/* ============================================================
   Reset + Base + Typography
   Aesthetic: Lifestyle editorial · Warm minimalist
   Display: Cormorant Garamond  ·  Body: DM Sans  ·  Mono: DM Mono
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;             /* 1rem baseline per design system */
  line-height: 1.75;
  font-weight: 400;
  color: var(--text-body);
  background: var(--bg-main);  /* warm cream #FBF5EE — never pure white */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--text-heading);
  text-decoration: none;
  transition: color var(--t-fast);
  cursor: pointer;
}
a:hover { color: var(--primary); }

button { font-family: inherit; cursor: pointer; }

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0 0 1em; max-width: 65ch; }

/* Editorial headings — Cormorant Garamond, light weight on H1 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  margin: 0 0 .6em;
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-weight: 400;
}

h1 {
  font-size: clamp(56px, 7vw + 1rem, 104px);
  line-height: 1.02;
  font-weight: 300;             /* editorial light H1 */
  letter-spacing: -0.02em;
}
h1 em, h1 .ital {
  font-style: italic;
  font-weight: 400;
  color: var(--primary);
}
h2 {
  font-size: clamp(32px, 3vw + 1rem, 56px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.012em;
}
h2 em, h2 .ital {
  font-style: italic;
  color: var(--primary);
}
h3 {
  font-size: clamp(22px, 1vw + 1rem, 28px);
  line-height: 1.2;
  font-weight: 600;
}
h4 {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary, var(--text-body));
}
h5 { font-size: 16px; font-weight: 600; }

/* Eyebrow / monospaced label */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: .75rem;
}

.section-title {
  text-align: center;
  margin-bottom: .35em;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 16px;
  line-height: 1.6;
}

.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-display { font-family: var(--font-display); font-weight: 400; }

::selection { background: var(--primary); color: var(--bg-main); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--text-heading);
  color: var(--bg-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-family: var(--font-body);
  font-size: 13px;
}
.skip-link:focus { top: 8px; color: var(--bg-main); }

/* Container (1280px max, centred) */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* Section spacing (8px grid: 96px / 64px) */
.section { padding: 112px 0; position: relative; }
.section.tight { padding: 72px 0; }
.section.alt {
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 166, 35, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(196, 98, 45, 0.05) 0%, transparent 50%),
    var(--bg-alt);
}
/* Bright variant — warm cream with a subtle terracotta + gold wash */
.section.bright {
  background:
    radial-gradient(circle at 95% 5%,  rgba(245, 166, 35, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 5% 95%,  rgba(196, 98, 45, 0.08)  0%, transparent 40%),
    var(--bg-main);
}
.section-dark {
  background: linear-gradient(135deg, #1C0F0A 0%, #3A1E13 60%, #C4622D 100%);
  color: var(--text-on-dark);
}
.section-dark p  { color: rgba(251, 245, 238, 0.7); }
.section-dark h1,
.section-dark h2,
.section-dark h3 { color: var(--text-on-dark); }

/* Eyebrow + section title — when revealed, draw a short terracotta line below
   the title for a "scene change" punctuation moment. */
.section h2 {
  position: relative;
  padding-bottom: 14px;
}
.section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 700ms cubic-bezier(.2, .8, .2, 1) 200ms;
}
.section .section-head[style*="text-align:center"] h2::after,
.section [style*="text-align: center"] h2::after,
.section [style*="justify-content:center"] h2::after,
.section [style*="justify-content: center"] h2::after {
  left: 50%;
  transform: translateX(-50%);
}
.section h2.is-visible::after,
[data-reveal].is-visible h2::after {
  width: 56px;
}

@media (max-width: 767px) {
  .section { padding: 64px 0; }
  .section.tight { padding: 48px 0; }
  body { font-size: 15px; }
}

/* ============================================================
   Scroll-triggered reveals
   Elements get [data-reveal] via JS on mount. The CSS handles
   the entrance choreography; the IntersectionObserver flips the
   class. Direction variants supported via [data-reveal="left"] etc.
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 700ms cubic-bezier(.2, .8, .2, 1),
              transform 700ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform, opacity;
}
[data-reveal="left"]  { transform: translate3d(-28px, 0, 0); }
[data-reveal="right"] { transform: translate3d( 28px, 0, 0); }
[data-reveal="zoom"]  { transform: scale(0.96); }
[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}
/* Stagger children when parent has [data-reveal-stagger] */
[data-reveal-stagger] [data-reveal]:nth-child(1) { transition-delay:  40ms; }
[data-reveal-stagger] [data-reveal]:nth-child(2) { transition-delay: 120ms; }
[data-reveal-stagger] [data-reveal]:nth-child(3) { transition-delay: 200ms; }
[data-reveal-stagger] [data-reveal]:nth-child(4) { transition-delay: 280ms; }
[data-reveal-stagger] [data-reveal]:nth-child(5) { transition-delay: 360ms; }
[data-reveal-stagger] [data-reveal]:nth-child(6) { transition-delay: 440ms; }

/* Honour prefers-reduced-motion (also handled in :root via variables) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
