/* ATELIER LOGGIA — Base: fonts, variables, reset, utilities */
/* =========================================================
   ATELIER LOGGIA — Main Stylesheet
   ========================================================= */

/* 1. Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

/* 2. CSS Custom Properties */
:root {
  --color-primary:    #1A1A1A;
  --color-secondary:  #666666;
  --color-bg:         #FFFFFF;
  --color-bg-subtle:  #F7F7F7;
  --color-border:     #E0E0E0;
  --color-accent:     #B8956A;
  --color-accent-light: #F5EDE0;
  --color-white:      #FFFFFF;
  --color-error:      #C0392B;
  --color-success:    #27AE60;
  --color-primary-soft: #333333;
  --color-accent-hover: #A07B56;
  --color-accent-tint: #F0EAE0;

  --font-heading: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, sans-serif;

  --body-size:    17px;
  --line-height:  1.65;

  --section-pad-v:        64px;
  --section-pad-v-mobile: 40px;
  --max-width:            1100px;
  --max-width-narrow:     800px;

  --radius: 4px;
  --transition: 0.3s ease;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);

  --header-height: 80px;
}

/* 3. CSS Reset / Normalize */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--body-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: #100F0C;
  overflow-x: hidden; /* prevent horizontal scroll from any overflowing child */
}

body.body--menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--line-height);
  color: var(--color-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

/* <picture> is transparent to layout — existing .foo img selectors keep working */
picture {
  display: contents;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* 4. Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow {
  max-width: var(--max-width-narrow);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: var(--section-pad-v);
}

.section--subtle { background-color: var(--color-bg-subtle); }
.section--prose  { padding-block: 44px; }

/* Adjacent same-bg sections: reduce double gap */
.section--subtle + .section--subtle {
  padding-top: 32px;
}
.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.section__header {
  margin-bottom: 28px;
}

.section__header h2 {
  margin-bottom: 12px;
}

.section__header p {
  color: var(--color-secondary);
  font-size: 1.05rem;
}

.section--dark .section__header p {
  color: rgba(255,255,255,0.7);
}

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}
