/* ============================================================
   & Ko. — Design tokens (v2, Minimalist Retro Editorial)
   Palette + type per Kaye's supplied design system (2026-10-20).
   ============================================================ */
:root {
  /* ——— Colour (exact, per design-system card) ——— */
  --paper: #F7F0E4;        /* Warm Paper — dominant background */
  --ink: #302521;          /* Espresso Ink — primary text */
  --apricot: #E99220;      /* Apricot Orange — accent */
  --terra: #D94C2B;        /* Terracotta Red — CTAs + script */
  --teal: #286E6B;         /* Deep Teal — selected bg + accents */
  --rose: #E7B5B2;         /* Dusty Rose — supporting */
  --butter: #EEE7B4;       /* Butter Yellow — supporting */
  --sea: #83B8B6;          /* Sea Glass — supporting */

  /* Derived tints */
  --paper-deep: #EEE2CC;   /* hairlines + washes on paper */
  --ink-soft: rgba(48, 37, 33, 0.74);
  --ink-faint: rgba(48, 37, 33, 0.55);
  --terra-deep: #BC3B1F;   /* CTA hover */
  --teal-deep: #1F5956;

  /* ——— Type ——— */
  --font-display: "Libre Baskerville", Georgia, serif;
  --font-script: "Alex Brush", cursive;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --text-hero: clamp(2.85rem, 6vw, 5.3rem);
  --text-h1: clamp(2.5rem, 5vw, 4.4rem);
  --text-h2: clamp(2.1rem, 4.2vw, 3.6rem);
  --text-h3: clamp(1.35rem, 2.2vw, 1.75rem);
  --text-lede: clamp(1.13rem, 1.6vw, 1.3rem);
  --text-body: 1.05rem;
  --text-small: 0.9rem;
  --text-eyebrow: 0.78rem;
  --tracking-eyebrow: 0.32em;
  --leading-tight: 1.02;
  --leading-snug: 1.22;
  --leading-body: 1.65;

  /* ——— Space + shape ——— */
  --wrap: min(1240px, 92vw);
  --section-pad: clamp(4.5rem, 9vw, 8rem);
  --radius: 4px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;
  --shadow-warm: 0 30px 60px rgba(48, 37, 33, 0.16);
  --header-h: 84px;
}

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--terra); color: var(--paper); }

.wrap { width: var(--wrap); margin-inline: auto; }
.section { padding-block: var(--section-pad); position: relative; }

/* ——— Type utilities ——— */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  text-transform: none;
  color: var(--terra);
  font-size: 1.14em;
  letter-spacing: 0;
  display: inline-block;
  transform: rotate(-2deg);
  padding-inline: 0.04em;
}
.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.9rem;
}
.eyebrow::before {
  content: ""; width: 2.4rem; height: 2px; background: var(--terra); flex: none;
}
.lede { font-size: var(--text-lede); line-height: 1.55; }
.muted { color: var(--ink-soft); }

/* ——— Buttons + links ——— */
.btn {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--terra); color: var(--paper);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.9rem; border-radius: 999px; border: 1px solid var(--terra);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  will-change: transform;
}
.btn:hover, .btn:focus-visible {
  background: var(--terra-deep); border-color: var(--terra-deep);
  box-shadow: 0 14px 30px rgba(217, 76, 43, 0.28);
}
.btn .arr { transition: transform var(--dur) var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
/* Center single-label buttons exactly: letter-spacing adds a trailing
   space after the last glyph, which otherwise pulls the visible text
   ~1.4px left of the button's center. Removing that trailing space from
   the span's box re-centers the ink. Arrow buttons (span + .arr) are
   untouched: their span is not an only child. */
.btn span:only-child { margin-right: -0.22em; }
.btn-teal { background: var(--teal); border-color: var(--teal); }
.btn-teal:hover, .btn-teal:focus-visible { background: var(--teal-deep); border-color: var(--teal-deep); box-shadow: 0 14px 30px rgba(40, 110, 107, 0.3); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover, .btn-paper:focus-visible { background: var(--butter); border-color: var(--butter); color: var(--ink); box-shadow: 0 14px 30px rgba(0,0,0,0.25); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 0.35rem;
  transition: background-size var(--dur) var(--ease-out), color var(--dur);
}
.link-arrow:hover, .link-arrow:focus-visible { background-size: 100% 2px; color: var(--terra); }
.link-arrow .arr { transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ——— Reveal system ————————————————————————————————
   Content is VISIBLE by default. JS (anim.js) adds .pre to
   [data-reveal] elements only when animation is available,
   then removes it as they scroll in. No JS = no .pre = all
   content readable. A safety timeout in anim.js force-
   removes .pre near the viewport so nothing can stay hidden. */
html.anim [data-reveal] {
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
  transition-delay: var(--d, 0s);
}
html.anim [data-reveal].pre { opacity: 0; transform: translateY(36px); }

/* Masked lines (hero + big headings). Overflow mask is layout
   only — the inner line sits at its natural position unless
   GSAP sets a transform. No-JS = fully readable. */
.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line-in { display: block; will-change: transform; }

/* Photo frames */
.frame { overflow: hidden; position: relative; background: var(--paper-deep); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-parallax img { height: 116%; will-change: transform; }

/* Focus visibility */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
