/* ===========================================================================
   Origna · reset, fonts, type scale, layout, controls
   =========================================================================== */

/* --- fonts ---------------------------------------------------------------
   TRIAL fonts. WOFF2 conversion needs brotli, which was unavailable on the
   build machine, so the OTFs ship as-is (spec §4 permits this). Converting
   later is a drop-in replacement: same family names, same weights.
   See the licence warning in README.md before this page goes public.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Canela";
  src: url("../fonts/Canela-Light-Trial.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Canela";
  src: url("../fonts/Canela-Regular-Trial.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Canela";
  src: url("../fonts/Canela-RegularItalic-Trial.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Canela";
  src: url("../fonts/Canela-Medium-Trial.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntlTrial-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntlTrial-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* Fallback metrics, so swapping the real font in does not shift layout (CLS). */
@font-face {
  font-family: "Canela Fallback";
  src: local("Iowan Old Style"), local("Georgia"), local("Times New Roman");
  size-adjust: 103%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%;
}
@font-face {
  font-family: "Suisse Fallback";
  src: local("Helvetica Neue"), local("Arial");
  size-adjust: 99%; ascent-override: 95%; descent-override: 24%; line-gap-override: 0%;
}

/* --- reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--font-sans), "Suisse Fallback";
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
summary::-webkit-details-marker { display: none; }

/* Lenis needs this when smooth scroll is on; harmless otherwise. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* --- a11y ---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.skip {
  position: absolute; left: var(--s4); top: var(--s4);
  z-index: 200;
  padding: var(--s3) var(--s5);
  background: var(--primary); color: var(--cream);
  transform: translateY(-200%);
  transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }
.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --- layout -------------------------------------------------------------- */
.band {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--band-y);
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(8, 1fr); gap: 20px; }
}
@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(12, 1fr); gap: 24px; }
}

/* --- type ---------------------------------------------------------------- */
.display-xl, .display-l, .display-m, .quote {
  font-family: var(--font-display), "Canela Fallback";
  text-wrap: balance;
}
.display-xl { font-weight: 300; font-size: var(--t-display-xl); line-height: 1.04; letter-spacing: -.026em; }
.display-l  { font-weight: 300; font-size: var(--t-display-l);  line-height: 1.04; letter-spacing: -.026em; }
.display-m  { font-weight: 400; font-size: var(--t-display-m);  line-height: 1.1; letter-spacing: -.018em; }
.quote      { font-weight: 400; font-style: italic; font-size: var(--t-quote); line-height: 1.15; }
.body-l     { font-size: var(--t-body-l); line-height: 1.55; }
.eyebrow {
  font-size: var(--t-eyebrow); font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; line-height: 1;
  color: var(--accent);
}
.num {
  font-family: var(--font-display), "Canela Fallback";
  font-weight: 300; font-size: clamp(34px, 4.2vw, 60px); line-height: 1;
  letter-spacing: -.02em;
}
.tabular { font-variant-numeric: tabular-nums; }
.measure { max-width: 46ch; }
.hair { height: 1px; background: var(--hair); border: 0; }

/* --- controls ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s6);
  border-radius: var(--radius-pill);
  font-size: var(--t-button); font-weight: 500; letter-spacing: .02em;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out),
              border-color .25s var(--ease-out), transform .25s var(--ease-out);
  will-change: auto;
}
.btn--primary { background: var(--primary); color: var(--cream); }
.btn--primary:hover { background: #851B58; }
.btn--outline { border: 1px solid currentColor; color: var(--accent); }
.btn--outline:hover { background: var(--accent); color: var(--bg); }
.btn--cream { background: var(--cream); color: var(--primary); }
.btn--cream:hover { background: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 32px; padding: 0 var(--s4);
  border: 1px solid currentColor; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500; letter-spacing: .02em;
  color: var(--accent);
}
.chip {
  display: inline-flex; align-items: center;
  min-height: 28px; padding: 0 var(--s3);
  border: 1px solid var(--hair); border-radius: var(--radius-pill);
  font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg); opacity: .8;
}

/* Cards and panels are square, always (brand rule). */
.card, .panel, .tile {
  border-radius: var(--radius-card);
  background: var(--paper);
  border: 1px solid var(--hair);
}
.band-plum .card, .band-plum .tile,
.band-primary .card, .band-primary .tile { background: transparent; }

/* --- fields -------------------------------------------------------------- */
.field { display: grid; gap: var(--s2); }
.field label { font-size: 13px; font-weight: 500; letter-spacing: .02em; }
.field input, .field .select__btn {
  width: 100%; min-height: 48px; padding: 0 var(--s4);
  background: transparent; color: inherit;
  border: 1px solid var(--hair); border-radius: 0;
  transition: border-color .2s var(--ease-out);
}
.field input::placeholder { color: currentColor; opacity: .5; }
.field input:focus-visible, .field .select__btn:focus-visible { border-color: currentColor; }
.field__err { font-size: 13px; color: var(--primary); min-height: 0; }
.band-primary .field__err, .band-plum .field__err { color: var(--cream); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-inline { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-start; }
.form-inline .field { flex: 1 1 260px; }

/* --- reveal (only hidden when JS is on) ---------------------------------- */
html.js .reveal { opacity: 0; }
html.js .reveal--up { transform: translateY(32px); }

/* --- reading progress ---------------------------------------------------- */
.progress {
  position: fixed; inset: 0 0 auto 0; z-index: 150;
  height: 2px; background: var(--primary);
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* --- custom cursor (fine pointer only) ----------------------------------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 180;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: var(--primary); border-radius: 50%;
  pointer-events: none; opacity: 0;
  mix-blend-mode: normal;
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* --- marquee ------------------------------------------------------------- */
.marquee { overflow: hidden; }
.marquee__row { display: flex; width: max-content; will-change: transform; }
.marquee__row > * { flex: 0 0 auto; }

/* --- reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; }
  .progress, .cursor { display: none; }
  .marquee__row { transform: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- sprite --------------------------------------------------------------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { position: relative; z-index: 1; }

/* --- nothing decorative may widen the page ------------------------------- */
.band { overflow-x: clip; }
