/* Unofficial ParkPass - bridge site stylesheet
   Implements Doc 34 (Brand Implementation Handoff v1.0) directly.
   One stylesheet, no framework (Doc 32 s2). Mobile-first.

   Doc 34 s2 replaced the earlier placeholder tokens. --brand / --brand-deep / --accent
   are gone; --color-brand / --color-brand-deep / --color-accent replace them everywhere.
   No token from the old set survives - scripts/check-tokens.py fails if any reappears.

   Contrast is governed by scripts/check-contrast.py against Doc 34 s5. */

/* ==========================================================================
   Self-hosted fonts (Doc 34 s3). Both OFL. No hosted-webfont call.
   Built by scripts/build-fonts.py: axis-limited, Latin-subset, woff2.
   Fraunces keeps its opsz axis so headings get real optical sizing.
   Inter keeps `tnum` so figures are tabular.
   ========================================================================== */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 400 600;          /* Doc 34 s3: 400 and 600 only */
  font-style: normal;
  font-display: swap;
  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: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 400 600;          /* Doc 34 s3: 400, 500, 600 */
  font-style: normal;
  font-display: swap;
  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;
}

/* ==========================================================================
   Doc 34 s2 - design tokens. Values are final.
   ========================================================================== */
:root {
  /* ---- Colour: core ---- */
  --color-paper:          #FAF6EF;
  --color-paper-raised:   #F3ECE0;
  --color-ink:            #1B1A17;
  --color-ink-secondary:  #4A463D;
  --color-muted:          #6B6454;
  --color-hairline:       #E4DCCD;

  --color-brand:          #1F4B44; /* Cypress */
  --color-brand-deep:     #163732;
  --color-brand-tint:     #DCE6E1;

  --color-accent:         #B5623C; /* Ochre - fills / large text only */
  --color-accent-text:    #97502F; /* Ochre for small text (AA) */
  --color-accent-tint:    #F0E0D2;

  /* ---- Colour: value-semantic scale (reserved, Value Calendar) ---- */
  --value-1: #1F4B44; /* best value / go */
  --value-2: #4E7A5C; /* good            */
  --value-3: #C8973F; /* watch           */
  --value-4: #B5623C; /* pricey          */
  --value-5: #8E3B2E; /* peak / avoid    */

  /* ---- Colour: states ---- */
  --color-success: #2E6B54;
  --color-warning: #B5623C;
  --color-error:   #8E3B2E;
  --focus-ring:    #1F4B44;

  /* ---- Typography: families ---- */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* ---- Typography: scale ---- */
  --fs-eyebrow: 0.75rem;
  --fs-caption: 0.875rem;
  --fs-body:    1.0625rem;
  --fs-lead:    1.25rem;
  --fs-h4:      1.5rem;
  --fs-h3:      1.875rem;
  --fs-h2:      2.375rem;
  --fs-h1:      3rem;
  --fs-hero:    clamp(2.5rem, 6vw, 3.75rem);

  /* ---- Typography: rhythm ---- */
  --lh-body: 1.6;
  --lh-heading: 1.15;
  --lh-display: 1.05;
  --tracking-display: -0.01em;
  --tracking-label:   0.12em;
  --measure: 68ch;

  --fw-reg: 400;
  --fw-med: 500;
  --fw-semi: 600;

  /* ---- Spacing (4px base, 8px rhythm) ---- */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 24px;  --space-6: 32px;
  --space-7: 48px;  --space-8: 64px;  --space-9: 96px;
  --space-10: 128px;

  /* ---- Radii ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* ---- Elevation (prefer hairlines to shadow) ---- */
  --shadow-1: 0 1px 2px rgba(27,26,23,0.06);
  --shadow-2: 0 4px 16px rgba(27,26,23,0.08);

  /* ---- Motion ---- */
  --dur-fast: 150ms;
  --dur-base: 240ms;
  --dur-slow: 360ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* ---- Breakpoints (reference) ---- */
  --bp-sm: 640px;  --bp-md: 768px;  --bp-lg: 1024px;  --bp-xl: 1280px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
}

/* Layout containers. Doc 34 defines --measure but no page container; these are
   retained from Doc 32 s4, which Doc 34 does not supersede on layout. */
:root {
  --container: 1120px;
  --container-text: 720px;
  --section: var(--space-8);
  --header-h: 68px;              /* Doc 32 s5a: 64-72px */
}
@media (min-width: 1024px) { :root { --section: var(--space-9); } }
@media (min-width: 1280px) { :root { --section: var(--space-10); } }

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;   /* Doc 34 s3: Inter tabular figures */
}
img { max-width: 100%; height: auto; display: block; }

/* Doc 34 s5: focus ring always visible, 2px outline, 2px offset. */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ==========================================================================
   Typography - Doc 34 s3 functional split:
   editorial/reading -> Fraunces; interface/data -> Inter.
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: var(--fw-semi);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-display);
  color: var(--color-ink);
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-display); }
h2 { font-size: var(--fs-h2); margin-top: var(--space-8); }
h3 { font-size: var(--fs-h3); margin-top: var(--space-6); }
h4 { font-size: var(--fs-h4); margin-top: var(--space-5); }

p, ul, ol, table, blockquote { margin: 0 0 var(--space-5); }
a { color: var(--color-brand); text-underline-offset: 2px; }
a:hover { color: var(--color-brand-deep); }
small, .small { font-size: var(--fs-caption); color: var(--color-muted); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-muted);
}

blockquote {
  margin-left: 0;
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--color-hairline);
  background: var(--color-paper-raised);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
blockquote p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-caption); }
th, td {
  text-align: left; padding: var(--space-3);
  border-bottom: 1px solid var(--color-hairline); vertical-align: top;
}
th { font-weight: var(--fw-semi); }
code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .9em; background: var(--color-paper-raised);
  padding: 1px 4px; border-radius: 3px;
}

/* Long-form reading is Fraunces (Doc 34 s3). */
.prose, h1, h2, h3, h4 { font-variant-numeric: normal; }  /* s3: tnum is Inter only */
.prose { max-width: var(--measure); font-family: var(--font-serif); }
.prose table, .prose code { font-family: var(--font-sans); }

/* ==========================================================================
   Layout
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-5); }
.container--text { max-width: var(--container-text); }
.band { padding-block: var(--section); }
.band--raised { background: var(--color-paper-raised); }
.band > .container > p { max-width: var(--measure); }  /* s6: copy capped at 68ch */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-3) var(--space-4);
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* ==========================================================================
   Wordmark lockup - Doc 34 s4
   "ParkPass" Fraunces ~600, carries 80-90% of the mark's mass.
   "UNOFFICIAL" Inter uppercase, +0.12em tracking, kicker flush above the P,
   under 20% of the mark. Left edges aligned. Clear space >= cap-height of P.
   Minimum logotype cap-height 14px; below that the kicker drops.
   Fraunces cap-height is ~0.70em, so 1.375rem (22px) gives ~15.4px - above the
   floor at every breakpoint used here, so the kicker always shows on this site.
   ========================================================================== */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;      /* left edges aligned */
  gap: 0;
  text-decoration: none;
  color: var(--color-ink);
  /* Clear space: Doc 34 s4 requires a minimum of the cap-height of the P on all
     sides. Fraunces sCapHeight is 1400/2000 = exactly 0.70em, so that is 0.7em,
     and it is real padding - no negative margin cancelling it. An earlier version
     used 0.35em with margin:-0.35em, which both halved the figure and netted the
     reserved space to zero. */
  padding: 0.7em;
  margin-right: auto;
  line-height: 1;
}
.wordmark:hover { color: var(--color-ink); }
.wordmark__kicker {
  font-family: var(--font-sans);
  /* Doc 34 s4 caps the kicker under 20% of the mark's mass, with the logotype
     carrying 80-90%. Measured from the shipped fonts (advance width x cap-height,
     tracking included): "ParkPass" at Fraunces 600/opsz120/-0.01em = 2.6401em2.
     "UNOFFICIAL" at Inter 600/+0.12em is 7.2229em advance at 1em, so at 0.32em it
     is 0.5381em2 = 16.9% of the lockup, leaving the logotype at 83.1% - inside the
     80-90% band with margin. 0.46em measured 29.6% and was well over. */
  font-size: 0.32em;
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-muted);
  margin-bottom: 0.22em;        /* baseline ~0.4x cap-height above the cap-line */
}
.wordmark__name {
  font-family: var(--font-serif);
  font-weight: var(--fw-semi);
  font-size: 1em;
  letter-spacing: var(--tracking-display);
  font-variation-settings: "opsz" 120, "SOFT" 0;  /* high optical size, low soft axis */
}
.wordmark--header { font-size: 1.375rem; }        /* cap-height ~15.4px */
@media (min-width: 640px) { .wordmark--header { font-size: 1.5rem; } }
/* Below --fs-hero (40-60px): s6 names the Fraunces headline as the hero element,
   so the mark must not outsize it. */
.wordmark--hero { font-size: clamp(2rem, 4.5vw, 2.75rem); }

/* Doc 34 s4: below 14px cap-height the kicker drops and the logotype stands alone. */
.wordmark--compact .wordmark__kicker { display: none; }

/* Reversed variant: Paper on Cypress (9.07:1, clears AAA). */
.wordmark--reversed, .wordmark--reversed .wordmark__name { color: var(--color-paper); }
.wordmark--reversed .wordmark__kicker { color: var(--color-brand-tint); }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  min-height: var(--header-h);
  border-bottom: 1px solid var(--color-hairline);
  background: var(--color-paper);
}
.site-header .container { display: flex; align-items: center; gap: var(--space-5); min-height: var(--header-h); }
.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav a {
  font-family: var(--font-sans);
  color: var(--color-ink); text-decoration: none;
  font-size: var(--fs-caption); padding: var(--space-3) 0;
}
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

.nav-toggle { display: none; }
@media (max-width: 639px) {
  .site-header .container { flex-wrap: wrap; padding-block: var(--space-3); }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: var(--space-2);
    background: none; border: 1px solid var(--color-hairline);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans); font-size: var(--fs-caption);
    color: var(--color-ink); padding: var(--space-2) var(--space-3);
    cursor: pointer; min-height: 44px;
  }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: var(--space-3); }
  .nav a { padding: var(--space-3) 0; min-height: 44px; display: flex; align-items: center; border-top: 1px solid var(--color-hairline); }
  .site-header[data-open="true"] .nav { display: flex; }
}

/* ==========================================================================
   Hero - Doc 34 s6: single column, Fraunces headline at --fs-hero,
   Inter subhead at --fs-lead, one paragraph, one CTA.
   ========================================================================== */
.hero { padding-block: var(--space-9) var(--section); }
.hero__inner { max-width: var(--measure); }
.hero .wordmark { margin-bottom: var(--space-7); }
.hero h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  margin-bottom: var(--space-5);
}
.hero__sub {
  font-family: var(--font-sans);
  font-size: var(--fs-lead);
  color: var(--color-ink-secondary);
  margin-bottom: var(--space-7);
}
.hero__unofficial { margin-top: var(--space-6); }

/* ==========================================================================
   Email capture - Doc 34 s6: one CTA, Cypress button, no competing buttons.
   ========================================================================== */
.capture { max-width: 34rem; font-family: var(--font-sans); }
.capture__label {
  display: block; font-size: var(--fs-caption);
  font-weight: var(--fw-semi); margin-bottom: var(--space-2);
}
.capture__row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.capture input[type="email"] {
  flex: 1 1 15rem; min-width: 0; min-height: 48px;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans); font-size: var(--fs-body);
  border: 1px solid var(--color-hairline); border-radius: var(--radius-sm);
  background: var(--color-paper); color: var(--color-ink);
}
.capture input::placeholder { color: var(--color-muted); opacity: 1; }  /* AA: 5.45:1 */
.capture input:focus-visible { border-color: var(--color-brand); }
.btn {
  min-height: 48px; padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: var(--fw-semi);
  background: var(--color-brand); color: var(--color-paper);
  border: 1px solid var(--color-brand); border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard);
}
.btn:hover { background: var(--color-brand-deep); border-color: var(--color-brand-deep); }
.capture__note { font-size: var(--fs-caption); color: var(--color-muted); margin: var(--space-3) 0 0; }
.capture__status { font-size: var(--fs-caption); margin: var(--space-3) 0 0; min-height: 1.4em; }
.capture__status[data-state="ok"] { color: var(--color-success); font-weight: var(--fw-semi); }
.capture__status[data-state="error"] { color: var(--color-error); font-weight: var(--fw-semi); }

/* The single permitted Ochre micro-accent (Doc 34 s6). Uses --color-accent-text
   because it is small text; --color-accent is fills/large only (Doc 34 s5). */
.capture__perk {
  font-size: var(--fs-caption); color: var(--color-accent-text);
  font-weight: var(--fw-med); margin: var(--space-3) 0 0;
}

/* ==========================================================================
   Guide cards - retained from Doc 33 s3, which requires all four on the home
   page as the content-depth proof for affiliate review.
   ========================================================================== */
.cards { display: grid; gap: var(--space-5); grid-template-columns: 1fr; padding: 0; margin: 0; list-style: none; }
@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--color-paper); border: 1px solid var(--color-hairline);
  border-radius: var(--radius-md); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card h2, .card h3 { margin: 0; font-size: var(--fs-h4); }
.card h2 a, .card h3 a { color: var(--color-ink); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: var(--fs-caption); color: var(--color-ink-secondary); font-family: var(--font-sans); }
.card__pillar {
  font-family: var(--font-sans); font-size: var(--fs-eyebrow); color: var(--color-muted);
  text-transform: uppercase; letter-spacing: var(--tracking-label);
}

/* ==========================================================================
   Reserved slot - Doc 34 s6: hairline-bordered region sized for wireframe
   imagery, captioned as previews. No imagery supplied yet.
   ========================================================================== */
.reserved {
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  background: var(--color-paper-raised);
  aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6);
}
.reserved__note {
  font-family: var(--font-sans); font-size: var(--fs-caption);
  color: var(--color-muted); text-align: center; margin: 0; max-width: 36ch;
}
.reserved-caption {
  font-family: var(--font-sans); font-size: var(--fs-caption);
  color: var(--color-muted); margin: var(--space-3) 0 0;
}

/* ==========================================================================
   Tease block - Doc 34 s6: projected tools, stated honestly as coming.
   ========================================================================== */
.tease { display: grid; gap: var(--space-5); grid-template-columns: 1fr; padding: 0; margin: 0; list-style: none; }
@media (min-width: 768px) { .tease { grid-template-columns: repeat(3, 1fr); } }
.tease__item { border-top: 2px solid var(--color-brand); padding-top: var(--space-4); }
.tease__status {
  font-family: var(--font-sans); font-size: var(--fs-eyebrow);
  text-transform: uppercase; letter-spacing: var(--tracking-label);
  color: var(--color-muted); display: block; margin-bottom: var(--space-2);
}
.tease__item h3 { font-size: var(--fs-h4); margin: 0 0 var(--space-2); }
.tease__item p { font-family: var(--font-sans); font-size: var(--fs-caption); color: var(--color-ink-secondary); margin: 0; }

/* ==========================================================================
   Article
   ========================================================================== */
.breadcrumb { font-family: var(--font-sans); font-size: var(--fs-caption); color: var(--color-muted); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--color-muted); }
.byline {
  font-family: var(--font-sans);
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  padding-block: var(--space-4); margin-bottom: var(--space-7);
  font-size: var(--fs-caption);
}
.byline__name { font-weight: var(--fw-semi); color: var(--color-ink); }
.byline__creds, .byline__verified { color: var(--color-muted); display: block; margin-top: var(--space-1); }
.lede { font-size: var(--fs-lead); line-height: 1.5; color: var(--color-ink); }

/* ==========================================================================
   Disclosure banner - Doc 10 / Doc 34 s10: above the first affiliate link.
   ========================================================================== */
.disclosure {
  font-family: var(--font-sans);
  border: 1px solid var(--color-hairline);
  border-left: 3px solid var(--color-brand);
  background: var(--color-paper-raised);
  border-radius: var(--radius-md);
  padding: var(--space-4); margin-bottom: var(--space-6);
  font-size: var(--fs-caption);
}
.disclosure p { margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  font-family: var(--font-sans);
  background: var(--color-paper-raised);
  border-top: 1px solid var(--color-hairline);
  padding-block: var(--space-8); margin-top: var(--section);
  font-size: var(--fs-caption);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-bottom: var(--space-5); }
.site-footer a { color: var(--color-ink); }
.unofficial { color: var(--color-ink-secondary); max-width: var(--measure); margin: 0 0 var(--space-3); }
.copyright { color: var(--color-muted); margin: 0; }

/* ==========================================================================
   Unresolved verification tokens - visible so they cannot ship unnoticed.
   ========================================================================== */
.token {
  background: var(--color-accent-tint); color: var(--color-accent-text);
  border: 1px dashed var(--color-accent); border-radius: var(--radius-sm);
  padding: 0 4px; font-size: .9em; font-weight: var(--fw-semi);
  white-space: nowrap; font-family: var(--font-sans);
}

.table-wrap { overflow-x: auto; margin: 0 0 var(--space-5); }
.table-wrap table { min-width: 34rem; margin: 0; }

/* ==========================================================================
   Motion - Doc 34 s8: clarifies, never decorates. Ease-out, no bounce.
   Durations collapse to 0ms under prefers-reduced-motion via the tokens.
   ========================================================================== */
/* No entrance animation. Doc 34 s8 scopes motion to revealing state changes and says
   it must never decorate; a page-load fade reveals no state change. The only motion in
   the system is the button background transition above, at --dur-fast. */
