/* caddiwise.com's design tokens (#610): every page links this first, the course editor and My golf
   included. Colours are Design/Palette.swift's swatches, light and dark, under the same names;
   change a colour there and here together. Nothing here lays a page out. */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-latin.woff2") format("woff2"), url("/fonts/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  /* Palette swatches (light) */
  --pine: #0B2440; --fairway: #1C773A; --mint: #E4F2E9; --flag: #F5B700; --sand: #E8DCC0; --water: #2A71CC;
  --clay: #C94040; --berry: #8E2430; --paper: #F5F7F9; --surface: #FFFFFF; --raised: #ECEFF3; --line: #DFE4EA;
  --ink: #0E1624; --slate: #5A6573; --on-dark: #FFFFFF; --on-fairway: #FFFFFF; --flag-ink: #8A6500;
  --turf: #7FD67F; --putting: #3CCF5A;
  /* The logo's two greens (Design/Brand): the wordmark's "Wise". */
  --wordmark: #0B2440; --wordmark-wise: #26964A;

  /* Fixed swatches for the navy "stage" bands (the hero, the 3D green, the finale), which stay
     navy in both colour schemes: pine and paper's dark values, and the bright fairway and flag. */
  --stage: #0B2440; --stage-deep: #0C1F38; --stage-night: #0A0E14; --stage-green: #3DBA6A; --stage-flag: #F5B700;

  /* Roles the pages use (older names kept for the pages built on them) */
  --green: var(--fairway); --muted: var(--slate); --bg: var(--surface); --card: var(--paper);

  /* Type: Outfit for display and figures (the wordmark's font); the system font (SF on Apple
     devices) for reading. */
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space and shape (Metrics in the app: radius 14, large 22) */
  --radius-s: 10px; --radius: 14px; --radius-l: 22px; --radius-xl: 32px;
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 680px;
  --wide: 1200px;

  /* Type scale (#612): every page sizes text from these, so a label on My golf matches one in
     the editor. Figures use --font-display with tabular numbers. */
  --fs-xs: 12px; --fs-s: 14px; --fs-m: 15px; --fs-body: 17px; --fs-l: clamp(19px, 2.3vw, 22px);
  --fs-h3: 20px; --fs-h2: clamp(23px, 3vw, 30px); --fs-h1: clamp(36px, 6vw, 56px); --fs-figure: clamp(28px, 4vw, 36px);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --control-h: 44px; --control-h-s: 34px;

  --shadow: 0 1px 2px rgb(14 22 36 / 0.06), 0 8px 24px rgb(14 22 36 / 0.06);
  --shadow-lift: 0 2px 4px rgb(14 22 36 / 0.08), 0 18px 40px rgb(14 22 36 / 0.12);
  --shadow-device: 0 2px 6px rgb(6 12 22 / 0.18), 0 30px 60px -10px rgb(6 12 22 / 0.35), 0 60px 120px -30px rgb(6 12 22 / 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--fairway);
}

@media (prefers-color-scheme: dark) {
  :root {
    --pine: #0C1F38; --fairway: #3DBA6A; --mint: #14301F; --flag: #FFC93C; --sand: #6B5E43; --water: #5AA2FF;
    --clay: #FF6B6B; --berry: #DC5A70; --paper: #0A0E14; --surface: #141A22; --raised: #1D2530; --line: #262F3B;
    --ink: #EEF1F5; --slate: #9AA5B3; --on-fairway: #0B2440; --flag-ink: #FFC93C;
    --turf: #6CC46C; --putting: #45D865;
    --wordmark: #FFFFFF; --wordmark-wise: #3DBA6A;
    --bg: var(--paper); --card: var(--surface);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.25);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.5), 0 18px 40px rgb(0 0 0 / 0.4);
    --shadow-device: 0 2px 6px rgb(0 0 0 / 0.5), 0 30px 60px -10px rgb(0 0 0 / 0.6), 0 60px 120px -30px rgb(0 0 0 / 0.5);
    --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--fairway);
  }
}

/* The wordmark: "Caddi" in navy (white on dark), "Wise" in the logo's green. */
.wordmark { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; color: var(--wordmark); line-height: 1; }
.wordmark span { color: var(--wordmark-wise); }

/* Keyboard focus: a clear two-tone ring wherever focus lands, never on a mouse click. */
:focus-visible { outline: 2px solid var(--fairway); outline-offset: 3px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
