/* ============================================================
   JOJO — Design tokens
   Direction: "The circle is the atom" (qa/DESIGN-DIRECTION.md)
   Ratified 30 Aug 2026. Single source of truth; every page imports this.
   ============================================================ */

:root {
  /* ---- Ground & ink (JOJO Official Brand Kit) -------------------------
     #8A5A3B · Brand Cognac / Primary Accent
     #FFFCFA · Crisp Off-White / Primary Ground
     #3E2A1F · Deep Espresso Brown / Accent Deep
     #1C1C1C · Deep Slate Black / Primary Pitch
     #011021 · Midnight Navy / Dark Surface
     #6B705C · Sage Green / Sensory & Wellness Accent
     #4C4236 · Muted Earth Olive / Secondary Ink
     Light beige/tan tones (#F2E5D7, #B08459, #CFB3A4) permanently removed. */
  --paper:        #FFFCFA;   /* primary page ground (clean brand off-white) */
  --paper-deep:   #F5F5F2;   /* subtle neutral surface variant */
  --pitch:        #1C1C1C;   /* brand deep black stage */
  --pitch-soft:   #011021;   /* brand midnight navy — raised surface on dark stage */

  --ink:          #1C1C1C;   /* body text — 16.3:1 on paper (AAA) */
  --ink-strong:   #1C1C1C;   /* display titles — 16.3:1 (AAA) */
  --ink-muted:    #4C4236;   /* secondary text — 7.6:1 on paper (AAA) */
  --ink-faint:    #6B705C;   /* spec labels & sensory accents — 4.6:1 on paper (AA) */

  --accent:       #8A5A3B;   /* THE action colour — official brand cognac brown */
  --accent-deep:  #3E2A1F;   /* hover/active — official brand deep espresso */
  --cognac:       #8A5A3B;   /* official brand cognac */
  --sage:         #545C45;   /* rich olive sage */
  --sage-light:   #EAEFE4;   /* subtle sage surface fill */
  --olive-dark:   #4C4236;   /* official brand muted earth */
  --tan:          #8A5A3B;   /* legacy tan mapped to official cognac */
  --sand:         #F8F6F1;   /* warm light sand ground — high contrast for text */
  --sand-dark:    #E5E0D6;   /* sand border / muted accents */
  --cream:        #FFFCFA;   /* legacy cream mapped to official off-white */
  --oxblood:      #3E2A1F;   /* state indicator mapped to deep espresso */

  --paper-muted:  #D4D8CA;   /* secondary text on dark stage — 10.2:1 on pitch */

  --rule:         rgba(28, 28, 28, 0.12);
  --rule-strong:  rgba(28, 28, 28, 0.24);
  --rule-dark:    rgba(255, 252, 250, 0.16);
  --focus:        #1C1C1C;

  /* ---- Surface & Scrim Role Tokens ---------------------------------- */
  --scrim:             rgba(0, 0, 0, 0.5);
  --scrim-strong:      rgba(0, 0, 0, 0.6);
  --on-dark-hairline:  rgba(255, 252, 250, 0.08);
  --on-dark-fill:      rgba(255, 252, 250, 0.06);
  --white:             #FFFFFF;

  /* ---- Type ---------------------------------------------------------
     Headings: Bebas Neue (with relaxed letter-spacing for breathability)
     Subheadings & Specs: Montserrat
     Body: Noto Sans */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-label:   'Montserrat', sans-serif;
  --font-body:    'Noto Sans', sans-serif;

  --track-display: 0.04em;    /* Relaxed tracking prevents titles from looking cramped */
  --track-label:   0.14em;    /* Spec label tracking */
  --lh-display:    1.08;      /* Breathing line height prevents vertical collisions */
  --lh-body:       1.55;
  --measure:       75ch;

  /* Display scale — fluid, calibrated, and standardized */
  --d-1: clamp(40px, 5.2vw, 68px);   /* primary hero */
  --d-hero-sub: clamp(32px, 4.2vw, 52px); /* content/secondary hero headings */
  --d-2: clamp(28px, 3.2vw, 44px);   /* section heads */
  --d-3: clamp(22px, 2.2vw, 32px);   /* sub-heads */
  --d-4: clamp(18px, 1.6vw, 24px);   /* row titles */
  --d-5: clamp(16px, 1.2vw, 18px);   /* cards/index titles */

  --t-lead: clamp(16px, 1.2vw, 19px);
  --t-body: 16px;
  --t-small: 14px;
  --t-cta: 13px;
  --t-caption: 12px;
  --t-spec: 11px;

  /* ---- Parallax speeds for multi-layer background -------------------- */
  --p-factor-0: -0.025;
  --p-factor-1: -0.060;
  --p-factor-2: -0.100;
  --p-factor-3: -0.150;

  /* ---- The circle series --------------------------------------------
     Every circle on the site comes from here. The ratio is √2 — the same
     step the A-series scale diagram in Visual Identity.png is built on —
     so sizes relate the way paper sizes do instead of being arbitrary.
     Ground class: c1–c9. Light class (moments/dots): 8–20px.
     Nothing is drawn at a diameter that is not on this list. */
  --c-1: 480px; --c-2: 340px; --c-3: 240px; --c-4: 170px; --c-5: 120px;
  --c-6:  84px; --c-7:  60px; --c-8:  42px; --c-9:  30px;
  --c-dot-lg: 20px; --c-dot: 14px; --c-dot-sm: 8px;

  /* ---- Space — same √2 logic, rounded to whole pixels ---------------- */
  --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;
  --s-11: 180px;

  /* ---- Layout -------------------------------------------------------- */
  --wrap-wide:      1380px;  /* hero, nav, footer, expansive stages */
  --wrap-standard:  1220px;  /* feature grids, booking, detail */
  --wrap-editorial: 1040px;  /* narrative measure */
  --wrap-task:       760px;  /* quiz steps */
  --gutter:  clamp(20px, 4.4vw, 56px);
  --nav-h:   64px;
  --cta-h-compact: 44px;

  --space-hero:       clamp(36px, 4.5vw, 64px) clamp(40px, 5vw, 76px);
  --space-section:    clamp(72px, 9vw, 132px);
  --space-section-sm: clamp(48px, 5.5vw, 80px);

  /* ---- Radius — 2/4/8 system. Pill on CTAs ONLY. No rounded boxes. --- */
  --r-1: 2px; --r-2: 4px; --r-3: 8px; --r-card: var(--r-3); --r-pill: 999px;
  --rust: #8A5A3B;           /* brand cognac alias for dual-cost and accent components */

  /* ---- Motion --------------------------------------------------------
     Discrete state 150–260ms; reveals 420–560ms; nothing over 600ms.
     Choreography overlaps — it never waits-then-fades. */
  --dur-tap:    140ms;
  --dur-state:  220ms;
  --dur-move:   380ms;
  --dur-reveal: 520ms;
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back:  cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* The series steps down one notch below 1024px and two below 768px, so a
   circle is never larger than the space it has. Stepping the scale keeps
   every diameter on the series; capping individual circles would not. */
@media (max-width: 1024px) {
  :root {
    --c-1: 340px; --c-2: 240px; --c-3: 170px; --c-4: 120px; --c-5: 84px;
    --c-6:  60px; --c-7:  42px; --c-8:  30px; --c-9: 20px;
  }
}
@media (max-width: 768px) {
  :root {
    --c-1: 240px; --c-2: 170px; --c-3: 140px; --c-4: 100px; --c-5: 72px;
    --c-6:  56px; --c-7:  40px; --c-8:  28px; --c-9: 20px;
  }
}

/* ---- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  color: var(--ink);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button {
  font-family: inherit;
  color: inherit;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  color: var(--rule);
}

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

/* ---- The three voices ---------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--track-display);
  line-height: var(--lh-display);
  text-transform: uppercase;
  color: var(--ink-strong);
}

/* The spec voice. Reserved for real data — counts, ratios, durations,
   index numbers. Never "FEATURES" or "HOW IT WORKS". */
.spec {
  font-family: var(--font-label);
  font-size: var(--t-spec);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.spec--ink { color: var(--ink-muted); }
.spec--accent { color: var(--accent); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.58;
  color: var(--ink-muted);
  max-width: 54ch;
}

/* ---- Focus: visible everywhere ------------------------------------- */
:where(a, button, [role="button"], [role="tab"], input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
:is(.on-dark, .ground-dark) :where(a, button, [role="button"], [role="tab"], input, select, textarea, summary):focus-visible,
:is(.on-dark, .ground-dark):focus-visible {
  outline-color: var(--paper);
}

/* ---- Minimum target floors ----------------------------------------- */
:where(button, [role="button"], [role="tab"]) {
  min-height: 44px;
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 44px;
}

/* ---- CTA — the only pill on the site ------------------------------- */
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-6);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-label);
  font-size: var(--t-cta);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--dur-state) var(--ease-out),
              transform var(--dur-tap) var(--ease-out);
}
.cta:hover { background: var(--accent-deep); }
.cta:active { transform: translateY(1px); }
.cta[disabled] { opacity: .38; cursor: not-allowed; }
.cta[disabled]:active { transform: none; }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.cta--ghost:hover { background: rgba(42, 30, 24, 0.06); }

.on-dark .cta--ghost { color: var(--paper); border: 1.5px solid var(--paper); }
.on-dark .cta--ghost:hover { background: rgba(250, 246, 241, 0.1); }

/* ---- Skip link ------------------------------------------------------ */
.skip-link {
  position: absolute; left: -9999px; top: var(--s-2); z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--ink); color: var(--paper); border-radius: var(--r-2);
}
.skip-link:focus-visible { left: var(--s-4); }

/* ---- Circle primitives ---------------------------------------------
   Ground class sits behind/around content and comes from the series.
   Light class is a moment — a dot, an index, a marker. */
.circle { border-radius: 50%; }
.circle-ground { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.circle-light { display: inline-block; border-radius: 50%; flex: none; }

/* ---- The dot-rule ---------------------------------------------------
   The only "grid" that appears on the site, and only at boundaries that
   are real. Built from the circle language, not a border. */
.dot-rule {
  height: 3px;
  background-image: radial-gradient(circle, var(--rule-strong) 1.5px, transparent 1.6px);
  background-size: 12px 3px;
  background-repeat: repeat-x;
  border: 0;
}
.on-dark .dot-rule, .dot-rule--dark {
  background-image: radial-gradient(circle, var(--rule-dark) 1.5px, transparent 1.6px);
}

/* ---- Reduced motion -------------------------------------------------
   A designed static state: everything lands in its composed end frame.
   Not "animations off" — the page still has to look finished. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- The Sensory & Playground Tokens -------------------------------
   Calibrated for canine enrichment, dichromatic vision, and CAD specs. */
:root {
  --turf-green:     #2D6A4F;
  --turf-soft:      #40916C;
  --cad-blue:       #2563EB;
  --cad-rule:       rgba(138, 83, 52, 0.25);
  --cad-bg:         rgba(138, 83, 52, 0.04);

  /* ---- Cohort Tokens (Social Play & Mixed Sessions) ---------- */
  --cohort-male:         #1D63B8;   /* confident canine blue */
  --cohort-male-bg:      #EBF3FC;
  --cohort-male-border:  rgba(29, 99, 184, 0.35);
  --cohort-female:       #C8385E;   /* vibrant canine rose pink */
  --cohort-female-bg:    #FDF0F4;
  --cohort-female-border:rgba(200, 56, 94, 0.35);
  --cohort-mixed:        #8A5A3B;   /* balanced cognac */
  --cohort-mixed-bg:     #F4EFE6;
  --cohort-mixed-border: rgba(138, 90, 59, 0.28);
  --cohort-open:         #2D6A4F;   /* neutral open forest */
  --cohort-open-bg:      #EAF3EC;
  --cohort-open-border:  rgba(45, 106, 79, 0.28);
  --cohort-locked:       #8A2525;
  --cohort-locked-bg:    #FDE8E8;
}



/* Visually hidden, still announced (booking radios + live region) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
