/* ==========================================================================
   Scoundrel: The Descent — Site Styles
   A printed-manual aesthetic: warm parchment, deep ink, gold leaf accents.
   ========================================================================== */

:root {
  --ink: #1a1410;
  --ink-2: #2a201a;
  --ink-3: #3a2e25;
  --paper: #f3ebd8;
  --paper-2: #ebe0c5;
  --paper-3: #e0d2b0;
  --rule: #c9b78a;
  --rule-dark: #4a3d30;

  --gold: #c69a3f;
  --gold-bright: #e6b955;
  --gold-deep: #8a6a25;
  --blood: #a83229;
  --blood-deep: #6e2018;
  --moss: #4f6b3a;
  --moss-deep: #2f4220;

  --suit-red: #b32a20;
  --suit-black: #1a1410;

  --font-display: 'Cormorant Garamond', 'Cormorant', 'EB Garamond', Garamond, 'Playfair Display', serif;
  --font-serif: 'Lora', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter Tight', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 64ch;
  --container: 1200px;
  --container-wide: 1400px;
  --radius: 4px;
  --radius-card: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain on light backgrounds */
.paper {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(198, 154, 63, 0.06), transparent 60%),
    radial-gradient(ellipse at 80% 90%, rgba(168, 50, 41, 0.04), transparent 60%),
    var(--paper);
  position: relative;
}
.paper::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5;
  z-index: 0;
}
.paper > * { position: relative; z-index: 1; }

/* Dark stone surfaces */
.stone {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(198, 154, 63, 0.10), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.5), transparent 70%),
    linear-gradient(180deg, #15110d, #0c0907 60%, #0a0806);
  color: var(--paper);
  position: relative;
}
.stone::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.85  0 0 0 0 0.6  0 0 0 0.08 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: screen;
  z-index: 0;
}
.stone > * { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============ Type ============ */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.stone .eyebrow { color: var(--gold-bright); }
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow.no-rule::before, .eyebrow.no-rule::after { display: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.h2 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.05; }
.h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; }
.h4 { font-size: 20px; line-height: 1.2; font-weight: 600; }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

.lede { font-size: 22px; line-height: 1.5; color: var(--ink-2); }
.stone .lede { color: rgba(243, 235, 216, 0.82); }

.small { font-size: 14px; line-height: 1.5; }
.tiny  { font-size: 12px; line-height: 1.5; }

a { color: inherit; }
a:hover { color: var(--blood); }
.stone a:hover { color: var(--gold-bright); }

.gold-title {
  font-family: var(--font-display);
  font-weight: 600;
  background: linear-gradient(180deg, #f4d488 0%, #c69a3f 50%, #8a6a25 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  letter-spacing: 0.005em;
}

.title-stack {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.05em;
}
.title-stack .between {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.28em;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--gold-bright);
  text-transform: uppercase;
  font-weight: 400;
}
.title-stack .between::before, .title-stack .between::after {
  content: ""; width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold-deep);
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 8px 24px -10px rgba(198, 154, 63, 0.6);
}
.btn-primary:hover { background: var(--gold-bright); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  opacity: 0.85;
}
.btn-ghost:hover { opacity: 1; background: rgba(255,255,255,0.06); color: inherit; }
.paper .btn-ghost:hover { background: rgba(0,0,0,0.04); }

.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid #000;
  text-decoration: none;
  font-family: var(--font-sans);
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-store:hover { transform: translateY(-2px); background: #000; color: var(--paper); }
.btn-store .row1 { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.75; line-height: 1; margin-bottom: 3px; display: block; }
.btn-store .row2 { font-size: 17px; font-weight: 600; line-height: 1; display: block; }

/* ============ Site chrome ============ */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(15, 11, 8, 0.78);
  border-bottom: 1px solid rgba(198, 154, 63, 0.18);
  color: var(--paper);
}
.site-nav .inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.site-nav a { text-decoration: none; }
.site-nav .logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}
.site-nav .logo .logo-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: block;
  box-shadow: 0 0 0 1px rgba(198, 154, 63, 0.3), 0 4px 10px -3px rgba(0,0,0,0.6);
}
.site-nav .links {
  display: flex; gap: 28px; align-items: center;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.site-nav .links a {
  color: rgba(243, 235, 216, 0.78);
  position: relative;
  padding: 6px 0;
}
.site-nav .links a:hover { color: var(--gold-bright); }
.site-nav .links a.active { color: var(--gold-bright); }
.site-nav .links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--gold);
}
.site-nav .nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
}
.site-nav .nav-cta:hover { background: var(--gold-bright); color: var(--ink); }

.site-nav .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: rgba(198, 154, 63, 0.1);
  color: var(--gold-bright);
  border: 1px solid rgba(198, 154, 63, 0.35);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.site-nav .nav-toggle:hover { background: rgba(198, 154, 63, 0.2); }
.site-nav .nav-icon-close { display: none; }
.site-nav.open .nav-icon-open { display: none; }
.site-nav.open .nav-icon-close { display: block; }

@media (max-width: 720px) {
  .site-nav .inner { gap: 12px; }
  .site-nav .nav-toggle { display: inline-flex; }
  .site-nav .nav-cta {
    font-size: 12px;
    padding: 8px 12px;
  }
  .site-nav .links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    background: rgba(15, 11, 8, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(198, 154, 63, 0.18);
    box-shadow: 0 16px 32px -16px rgba(0,0,0,0.6);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
    padding-top: 0; padding-bottom: 0;
  }
  .site-nav .links a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(243, 235, 216, 0.06);
    font-size: 15px;
    color: rgba(243, 235, 216, 0.85);
  }
  .site-nav .links a:last-child { border-bottom: none; }
  .site-nav .links a.active::after { display: none; }
  .site-nav .links a.active { color: var(--gold-bright); }
  .site-nav.open .links {
    max-height: 480px;
    padding-top: 8px;
    padding-bottom: 16px;
  }
}

@media (max-width: 420px) {
  .site-nav .nav-cta { display: none; }
}

/* ============ Footer ============ */
.site-footer {
  background: var(--ink);
  color: rgba(243, 235, 216, 0.7);
  padding: 64px 0 32px;
  font-size: 14px;
}
.site-footer a { color: rgba(243, 235, 216, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer .grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.site-footer .footer-brand {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--gold-bright);
  margin-bottom: 16px;
}
.site-footer .footer-blurb {
  color: rgba(243, 235, 216, 0.65);
  font-size: 14px;
  max-width: 360px;
}
.site-footer h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .legal {
  margin-top: 48px;
  padding: 24px 28px 0;
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  border-top: 1px solid rgba(243, 235, 216, 0.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px;
  color: rgba(243, 235, 216, 0.55);
}
@media (max-width: 720px) {
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
}

/* ============ Card visuals ============ */
.card {
  position: relative;
  width: 140px; aspect-ratio: 5 / 7.4;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 30% 20%, #f8efd6 0%, #e7d4a8 60%, #d6bf85 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 -3px 12px rgba(0,0,0,0.18) inset,
    0 18px 30px -12px rgba(0,0,0,0.55),
    0 4px 10px -3px rgba(0,0,0,0.4);
  border: 1px solid rgba(60, 40, 20, 0.55);
  font-family: var(--font-display);
  user-select: none;
}
.card::before {
  content: ""; position: absolute; inset: 4px; border-radius: 7px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.18  0 0 0 0 0.08  0 0 0 0.18 0'/></filter><rect width='100' height='100' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
}
.card .corner {
  position: absolute;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.card .corner.tl { top: 10px; left: 12px; }
.card .corner.br { bottom: 10px; right: 12px; transform: rotate(180deg); }
.card .corner .pip { font-size: 14px; margin-top: 1px; }
.card .body {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 22% 14% 16%;
}
.card .card-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 3px rgba(40, 22, 10, 0.35));
  pointer-events: none;
}
.card .body::before {
  content: "";
  position: absolute;
  inset: 18% 8% 12%;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 240, 200, 0.45), transparent 70%);
  pointer-events: none;
}

.card.red   { color: var(--suit-red); }
.card.black { color: var(--suit-black); }

.card.back {
  background:
    radial-gradient(ellipse at center, #7a2418 0%, #4d130c 70%, #380c07 100%);
  border-color: #2a0a06;
  overflow: hidden;
}
.card.back::before {
  /* lattice + flourish pattern */
  content: "";
  position: absolute; inset: 8px;
  border-radius: 6px;
  border: 1px double rgba(244, 212, 136, 0.55);
  box-shadow: 0 0 0 1px rgba(244, 212, 136, 0.18) inset;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' width='40' height='40'><path d='M 20 2 L 38 20 L 20 38 L 2 20 Z' fill='none' stroke='%23c69a3f' stroke-opacity='0.42' stroke-width='0.7'/><circle cx='20' cy='20' r='1.4' fill='%23e6b955' fill-opacity='0.55'/><path d='M 0 20 L 20 0 M 20 40 L 40 20 M 0 20 L 20 40 M 20 0 L 40 20' stroke='%23c69a3f' stroke-opacity='0.25' stroke-width='0.5'/></svg>"),
    radial-gradient(ellipse at center, rgba(244, 212, 136, 0.28), transparent 65%);
  background-size: 28px 28px, 100% 100%;
  background-position: center, center;
  mix-blend-mode: normal;
  opacity: 1;
}
.card.back::after {
  /* central diamond flourish */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 26%; aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid rgba(244, 212, 136, 0.7);
  background:
    radial-gradient(ellipse at center, rgba(244, 212, 136, 0.35), rgba(244, 212, 136, 0.08) 60%, transparent 80%);
  box-shadow: 0 0 12px rgba(244, 212, 136, 0.25);
  pointer-events: none;
}
.card.back.sm::after { width: 22%; }
.card.back.lg::after { width: 28%; }

.card.sm { width: 92px; }
.card.md { width: 120px; }
.card.lg { width: 160px; }

/* Decorative ornament between sections */
.ornament {
  display: flex; align-items: center; gap: 16px;
  color: var(--gold);
  justify-content: center;
  margin: 0 auto;
  width: max-content;
  opacity: 0.7;
}
.ornament::before, .ornament::after {
  content: ""; width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}
.ornament .diamond {
  width: 8px; height: 8px;
  background: currentColor;
  transform: rotate(45deg);
}

/* ============ Utility ============ */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; } .gap-5 { gap: 48px; } .gap-6 { gap: 64px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.muted { opacity: 0.65; }

section { padding: 64px 0; position: relative; }
section.tight { padding: 48px 0; }
section.loose { padding: 96px 0; }

.section-head {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center;
  margin-bottom: 40px;
}
.section-head p { color: var(--ink-2); }
.stone .section-head p { color: rgba(243, 235, 216, 0.78); }

/* ============ Page-specific ============ */

/* Hero */
.hero {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding-top: 100px; padding-bottom: 120px;
  overflow: hidden; min-height: 720px;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 2;
}
.hero-cards { position: absolute; inset: 0; pointer-events: none; }
.float-card { position: absolute; opacity: 0.5; filter: blur(0.3px); }
.float-card.c1 { top: 8%;  left: 6%;  transform: rotate(-22deg); }
.float-card.c2 { top: 18%; right: 7%; transform: rotate(18deg); opacity: 0.42; }
.float-card.c3 { bottom: 10%; left: 12%; transform: rotate(28deg); opacity: 0.38; }
.float-card.c4 { bottom: 8%; right: 6%; transform: rotate(-22deg); opacity: 0.42; }
.float-card.c5 { top: 50%; left: 22%; transform: translateY(-50%) rotate(8deg); opacity: 0.22; }
.float-card.c6 { top: 56%; right: 28%; transform: translateY(-50%) rotate(-12deg); opacity: 0.35; }

@media (max-width: 720px) {
  .float-card.c5, .float-card.c6 { display: none; }
  .float-card.c1, .float-card.c2, .float-card.c3, .float-card.c4 { opacity: 0.25; }
}

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(243, 235, 216, 0.55);
  text-decoration: none;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-hint:hover { color: var(--gold-bright); }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

.hero-meta {
  margin-top: 24px;
  color: rgba(243, 235, 216, 0.6);
  font-size: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}
.hero-meta .dot { opacity: 0.5; }

/* What it is: three pillars */
.three-up {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
  margin-top: 24px;
}
.pillar { text-align: center; max-width: 320px; margin: 0 auto; }
.pillar-num {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 16px;
  font-style: italic;
}
.pillar h3 { margin-bottom: 12px; }
.pillar p { color: var(--ink-2); }
@media (max-width: 800px) {
  .three-up { grid-template-columns: 1fr; gap: 36px; }
}

/* Suits grid */
.suits-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 24px;
}
.suit-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px;
  display: flex; gap: 28px; align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.suit-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -16px rgba(0,0,0,0.25); }
.suit-card-art { flex-shrink: 0; }
.suit-card-body { flex: 1; }
.suit-card-body h3 { margin-bottom: 4px; }
.suit-role {
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}
.suit-count {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--blood);
  font-weight: 600;
}
.suit-card p { font-size: 16px; margin: 0; color: var(--ink-2); }
@media (max-width: 1100px) {
  .suits-grid { grid-template-columns: 1fr; }
  .suit-card { max-width: 560px; margin: 0 auto; width: 100%; }
}

/* Phones (screenshot showcase) */
.phone-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  margin-top: 24px;
}
.phone { display: flex; flex-direction: column; align-items: center; gap: 16px; transition: transform 0.4s ease; margin: 0; }
.phone:hover { transform: translateY(-6px) rotate(-0.5deg); }
.phone:nth-child(even):hover { transform: translateY(-6px) rotate(0.5deg); }
.phone-bezel {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: #000;
  border: 4px solid #1a1410;
  border-radius: 28px;
  padding: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 24px 48px -12px rgba(0,0,0,0.6),
    0 0 0 1px rgba(198, 154, 63, 0.15);
  overflow: hidden;
}
.phone-bezel img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  border-radius: 22px;
  display: block;
}
.phone figcaption {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(243, 235, 216, 0.6);
}
@media (max-width: 1000px) {
  .phone-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .phone-row { grid-template-columns: 1fr; max-width: 280px; margin-left: auto; margin-right: auto; }
}

/* Download cards */
.dl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 24px;
}
.dl-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 32px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.dl-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px -20px rgba(198, 154, 63, 0.4);
  color: inherit;
}
.dl-card.soon { background: var(--paper-3); }
.dl-card.soon:hover { transform: none; box-shadow: none; }
.dl-icon { color: var(--ink); margin-bottom: 8px; }
.dl-card .small { color: var(--ink-2); flex: 1; }
.dl-chip {
  align-self: flex-start;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  color: var(--blood);
}
@media (max-width: 900px) { .dl-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; } }

/* About row */
.about-row {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px;
  align-items: start;
}
@media (max-width: 980px) {
  .about-row { grid-template-columns: 1fr; gap: 32px; }
  .about-row > *:last-child { max-width: none; }
}

/* ==========================================================================
   How to Play page
   ========================================================================== */

.howto-hero { position: relative; }

.breadcrumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 13px; letter-spacing: 0.04em;
  color: rgba(243, 235, 216, 0.6);
  text-decoration: none;
}
.breadcrumb:hover { color: var(--gold-bright); }

/* Body: sidebar TOC + main column */
.howto-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  padding: 80px 28px 64px;
  background: var(--paper);
}

/* TOC */
.toc {
  position: sticky; top: 88px;
  align-self: start;
  font-family: var(--font-sans);
  font-size: 14px;
  border-right: 1px solid var(--rule);
  padding-right: 24px;
}
.toc-label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 16px;
}
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.toc a {
  display: flex; gap: 14px; align-items: baseline;
  text-decoration: none; color: var(--ink-2);
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.3;
  transition: color 0.15s;
}
.toc a:hover { color: var(--blood); }
.toc-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
  width: 22px;
}

@media (max-width: 1000px) {
  .howto-body { grid-template-columns: 1fr; }
  .toc { display: none; }
}

.howto-main { max-width: 820px; }

/* Rule section */
.rule-section { scroll-margin-top: 80px; }
.rule-header {
  display: flex; gap: 24px; align-items: flex-start;
  margin-bottom: 28px;
}
.rule-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 56px;
  color: var(--gold);
  line-height: 0.9;
  flex-shrink: 0;
}
.rule-pull {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--blood);
  font-size: 17px;
  margin-top: 8px;
}
.rule-body p { font-size: 18px; line-height: 1.7; }
.rule-body h3 { margin-top: 32px; margin-bottom: 8px; }
.rule-body strong { color: var(--ink); font-weight: 600; }
.rule-body em { color: var(--blood); font-style: italic; }

/* Setup grid */
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 32px; }
.setup-cards { position: relative; }
.cards-row { display: flex; gap: 8px; justify-content: center; }
.setup-x {
  position: absolute; inset: -20px;
  pointer-events: none;
}
.setup-text h3 { margin-top: 0; }
.bullets { padding-left: 0; list-style: none; display: grid; gap: 8px; margin: 16px 0; }
.bullets li {
  position: relative; padding-left: 22px;
  font-size: 16px;
}
.bullets li::before {
  content: "\25C6"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-size: 12px;
}
@media (max-width: 700px) {
  .setup-grid { grid-template-columns: 1fr; }
}

/* Drop cap */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 5em;
  float: left;
  line-height: 0.85;
  padding: 0.04em 0.12em 0 0;
  color: var(--blood);
}

/* Types grid */
.types-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin: 32px 0;
}
.type-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 16px;
  padding: 24px; background: var(--paper-2);
  border-radius: 12px;
  border: 1px solid var(--rule);
}
.type-role {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-deep);
}
.type-count {
  font-family: var(--font-display); font-size: 28px; color: var(--blood); font-weight: 600;
  line-height: 1;
}
.type-card p { margin: 4px 0 0; }
@media (max-width: 700px) { .types-grid { grid-template-columns: 1fr; } }

/* Value table */
.value-table {
  margin: 40px 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 32px;
}
.value-table table { width: 100%; border-collapse: collapse; font-family: var(--font-serif); }
.value-table th {
  text-align: left; padding: 8px 0;
  font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold-deep);
  border-bottom: 1px solid var(--rule);
}
.value-table td { padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.value-table tr:last-child td { border-bottom: none; }
.value-table td:last-child {
  font-family: var(--font-display); font-weight: 600; color: var(--blood);
  text-align: right;
}

/* Two-column */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  margin-top: 32px;
}
.two-col h3 { margin-top: 0; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }

/* Callouts */
.callout {
  margin-top: 32px;
  padding: 24px 28px;
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.callout.warn { border-left-color: var(--blood); }
.callout-label {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.callout.warn .callout-label { color: var(--blood); }
.callout p { margin: 0; }

/* Result cards */
.result-card {
  padding: 32px; background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 12px;
}
.result-icon { margin-bottom: 12px; }

/* FAQ */
.faq-list { margin-top: 24px; border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; cursor: pointer;
  padding: 20px 0;
  text-align: left;
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.faq-toggle {
  font-family: var(--font-sans); font-size: 24px; color: var(--gold); width: 24px; text-align: center;
  flex-shrink: 0;
}
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 600px; padding-bottom: 20px; }

/* ===== Animation scenes ===== */
.scene-wrap {
  margin: 32px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rule-dark);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.4);
}
.felt-wrap { margin: 32px 0; }
.felt-label {
  background: linear-gradient(180deg, #15110d, #0c0907);
  color: var(--gold-bright);
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-dark);
}
.felt {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(244, 212, 136, 0.06), transparent 70%),
    radial-gradient(ellipse at 50% 0%, rgba(168, 50, 41, 0.06), transparent 70%),
    linear-gradient(180deg, #1c2820 0%, #0f1611 100%);
  width: 100%;
  overflow: hidden;
}
.felt::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.6' 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.18 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: overlay;
}
.felt-caption {
  background: var(--paper-2);
  padding: 14px 24px;
  font-size: 14px;
  font-style: italic;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}
.scene-controls {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: #0a0806;
  border-top: 1px solid var(--rule-dark);
}
.scene-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(198, 154, 63, 0.12);
  color: var(--gold-bright);
  border: 1px solid rgba(198, 154, 63, 0.3);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.scene-btn:hover { background: rgba(198, 154, 63, 0.22); }
.scrubber {
  flex: 1; height: 4px;
  background: rgba(243, 235, 216, 0.15);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.scrubber-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
}

.abs { position: absolute; }
.cardpos { transition: none; }

.ring {
  border-radius: 14px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 24px rgba(244, 212, 136, 0.5), 0 0 0 4px rgba(244, 212, 136, 0.15);
  pointer-events: none;
}

.caption-banner {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: rgba(15,11,8,0.88);
  color: var(--paper);
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(198, 154, 63, 0.4);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  white-space: nowrap;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 5;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
  max-width: 92%;
  text-align: center;
}

.hit-flash {
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(244,212,136,0.9), rgba(168,50,41,0.4) 50%, transparent 75%);
  pointer-events: none;
  border-radius: 50%;
  animation: flash 0.35s ease-out;
}
@keyframes flash {
  from { transform: translateX(-50%) scale(0.4); opacity: 1; }
  to   { transform: translateX(-50%) scale(1.4); opacity: 0; }
}

.dmg-pop {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  color: #ff6a4a;
  text-shadow: 0 2px 0 #6e2018, 0 4px 12px rgba(168,50,41,0.6);
  pointer-events: none;
}
.dmg-pop.sm { font-size: 32px; }

.heal-pop {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: #66c870;
  text-shadow: 0 2px 0 #1f5a26, 0 4px 12px rgba(79,107,58,0.6);
}

.lk-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(15,11,8,0.7);
  border: 1px solid rgba(198, 154, 63, 0.4);
  border-radius: 4px;
  padding: 4px 10px;
  white-space: nowrap;
}
.lk-badge strong { color: #fff; font-family: var(--font-display); font-size: 14px; }

.reject-x { pointer-events: none; }

.cmp-grid {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  height: 100%;
}
.cmp-grid::before {
  content: "";
  background: linear-gradient(180deg, transparent, rgba(198, 154, 63, 0.4), transparent);
  grid-column: 2;
}
.cmp-col { display: flex; flex-direction: column; padding: 24px; }
.cmp-grid > .cmp-col:first-child { grid-column: 1; }
.cmp-grid > .cmp-col:last-child { grid-column: 3; }
.cmp-label {
  font-family: var(--font-sans);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 12px;
}
.cmp-stage { position: relative; flex: 1; min-height: 200px; margin-top: 16px; }
.cmp-math {
  display: flex; align-items: center; gap: 8px; margin-top: 16px;
  font-family: var(--font-display); font-size: 20px;
  color: var(--paper);
}
.m-token {
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid currentColor;
  font-weight: 600;
}
.m-monster { color: #d8ddca; }
.m-weapon  { color: #f4c45c; }
.m-dmg     { color: #ff8a6a; }
.m-op      { opacity: 0.5; font-family: var(--font-serif); }

.hp-row {
  display: flex; align-items: center; gap: 12px;
  width: 200px;
}
.hp-icon {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--paper);
  min-width: 56px;
}
.hp-num { font-size: 20px; }
.hp-bar {
  flex: 1; height: 8px;
  background: rgba(243, 235, 216, 0.15);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(198, 154, 63, 0.3);
}
.hp-fill { height: 100%; transition: width 0.2s ease, background 0.4s; }

@media (max-width: 720px) {
  .scene-wrap .felt { font-size: 0.86em; }
  .caption-banner { font-size: 13px; padding: 8px 14px; white-space: normal; line-height: 1.3; }
  .cmp-grid { grid-template-columns: 1fr; grid-template-rows: 1fr 1px 1fr; }
  .cmp-grid::before { grid-column: 1; grid-row: 2; background: linear-gradient(90deg, transparent, rgba(198, 154, 63, 0.4), transparent); }
  .cmp-col:first-child { grid-row: 1; }
  .cmp-col:last-child  { grid-row: 3; }
}

/* ==========================================================================
   Strategy page
   ========================================================================== */

.strategy-section { margin: 64px 0; }
.strategy-section + .strategy-section { margin-top: 88px; }

.strategy-header {
  display: flex; gap: 24px; align-items: flex-start;
  margin-bottom: 24px;
}
.strategy-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 56px;
  color: var(--gold);
  line-height: 0.9;
  flex-shrink: 0;
}
.strategy-intro {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 64ch;
  margin-bottom: 28px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 800px) {
  .strategy-grid { grid-template-columns: 1fr; }
}

.strategy-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.strategy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(0,0,0,0.22);
}
.strategy-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.2;
}
.strategy-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}
.strategy-card p + p { margin-top: 8px; }
.strategy-card strong { color: var(--ink); font-weight: 600; }
.strategy-card em { font-style: italic; color: var(--blood); }

.strategy-card.warn { border-left-color: var(--blood); }

.app-aside {
  margin: 64px 0 0;
  padding: 28px 32px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.app-aside p { margin: 0; font-size: 17px; color: var(--ink-2); max-width: none; }
.app-aside strong { color: var(--ink); }
.app-aside a { color: var(--blood); font-weight: 600; }
.app-aside a:hover { color: var(--blood-deep); }

/* ==========================================================================
   Legal pages (privacy, terms)
   ========================================================================== */
.legal-prose {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}
.legal-prose .legal-meta {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 32px;
}
.legal-prose h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin: 48px 0 12px;
  line-height: 1.2;
}
.legal-prose h2:first-of-type { margin-top: 32px; }
.legal-prose p { max-width: none; margin: 0 0 1em; }
.legal-prose ul, .legal-prose ol {
  margin: 0 0 1em;
  padding-left: 24px;
  display: grid;
  gap: 10px;
}
.legal-prose li { padding-left: 4px; }
.legal-prose li::marker { color: var(--gold); }
.legal-prose strong { color: var(--ink); font-weight: 600; }
.legal-prose a { color: var(--blood); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.legal-prose a:hover { color: var(--blood-deep); }
.legal-prose hr {
  border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
  margin: 48px 0;
}
