/* Exit Rush website. Same palette and type as the app:
   light = Arctic Blue, dark = Midnight Amber (follows the visitor's system). */
:root {
  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --ink: #14213D;
  --muted: #56657D;
  --line: #DCE3EE;
  --accent: #2D6AE3;
  --accent-edge: #1D4FB3;
  --accent-soft: #E3ECFC;
  --on-accent: #FFFFFF;
  --danger: #E5484D;
  --coin: #E89A00;
  --dot: #C3CCD9;
  --board: #FFFFFF;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 12px 32px rgba(20, 33, 61, .08);
  --paper: #F3E6C8;
  --paper-ink: #2F2216;
  --display: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131518;
    --surface: #1E2125;
    --ink: #ECE7DE;
    --muted: #9AA0A6;
    --line: #2A2E33;
    --accent: #F2A93B;
    --accent-edge: #B57A1F;
    --accent-soft: #3A2E1A;
    --on-accent: #1A1206;
    --danger: #FF5A4E;
    --coin: #F2A93B;
    --dot: #3A3E44;
    --board: #1A1D21;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-edge); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Faint board of arrows behind the page (same idea as the app's splash). */
.pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='none' stroke='%2314213D' stroke-opacity='.06' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 33V11M17 16l5-5 5 5M58 18h20M73 13l5 5-5 5M66 56v22M61 73l5 5 5-5M14 58v14h16M25 67l5 5-5 5'/%3E%3C/svg%3E");
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' fill='none' stroke='%23ECE7DE' stroke-opacity='.06' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 33V11M17 16l5-5 5 5M58 18h20M73 13l5 5-5 5M66 56v22M61 73l5 5 5-5M14 58v14h16M25 67l5 5-5 5'/%3E%3C/svg%3E");
  }
}

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: env(safe-area-inset-top);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.top .play-btn { padding: 10px 16px; min-height: 44px; font-size: 14px; }
@media (max-width: 760px) { .nav { display: none; } .top .play-btn { margin-left: auto; } }

/* ---------- Buttons ---------- */
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  min-height: 56px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--accent-edge);
  transition: transform .08s ease, box-shadow .08s ease;
}
.play-btn:hover { color: var(--on-accent); transform: translateY(-1px); }
.play-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--accent-edge); }
.play-btn svg { width: 22px; height: 22px; flex: none; }
.play-btn small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; line-height: 1.1; }
.play-btn span { display: block; font-size: 18px; line-height: 1.15; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding-block: 56px 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); line-height: 1.02; letter-spacing: -.035em; margin: 0 0 18px; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 52ch; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 30px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.facts b { color: var(--ink); font-size: 18px; margin-right: 4px; }
@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero .copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .cta-row, .facts { justify-content: center; }
}

/* ---------- Playable phone ---------- */
.phone {
  justify-self: center;
  width: min(380px, 100%);
  border-radius: 44px;
  padding: 12px;
  background: var(--ink);
  box-shadow: var(--shadow), 0 40px 80px -30px rgba(20, 33, 61, .45);
}
@media (prefers-color-scheme: dark) { .phone { background: #2A2D33; } }
.screen { border-radius: 34px; background: var(--bg); overflow: hidden; padding: 18px 16px 16px; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hearts { display: flex; gap: 4px; }
.hearts svg { width: 26px; height: 26px; transition: transform .25s ease, opacity .25s ease; }
.hearts svg.lost { opacity: .25; transform: scale(.85); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.round { width: 40px; height: 40px; border-radius: 13px; border: 0; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.round svg { width: 18px; height: 18px; }
.levelrow { display: flex; align-items: center; gap: 10px; margin: 14px 2px 10px; }
.levelrow strong { font-size: 18px; letter-spacing: -.02em; }
.chip { font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 3px 7px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); }
.bar { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .3s ease; }
.board-wrap { position: relative; border-radius: 22px; background: var(--board); aspect-ratio: 5 / 7.1; }
.board-wrap canvas { width: 100%; height: 100%; display: block; touch-action: manipulation; cursor: pointer; border-radius: 22px; }
.board-wrap.shake { animation: shake .38s ease; }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
.tip { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; margin: 12px 0 0; min-height: 2.6em; }
.result {
  position: absolute; inset: 0; border-radius: 22px; display: grid; place-content: center; gap: 12px; text-align: center; padding: 20px;
  background: color-mix(in srgb, var(--board) 88%, transparent); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.result.show { opacity: 1; pointer-events: auto; }
.result h3 { margin: 0; font-size: 30px; letter-spacing: -.02em; }
.result p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.result .stars { font-size: 30px; color: var(--coin); letter-spacing: 4px; }
.result .play-btn { justify-self: center; }

/* ---------- Sections ---------- */
section { padding-block: 72px; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 12px; text-wrap: balance; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.step svg { width: 100%; height: 120px; display: block; margin-bottom: 18px; }
.step h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step .num { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Books */
.books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.book { display: flex; gap: 18px; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.cover {
  flex: none; width: 96px; aspect-ratio: 1 / 1.45; border-radius: 4px 10px 10px 4px; padding: 10px 8px 10px 16px;
  box-shadow: 4px 8px 16px rgba(0, 0, 0, .28);
  font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: center;
}
.cover > div { height: 100%; border: 1px solid currentColor; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 8px 2px; font-size: 9px; opacity: .92; }
.cover strong { font-size: 11px; letter-spacing: .08em; }
.cover svg { width: 26px; height: 26px; }
.cover.grid { background: linear-gradient(90deg, #131C35 0 10%, #1E2B4D 12%); color: #E2C27E; }
.cover.mirrors { background: linear-gradient(90deg, #082623 0 10%, #0E3B37 12%); color: #CFE8E2; }
.cover.soon { background: linear-gradient(90deg, #1B1B1D 0 10%, #2B2B2E 12%); color: #9A9AA0; }
.book h3 { margin: 2px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.book .label { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }
.book p { margin: 0; color: var(--muted); font-size: 14.5px; }
.book .meta { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--ink); }
@media (max-width: 960px) { .books { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }

.page {
  position: relative; max-width: 620px; margin: 44px auto 0; padding: 34px 34px 30px 58px; border-radius: 6px;
  background: radial-gradient(ellipse at 40% 30%, #F8EED7, var(--paper) 60%, #DCC593);
  color: var(--paper-ink); box-shadow: 0 18px 40px rgba(0, 0, 0, .18); transform: rotate(-.6deg);
}
.page::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 40px; width: 1px; background: rgba(158, 59, 44, .25); }
.page h3 { margin: 0 0 8px; font-family: var(--hand); font-size: 40px; line-height: 1; }
.page p { margin: 0; font-family: var(--hand); font-size: 25px; line-height: 1.3; }
.page .sign { margin-top: 12px; font-size: 20px; color: #6B5539; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { background: var(--surface); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.feature .ic { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 4px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .features { grid-template-columns: 1fr; } }

.final { text-align: center; }
.final .card { background: var(--surface); border-radius: 30px; padding: 48px 24px; box-shadow: var(--shadow); }
.final img { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 18px; box-shadow: 0 0 0 1px var(--line); }
.final h2 { margin: 0 0 10px; font-size: clamp(30px, 4.5vw, 42px); letter-spacing: -.03em; }
.final p { margin: 0 auto 24px; color: var(--muted); max-width: 46ch; }

/* ---------- Footer ---------- */
footer { padding-block: 34px calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; }
footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */
.legal { padding-block: 48px 72px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 32px; font-weight: 600; }
.legal h2 { font-size: 20px; margin: 30px 0 6px; letter-spacing: -.01em; }
.legal p, .legal li { color: var(--muted); max-width: 68ch; }
.legal ul { padding-left: 20px; }
.legal .card { background: var(--surface); border-radius: var(--radius); padding: 8px 28px 28px; box-shadow: var(--shadow); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
