/* ===========================================================
   SUPER NICHE PRESS — base.css + design tokens
   Palette derived from "The Research Guide" cover art:
   cream paper, charcoal ink, gold + sage constellation accents.
   =========================================================== */

/* ---------- Base reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(circle at 15% 10%, color-mix(in oklab, var(--color-text) 3%, transparent) 0, transparent 40%),
    radial-gradient(circle at 85% 30%, color-mix(in oklab, var(--color-text) 2.5%, transparent) 0, transparent 35%),
    radial-gradient(circle at 40% 80%, color-mix(in oklab, var(--color-text) 2.5%, transparent) 0, transparent 40%);
  background-attachment: fixed;
  transition: background-color .25s ease, color .25s ease;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); font-weight: 500; }
p, li, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
::selection { background: color-mix(in oklab, var(--color-gold) 30%, transparent); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; border-radius: var(--radius-sm); }
button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role="button"], input, textarea, select {
  transition: color .18s cubic-bezier(.16,1,.3,1), background .18s cubic-bezier(.16,1,.3,1),
    border-color .18s cubic-bezier(.16,1,.3,1), box-shadow .18s cubic-bezier(.16,1,.3,1), transform .18s cubic-bezier(.16,1,.3,1);
}

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ---------- Type scale ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 0.375rem; --radius-md: 0.6rem; --radius-lg: 1rem; --radius-xl: 1.5rem; --radius-full: 9999px;

  --content-narrow: 640px; --content-default: 960px; --content-wide: 1180px;

  --font-display: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* ---------- Color: light (default) ---------- */
:root, [data-theme="light"] {
  --color-bg: #f2e8d1;
  --color-surface: #f7efd9;
  --color-surface-2: #fdf8ea;
  --color-surface-offset: #eaddb5;
  --color-border: #d2c096;
  --color-divider: #e0d0a2;

  --color-text: #241c11;
  --color-text-muted: #6c5c3d;
  --color-text-faint: #a3906a;
  --color-text-inverse: #f2e8d1;

  --color-gold: #93701f;
  --color-gold-hover: #785a19;
  --color-gold-active: #614814;
  --color-gold-highlight: #ecdba9;

  --color-ink: #5a2230;
  --color-ink-highlight: #ecdcdc;

  --color-sage: #5c6e48;
  --color-sage-hover: #4a5939;
  --color-sage-active: #3a462d;
  --color-sage-highlight: #dde2cf;

  --color-blush: #b6603f;
  --color-blush-highlight: #e9d2c4;

  --color-success: #4c7a3c;
  --color-error: #a3403a;
  --color-error-highlight: #f0d8d5;

  --shadow-sm: 0 1px 2px rgba(43,38,24,0.08);
  --shadow-md: 0 6px 20px rgba(43,38,24,0.10);
  --shadow-lg: 0 20px 48px rgba(43,38,24,0.16);
}

/* ---------- Color: dark ---------- */
[data-theme="dark"] {
  --color-bg: #17150f;
  --color-surface: #1c1a13;
  --color-surface-2: #211f17;
  --color-surface-offset: #262316;
  --color-border: #3a3626;
  --color-divider: #2e2b1d;

  --color-text: #ece5d2;
  --color-text-muted: #a89d84;
  --color-text-faint: #6b6250;
  --color-text-inverse: #17150f;

  --color-gold: #d9ac4c;
  --color-gold-hover: #e8bf6a;
  --color-gold-active: #f3d189;
  --color-gold-highlight: #3a3218;

  --color-ink: #c98a97;
  --color-ink-highlight: #3a2228;

  --color-sage: #8ea283;
  --color-sage-hover: #a3b799;
  --color-sage-active: #b7c9ad;
  --color-sage-highlight: #263124;

  --color-blush: #e0a487;
  --color-blush-highlight: #3a2a20;

  --color-success: #8ab377;
  --color-error: #d9847d;
  --color-error-highlight: #3a2320;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #17150f; --color-surface: #1c1a13; --color-surface-2: #211f17;
    --color-surface-offset: #262316; --color-border: #3a3626; --color-divider: #2e2b1d;
    --color-text: #ece5d2; --color-text-muted: #a89d84; --color-text-faint: #6b6250;
    --color-text-inverse: #17150f;
    --color-gold: #d9ac4c; --color-gold-hover: #e8bf6a; --color-gold-active: #f3d189; --color-gold-highlight: #3a3218;
    --color-ink: #c98a97; --color-ink-highlight: #3a2228;
    --color-sage: #8ea283; --color-sage-hover: #a3b799; --color-sage-active: #b7c9ad; --color-sage-highlight: #263124;
    --color-blush: #e0a487; --color-blush-highlight: #3a2a20;
    --color-success: #8ab377; --color-error: #d9847d; --color-error-highlight: #3a2320;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow-md: 0 6px 20px rgba(0,0,0,0.35); --shadow-lg: 0 20px 48px rgba(0,0,0,0.5);
  }
}

/* ===========================================================
   Layout primitives
   =========================================================== */
.wrap { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.wrap--narrow { max-width: var(--content-narrow); }
.wrap--default { max-width: var(--content-default); }

section { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  letter-spacing: .06em;
  font-variant: small-caps;
  color: var(--color-gold);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 3px double var(--color-border);
  transition: box-shadow .3s cubic-bezier(.16,1,.3,1);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); gap: var(--space-6); }
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand svg { width: 28px; height: 28px; color: var(--color-gold); flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: .02em; }
.brand-name .press { color: var(--color-text-muted); font-style: italic; }

.nav-links { display: flex; align-items: center; gap: var(--space-8); }
.nav-links a {
  font-family: var(--font-display); font-size: var(--text-base); letter-spacing: .04em; font-variant: small-caps;
  color: var(--color-text-muted); position: relative; padding-block: var(--space-1);
}
.nav-links a:hover, .nav-links a.active { color: var(--color-text); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--color-gold); }

.header-actions { display: flex; align-items: center; gap: var(--space-4); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-full);
  color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.icon-btn:hover { color: var(--color-text); border-color: var(--color-gold); }
.icon-btn svg { width: 16px; height: 16px; }

.menu-toggle { display: none; }

@media (max-width: 780px) {
  .nav-links { position: fixed; inset: 64px var(--space-6) auto var(--space-6); flex-direction: column; align-items: flex-start;
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6);
    box-shadow: var(--shadow-lg); gap: var(--space-5); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s cubic-bezier(.16,1,.3,1); }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .menu-toggle { display: grid; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-size: var(--text-base); letter-spacing: .05em; font-variant: small-caps;
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-sm); white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary { background: var(--color-text); color: var(--color-text-inverse); }
.btn--primary:hover { background: var(--color-gold-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
[data-theme="dark"] .btn--primary:hover, :root:not([data-theme]) .btn--primary:hover { color: var(--color-text-inverse); }
.btn--outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--outline:hover { border-color: var(--color-gold); color: var(--color-gold); }
.btn--ghost { background: transparent; color: var(--color-text-muted); }
.btn--ghost:hover { color: var(--color-text); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(var(--space-16), 10vw, var(--space-32)) clamp(var(--space-12), 6vw, var(--space-20)); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-16); align-items: center; }
.hero h1 { font-size: var(--text-3xl); font-weight: 500; margin-block: var(--space-5) var(--space-6); }
.hero h1 em { font-style: italic; color: var(--color-gold); }
.hero p.lede { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 46ch; margin-bottom: var(--space-8); }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual .cover-frame { width: min(340px, 80%); transform: rotate(2.5deg); }
.hero-visual .cover-frame img { border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.hero-visual .float-tag {
  position: absolute; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-md); font-family: var(--font-mono); font-size: var(--text-xs);
}
.hero-visual .float-tag--top { top: 6%; left: -4%; }
.hero-visual .float-tag--bottom { bottom: 8%; right: -6%; }
.hero-visual .float-tag strong { display: block; font-family: var(--font-display); font-size: var(--text-lg); font-style: italic; color: var(--color-gold); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual .float-tag { display: none; }
}

/* ---------- Section headings ---------- */
.section-head { max-width: 640px; margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-2xl); margin-top: var(--space-3); }
.section-head h2::after { content: ""; display: block; width: 44px; height: 1px; background: var(--color-gold); margin-top: var(--space-4); }
.section-head p { color: var(--color-text-muted); font-size: var(--text-base); margin-top: var(--space-4); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center h2::after { margin-inline: auto; }

/* ---------- Featured product ---------- */
.featured { background: var(--color-surface); border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.featured-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-16); align-items: center; }
.featured-cover { position: relative; }
.featured-cover img { border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: .08em; text-transform: uppercase; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
}
.badge--available { background: var(--color-sage-highlight); color: var(--color-sage); }
.badge--soon { background: var(--color-surface-offset); color: var(--color-text-muted); border: 1px dashed var(--color-border); }
.featured-info h3 { font-size: var(--text-xl); margin-block: var(--space-4) var(--space-2); }
.featured-info .subtitle { font-style: italic; color: var(--color-text-muted); font-size: var(--text-base); margin-bottom: var(--space-5); }
.featured-info p.desc { color: var(--color-text-muted); max-width: 52ch; margin-bottom: var(--space-6); }
.spec-list { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-8); }
.spec-chip { font-family: var(--font-mono); font-size: var(--text-xs); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: var(--space-1) var(--space-3); color: var(--color-text-muted); }
.price-row { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-6); }
.price { font-family: var(--font-display); font-size: var(--text-xl); }
.price-note { font-size: var(--text-xs); color: var(--color-text-faint); }

@media (max-width: 900px) { .featured-grid { grid-template-columns: 1fr; gap: var(--space-10); } }

/* ---------- Coming soon grid ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6); }
.niche-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
}
.niche-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.niche-cover { aspect-ratio: 3/4; position: relative; background: var(--color-surface-2); }
.niche-cover img { width: 100%; height: 100%; object-fit: cover; }
.niche-cover .ribbon {
  position: absolute; top: var(--space-3); right: var(--space-3); font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 3px var(--space-2); color: var(--color-text-muted);
}
.niche-body { padding: var(--space-5); }
.niche-body h4 { font-size: var(--text-base); margin-bottom: var(--space-1); }
.niche-body p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Generated placeholder covers */
.placeholder-cover {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: var(--space-6) var(--space-4); text-align: center; position: relative;
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
}
.placeholder-cover .frame {
  position: absolute; inset: 10px; border: 1px solid color-mix(in oklab, var(--color-gold) 55%, transparent); border-radius: var(--radius-sm);
}
.placeholder-cover .glyph { width: 56px; height: 56px; color: var(--color-gold); margin-top: var(--space-10); }
.placeholder-cover .cover-title { font-family: var(--font-display); font-size: var(--text-base); line-height: 1.2; margin-bottom: var(--space-2); }
.placeholder-cover .cover-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ---------- Why us ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-10); }
.trio-item { text-align: left; }
.trio-item .icon { width: 40px; height: 40px; color: var(--color-gold); margin-bottom: var(--space-4); }
.trio-item h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-2); }
.trio-item p { color: var(--color-text-muted); font-size: var(--text-sm); }
@media (max-width: 780px) { .trio { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ---------- Product detail page ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); padding-block: var(--space-6) 0; }
.breadcrumb a:hover { color: var(--color-gold); }
.product-page { padding-block: var(--space-10) var(--space-24); }
.product-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-16); }
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); margin-bottom: var(--space-4); }
.gallery-thumbs { display: flex; gap: var(--space-3); }
.gallery-thumbs button { width: 72px; aspect-ratio: 3/4; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--color-border); padding: 0; }
.gallery-thumbs button.active { border-color: var(--color-gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info h1 { font-size: var(--text-xl); margin-block: var(--space-3) var(--space-1); }
.product-info .subtitle { font-style: italic; color: var(--color-text-muted); margin-bottom: var(--space-5); }
.stars { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); }
.stars svg { width: 14px; height: 14px; color: var(--color-gold); }

.format-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-5); }
.format-option { position: relative; text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); background: var(--color-surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.format-option:hover { border-color: var(--color-gold); }
.format-option.active { border-color: var(--color-gold); box-shadow: 0 0 0 1px var(--color-gold); }
.format-option .format-label { display: block; font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-muted); margin-bottom: var(--space-1); }
.format-option .format-name { display: block; font-family: var(--font-display); font-size: var(--text-base); margin-bottom: var(--space-1); }
.format-option .format-price { display: block; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-gold); }
.format-option .format-check { position: absolute; top: var(--space-3); right: var(--space-3); width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--color-border); }
.format-option.active .format-check { border-color: var(--color-gold); background: var(--color-gold); }
.format-option.active .format-check::after { content: ""; display: block; width: 6px; height: 6px; margin: 4px auto; border-radius: 50%; background: var(--color-surface); }

.buybox { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); margin-block: var(--space-6); }
.qty-row { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-full); }
.qty-control button { width: 32px; height: 32px; font-size: var(--text-base); }
.qty-control span { width: 32px; text-align: center; font-family: var(--font-mono); font-size: var(--text-sm); }
.secure-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-4); }
.secure-note svg { width: 14px; height: 14px; color: var(--color-sage); flex-shrink: 0; }

.feature-list { margin-top: var(--space-6); display: grid; gap: var(--space-3); }
.feature-list li { display: flex; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.feature-list svg { width: 16px; height: 16px; color: var(--color-sage); flex-shrink: 0; margin-top: 3px; }

.accordion { border-top: 1px solid var(--color-divider); }
.accordion-item { border-bottom: 1px solid var(--color-divider); }
.accordion-item button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-block: var(--space-5); text-align: left; font-size: var(--text-base); font-family: var(--font-body); font-weight: 500; }
.accordion-item svg { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform .25s; flex-shrink: 0; }
.accordion-item.open svg { transform: rotate(180deg); }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .3s cubic-bezier(.16,1,.3,1); }
.accordion-panel p { padding-bottom: var(--space-5); color: var(--color-text-muted); font-size: var(--text-sm); max-width: 62ch; }

.detail-block { max-width: var(--content-narrow); margin-inline: auto; }
.detail-block h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.detail-block p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.detail-block ul { display: grid; gap: var(--space-3); margin-block: var(--space-4); }
.detail-block ul li { display: flex; gap: var(--space-3); font-size: var(--text-base); }
.detail-block ul svg { width: 18px; height: 18px; color: var(--color-gold); flex-shrink: 0; margin-top: 3px; }

@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; } }

/* ---------- Toast / modal for coming-soon checkout ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,17,10,0.55); display: none; align-items: center; justify-content: center; z-index: 100; padding: var(--space-6);
}
.modal-overlay.open { display: flex; }
.modal-card { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg); max-width: 420px; padding: var(--space-8); box-shadow: var(--shadow-lg); text-align: center; }
.modal-card .glyph { width: 40px; height: 40px; color: var(--color-gold); margin-inline: auto; margin-bottom: var(--space-4); }
.modal-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.modal-card p { color: var(--color-text-muted); font-size: var(--text-sm); margin-bottom: var(--space-6); }

/* ---------- About page ---------- */
.about-hero { padding-block: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-12); }
.about-hero h1 { font-size: var(--text-2xl); max-width: 20ch; }
.about-hero p { color: var(--color-text-muted); font-size: var(--text-lg); max-width: 60ch; margin-top: var(--space-5); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start; }
.story-grid p { color: var(--color-text-muted); margin-bottom: var(--space-4); max-width: 56ch; }
.pull-quote { font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--color-gold); border-left: 2px solid var(--color-gold); padding-left: var(--space-5); }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } }

/* ---------- Simple content pages (privacy / shipping) ---------- */
.content-page { padding-block: var(--space-12) var(--space-24); }
.content-page .wrap--narrow h1 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.content-page h2 { font-size: var(--text-lg); margin-block: var(--space-8) var(--space-3); }
.content-page p, .content-page li { color: var(--color-text-muted); margin-bottom: var(--space-3); }
.content-page ul { padding-left: var(--space-6); list-style: disc; }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px double var(--color-border); background: var(--color-surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-12); padding-block: var(--space-16); }
.footer-brand .brand { margin-bottom: var(--space-4); }
.footer-brand p { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 32ch; margin-bottom: var(--space-5); }
.footer-col h5 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-faint); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.footer-col li { position: relative; }
.footer-col a { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-col a:hover { color: var(--color-gold); }
.footer-bottom { border-top: 1px solid var(--color-divider); padding-block: var(--space-5); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.footer-bottom p { font-size: var(--text-xs); color: var(--color-text-faint); }
.social-row { display: flex; gap: var(--space-3); }

@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ---------- Tarot-style feature card (next-up journal teaser) ---------- */
.tarot-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); max-width: 300px; margin-inline: auto; }
.tarot-card {
  width: 100%; aspect-ratio: 5/8; position: relative;
  background: radial-gradient(circle at 50% 30%, var(--color-surface-2), var(--color-surface) 75%);
  border: 7px double var(--color-gold);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-4);
  box-shadow: var(--shadow-md);
}
.tarot-corner { position: absolute; width: 14px; height: 14px; border: 1px solid var(--color-gold); opacity: .65; }
.tarot-corner--tl { top: 9px; left: 9px; border-width: 1px 0 0 1px; }
.tarot-corner--tr { top: 9px; right: 9px; border-width: 1px 1px 0 0; }
.tarot-corner--bl { bottom: 9px; left: 9px; border-width: 0 0 1px 1px; }
.tarot-corner--br { bottom: 9px; right: 9px; border-width: 0 1px 1px 0; }
.tarot-numeral { font-family: var(--font-mono); font-size: 10px; letter-spacing: .25em; color: var(--color-text-faint); }
.tarot-emblem { position: relative; display: grid; place-items: center; margin-block: var(--space-6); }
.tarot-glyph { width: 60px; height: 60px; color: var(--color-gold); }
.tarot-star { width: 8px; height: 8px; color: var(--color-sage); position: absolute; opacity: .75; }
.tarot-star--1 { top: -16px; left: -34px; }
.tarot-star--2 { bottom: -12px; right: -30px; }
.tarot-title-band {
  width: 100%; text-align: center; padding-block: var(--space-2);
  border-top: 1px solid color-mix(in oklab, var(--color-gold) 45%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--color-gold) 45%, transparent);
}
.tarot-title-band h3 { font-family: var(--font-display); font-style: italic; font-size: var(--text-base); letter-spacing: .03em; }
.tarot-caption { text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); max-width: 34ch; }
