/* Thumb Jail site. Colours match the app's Candy Jail tokens (Core/ThemeTokens.swift, SRS §10.1). */
:root {
  --bg: #FFF8F0;
  --scene: #FFF3E3;
  --surface: #FFFFFF;
  --text: #231F20;
  --muted: #6E6872;
  --primary: #FF7A45;
  --primary-deep: #D9531F;
  --accent: #12B5A5;
  --line: #F3E2D2;
  --shadow: 0 10px 30px rgba(176, 112, 63, 0.14);
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17141F;
    --scene: #2A1B14;
    --surface: #221E2D;
    --text: #F4EFF7;
    --muted: #A39BAA;
    --primary: #FF8A5C;
    --primary-deep: #FF8A5C;
    --accent: #2CCFBF;
    --line: #342D40;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-deep); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--scene), var(--bg)); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 32px; padding-top: 56px; padding-bottom: 56px; }
.eyebrow { display: inline-block; background: var(--surface); color: var(--accent); font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); }
h1 { font-size: clamp(40px, 6.4vw, 66px); line-height: 1.04; letter-spacing: -0.02em; margin: 18px 0 16px; font-weight: 900; }
h1 em { font-style: normal; color: var(--primary); }
.lead { font-size: 20px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--primary); color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; padding: 14px 24px; border-radius: 999px; box-shadow: 0 6px 0 var(--primary-deep); }
.btn[aria-disabled="true"] { cursor: default; }
.btn svg { width: 20px; height: 20px; }
.note { color: var(--muted); font-size: 15px; }
.hero-art { position: relative; justify-self: center; }
.hero-art img { width: min(360px, 80vw); filter: drop-shadow(0 18px 24px rgba(176, 112, 63, 0.25)); }
.bubble { position: absolute; z-index: 2; white-space: nowrap; top: -2%; left: -34%; background: var(--surface); color: var(--text); font-weight: 800; padding: 10px 16px; border-radius: 18px; box-shadow: var(--shadow); font-size: 16px; }
.bubble::after { content: ""; position: absolute; bottom: -8px; right: 26px; border: 8px solid transparent; border-top-color: var(--surface); border-bottom: 0; }

/* Sections */
section { padding: 64px 0; }
h2 { font-size: clamp(30px, 4.2vw, 42px); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 900; }
.section-lead { color: var(--muted); font-size: 19px; margin: 0 0 36px; max-width: 36em; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.card { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.steps .card { position: relative; padding-top: 34px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 24px; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 900; display: grid; place-items: center; }
.card h3 { margin: 0 0 6px; font-size: 21px; }
.card p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: center; }
.feature img { width: 128px; }
.feature .emoji { font-size: 44px; text-align: center; }

.promise { background: var(--surface); border-radius: 32px; box-shadow: var(--shadow); display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 28px; align-items: center; padding: 36px; }
.promise img { width: 220px; justify-self: center; }
.promise ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); }
.promise li { margin: 6px 0; }

.faq details { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 22px; margin-bottom: 12px; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 18px; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Legal pages */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(36px, 5vw, 48px); margin-top: 0; }
.doc .updated { color: var(--muted); margin-top: -6px; }
.doc h2 { font-size: 26px; margin: 40px 0 8px; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.summary { background: var(--surface); border-left: 6px solid var(--accent); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); margin: 24px 0 8px; }
.summary p { margin: 0 0 6px; }
.summary ul { margin: 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 800; }
.table-scroll { overflow-x: auto; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { width: min(240px, 64vw); }
  .bubble { left: -46%; top: 4%; font-size: 14px; }
  .steps, .features { grid-template-columns: 1fr; gap: 28px; }
  .promise { grid-template-columns: 1fr; text-align: left; padding: 26px; }
  .promise img { width: 160px; }
  .top nav { gap: 14px; }
  .top nav a { font-size: 14px; }
  section { padding: 48px 0; }
}
@media (max-width: 420px) {
  .top nav .hide-sm { display: none; }
  .feature { grid-template-columns: 96px 1fr; }
  .feature img { width: 96px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: bob 3.2s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}
