/* ============================================================
   HER LONG GAME — hlg.css
   Single shared stylesheet for the marketing website [WEB].
   Canonical source: DESIGN.md v6.0.

   This file is the one place global tokens and shared components
   (nav, footer, buttons, forms, cards, surfaces, type) are defined.
   Every page links this FIRST, then adds only page-specific styles.
   Do not redefine these tokens per page. If a value must change,
   it changes here.

   Fonts (load once per page, in <head>, before this file):
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">
   ============================================================ */

/* ----------------------------------------------------------
   1. TOKENS  (DESIGN.md v6.0)
---------------------------------------------------------- */
:root {
  /* Brand — primary */
  --sage-deep: #5C7A62;
  --sage:      #7A9279;
  --sage-mid:  #8A9E8D;
  --gold:      #B8923A;
  --cream:     #F7F5F0;

  /* Brand — supporting */
  --orange:     #D4621A;
  --orange-dark:#B8501A;
  --rose:       #C4756A;

  /* Statement + ink */
  --night: #161E17;
  --ink:   #161E17;

  /* Derived surfaces */
  --cream-warm:     #F2EFE8;
  --cream-elevated: #FFFDF9;
  --sage-tint:      rgba(92,122,98,0.12);
  --rose-tint:      #F4E1DC;
  --gold-tint:      #F2E9D2;
  --sage-wash:      #E8EEE7;

  /* Semantic */
  --error:   #C45A3A;
  --success: #5C7A62;
  --warning: #B8923A;
  --focus:   #5C7A62;

  /* Text roles */
  --text:              #161E17;
  --text-muted:        rgba(22,30,23,0.65);
  --text-on-dark:      rgba(247,245,240,0.88);
  --text-on-dark-soft: rgba(247,245,240,0.62);

  /* Type scale */
  --fs-micro:         0.625rem;
  --fs-label:         0.72rem;
  --fs-small:         0.85rem;
  --fs-body:          0.95rem;
  --fs-body-lg:       1rem;
  --fs-callout:       clamp(1.05rem, 2vw, 1.2rem);
  --fs-card-title:    clamp(1rem, 1.8vw, 1.1rem);
  --fs-subtitle:      1.35rem;
  --fs-h2:            clamp(1.25rem, 2.5vw, 1.5rem);
  --fs-section-title: clamp(1.65rem, 4.5vw, 3.2rem);
  --fs-feature-title: clamp(1.95rem, 5vw, 3.6rem);
  --fs-hero-title:    clamp(2.1rem, 6.5vw, 4.8rem);

  /* Line-heights */
  --lh-display: 1.08;
  --lh-heading: 1.18;
  --lh-body:    1.55;
  --lh-tight:   1.3;

  /* Spacing scale (8px base) */
  --space-1: 0.25rem; --space-2: 0.5rem;  --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;    --space-12: 3rem;   --space-16: 4rem;
  --space-24: 6rem;
  --section-gap: clamp(4rem, 8vw, 8rem);
  --container:        1280px;
  --container-narrow: 760px;

  /* Radius */
  --r-card:   0.75rem; --r-button: 0.5rem;  --r-input:  0.5rem;
  --r-badge:  1.25rem; --r-tag:    0.375rem; --r-pill:   999px;
  --r-panel:  1.25rem;

  /* Elevation */
  --shadow-card:  0 2px 12px rgba(92,122,98,0.06);
  --shadow-hover: 0 6px 20px rgba(92,122,98,0.12);
  --shadow-float: 0 24px 80px rgba(92,122,98,0.18);

  /* z-index */
  --z-base: 0; --z-raised: 10; --z-sticky: 100; --z-overlay: 200; --z-modal: 300; --z-toast: 400;

  /* Motion */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms; --dur-base: 300ms; --dur-entry: 420ms;
}

/* ----------------------------------------------------------
   2. RESET + BASE
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

::selection { background: rgba(184,146,58,0.25); color: var(--ink); }

.tnum, .stat-num, .num { font-feature-settings: 'tnum' 1; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------
   3. ACCESSIBILITY
---------------------------------------------------------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
  background: var(--sage-deep); color: var(--cream);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--r-button) 0;
  font-size: var(--fs-small); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------
   4. LAYOUT
---------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .container { padding-inline: 2rem; } }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-gap); position: relative; }
.section--flush-top { padding-top: 0; }

/* ----------------------------------------------------------
   5. TYPOGRAPHY
---------------------------------------------------------- */
.display, .h1, .h2, .h3 { font-family: 'Playfair Display', Georgia, serif; }

.hero-title {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: var(--fs-hero-title); line-height: var(--lh-display); letter-spacing: -0.025em;
}
.feature-title {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: var(--fs-feature-title); line-height: var(--lh-display); letter-spacing: -0.02em;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 700;
  font-size: var(--fs-section-title); line-height: var(--lh-display);
  letter-spacing: -0.01em; color: var(--sage-deep);
}

.ital { font-style: italic; font-weight: 400; }
.hero-title .ital, .feature-title .ital { color: var(--gold); }

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.eyebrow--rule::before { content: ''; width: 24px; height: 1px; background: currentColor; display: block; }
.eyebrow--orange { color: var(--orange); }

.lede { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--text-muted); max-width: 60ch; }
.muted { color: var(--text-muted); }
.pull-quote {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: var(--fs-callout); line-height: var(--lh-heading); color: var(--ink);
}

/* ----------------------------------------------------------
   6. SURFACE LADDER
---------------------------------------------------------- */
.surface-cream     { background: var(--cream); color: var(--text); }
.surface-warm      { background: var(--rose-tint); color: var(--ink); }
.surface-sage      { background: var(--sage-deep); color: var(--cream); }
.surface-statement { background: var(--night); color: var(--cream); }

.surface-sage .section-title,
.surface-statement .section-title { color: var(--cream); }
.surface-sage .eyebrow,
.surface-statement .eyebrow { color: var(--gold); }
.surface-sage p { color: var(--text-on-dark); }

.callout-warm {
  background: var(--rose-tint); color: var(--ink);
  border-radius: var(--r-card); padding: 1.5rem 1.75rem;
}

/* ----------------------------------------------------------
   7. BUTTONS
---------------------------------------------------------- */
.btn {
  --btn-bg: var(--sage-deep);
  --btn-fg: var(--cream);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'DM Sans', sans-serif; font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  padding: 0.85rem 1.75rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid transparent; border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(92,122,98,0.25); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--primary   { --btn-bg: var(--sage-deep); --btn-fg: var(--cream); }
.btn--primary:hover { background: #4d6753; }
.btn--secondary { --btn-bg: var(--orange); --btn-fg: var(--cream); }
.btn--secondary:hover { background: var(--orange-dark); box-shadow: 0 6px 18px rgba(212,98,26,0.25); }
.btn--ghost     { --btn-bg: transparent; --btn-fg: var(--sage-deep); border-color: var(--sage-deep); }
.btn--ghost:hover { background: rgba(92,122,98,0.08); box-shadow: none; }
.btn--on-dark   { --btn-bg: var(--cream); --btn-fg: var(--sage-deep); }
.btn--on-dark:hover { background: #fffdf9; box-shadow: 0 6px 22px rgba(0,0,0,0.18); }
.btn--ghost-on-dark { --btn-bg: transparent; --btn-fg: var(--cream); border-color: rgba(247,245,240,0.55); }
.btn--ghost-on-dark:hover { background: rgba(247,245,240,0.10); box-shadow: none; }

.btn--sm { padding: 0.55rem 1.1rem; font-size: var(--fs-micro); }
.btn--lg { padding: 1rem 2.25rem; font-size: var(--fs-small); }
.btn--block { display: flex; width: 100%; }

.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--btn-fg); animation: hlg-spin 0.7s linear infinite;
}
@keyframes hlg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::after { animation-duration: 1.4s; } }

/* ----------------------------------------------------------
   8. NAV
---------------------------------------------------------- */
nav#nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-overlay);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  transition: background var(--dur-base), box-shadow var(--dur-base);
}
@media (min-width: 768px) { nav#nav { padding: 1.1rem 2rem; } }

nav#nav.scrolled {
  background: rgba(247,245,240,0.94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 rgba(92,122,98,0.10);
}

.nav-logo { display: flex; align-items: center; text-decoration: none; color: var(--cream); }
.nav-logo-img { height: 34px; }
.nav-logo-img svg { height: 100%; width: auto; fill: currentColor; display: block; transition: fill var(--dur-base); }
/* Simple pre-upgrade header nav (pages hlg.js upgrades): size the logo so it does
   not flash at the SVG's intrinsic size before the script swaps the nav in. */
.logo-img { height: 32px; width: auto; display: block; }
nav#nav.scrolled .nav-logo { color: var(--sage-deep); }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(247,245,240,0.90); text-decoration: none; transition: color var(--dur-fast);
}
.nav-link:hover { color: var(--cream); }
nav#nav.scrolled .nav-link { color: var(--text-muted); }
nav#nav.scrolled .nav-link:hover { color: var(--sage-deep); }

/* Nav CTA — Horizon Orange per founder decision */
.nav-cta {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cream); background: var(--orange);
  padding: 0.6rem 1.25rem; border-radius: var(--r-pill); text-decoration: none;
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.nav-cta:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(212,98,26,0.25); }
nav#nav.scrolled .nav-cta { background: var(--orange); color: var(--cream); }
nav#nav.scrolled .nav-cta:hover { background: var(--orange-dark); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--cream);
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: currentColor;
  transition: transform var(--dur-fast), opacity var(--dur-fast);
}
nav#nav.scrolled .nav-hamburger { color: var(--sage-deep); }

/* Mobile drawer — slide in from right */
.nav-drawer {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease);
  visibility: hidden;
  padding: env(safe-area-inset-top, 5rem) 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0rem));
}
.nav-drawer.open { transform: translateX(0); visibility: visible; }

.nav-drawer-link {
  font-family: 'Playfair Display', serif; font-size: 1.6rem;
  color: var(--sage-deep); text-decoration: none;
  transition: color var(--dur-fast);
}
.nav-drawer-link:hover { color: var(--gold); }

.nav-drawer-close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top, 0rem)); right: 1.25rem;
  background: transparent; border: 0; font-size: 1.4rem;
  color: var(--sage-deep); cursor: pointer; line-height: 1;
}
.nav-drawer-cta { margin-top: 0.5rem; }

@media (max-width: 767px) {
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
}

/* Subpages without dark hero */
nav#nav.nav--solid {
  background: rgba(247,245,240,0.96);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  box-shadow: 0 1px 0 rgba(92,122,98,0.10);
}
nav#nav.nav--solid .nav-logo { color: var(--sage-deep); }
nav#nav.nav--solid .nav-link { color: var(--text-muted); }
nav#nav.nav--solid .nav-link:hover { color: var(--sage-deep); }
nav#nav.nav--solid .nav-hamburger { color: var(--sage-deep); }
body.hlg-nav-pad { padding-top: 4.25rem; }

/* ----------------------------------------------------------
   9. FORMS
---------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
}
.input,
input[type="text"].input,
input[type="email"].input,
textarea.input,
select.input {
  background: var(--cream-warm);
  border: 1.5px solid rgba(92,122,98,0.35);
  border-radius: var(--r-input);
  padding: 0.8rem 1rem;
  font-family: 'DM Sans', sans-serif; font-size: var(--fs-body); color: var(--sage-deep);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input::placeholder { color: var(--sage-mid); }
.input:focus { outline: none; border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(92,122,98,0.18); }
.input.is-error, .input[aria-invalid="true"] { border-color: var(--error); }
.input.is-success { border-color: var(--sage-deep); }
.field-error { font-size: var(--fs-small); color: var(--error); }

/* ----------------------------------------------------------
   10. CARDS
---------------------------------------------------------- */
.card {
  background: var(--cream); border: 1px solid var(--sage-tint);
  border-radius: var(--r-card); padding: 1.25rem 1.5rem;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast);
}
.card--elevated { background: var(--cream-elevated); box-shadow: var(--shadow-card); }
.card--interactive { cursor: pointer; }
.card--interactive:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: rgba(92,122,98,0.2); }
.card-title { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: var(--fs-card-title); color: var(--sage-deep); }
.card-title--editorial { font-family: 'Playfair Display', serif; font-weight: 700; }
.card-meta { font-size: var(--fs-small); color: var(--text-muted); }

.divider {
  height: 1px; border: 0; margin: 2rem 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--sage) 60%, var(--cream) 100%);
}

/* ----------------------------------------------------------
   11. FOOTER
---------------------------------------------------------- */
footer {
  background: var(--cream); border-top: 1px solid rgba(92,122,98,0.15);
  padding: 4rem 1.25rem 2rem;
}
@media (min-width: 768px) { footer { padding-inline: 2rem; } }

.footer-top-row {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 2.5rem;
  max-width: var(--container); margin-inline: auto; align-items: start;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; max-width: 280px; }
.footer-nav-label {
  font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem;
}
.footer-nav-links,
.footer-connect-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav-links a,
.footer-connect-item {
  font-size: var(--fs-small); color: var(--text-muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: color var(--dur-fast);
}
.footer-nav-links a:hover,
.footer-connect-item:hover { color: var(--sage-deep); }

.footer-bottom-row,
.footer-disclaimer { max-width: var(--container); margin: 0 auto; }
.footer-bottom-row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.75rem; margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--sage-tint); text-align: center;}
.footer-disclaimer { margin-top: 1rem; font-size: var(--fs-small); color: var(--text-muted); line-height: var(--lh-body); }

@media (max-width: 767px) {
  .footer-top-row { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------
   12. MOTION
---------------------------------------------------------- */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.will-animate { opacity: 0; transform: translateY(24px); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@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;
  }
  .reveal.will-animate { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------
   13. UTILITIES
---------------------------------------------------------- */
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-8); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 479px) { .cta-row .btn { width: 100%; } }

/* ----------------------------------------------------------
   14. WATERMARK SECTION TITLES
---------------------------------------------------------- */
[data-watermark] { position: relative; overflow: hidden; }
[data-watermark]::before {
  content: attr(data-watermark);
  position: absolute; top: 0.5rem; right: -1rem;
  font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 700;
  font-size: clamp(5rem, 13vw, 12rem); line-height: 1;
  color: rgba(92,122,98,0.055);
  white-space: nowrap; pointer-events: none; user-select: none; z-index: 0;
}
[data-watermark] > * { position: relative; z-index: 1; }
.surface-sage[data-watermark]::before,
.surface-statement[data-watermark]::before { color: rgba(247,245,240,0.06); }
@media (max-width: 600px) {
  [data-watermark]::before { font-size: clamp(3.5rem, 22vw, 6rem); top: 0.25rem; right: -0.5rem; }
}
