/* ==========================================================================
   Poppie — Design Tokens
   Single source of truth. Edit here to re-skin the whole template.
   ========================================================================== */

:root {
  /* ----- Brand / Accent Colors ---------------------------------------- */
  --primary: #FF6B6B;          /* coral — primary CTA, highlights (graphic/UI use) */
  --primary-hover: #FF5252;    /* CTA hover */
  --primary-soft: #FFE4E4;     /* primary tint for bg washes */
  /* Contrast-safe coral for inline text/links on light bg (≥4.5:1 AA) */
  --primary-ink: #C13D3D;
  --primary-ink-hover: #A82E2E;
  --accent-yellow: #FFD93D;    /* stars, badges (graphic only — not for text) */
  --accent-yellow-ink: #8A6500; /* AA-safe darker yellow when used as text */
  --accent-mint: #6BCB77;      /* success, check icons (graphic) */
  --accent-mint-ink: #2E8540;  /* AA-safe mint when used for text */
  --accent-lavender: #A78BFA;  /* decorative blobs */
  --accent-lavender-ink: #6E4DD4; /* AA-safe lavender for text */
  --accent-peach: #FFB4A2;     /* soft tint backgrounds */
  --accent-sky: #7CC7E8;       /* supporting cool tone */
  --accent-sky-ink: #1E6D93;   /* AA-safe sky for text */

  /* ----- Neutrals (light mode) ---------------------------------------- */
  --ink: #1A1523;
  --ink-soft: #4A4458;
  --ink-mute: #8A8299;
  --bg: #FFFBF5;
  --bg-alt: #FFF1E6;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --border: #F0E6D8;
  --border-strong: #E4D6C1;

  /* ----- Semantic ------------------------------------------------------ */
  --success: #6BCB77;
  --warning: #FFD93D;
  --danger: #E63946;
  --info: #7CC7E8;

  /* ----- Typography ---------------------------------------------------- */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;       /* 12px */
  --fs-sm: 0.875rem;      /* 14px */
  --fs-base: 1.0625rem;   /* 17px — body */
  --fs-md: 1.125rem;      /* 18px */
  --fs-lg: 1.25rem;       /* 20px */
  --fs-xl: 1.5rem;        /* 24px — h3 */
  --fs-2xl: 2rem;         /* 32px */
  --fs-3xl: clamp(2rem, 3.5vw, 3rem);       /* h2 */
  --fs-4xl: clamp(2.5rem, 5vw, 4.5rem);     /* h1 */

  --lh-tight: 1.05;
  --lh-snug: 1.15;
  --lh-normal: 1.3;
  --lh-relaxed: 1.5;
  --lh-loose: 1.65;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-black: 800;

  /* ----- Spacing scale (4pt system) ----------------------------------- */
  --space-1: 0.25rem;   /* 4  */
  --space-2: 0.5rem;    /* 8  */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */

  /* Section vertical rhythm */
  --section-y: var(--space-9);
  --section-y-lg: var(--space-10);

  /* ----- Radius -------------------------------------------------------- */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 48px;
  --radius-full: 9999px;

  /* ----- Shadows (soft, tinted — never harsh black) ------------------- */
  --shadow-sm: 0 4px 12px rgba(255, 107, 107, 0.08);
  --shadow-md: 0 12px 32px rgba(26, 21, 35, 0.08), 0 2px 6px rgba(255, 107, 107, 0.04);
  --shadow-lg: 0 24px 64px rgba(167, 139, 250, 0.12), 0 8px 16px rgba(26, 21, 35, 0.06);
  --shadow-xl: 0 40px 96px rgba(167, 139, 250, 0.18), 0 12px 24px rgba(26, 21, 35, 0.08);
  --shadow-colored-primary: 0 16px 40px -8px rgba(255, 107, 107, 0.45);
  --shadow-colored-mint: 0 16px 40px -8px rgba(107, 203, 119, 0.4);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* ----- Motion -------------------------------------------------------- */
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;
  --dur-hero: 600ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* ----- Layout -------------------------------------------------------- */
  --container-max: 1200px;
  --container-narrow: 760px;
  --gutter-mobile: 20px;
  --gutter-tablet: 32px;
  --gutter-desktop: 48px;

  /* ----- Z-index scale ------------------------------------------------- */
  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 50;
  --z-overlay: 100;
  --z-modal: 200;
  --z-toast: 300;

  /* Nav height (used by sticky offsets) */
  --nav-h: 72px;

  color-scheme: light;
}

/* ==========================================================================
   Dark mode — tokens only override the needed vars
   Activated by [data-theme="dark"] on <html>
   ========================================================================== */

[data-theme="dark"] {
  --primary: #FF8585;
  --primary-hover: #FF9F9F;
  --primary-soft: #3A1F28;
  /* On dark bg, the bright coral itself already clears AA — use it as ink */
  --primary-ink: #FFA0A0;
  --primary-ink-hover: #FFB8B8;
  --accent-yellow: #FFE066;
  --accent-yellow-ink: #FFE066;
  --accent-mint: #7CE08A;
  --accent-mint-ink: #7CE08A;
  --accent-lavender: #B8A0FF;
  --accent-lavender-ink: #B8A0FF;
  --accent-peach: #FFC8B8;
  --accent-sky: #8CD3F0;
  --accent-sky-ink: #8CD3F0;

  --ink: #FBF7F0;
  --ink-soft: #C8BFD5;
  --ink-mute: #8A82A0;
  --bg: #0F0B1A;
  --bg-alt: #1A1428;
  --surface: #241B38;
  --surface-raised: #2E2344;
  --border: #3A2F52;
  --border-strong: #4A3F68;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(167, 139, 250, 0.25), 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 40px 96px rgba(167, 139, 250, 0.35), 0 12px 24px rgba(0, 0, 0, 0.6);
  --shadow-colored-primary: 0 16px 40px -8px rgba(255, 133, 133, 0.4);
  --shadow-colored-mint: 0 16px 40px -8px rgba(124, 224, 138, 0.35);

  color-scheme: dark;
}
