/*
 * Who's Keen? design tokens
 * Keep in sync with tokens.json.
 *
 * Use the role variables (--k-hero, --k-ink…) in components, not the raw
 * palette, so the palette can be swapped with data-palette on any element.
 * Fonts are bundled (fonts/, SIL Open Font License), so this file works offline.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/Figtree-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/BricolageGrotesque-latin.woff2') format('woff2');
}

:root {
  /* Sunset palette (the default) */
  --sunset-coral: #FF5A36;
  --sunset-tangerine: #FFB020;
  --sunset-plum: #2B0F3A;
  --sunset-pink: #FFD6E8;
  --sunset-lime: #C6F432;
  --sunset-cream: #FFF4E6;

  /* Roles */
  --k-hero: var(--sunset-coral);       /* "Who’s keen tonight?" moments */
  --k-on-hero: var(--sunset-plum);
  --k-ink: var(--sunset-plum);         /* text and main pill buttons */
  --k-on-ink: var(--sunset-cream);
  --k-warm: var(--sunset-tangerine);   /* colour blocks */
  --k-soft: var(--sunset-pink);        /* colour blocks */
  --k-pop: var(--sunset-lime);         /* "You're in" and matched only */
  --k-paper: var(--sunset-cream);      /* quiet backgrounds */
  --k-hero-text: #CC3314;              /* coral text on paper or white (errors, Delete my data): --k-hero fails WCAG AA there */
  --k-surface: #FFFFFF;                /* cards, inputs, tab bar, choice rows */
  --k-line: rgba(43, 15, 58, 0.1);     /* hairlines and dividers */

  /* Map (the only place blue and green appear) */
  --k-map-land: #FFFBF5;
  --k-map-water: #A9DCEE;
  --k-map-park: #E2F4A8;
  --k-map-road: #FFFFFF;
  --k-map-line: rgba(43, 15, 58, 0.14);

  /* Type: Plus Jakarta Sans. Clean geometric sans, closest free match to Linktree's feel */
  --k-font: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --k-weight-body: 500;
  --k-weight-bold: 700;
  --k-weight-display: 800;
  --k-size-sm: 14px;
  --k-size-md: 17px;
  --k-size-lg: 20px;
  --k-size-xl: 34px;
  --k-size-xxl: 44px;
  --k-size-mega: 76px;
  --k-size-ask: 56px;   /* "Who’s keen tonight?" on Today and the intro: two lines at 342 wide */
  --k-display-tracking: -0.035em;
  --k-display-leading: 1;

  /* Shape: only three radii.
     Surfaces (cards, maps, sheets) 24, things nested inside a surface 16,
     and everything you tap (buttons, chips, inputs, tabs) is a pill. */
  --k-radius-surface: 24px;
  --k-radius-inner: 16px;
  --k-radius-pill: 999px;

  /* Space */
  --k-space-1: 4px;
  --k-space-2: 8px;
  --k-space-3: 12px;
  --k-space-4: 16px;
  --k-space-5: 24px;
  --k-space-6: 32px;
  --k-space-7: 48px;
  --k-space-8: 64px;

  /* Motion (docs/MOTION.md section 2): calm and quick. Nothing overshoots,
     bounces, tilts or rotates. */
  --k-dur-instant: 100ms;  /* press states */
  --k-dur-fast: 150ms;     /* fades out, chips, toggles */
  --k-dur-base: 250ms;     /* content entering, small moves */
  --k-dur-slow: 400ms;     /* colour washes, pushed screens, progress */
  --k-dur-flood: 600ms;    /* the two signature floods */
  --k-dur-locate: 1200ms;  /* Your patch locate shrink */
  --k-ease: cubic-bezier(0.2, 0.8, 0.2, 1);       /* standard: almost everything */
  --k-ease-in: cubic-bezier(0.4, 0, 1, 1);        /* things leaving */
  --k-ease-emph: cubic-bezier(0.3, 0, 0, 1);      /* floods, morphs, camera moves */
  --k-ease-linear: linear;                        /* countdowns, the search pulse */
  --k-stagger: 40ms;       /* between content items entering */
  --k-rise: 16px;          /* how far content rises when it enters */

  /* Old names, kept so the older prototypes still run. Don't use them in new
     work. --k-spring no longer overshoots (MOTION.md removes it). */
  --k-fast: var(--k-dur-fast);
  --k-base: 300ms;
  --k-spring: var(--k-ease);
}

/* Font alternates, for comparison only */
[data-font="figtree"] { --k-font: 'Figtree', 'Helvetica Neue', Arial, sans-serif; --k-display-tracking: -0.03em; }
[data-font="bricolage"] { --k-font: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif; --k-display-tracking: -0.04em; --k-display-leading: 0.95; }

/* Alternate palettes, for comparison only */
[data-palette="greens"] {
  --k-hero: #D2E823;
  --k-on-hero: #1E3A14;
  --k-ink: #1E3A14;
  --k-on-ink: #F4F7E8;
  --k-warm: #9FD356;
  --k-soft: #E9C0E9;
  --k-pop: #FFFFFF;
  --k-paper: #F4F7E8;
}

[data-palette="night"] {
  --k-hero: #6C3BFF;
  --k-on-hero: #FFFFFF;
  --k-ink: #0B0B14;
  --k-on-ink: #F5F3FF;
  --k-warm: #3BE8FF;
  --k-soft: #E4DBFF;
  --k-pop: #FF4FD8;
  --k-paper: #F5F3FF;
}
