/* Stencil Fonts */
@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&family=Syne:wght@400;600;700&display=swap');
/* /Stencil Fonts */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');


:root {
  /* ── typography ────────────────────────────────────────────── */
  --font-display: 'Instrument Serif', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, monospace;
  --font-weight-display: 400;
  --line-height-display: 1.0;
  --tracking-display: -0.01em;
  --font-weight-body: 400;
  --line-height-body: 1.65;
  --tracking-body: 0em;
  --font-weight-mono: 400;

  /* ── base palette (No Slumps — warm coral) ─────────────────── */
  --background: #FDFAF7;      /* warm off-white */
  --foreground: #1A1A1A;      /* near-black */
  --card: #FFFFFF;
  --card-foreground: #1A1A1A;
  --popover: #FFFFFF;
  --popover-foreground: #1A1A1A;
  --primary: #F4845F;         /* warm coral-orange — the brand */
  --primary-foreground: #FFFFFF;
  --secondary: #FBEEE6;       /* soft peach surface */
  --secondary-foreground: #8A4A2E;
  --muted: #F6EEE7;
  --muted-foreground: #8A7E78; /* warm grey */
  --accent: #F6EEE7;
  --accent-foreground: #1A1A1A;
  --accent-secondary: #FBBFA0; /* soft peach — chips, highlights */
  --accent-secondary-foreground: #6B3620;
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0 0);
  --border: #EDE1D6;
  --input: #EDE1D6;
  --ring: color-mix(in srgb, var(--primary) 45%, var(--background));
  --success: oklch(0.60 0.13 150);
  --warning: oklch(0.78 0.15 71);
  /* warm gold — reserved for the elevated "Love" rating */
  --gold: #C8862B;
  --gold-foreground: #FFF9EC;
  --gold-tint: color-mix(in srgb, #C8862B 12%, var(--background));

  /* ── sidebar ───────────────────────────────────────────────── */
  --sidebar: #FFFFFF;
  --sidebar-foreground: #1A1A1A;
  --sidebar-primary: #F4845F;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #F6EEE7;
  --sidebar-accent-foreground: #1A1A1A;
  --sidebar-border: #EDE1D6;
  --sidebar-ring: color-mix(in srgb, var(--primary) 45%, var(--background));

  /* ── surface hierarchy ─────────────────────────────────────── */
  --background-secondary: #F7EFE7;
  --surface-hover: #F5ECE3;
  --surface-active: #EFE3D7;
  --surface-elevated: #FFFFFF;

  /* ── border hierarchy ──────────────────────────────────────── */
  --border-subtle: #F3EAE0;
  --border-muted: #EDE1D6;
  --border-strong: #DFC9B6;

  /* ── text hierarchy ────────────────────────────────────────── */
  --foreground-secondary: #6B5F58;

  /* ── primary depth ─────────────────────────────────────────── */
  --primary-hover: #E86F44;
  --primary-muted: color-mix(in srgb, var(--primary) 16%, var(--background));
  --primary-soft: color-mix(in srgb, var(--primary) 9%, var(--background));
  --primary-tint: color-mix(in srgb, var(--primary) 5%, var(--background));

  /* ── focus & error ─────────────────────────────────────────── */
  --focus-ring: color-mix(in srgb, var(--primary) 35%, transparent);
  --error: oklch(0.577 0.245 27.325);
  --error-foreground: oklch(0.985 0 0);

  /* ── radius (chunky, rounded) ──────────────────────────────── */
  --radius: 0.75rem;
  --radius-none: 0rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ── shadows (warm-tinted) ─────────────────────────────────── */
  --shadow-sm: 0 1px 2px rgba(120, 72, 40, 0.05), 0 2px 8px rgba(120, 72, 40, 0.04);
  --shadow-md: 0 6px 24px rgba(120, 72, 40, 0.08);
  --shadow-lg: 0 22px 60px rgba(120, 72, 40, 0.13);

  /* ── motion ────────────────────────────────────────────────── */
  --duration-fast: 120ms;
  --duration-normal: 260ms;
  --duration-slow: 480ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);

  /* ── spacing ───────────────────────────────────────────────── */
  --spacing-base: 0.25rem;
}

.dark {
  --background: #17130F;
  --foreground: #F7EFE8;
  --card: #221C16;
  --card-foreground: #F7EFE8;
  --popover: #221C16;
  --popover-foreground: #F7EFE8;
  --primary: #F4845F;
  --primary-foreground: #1A120C;
  --secondary: #2E241C;
  --secondary-foreground: #F6D8C4;
  --muted: #271F18;
  --muted-foreground: #B7A79C;
  --accent: #271F18;
  --accent-foreground: #F7EFE8;
  --accent-secondary: #E09E7C;
  --accent-secondary-foreground: #1A120C;
  --border: #35291F;
  --input: #35291F;
  --background-secondary: #1D1712;
  --surface-hover: #271F18;
  --surface-active: #322619;
  --surface-elevated: #291F17;
  --border-subtle: #2A2018;
  --border-muted: #35291F;
  --border-strong: #4E3C2C;
  --foreground-secondary: #CDBCAE;
  --primary-hover: #F79876;
  --gold: #E0B354;
  --gold-foreground: #221C16;
  --gold-tint: color-mix(in srgb, #E0B354 14%, var(--background));
  --sidebar: #1D1712;
  --sidebar-foreground: #F7EFE8;
  --sidebar-border: #35291F;
}

/* ── Signature grain texture ───────────────────────────────────
   A subtle fractal-noise overlay on the page and on card surfaces —
   the tactile "luxe" quality of the brand. */
body {
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.grain {
  position: relative;
  isolation: isolate;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.8 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}

/* ── Signature: spice flames pulse & glow ──────────────────────── */
@keyframes flame-flicker {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-1px) scale(1.08); opacity: 0.9; }
}
.flame-on {
  animation: flame-flicker 1.6s var(--ease-standard) infinite;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--primary) 55%, transparent));
}
.flame-group:hover .flame-on {
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--primary) 75%, transparent));
}

/* ── Staggered page-load reveal ─────────────────────────────────── */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise-in {
  animation: rise-in 0.6s var(--ease-decelerate) both;
}

@keyframes toast-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-pop {
  animation: toast-pop 0.34s var(--ease-decelerate) both;
}

@media (prefers-reduced-motion: reduce) {
  .rise-in, .toast-pop { animation: none; }
}

@keyframes ring-draw {
  from { stroke-dashoffset: var(--ring-circ); }
}
.ring-draw {
  animation: ring-draw 1.1s var(--ease-decelerate) both;
}

/* ── Looping recommendations ticker ─────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  animation-name: marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.animate-marquee {
  animation: marquee linear infinite;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .animate-marquee { animation: none; }
}

/* ── Discovery: dropdown reveal + "finding" loader ──────────────── */
@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pop-in {
  animation: pop-in 0.22s var(--ease-decelerate) both;
  transform-origin: top center;
}
@keyframes spine-pulse {
  0%, 100% { transform: scaleY(0.5); opacity: 0.45; }
  50% { transform: scaleY(1); opacity: 1; }
}
.spine-pulse {
  animation: spine-pulse 1s var(--ease-standard) infinite;
  transform-origin: bottom center;
}

/* ── Book-loading overlay ───────────────────────────────────────── */
@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.overlay-fade {
  animation: overlay-fade 0.22s var(--ease-decelerate) both;
}
@keyframes book-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}
.book-breathe {
  animation: book-breathe 2.1s var(--ease-standard) infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Stencil Tweaks */
:root {
  --primary: #ff54bb;
  --primary-hover: #d7a4db;
  --font-display: 'Schibsted Grotesk', sans-serif;
  --font-sans: 'Syne', sans-serif;
  --radius: 0.25rem;
  --radius-sm: 0.125rem;
  --radius-lg: 0.375rem;
  --radius-xl: 0.5rem;
  --spacing-base: 0.3rem;
}
/* /Stencil Tweaks */