/* Shadow & Clue — marketing site. Palette mirrors shadow-ios Theme.swift. */
:root {
  --gold: #c9a227;
  --gold-bright: #e8c766;
  --gold-deep: #8f7019;
  --ink: #0d0b0a;
  --charcoal: #181514;
  --charcoal-light: #242020;
  --burgundy: #4a1520;
  --burgundy-bright: #7a2232;
  --paper: #eadfc6;
  --text: #ede6d8;
  --text-dim: #a79e8f;
  --line: rgba(201, 162, 39, 0.22);
  --gold-face: linear-gradient(180deg, #fff3cf 0%, #f5d58e 25%, #ddae5c 50%, #b07b33 53%, #d9a85a 74%, #f0c878 86%, #9a6427 100%);
  --serif: "Libre Baskerville", Baskerville, "Baskerville Old Face", Georgia, serif;
  --display: Cochin, "Cormorant Garamond", "Libre Baskerville", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 17px/1.65 var(--serif);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-bright); text-underline-offset: 3px; }
a:hover { color: #fff3cf; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 12px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(13, 11, 10, 0.92), rgba(13, 11, 10, 0.72));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); }
.brand span { font: 700 21px/1 var(--display); letter-spacing: 0.01em; background: var(--gold-face); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 26px; }
.site-nav a { font: 600 12px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); text-decoration: none; }
.site-nav a:hover { color: var(--gold-bright); }
@media (max-width: 760px) { .site-nav { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  padding: 12px 22px; border-radius: 12px; font: 600 15px/1.2 var(--sans);
  border: 1px solid var(--gold); color: var(--gold-bright);
  background: rgba(13, 11, 10, 0.55);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: rgba(201, 162, 39, 0.12); color: #fff3cf; }
.btn-gold { background: linear-gradient(180deg, #f0d47a, #c9a227 55%, #94741a); color: var(--ink); border-color: #f0d47a; box-shadow: 0 8px 30px rgba(201, 162, 39, 0.25); }
.btn-gold:hover { color: var(--ink); background: linear-gradient(180deg, #f6dd8c, #d3ab2e 55%, #a07d1d); transform: translateY(-1px); }
.btn small { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: 0.8; }
.btn strong { display: block; font-size: 17px; }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn[aria-disabled="true"] { cursor: default; }

/* ---------- Wordmark ---------- */
.wordmark { margin: 0; font: 700 clamp(56px, 13vw, 128px)/0.92 var(--display); letter-spacing: -0.005em; text-align: center; }
.wordmark .line { display: block; }
.wordmark .gold {
  background: var(--gold-face); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.03em 0 #3a2108) drop-shadow(0 0.06em 0.06em rgba(0, 0, 0, 0.7));
}
.wordmark .line + .line { margin-left: 0.55em; }
.lens { display: inline-block; width: 0.74em; height: 0.74em; overflow: visible; vertical-align: -0.015em; margin: 0 0.04em 0 0.02em; filter: drop-shadow(0 0.03em 0 #3a2108) drop-shadow(0 0.06em 0.06em rgba(0, 0, 0, 0.7)); }
.tagline-mark { display: block; margin-top: clamp(20px, 4.2vw, 42px); font: 600 clamp(15px, 2.4vw, 22px)/1.2 var(--serif); letter-spacing: 0.04em; color: #e2bc74; text-align: center; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; place-items: center; padding: 96px 0 72px; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0; z-index: -3; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(13, 11, 10, 0.1), rgba(13, 11, 10, 0.75) 70%),
    linear-gradient(180deg, rgba(13, 11, 10, 0.55) 0%, rgba(13, 11, 10, 0.2) 35%, rgba(13, 11, 10, 0.85) 85%, var(--ink) 100%);
}
.rain {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; opacity: 0.3; pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}
/* Two depth layers of short streaks, tilted for wind. Each layer slides exactly one
   tile height along its own (rotated) axis per loop, so the cycle is seamless. */
.rain::before, .rain::after {
  content: ""; position: absolute; inset: -60% -40%;
  will-change: transform;
  animation: rain-fall linear infinite;
}
.rain::before { --tile: 260px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='260'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23dce6ff' stop-opacity='0'/><stop offset='1' stop-color='%23dce6ff' stop-opacity='0.6'/></linearGradient></defs><g fill='url(%23g)'><rect x='12' y='101' width='1' height='19'/><rect x='17' y='210' width='1' height='24'/><rect x='32' y='149' width='1' height='22'/><rect x='57' y='54' width='1' height='14'/><rect x='62' y='107' width='1' height='14'/><rect x='79' y='141' width='1' height='15'/><rect x='92' y='144' width='1' height='20'/><rect x='117' y='161' width='1' height='15'/><rect x='128' y='15' width='1' height='24'/><rect x='143' y='12' width='1' height='23'/><rect x='152' y='219' width='1' height='17'/><rect x='169' y='36' width='1' height='16'/></g></svg>") 0 0 / 180px 260px; animation-duration: 0.42s; opacity: 0.75; }
.rain::after { --tile: 420px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='420'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23dce6ff' stop-opacity='0'/><stop offset='1' stop-color='%23dce6ff' stop-opacity='0.85'/></linearGradient></defs><g fill='url(%23g)'><rect x='11' y='350' width='1.5' height='38'/><rect x='61' y='341' width='1.5' height='35'/><rect x='106' y='328' width='1.5' height='34'/><rect x='118' y='272' width='1.5' height='35'/><rect x='177' y='15' width='1.5' height='36'/><rect x='193' y='350' width='1.5' height='43'/><rect x='260' y='75' width='1.5' height='30'/><rect x='294' y='134' width='1.5' height='32'/></g></svg>") 0 0 / 300px 420px; animation-duration: 0.46s; }
@keyframes rain-fall {
  from { transform: rotate(14deg) translate3d(0, calc(var(--tile) * -1), 0); }
  to   { transform: rotate(14deg) translate3d(0, 0, 0); }
}
.hero-inner { text-align: center; display: grid; justify-items: center; gap: 28px; }
.hero .lede { max-width: 620px; margin: 0; font-size: clamp(17px, 2vw, 20px); color: var(--text); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.hero-note { margin: 0; font: 600 12px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 112px) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 700 12px/1 var(--sans); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
h2 { margin: 0 0 18px; font: 400 clamp(32px, 4.6vw, 52px)/1.1 var(--serif); color: var(--text); letter-spacing: -0.01em; }
h2 em { color: var(--gold-bright); }
h3 { margin: 0 0 8px; font: 700 20px/1.3 var(--serif); color: var(--text); }
.section-lede { max-width: 680px; color: var(--text-dim); margin: 0 0 40px; font-size: 18px; }
.center { text-align: center; }
.center .section-lede { margin-inline: auto; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--gold); margin: 0 auto; width: min(320px, 80%); }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { transform: scaleX(-1); }

/* Stats strip */
.stats { padding: 0; border-block: 1px solid var(--line); background: linear-gradient(180deg, #120f0e, #0d0b0a); }
.stats ul { list-style: none; margin: 0 auto; padding: 26px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats li { text-align: center; }
.stats b { display: block; font: 400 clamp(30px, 4vw, 44px)/1 var(--serif); color: var(--gold-bright); }
.stats span { font: 600 11px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
@media (max-width: 640px) { .stats ul { grid-template-columns: repeat(2, 1fr); row-gap: 22px; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.steps li { position: relative; padding: 24px 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, rgba(36, 32, 32, 0.75), rgba(24, 21, 20, 0.75)); }
.steps li::before { counter-increment: step; content: "0" counter(step); display: block; font: 400 30px/1 var(--serif); color: var(--gold); margin-bottom: 14px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-dim); }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 10vw, 120px); }
.feature.flip .feature-media { order: 2; }
.feature-copy p { color: var(--text-dim); margin: 0 0 16px; }
.feature-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-copy li { position: relative; padding-left: 26px; font-size: 16px; }
.feature-copy li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }
.feature-media { display: flex; justify-content: center; gap: 18px; }
.phone { width: min(280px, 46%); border-radius: 34px; padding: 7px; background: linear-gradient(160deg, #3a332d, #121010 40%, #2b2522); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 162, 39, 0.18); }
.phone img { border-radius: 28px; }
.phone.tilt { transform: translateY(36px); }
.wide-shot { width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
}
@media (max-width: 420px) { .phone { border-radius: 26px; padding: 5px; } .phone img { border-radius: 22px; } }

/* Cases */
.cases { background: radial-gradient(ellipse at 50% 0%, rgba(74, 21, 32, 0.45), transparent 60%), var(--ink); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case {
  position: relative; padding: 22px 22px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(36, 32, 32, 0.9), rgba(20, 17, 16, 0.9));
  border: 1px solid rgba(201, 162, 39, 0.16); display: grid; gap: 8px; align-content: start;
}
.case-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.case-no { font: 400 13px/1 var(--sans); letter-spacing: 0.14em; color: var(--text-dim); }
.case-no b { font: 400 26px/1 var(--serif); color: var(--gold); letter-spacing: 0; margin-left: 4px; }
.tier { font: 700 10px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; border: 1px solid currentColor; }
.tier.tutorial { color: #8fbcae; } .tier.easy { color: #95c283; } .tier.medium { color: #d9b44a; } .tier.hard { color: #e0904f; } .tier.expert { color: #e06a62; } .tier.master { color: #a985dc; } .tier.grandmaster { color: #d65a8a; }
.case h3 { font-size: 21px; margin: 4px 0 0; }
.case .tag { margin: 0; font-style: italic; color: var(--text-dim); font-size: 15px; line-height: 1.5; }
.case .where { margin: 6px 0 0; font: 600 11px/1.4 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #c7b48a; }
@media (max-width: 960px) { .case-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .case-grid { grid-template-columns: 1fr; } }
.casebooks { margin: 44px 0 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; list-style: none; padding: 0; }
.casebooks li { padding: 14px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(24, 21, 20, 0.6); text-align: center; font: 600 12px/1.4 var(--sans); color: var(--text-dim); letter-spacing: 0.04em; }
.casebooks b { display: block; font: 400 22px/1.1 var(--serif); color: var(--gold-bright); margin-bottom: 4px; }
@media (max-width: 1000px) { .casebooks { grid-template-columns: repeat(4, 1fr); } .casebooks li:first-child { grid-column: span 2; } }
@media (max-width: 760px) { .casebooks { grid-template-columns: repeat(2, 1fr); } }

/* Sound */
.sound { position: relative; overflow: hidden; }
.cast { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-copy .cast li { padding: 18px; font-size: inherit; border-radius: 12px; border: 1px solid var(--line); background: rgba(24, 21, 20, 0.7); }
.feature-copy .cast li::before { display: none; }
.cast b { display: block; font: 700 17px/1.3 var(--serif); color: var(--text); }
.cast span { font-size: 14px; color: var(--text-dim); }
@media (max-width: 700px) { .cast { grid-template-columns: 1fr; } }
.wave { display: flex; align-items: center; gap: 5px; height: 120px; justify-content: center; }
.wave i { width: 6px; border-radius: 3px; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); animation: wave 1.6s ease-in-out infinite; height: 20%; }
@keyframes wave { 50% { height: 90%; } }
.sound-card { padding: clamp(28px, 4vw, 44px); border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.12), transparent 70%), var(--charcoal); }
.sound-card p { margin: 18px 0 0; color: var(--text-dim); font-size: 15px; text-align: center; font-style: italic; }

/* Fair play */
.fair-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card { padding: 28px 24px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(36, 32, 32, 0.85), rgba(20, 17, 16, 0.85)); }
.price-card.highlight { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4), 0 20px 50px rgba(201, 162, 39, 0.08); }
.price-card .kicker { font: 700 11px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.price-card h3 { margin-top: 12px; font-size: 24px; }
.price-card p { margin: 0; color: var(--text-dim); font-size: 15px; }
.price-card .price { margin: 14px 0 10px; font: 400 15px/1.3 var(--sans); color: var(--text); }
.price-card .price b { font: 400 30px/1 var(--serif); color: var(--gold-bright); margin-right: 4px; }
@media (max-width: 900px) { .fair-grid { grid-template-columns: 1fr; } }
.promises { margin: 36px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; }
.promises li { font: 600 13px/1.4 var(--sans); letter-spacing: 0.06em; color: var(--text); display: inline-flex; gap: 8px; align-items: center; }
.promises li::before { content: "✦"; color: var(--gold); }
.fine { margin-top: 18px; font: 13px/1.5 var(--sans); color: var(--text-dim); }

/* Final CTA */
.finale { position: relative; text-align: center; isolation: isolate; overflow: hidden; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 60%, rgba(232, 180, 90, 0.16), transparent 55%), linear-gradient(180deg, var(--ink), #140d0e); }
.finale .lamp { width: 10px; height: 10px; margin: 0 auto 28px; border-radius: 50%; background: #ffd98a; box-shadow: 0 0 30px 12px rgba(255, 196, 92, 0.45), 0 0 120px 50px rgba(255, 170, 60, 0.15); animation: flicker 5s infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: 1; } 44% { opacity: 0.65; } 46% { opacity: 1; } 71% { opacity: 0.85; } 72% { opacity: 1; } }
.finale .app-icon { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font: 14px/1.6 var(--sans); color: var(--text-dim); background: #0a0908; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer .motto { font: italic 15px/1.4 var(--serif); color: #c7b48a; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: clamp(56px, 8vw, 96px) 0 32px; background: radial-gradient(ellipse at 50% 0%, rgba(74, 21, 32, 0.5), transparent 70%); text-align: center; }
.legal-hero h1 { margin: 0; font: 400 clamp(36px, 6vw, 58px)/1.1 var(--serif); }
.legal-hero p { margin: 14px 0 0; font: 600 12px/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
.legal { padding: 24px 0 96px; }
.legal article { width: min(760px, 100% - 32px); margin: 0 auto; font: 16.5px/1.75 var(--sans); color: #ddd5c6; }
.legal h2 { font-size: clamp(24px, 3vw, 30px); margin: 44px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.legal h3 { font: 700 17px/1.4 var(--sans); margin: 24px 0 6px; color: var(--text); }
.legal p, .legal li { margin: 0 0 12px; }
.legal ul { padding-left: 22px; }
.legal li::marker { color: var(--gold); }
.legal .summary { margin-bottom: 26px; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--charcoal); }
.legal .summary p:last-child { margin-bottom: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 700; color: var(--gold-bright); }
.table-scroll { overflow-x: auto; }
.legal .toc { columns: 2; column-gap: 32px; padding-left: 22px; }
@media (max-width: 560px) { .legal .toc { columns: 1; } }

/* 404 */
.notfound { min-height: 70svh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font: 400 clamp(40px, 7vw, 72px)/1.1 var(--serif); margin: 0 0 12px; }
.notfound p { color: var(--text-dim); margin: 0 0 28px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rain::before, .rain::after, .wave i, .finale .lamp { animation: none; }
  .rain { opacity: 0.15; }
}
