/* ── Fonts ──────────────────────────────────────────────
   Both families are self-hosted. DM Sans was previously an
   @import from Google, which serialises three round-trips to
   a third party before any text can paint (fetch this file →
   parse → fetch Google's CSS → fetch the font). Serving it
   ourselves also keeps visitor IPs off Google's logs.

   DM Sans ships as a variable font (opsz 9–40, wght 100–1000),
   so one file per style covers every weight we use. Licence:
   ../assets/fonts/DMSans-OFL.txt (SIL Open Font License 1.1).
──────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Fake Receipt';
  src: url('../assets/fonts/fake_receipt_regular-webfont.woff2') format('woff2'),
       url('../assets/fonts/fake_receipt_regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/dmsans-latin.woff2') format('woff2');
  font-weight: 100 1000;
  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: 'DM Sans';
  src: url('../assets/fonts/dmsans-latin-ext.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
  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;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../assets/fonts/dmsans-italic-latin.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: italic;
  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: 'DM Sans';
  src: url('../assets/fonts/dmsans-italic-latin-ext.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
  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;
}

:root {
  /* ── Hey Monika Palette ─────────────────────────────────
     8 stops, dark plum → near-white blush
     Accent (#a030d4) used sparingly — CTAs and highlights only
  ──────────────────────────────────────────────────────── */
  --palette-1:              #1c0826;   /* near-black plum */
  --palette-2:              #2e0e7c;   /* deep indigo */
  --palette-3:              #a030d4;   /* vivid violet — accent only */
  --palette-4:              #c278d4;   /* medium orchid */
  --palette-5:              #d0a8cc;   /* muted mauve */
  --palette-6:              #e2cedc;   /* dusty rose */
  --palette-7:              #eedde8;   /* pale blush */
  --palette-8:              #faf4f8;   /* near white */

  /* ── Semantic aliases ── */
  --color-bg:               var(--palette-8);
  --color-surface:          var(--palette-7);
  --color-surface-mid:      var(--palette-6);
  --color-surface-dark:     var(--palette-2);
  --color-text-primary:     var(--palette-1);
  --color-text-secondary:   #6b4a72;   /* palette-5 darkened for readability */
  --color-text-light:       var(--palette-8);

  /* Accent — bright vivid violet, use sparingly */
  --color-accent:           var(--palette-3);
  --color-accent-deep:      #7a1fa8;   /* darkened accent for hover states */

  /* Currency symbols — softer than the numeral they sit against */
  --color-currency:         #b88bbc;

  /* Monika brand purple — mid-range, approachable */
  --color-monika:           var(--palette-4);
  --color-monika-light:     var(--palette-5);
  --color-monika-dark:      var(--palette-2);

  /* ── Lava lamp blobs — dark end of palette, very muted ──
     Blobs are near-black variants of palette colours;
     the contrast() filter does the work of making them pop
  ──────────────────────────────────────────────────────── */
  --lava-bg:                #1c0826;   /* palette-1 — the darkest value in the brand */
  --lava-1:                 #2a0a5c;   /* dark indigo (palette-2 deep) */
  --lava-2:                 #1a0430;   /* near-black purple */
  --lava-3:                 #3a1260;   /* dark mid-violet */
  --lava-4:                 #200850;   /* deep midnight */
  --lava-5:                 #2e0a48;   /* dark plum-violet */

  /* ── Typography ── */
  --font-display:           'Fake Receipt', monospace;
  --font-body:              'DM Sans', system-ui, sans-serif;

  /* ── Breakpoints ────────────────────────────────────────
     Single source of truth. CSS custom properties can't be
     used inside @media, so the literal values below are
     repeated in media queries by hand — change both together.
     main.js reads --bp-md via getComputedStyle so the mobile
     nav breakpoint never drifts from the stylesheet.

       --bp-sm   480px   mobile
       --bp-md   768px   tablet portrait / mobile nav cutover
       --bp-lg  1024px   tablet landscape & small laptop
  ──────────────────────────────────────────────────────── */
  --bp-sm:                  480px;
  --bp-md:                  768px;
  --bp-lg:                  1024px;

  /* ── Type scale ─────────────────────────────────────────
     xs–xl are fixed (UI text). 2xl and up are fluid: they
     interpolate between the min and max across the viewport
     so headlines resize without per-section media queries.
  ──────────────────────────────────────────────────────── */
  --text-xs:                0.75rem;
  --text-sm:                0.875rem;
  --text-base:              1rem;
  --text-lg:                1.125rem;
  --text-xl:                1.375rem;
  --text-2xl:               clamp(1.375rem, 1.10rem + 1.20vw,  1.75rem);
  --text-3xl:               clamp(1.75rem,  1.10rem + 2.40vw,  2.5rem);
  --text-4xl:               clamp(2rem,     1.10rem + 3.40vw,  3.5rem);
  --text-5xl:               clamp(2.5rem,   1.00rem + 5.20vw,  5rem);
  --text-6xl:               clamp(3rem,     1.20rem + 8.60vw,  7rem);

  /* ── Spacing ── */
  --space-unit:             8px;
  --space-xs:               4px;
  --space-sm:               8px;
  --space-md:               16px;
  --space-lg:               32px;
  --space-xl:               64px;
  --space-2xl:              128px;
  --space-3xl:              200px;

  /* ── Layout ── */
  --content-width:          1200px;
  --content-narrow:         780px;
  --nav-height:             72px;
  --gutter:                 var(--space-lg);
  --border-radius-sm:       6px;
  --border-radius-md:       16px;
  --border-radius-pill:     999px;

  /* ── Shadows ── */
  --shadow-sm:              0 1px 3px rgba(28,8,38,0.08);
  --shadow-md:              0 4px 24px rgba(28,8,38,0.12);
  --shadow-lg:              0 16px 64px rgba(28,8,38,0.18);

  /* ── Motion ── */
  --ease-out:               cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:            cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:          150ms;
  --duration-base:          300ms;
  --duration-slow:          600ms;
  --duration-xslow:         1000ms;
}
