@layer reset, tokens, base, layout, components, map, screens, utilities;

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../assets/fonts/fraunces-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../assets/fonts/fraunces-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@layer tokens {
  :root {
    color-scheme: light;
    /* map */
    --ocean: #d9e8f2;
    --ocean-deep: #c9dceb;
    --land: #fbf8f1;
    --coast: #7a8c99;
    --border: #c3cad0;
    --graticule: rgb(255 255 255 / 0.7);
    --water-line: #3b82c4;
    --water-fill: #a9cdea;
    /* ui */
    --bg: #f4f1ea;
    --surface: #ffffff;
    --surface-2: #f8f6f1;
    --glass: rgb(255 255 255 / 0.82);
    --line: #e3ded3;
    --ink: #16263d;
    --ink-2: #56657a;
    --ink-3: #626f80;
    --accent: #c2410c;
    --accent-ink: #ffffff;
    --accent-soft: #fbe6da;
    --ok: #15803d;
    --ok-soft: #dcf2e3;
    --near: #a35207;
    --near-soft: #fbecd2;
    --bad: #b91c1c;
    --bad-soft: #fbe0de;
    --known: #15803d;
    --learning: #d97706;
    --new: #c8ccd3;
    --focus: #c2410c;
    --shadow-1: 0 1px 2px rgb(22 38 61 / 0.06), 0 1px 1px rgb(22 38 61 / 0.04);
    --shadow-2: 0 2px 6px rgb(22 38 61 / 0.06), 0 10px 24px -8px rgb(22 38 61 / 0.14);
    --shadow-3: 0 12px 40px -12px rgb(22 38 61 / 0.3);

    /* type */
    --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
    --fs-xs: 0.8125rem;
    --fs-sm: 0.9375rem;
    --fs-md: 1.0625rem;
    --fs-lg: 1.25rem;
    --fs-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
    --fs-2xl: clamp(1.9rem, 1.4rem + 2.6vw, 2.9rem);

    /* space, shape, motion */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
    --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
    --tap: 44px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --t-fast: 140ms;
    --t-med: 240ms;
    --page-max: 760px;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
      color-scheme: dark;
      --ocean: #0e1a24;
      --ocean-deep: #0a141c;
      --land: #263741;
      --coast: #6c8293;
      --border: #3a4c58;
      --graticule: rgb(255 255 255 / 0.05);
      --water-line: #5aa6e6;
      --water-fill: #24425c;
      --bg: #0d1820;
      --surface: #14222c;
      --surface-2: #1a2a35;
      --glass: rgb(20 34 44 / 0.86);
      --line: #263845;
      --ink: #e6edf3;
      --ink-2: #a3b3c2;
      --ink-3: #7f91a1;
      --accent: #ff8a4c;
      --accent-ink: #1a0d05;
      --accent-soft: #3a2316;
      --ok: #4ade80;
      --ok-soft: #12321f;
      --near: #fbbf24;
      --near-soft: #3a2c0c;
      --bad: #f87171;
      --bad-soft: #3d1717;
      --known: #4ade80;
      --learning: #fbbf24;
      --new: #3a4a56;
      --focus: #ff8a4c;
      --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.04);
      --shadow-2: 0 0 0 1px rgb(255 255 255 / 0.06), 0 10px 30px -10px rgb(0 0 0 / 0.6);
      --shadow-3: 0 0 0 1px rgb(255 255 255 / 0.06), 0 16px 48px -12px rgb(0 0 0 / 0.7);
    }
  }
  :root[data-theme='dark'] {
    color-scheme: dark;
    --ocean: #0e1a24;
    --ocean-deep: #0a141c;
    --land: #263741;
    --coast: #6c8293;
    --border: #3a4c58;
    --graticule: rgb(255 255 255 / 0.05);
    --water-line: #5aa6e6;
    --water-fill: #24425c;
    --bg: #0d1820;
    --surface: #14222c;
    --surface-2: #1a2a35;
    --glass: rgb(20 34 44 / 0.86);
    --line: #263845;
    --ink: #e6edf3;
    --ink-2: #a3b3c2;
    --ink-3: #7f91a1;
    --accent: #ff8a4c;
    --accent-ink: #1a0d05;
    --accent-soft: #3a2316;
    --ok: #4ade80;
    --ok-soft: #12321f;
    --near: #fbbf24;
    --near-soft: #3a2c0c;
    --bad: #f87171;
    --bad-soft: #3d1717;
    --known: #4ade80;
    --learning: #fbbf24;
    --new: #3a4a56;
    --focus: #ff8a4c;
    --shadow-1: 0 0 0 1px rgb(255 255 255 / 0.04);
    --shadow-2: 0 0 0 1px rgb(255 255 255 / 0.06), 0 10px 30px -10px rgb(0 0 0 / 0.6);
    --shadow-3: 0 0 0 1px rgb(255 255 255 / 0.06), 0 16px 48px -12px rgb(0 0 0 / 0.7);
  }
}
