/* ==========================================================================
   MAGIC PEN - design tokens
   Deep dark ground, brushed silver, one restrained cold light.
   ========================================================================== */

/* --- Self-hosted variable fonts (SIL Open Font License) ------------------ */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant.woff2') format('woff2-variations'),
       url('../fonts/cormorant.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Variable';
  src: url('../fonts/inter.woff2') format('woff2-variations'),
       url('../fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Caveat Variable';
  src: url('../fonts/caveat.woff2') format('woff2-variations'),
       url('../fonts/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Ground ------------------------------------------------------------ */
  --ink-1000: #030305;
  --ink-900:  #07070a;
  --ink-850:  #0a0a0f;
  --ink-800:  #0e0e14;
  --ink-700:  #14141c;
  --ink-600:  #1c1c26;
  --ink-500:  #262633;

  /* --- Silver ------------------------------------------------------------ */
  --silver-100: #f7f8fa;
  --silver-200: #dfe3e9;
  --silver-300: #b9bfc9;
  --silver-400: #8d94a1;
  --silver-500: #676e7b;
  --silver-600: #474d58;

  /* --- Text -------------------------------------------------------------- */
  --text-primary:   #f2f4f7;
  --text-secondary: #a9b0bc;
  /* Lifted from #6d7482, which measured 4.04:1 on a card and so failed
     WCAG AA for small text. This clears 4.5:1 on every surface in the shop,
     including a card stacked on a card, while staying quiet enough to read
     as secondary rather than competing with the text above it. */
  --text-muted:     #838a99;
  --text-ink:       #16161c; /* on light surfaces */

  /* --- Light (the one accent) ------------------------------------------- */
  --glow:        #cfe0ff;
  --glow-soft:   rgba(207, 224, 255, 0.30);
  --glow-faint:  rgba(207, 224, 255, 0.10);
  --accent-line: rgba(207, 224, 255, 0.45);

  /* --- Paper (the demonstration) ---------------------------------------- */
  --paper:        #f2efe6;
  --paper-shade:  #e2ddcf;
  --paper-ink:    #2a2723;

  /* --- Lines and surfaces ------------------------------------------------ */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface:     rgba(255, 255, 255, 0.03);
  --surface-2:   rgba(255, 255, 255, 0.05);

  /* --- Status ------------------------------------------------------------ */
  --good:    #37c48b;
  --warning: #e0a63c;
  --danger:  #e06060;

  /* --- Type -------------------------------------------------------------- */
  --font-display: 'Cormorant Garamond', 'Didot', 'Bodoni MT', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-hand: 'Caveat Variable', 'Segoe Script', 'Bradley Hand', cursive;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;

  /* --- Scale ------------------------------------------------------------- */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.03rem);
  --step-1:  clamp(1.1rem, 1.04rem + 0.3vw, 1.3rem);
  --step-2:  clamp(1.35rem, 1.2rem + 0.7vw, 1.85rem);
  --step-3:  clamp(1.7rem, 1.4rem + 1.5vw, 2.7rem);
  --step-4:  clamp(2.2rem, 1.6rem + 3vw, 4.2rem);
  --step-5:  clamp(2.8rem, 1.7rem + 5.2vw, 6.4rem);

  /* --- Space ------------------------------------------------------------- */
  --space-1: 0.375rem;
  --space-2: 0.75rem;
  --space-3: 1.25rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 7rem;
  --space-8: 10rem;

  /* --- Shape ------------------------------------------------------------- */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 30px 80px -30px rgba(0, 0, 0, 0.95);
  --shadow-paper: 0 30px 70px -25px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);

  /* --- Motion ------------------------------------------------------------ */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur: 420ms;
  --dur-slow: 900ms;

  --max-width: 1200px;
  --max-text: 62ch;
  --header-height: 72px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur: 1ms;
    --dur-slow: 1ms;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
