/* =========================================================
   ELOISE — Design System v1
   Voice: calm, confident, studio-grade. Few colours, lots of air.
   Fonts: Instrument Serif (display) + Manrope (body/UI).
   ========================================================= */

:root {
  /* ---------- Colour ---------- */
  --c-bg:        #F6F3EE;   /* warm off-white page */
  --c-surface:   #FFFFFF;   /* cards, form fields */
  --c-sunken:    #EEE9E1;   /* alt bands */
  --c-ink:       #141414;   /* primary text */
  --c-ink-2:     #4A4744;   /* secondary text (7.9:1 on bg) */
  --c-ink-3:     #77726C;   /* captions, meta (4.6:1 on bg) */
  --c-line:      #E2DCD2;   /* hairlines */
  --c-line-2:    #CFC7BA;   /* stronger borders, inputs */
  --c-accent:    #8A5A2B;   /* bronze — primary actions only (6.3:1 vs white) */
  --c-accent-hover: #73481F;
  --c-accent-soft:  #F1E6D8;/* accent tint for highlights */
  --c-champagne: #C9B79C;   /* brand detail (never text) */
  --c-success:   #2F6B45;
  --c-error:     #A33A2B;
  --c-focus:     #8A5A2B;

  /* ---------- Typography ---------- */
  --f-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --f-body:    "Manrope", "Segoe UI", system-ui, sans-serif;

  /* Fluid scale (≈1.25 ratio, mobile → desktop) */
  --fs-xs:   0.8125rem;                           /* 13px  meta */
  --fs-sm:   0.9375rem;                           /* 15px  UI */
  --fs-base: 1.0625rem;                           /* 17px  body */
  --fs-lg:   clamp(1.125rem, 1rem + .4vw, 1.3125rem);   /* lead */
  --fs-h3:   clamp(1.375rem, 1.2rem + .6vw, 1.75rem);
  --fs-h2:   clamp(2.25rem, 1.7rem + 2vw, 3.5rem);
  --fs-h1:   clamp(2.875rem, 1.9rem + 4.2vw, 5.75rem);

  --lh-tight: 1.02;
  --lh-snug:  1.2;
  --lh-body:  1.6;
  --ls-display: -0.015em;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;

  /* ---------- Spacing (4px base) ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;
  --section-y: clamp(72px, 10vw, 140px);
  --gutter: clamp(20px, 4vw, 40px);

  /* ---------- Layout ---------- */
  --container: 1240px;
  --cols: 12;
  --col-gap: clamp(16px, 2vw, 24px);
  --nav-h: 72px;

  /* ---------- Radius ---------- */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* ---------- Shadow (soft, warm) ---------- */
  --sh-1: 0 1px 2px rgba(40, 30, 20, .06);
  --sh-2: 0 6px 24px -8px rgba(40, 30, 20, .12), 0 2px 6px rgba(40, 30, 20, .05);
  --sh-3: 0 30px 80px -30px rgba(40, 30, 20, .28), 0 8px 24px -12px rgba(40, 30, 20, .12);

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 700ms;

  /* ---------- Breakpoints (reference; used in media queries) ----------
     --bp-sm: 600px  phones → large phones
     --bp-md: 900px  tablets
     --bp-lg: 1200px desktop
  */
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--c-bg); color: var(--c-ink);
  font: var(--fw-regular) var(--fs-base)/var(--lh-body) var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: var(--fw-regular); }
p { margin: 0; }

/* ---------- Type roles ---------- */
.t-display { font-family: var(--f-display); font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: var(--ls-display); text-wrap: balance; }
.t-h2 { font-family: var(--f-display); font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--ls-display); text-wrap: balance; }
.t-h3 { font-family: var(--f-body); font-size: var(--fs-h3); font-weight: var(--fw-semi); line-height: var(--lh-snug); letter-spacing: -0.01em; }
.t-lead { font-size: var(--fs-lg); color: var(--c-ink-2); max-width: 34em; }
.t-meta { font-size: var(--fs-xs); color: var(--c-ink-3); }
.t-label { font-size: var(--fs-sm); font-weight: var(--fw-semi); color: var(--c-ink-2); }
.italic { font-style: italic; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); }
.section { padding-block: var(--section-y); }

/* ---------- Buttons ---------- */
.btn {
  --_bg: transparent; --_fg: var(--c-ink); --_bd: var(--c-line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  border: 1px solid var(--_bd); background: var(--_bg); color: var(--_fg);
  font: var(--fw-semi) var(--fs-sm)/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: background var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { --_bd: var(--c-ink); }
.btn:active { transform: translateY(1px); }
.btn .arrow { transition: transform var(--t-base) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--primary { --_bg: var(--c-accent); --_fg: #fff; --_bd: var(--c-accent); box-shadow: var(--sh-1); }
.btn--primary:hover { --_bg: var(--c-accent-hover); --_bd: var(--c-accent-hover); box-shadow: var(--sh-2); }
.btn--sm { min-height: 40px; padding: 0 18px; }

/* ---------- Focus ---------- */
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: var(--r-sm); }
.btn:focus-visible { border-radius: var(--r-pill); }

/* ---------- Cards ---------- */
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--sh-1); }

/* ---------- Form fields ---------- */
.field { display: grid; gap: var(--s-2); }
.input {
  min-height: 48px; padding: 12px 16px; border: 1px solid var(--c-line-2); border-radius: var(--r-md);
  background: var(--c-surface); color: var(--c-ink); font: 16px/1.4 var(--f-body);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.input[aria-invalid="true"] { border-color: var(--c-error); }

/* ---------- Placeholder marker (for content awaiting real data) ---------- */
.ph { display: inline-block; font-size: 11px; font-weight: var(--fw-semi); color: var(--c-ink-3); border: 1px dashed var(--c-line-2); border-radius: var(--r-pill); padding: 2px 8px; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: var(--r-md); }
.skip:focus { top: 12px; }
