/* VECT Academy design tokens.
 * Brand source: brand/BRAND_GUIDELINE.md §0 in the VECT hub, and SPECS.md §2.
 * Components only use the SEMANTIC tokens; each theme maps them to its own palette.
 *   Light   = official brand (default)
 *   Vintage = warm antique alternative (html[data-theme="vintage"]); see SPECS.md §2b
 */
:root {
  /* ---- Brand constants (light palette) ---- */
  --brand-green: #00A652;
  --brand-green-dark: #008542;
  --brand-red: #D62828;

  /* ---- Semantic roles ---- */
  --bg: #FFFFFF;               /* page background */
  --surface: #FFFFFF;          /* cards, form */
  --surface-alt: #F6F7F6;      /* alternate section band */
  --text: #000000;             /* body text, headings */
  --text-soft: #3D3D3D;        /* lead paragraphs, card copy */
  --text-muted: #6E6E6E;       /* captions, meta */
  --line: #E4E4E4;             /* borders, dividers, inputs */
  --green: var(--brand-green);           /* brand accent: logo, big headings, blocks */
  --green-dark: var(--brand-green-dark); /* small green text, links */
  --red: var(--brand-red);               /* CTA */
  --red-hover: #B81F1F;
  --on-accent: #FFFFFF;        /* text on green / red fills */
  --green-tint: #E8F6EE;       /* light green bands, stat boxes */
  --green-tint-2: #CFEEDC;
  --card-open: var(--green);   /* course box fill while expanded */
  --eyebrow: var(--green-dark);
  --ornament: var(--green);    /* rules, frames, small decorations */
  --header-bg: rgba(255, 255, 255, 0.94);
  --header-line: var(--line);
  --footer-bg: var(--green);
  --footer-fg: #FFFFFF;
  --footer-accent: #FFFFFF;
  --input-bg: #FFFFFF;
  --error: #B81F1F;            /* form messages and invalid fields (6.3:1 on white) */
  --card-open-ink: var(--brand-green-dark); /* text on the cream/white button inside an open course box */
  --plate: transparent;        /* backing plate behind logos (vintage only) */
  --photo-frame: #FFFFFF;      /* border around floating photos */
  --polaroid-paper: #F1F1EC;
  --pattern-a: #2FB563;         /* hero box icons at rest: light green */
  --pattern-b: #11944A;         /* dark green */
  --pattern-c: #119547;         /* speech bubble */
  --pattern-dot: #FFFFFF;
  --photo-filter: none;
  --pattern-filter: none;
  --pattern-opacity: 0.12;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-card: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.08));
  /* hero box "screen" (animated state) */
  --live-bg: var(--brand-green);
  --live-bg-edge: #007A3D;
  --live-ink: #FFFFFF;          /* the pattern, drawn light */
  --live-glow: #D9FFE9;         /* neon glow on the flickering part */
  --live-grid: rgba(255, 255, 255, 0.11);

  /* ---- Typography (D11) ---- */
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Paytone One', 'Manrope', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-heading: var(--font-sans);
  --heading-weight: 800;

  /* ---- Shape & layout ---- */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 16px;
  --radius-sm: 10px;
  --btn-radius: 999px;

  color-scheme: light;
}

/* =====================================================================
 * VINTAGE: a warm antique alternative, not an inverted dark mode.
 * Mood: an old schoolhouse library at lamplight. Espresso wood, parchment pages,
 * patina-green book cloth, brick-red stamps and brass fittings.
 * Every text pairing below is >= 4.5:1 (most >= 7:1); see SPECS.md §2b.
 * ===================================================================== */
html[data-theme="vintage"] {
  --bg: #1C1712;               /* Espresso */
  --surface: #28211A;          /* Walnut */
  --surface-alt: #211B15;      /* Umber */
  --text: #ECE1CA;             /* Parchment (13.7:1) */
  --text-soft: #CBBD9F;        /* Vellum (9.6:1) */
  --text-muted: #A39479;       /* Faded khaki (6.0:1) */
  --line: #4A3E30;             /* Leather */
  --green: #9CB67E;            /* Patina green (8.0:1) */
  --green-dark: #B3C898;       /* Sage (9.9:1), small green text */
  --red: #A3402B;              /* Brick (cream on brick 5.4:1) */
  --red-hover: #8E3624;
  --on-accent: #F5ECD8;        /* Cream */
  --green-tint: #23271C;       /* Olive dusk */
  --green-tint-2: #2E3424;
  --card-open: #3F5A39;        /* Forest book-cloth (cream on forest 6.5:1) */
  --eyebrow: #CFAB66;          /* Brass (8.2:1) */
  --ornament: #CFAB66;
  --header-bg: rgba(28, 23, 18, 0.92);
  --header-line: #4A3E30;
  --footer-bg: #15110D;        /* Ink */
  --footer-fg: #ECE1CA;
  --footer-accent: #CFAB66;
  --input-bg: #1F1A14;
  --error: #E39A80;            /* terracotta: form messages and invalid fields (7.0:1 on walnut) */
  --card-open-ink: #3F5A39;
  --plate: #EDE3CF;            /* Bookplate behind the logo (keeps official colors legible) */
  --photo-frame: #E6D9BD;      /* aged paper */
  --polaroid-paper: #E3D5B8;
  --pattern-a: #89B184;         /* the icons as they looked under the old sepia filter */
  --pattern-b: #628C63;
  --pattern-c: #628C63;
  --pattern-dot: #FFFFFF;
  --photo-filter: sepia(0.28) saturate(0.82) contrast(1.04) brightness(0.92);
  --pattern-filter: sepia(1) saturate(0.55) hue-rotate(-12deg) brightness(1.35);
  --pattern-opacity: 0.16;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-card: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
  --live-bg: #3F5A39;           /* forest book-cloth screen, like an old amber terminal */
  --live-bg-edge: #26361F;
  --live-ink: #F5ECD8;
  --live-glow: #E8C97A;         /* brass glow */
  --live-grid: rgba(232, 201, 122, 0.10);

  --font-heading: var(--font-serif);
  --heading-weight: 700;
  --btn-radius: 8px;

  color-scheme: dark;
}
