/* =============================================================
   Rebel & Hart — pass 1 styles
   Plain CSS, no framework. Mobile first.
   Every color, font, spacing and rule width lives on :root.
   ============================================================= */

/* ---------- Fonts -------------------------------------------- */

/* Body: Be Vietnam Pro, three weights only (300 Light, 400 Regular, 600
   SemiBold). TTFs come from google/fonts (ofl/bevietnampro), subset to
   Latin with pyftsubset --flavor=woff2.
   Backup body face: Figtree (kept in /fonts but not loaded here). */
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/bevietnampro-light.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bevietnampro-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Be Vietnam Pro";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/bevietnampro-semibold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Display word: Bowlby One, subset to only the uppercase letters and
   digits used in .loud text plus the lowercase e/b/l for the wordmark
   "Rebel". If you add new display words, re-subset with the extra chars.
   Backup display face: Archivo Black (not currently loaded). */
@font-face {
  font-family: "Bowlby One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bowlbyone-subset.woff2") format("woff2");
}

/* ---------- Design tokens ------------------------------------ */

:root {
  /* Palette */
  --ink:     #161412;
  --cream:   #FBF5EA;
  --walnut:  #7A3F1F;
  --clay:    #E6B8AC;
  --signal:  #EE5A2E;
  --olive:   #5F6B34;

  /* Semantic */
  --bg:         var(--cream);
  --fg:         var(--ink);
  --muted:      color-mix(in oklab, var(--ink) 65%, var(--cream));
  --rule:       var(--ink);
  --accent:     var(--walnut);
  --on-clay:    var(--ink);
  --on-olive:   var(--cream);
  --on-signal:  var(--ink);

  /* Type */
  --font-body:    "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Bowlby One", "Be Vietnam Pro", "Archivo Black", Impact, system-ui, sans-serif;

  --fs-100: 0.75rem;   /* 12px — small caps / meta */
  --fs-200: 0.875rem;  /* 14px */
  --fs-300: 1rem;      /* 16px — body */
  --fs-400: 1.125rem;  /* 18px — lede */
  --fs-500: 1.375rem;  /* 22px — h3 */
  --fs-600: 1.75rem;   /* 28px — h2 mobile */
  --fs-700: 2.25rem;   /* 36px — h1 mobile / h2 desktop */
  --fs-800: 3.25rem;   /* 52px — h1 desktop */

  --lh-tight: 1.1;
  --lh-snug:  1.25;
  --lh-body:  1.55;

  --tracking-caps: 0.14em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  --gutter: 1rem;      /* 16px side gutter */
  --shell-max: 72rem;  /* 1152px */

  /* Rules */
  --rule-w: 1.5px;

  /* Motion */
  --dur: 180ms;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Dark theme: swap cream and ink; color blocks keep their hue. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:     var(--ink);
    --fg:     var(--cream);
    --muted:  color-mix(in oklab, var(--cream) 65%, var(--ink));
    --rule:   var(--cream);
    --accent: var(--clay);
  }
}

/* ---------- Reset-ish ---------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden; /* no horizontal page scroll, ever */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  font-weight: 400;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--space-4); line-height: var(--lh-tight); font-weight: 600; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Skip link ---------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
}
.skip:focus { left: var(--gutter); top: var(--gutter); }

/* ---------- Shell / layout primitives ------------------------ */

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-7);
  border-top: var(--rule-w) solid var(--rule);
}
.section:first-of-type { border-top: 0; }

/* Split panel: stacked on phones, two-column on desktop. */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 48rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
}

/* ---------- Header ------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: var(--rule-w) solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
  flex-wrap: wrap;
}
.site-nav {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-100);
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

@media (min-width: 30rem) {
  .site-nav { gap: var(--space-5); font-size: var(--fs-200); }
  .site-nav a { letter-spacing: var(--tracking-caps); }
}

/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-500);
  line-height: 1;
}
.wordmark__loud {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.005em;
  font-size: 0.95em;            /* Bowlby's cap-height pushes this up visually */
  line-height: 1;
}
.wordmark__thin { font-weight: 400; }

/* Ampersand container: two SVGs stacked; hand-drawn ampersand at rest,
   duck on hover/focus. Aspect ratio roughly matches the hand drawing. */
.wordmark__amp {
  position: relative;
  display: inline-block;
  width: 1.4rem;
  height: 1.55rem;
  color: var(--accent);
  vertical-align: -0.2em;
}
.wordmark__amp .amp {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity var(--dur) var(--ease);
}
.wordmark__amp .amp--duck {
  opacity: 0;
  transform: scale(0.85);           /* duck sits visually smaller inside the amp slot */
  transform-origin: center;
}
.wordmark:hover .amp--rest,
.wordmark:focus-visible .amp--rest { opacity: 0; }
.wordmark:hover .amp--duck,
.wordmark:focus-visible .amp--duck { opacity: 1; }

/* ---------- Buttons ------------------------------------------ */

.btn {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border: var(--rule-w) solid var(--rule);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn--primary {
  background: var(--fg);
  color: var(--bg);
}
.btn--primary:hover { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
}
.btn--ghost:hover { background: var(--fg); color: var(--bg); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* ---------- Type helpers ------------------------------------- */

.headline {
  font-size: var(--fs-700);
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  font-weight: 600;
  margin-bottom: var(--space-5);
}
@media (min-width: 48rem) {
  .headline { font-size: var(--fs-800); }
}

.section-title {
  font-size: var(--fs-600);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
  max-width: 24ch;
}
@media (min-width: 48rem) {
  .section-title { font-size: var(--fs-700); }
}
.section-title--sub {
  font-size: var(--fs-500);
  margin-top: var(--space-7);
  margin-bottom: var(--space-5);
}

.loud {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 0.9em;              /* Bowlby One has a tall x-height; shrink to match the thin words beside it */
  line-height: 0.95;             /* keep the loud span from growing the parent line */
  text-transform: uppercase;     /* write the span lowercase in HTML so screen readers say the word, not the letters */
  vertical-align: baseline;
}

.lede {
  font-size: var(--fs-400);
  max-width: 48ch;
}

.section-lede {
  font-size: var(--fs-400);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--fs-100);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.smallcaps {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: var(--fs-100);
  font-weight: 600;
}

.placeholder {
  font-style: italic;
  color: var(--muted);
}

.link { color: var(--accent); }

/* ---------- Hero --------------------------------------------- */

.hero { padding-block: var(--space-8) var(--space-7); }
.hero__art { color: var(--fg); }
@media (min-width: 48rem) {
  .hero { padding-block: var(--space-9) var(--space-8); }
}

/* Animated mini-golf hero. The SVG has its own internal <style> with
   the state machine; what we style here is only the toggle plumbing
   and the replay button under the illustration. */
.golf-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.golf-art svg { width: 100%; height: auto; display: block; }

/* Visually hidden but keyboard-reachable. The split's grid has an odd
   child count now; absolute positioning keeps the checkbox from
   consuming a grid cell. */
.golf-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.golf-btn {
  cursor: pointer;
  font-size: var(--fs-100);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border: var(--rule-w) solid var(--olive);
  color: var(--olive);
  border-radius: 999px;
  user-select: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.golf-btn:hover { background: var(--olive); color: var(--cream); }
.golf-toggle:focus-visible ~ .golf-art .golf-btn {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
.golf-btn .again { display: none; }
.golf-toggle:checked ~ .golf-art .golf-btn .play { display: none; }
.golf-toggle:checked ~ .golf-art .golf-btn .again { display: inline; }
.golf-toggle:checked ~ .golf-art .golf-btn {
  border-color: var(--fg);
  color: var(--fg);
}
.golf-toggle:checked ~ .golf-art .golf-btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- The problem + entry moments ---------------------- */

.problem__body { max-width: 62ch; margin-bottom: var(--space-6); }
.problem__body p { font-size: var(--fs-400); }

.entry__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 48rem) {
  .entry__grid { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
}

.entry__card {
  border: var(--rule-w) solid var(--rule);
  padding: var(--space-5);
  background: var(--bg);
  position: relative;
}

/* Hide the radio input but keep it reachable by keyboard */
.entry__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.entry__label {
  display: block;
  cursor: pointer;
  user-select: none;
}

/* Cover art for the two entry cards that have a Kristin drawing.
   SVG variants carry their own inline <style> for light/dark theming
   via prefers-color-scheme (see entry-moment-*.svg).
   Raster (PNG) variants get the --raster modifier and we theme them
   with a CSS filter in dark mode. */
.entry__art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-4);
  /* soft divider between the illustration and the quote */
  border-bottom: var(--rule-w) solid color-mix(in oklab, var(--rule) 20%, transparent);
  padding-bottom: var(--space-4);
}

/* All four entry-card illustrations are now SVG; each one carries its
   own prefers-color-scheme block inside the file. No raster-mode
   filter needed anymore. */
.entry__quote {
  display: block;
  font-size: var(--fs-500);
  line-height: var(--lh-snug);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.entry__who {
  display: block;
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--muted);
}

/* Hidden by default; shown when the card's radio is checked. */
.entry__reveal {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease), margin-top var(--dur) var(--ease);
  margin-top: 0;
}
.entry__radio:checked ~ .entry__reveal {
  max-height: 20rem;
  opacity: 1;
  margin-top: var(--space-4);
}

/* Visible focus on the (hidden) radio reaches the card */
.entry__radio:focus-visible ~ .entry__label {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

/* Chosen-card accent rule */
.entry__radio:checked ~ .entry__label .entry__quote { color: var(--accent); }
.entry__card:has(.entry__radio:checked) { background: color-mix(in oklab, var(--clay) 20%, var(--bg)); }

/* ---------- Work: four-step arc + three offers --------------- */

.arc {
  list-style: none;
  margin: 0 0 var(--space-7);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: var(--rule-w) solid var(--rule);
}
@media (min-width: 48rem) {
  .arc { grid-template-columns: repeat(4, 1fr); }
}
.arc__step {
  padding: var(--space-5);
  border-top: var(--rule-w) solid var(--rule);
}
.arc__step:first-child { border-top: 0; }
@media (min-width: 48rem) {
  .arc__step { border-top: 0; border-left: var(--rule-w) solid var(--rule); }
  .arc__step:first-child { border-left: 0; }
}
.arc__num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-500);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.arc__title {
  font-size: var(--fs-500);
  margin-bottom: var(--space-2);
}

/* Offers: three boxed cards, one color block each */
.offers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 48rem) {
  .offers { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}
.offer {
  border: var(--rule-w) solid var(--rule);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.offer__title { font-size: var(--fs-500); margin: 0; }
.offer__body { flex: 1; }
.offer__meta {
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.offer__meta span { opacity: 0.7; margin-right: 0.25em; }

.offer--clay   { background: var(--clay);   color: var(--on-clay); }
.offer--olive  { background: var(--olive);  color: var(--on-olive); }
.offer--signal { background: var(--signal); color: var(--on-signal); }

/* Color blocks keep their hue in dark mode — no overrides needed. */

/* ---------- Bringing in AI ----------------------------------- */

.section--ai { background: color-mix(in oklab, var(--olive) 14%, var(--bg)); }
.ai__art { color: var(--rule); opacity: 0.7; }

/* ---------- Proof / case notes ------------------------------- */

.cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 40rem) {
  .cases { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 64rem) {
  .cases { grid-template-columns: repeat(3, 1fr); }
}
.case {
  border: var(--rule-w) solid var(--rule);
  padding: var(--space-5);
}
.case__title {
  font-size: var(--fs-500);
  margin-bottom: var(--space-3);
}
.case--extra { background: color-mix(in oklab, var(--clay) 35%, var(--bg)); }

/* ---------- Pause: torch-in-the-woods --------------------------
   Headline sits above the illustration; a supporting line hides
   until the visitor "brings a light" (the SVG's checkbox toggle).
   Mirrors the hero golf pattern: inline SVG, pure-CSS state,
   reduced-motion handled inside the SVG's own <style>. */

.section--pause { padding-block: var(--space-7); text-align: center; }
.pause__line {
  font-size: var(--fs-600);
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin: 0 auto;
  font-weight: 600;
}
@media (min-width: 48rem) {
  .pause__line { font-size: var(--fs-700); }
}
.pause__sub {
  max-width: 44ch;
  margin: var(--space-4) auto 0;
  font-size: var(--fs-400);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .3s;
}
.torch-toggle:checked ~ .pause__sub {
  opacity: 1;
  transform: none;
  transition: opacity .8s 2.9s, transform .8s 2.9s;
}
@media (prefers-reduced-motion: reduce) {
  .pause__sub { transition: none !important; opacity: 1; transform: none; }
}

.torch-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  color: var(--fg);
}
.torch-art svg { width: 100%; height: auto; display: block; }

.torch-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.torch-btn {
  cursor: pointer;
  font-size: var(--fs-100);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border: var(--rule-w) solid var(--olive);
  color: var(--olive);
  border-radius: 999px;
  user-select: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.torch-btn:hover { background: var(--olive); color: var(--cream); }
.torch-toggle:focus-visible ~ .torch-art .torch-btn {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}
.torch-btn .again { display: none; }
.torch-toggle:checked ~ .torch-art .torch-btn .play { display: none; }
.torch-toggle:checked ~ .torch-art .torch-btn .again { display: inline; }
.torch-toggle:checked ~ .torch-art .torch-btn {
  border-color: var(--fg);
  color: var(--fg);
}
.torch-toggle:checked ~ .torch-art .torch-btn:hover { background: var(--fg); color: var(--bg); }

/* ---------- About -------------------------------------------- */

.about__photo { color: var(--rule); opacity: 0.7; }

/* ---------- Contact ------------------------------------------ */

.contact__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
}
.contact__list li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
@media (min-width: 40rem) {
  .contact__list li {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-4);
  }
}
.contact__link {
  font-size: var(--fs-500);
  font-weight: 600;
  color: var(--accent);
  word-break: break-word;
}
.contact__note {
  font-size: var(--fs-100);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--muted);
}

/* ---------- Footer ------------------------------------------- */

.site-footer {
  border-top: var(--rule-w) solid var(--rule);
  padding-block: var(--space-6);
  margin-top: var(--space-7);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
@media (min-width: 48rem) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.site-footer__email a { color: var(--accent); }

.site-footer__credits {
  margin-top: var(--space-5);
  font-size: var(--fs-100);
  color: var(--muted);
}
.site-footer__credits a { color: inherit; }
.site-footer__credits p { margin: 0; }

/* ---------- Dark-mode art tweaks ----------------------------- */

@media (prefers-color-scheme: dark) {
  .entry__card:has(.entry__radio:checked) { background: color-mix(in oklab, var(--clay) 18%, var(--bg)); }
  .section--ai { background: color-mix(in oklab, var(--olive) 18%, var(--bg)); }
  .case--extra { background: color-mix(in oklab, var(--clay) 25%, var(--bg)); }
}
