/* Chaptered site. One stylesheet for all pages. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('./fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Theme colours are swapped by the theme picker on the home page. */
  --primary: #2563ea; --accent: #3b82f6;
  --g1: hsla(28, 100%, 74%, 0.5); --g2: hsla(215, 100%, 86%, 0.6);
  --bg: #f8fafc; --surface: #ffffff; --surface2: #f1f5f9; --border: #e2e8f0;
  --text: #1e293b; --text2: #64748b;
  --link: color-mix(in srgb, var(--primary) 82%, #000);
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e293b; --surface: #334155; --surface2: #475569; --border: #475569;
    --text: #f1f5f9; --text2: #cbd5e1;
    --g1: hsla(28, 100%, 60%, 0.16); --g2: hsla(215, 100%, 60%, 0.2);
    --link: color-mix(in srgb, var(--primary) 45%, #fff);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg); color: var(--text); line-height: 1.55; overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 60% 700px at 95% -80px, var(--g1), transparent 70%),
    radial-gradient(ellipse 55% 800px at -15% 500px, var(--g2), transparent 70%),
    radial-gradient(ellipse 50% 900px at 105% 2000px, var(--g2), transparent 70%),
    radial-gradient(ellipse 50% 900px at -10% 3300px, var(--g1), transparent 70%);
  background-repeat: no-repeat;
}
img { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* ---------- header and footer (all pages) ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.top nav { display: flex; gap: 22px; font-size: 0.92rem; font-weight: 600; color: var(--text2); }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--link); }
@media (max-width: 640px) { .top nav a:not(.keep) { display: none; } }

.foot { padding: 40px 0 56px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; color: var(--text2); font-size: 0.9rem; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--link); }

/* ---------- icons ---------- */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* "Sticker" icon: a tinted, slightly tilted tile that follows the theme. */
.stk { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; font-size: 26px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #000), var(--accent));
  box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: rotate(-5deg); transition: transform 0.2s; }
.stk.r { transform: rotate(4deg); }
.stk.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.stk.soft { color: var(--link); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); box-shadow: none; }
.tile:hover .stk, .fact:hover .stk { transform: rotate(0) scale(1.06); }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 32px 0 72px; }
.kicker { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--link); font-weight: 700; font-size: 0.82rem; }
.kicker .ic { font-size: 16px; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; margin: 18px 0; text-wrap: balance; }
h1 em { font-style: normal; color: var(--primary); }
.sub { font-size: 1.15rem; color: var(--text2); max-width: 30em; text-wrap: pretty; }
.stores { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.stores a { display: inline-block; transition: transform 0.15s; line-height: 0; }
.stores a:hover { transform: translateY(-2px); }
.stores .as img { height: 52px; width: auto; }
.stores .gp img { height: 77px; width: auto; margin: -12px -10px; } /* the Play badge file has built-in padding */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .sub { margin: 0 auto; }
  .hero .stores { justify-content: center; }
}

.card-stage { position: relative; display: grid; place-items: center; min-height: 400px; }
.idcard { width: min(420px, 100%); aspect-ratio: 1.6; border-radius: 26px; padding: 26px; color: #fff; text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, #000), var(--accent));
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--primary) 60%, transparent);
  display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-4deg); transition: transform 0.3s; }
.idcard:hover { transform: rotate(-1deg) scale(1.02); }
.idcard .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.idcard .lbl { font-size: 0.78rem; letter-spacing: 0.12em; font-weight: 700; opacity: 0.9; }
.chip { width: 46px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
.idcard .name { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.idcard .meta { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.78rem; letter-spacing: 0.14em; opacity: 0.9; }
.lvl { background: rgba(255, 255, 255, 0.22); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.sticker { position: absolute; width: 128px; height: auto; right: -10px; bottom: -48px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.2)); transform: rotate(8deg); animation: bob 3.5s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(5deg) translateY(-8px); } }
.namefield { margin-top: 30px; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--text2); position: relative; z-index: 2; }
.namefield input { font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); width: 200px; }
.namefield input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (max-width: 900px) { .card-stage { min-height: 330px; } }
@media (max-width: 480px) { .card-stage { min-height: 270px; } .sticker { width: 92px; right: -6px; bottom: -58px; } .namefield { margin-top: 64px; } .idcard { padding: 20px; } .idcard .name { font-size: 1.35rem; max-width: 170px; } }

/* ---------- home: sections ---------- */
.sec { padding: 56px 0; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -0.03em; line-height: 1.1; font-weight: 800; text-wrap: balance; }
.lead { color: var(--text2); font-size: 1.05rem; max-width: 36em; margin-top: 10px; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 32px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; overflow: hidden; position: relative; box-shadow: var(--shadow); min-width: 0; }
.tile h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 16px; }
.tile p { color: var(--text2); font-size: 0.95rem; margin-top: 6px; max-width: 26em; }
.t-scan { grid-column: span 4; min-height: 320px; }
.t-prog { grid-column: span 2; }
.t-wish { grid-column: span 2; }
.t-ach { grid-column: span 4; }
.t-scan p { max-width: 22em; }
.phone { border-radius: 28px; border: 6px solid #0f172a; overflow: hidden; box-shadow: 0 24px 48px -16px rgba(15, 23, 42, 0.45); background: #0f172a; line-height: 0; }
.phone img { display: block; width: 100%; height: auto; }
.t-scan .phone { position: absolute; width: 210px; right: 32px; top: 28px; }
.phone img { border-radius: 22px; }
.barcode { display: flex; gap: 3px; height: 48px; margin-top: 22px; align-items: stretch; }
.barcode i { background: var(--text); width: 3px; border-radius: 1px; }
.barcode i:nth-child(3n) { width: 6px; } .barcode i:nth-child(4n) { width: 1.5px; } .barcode i:nth-child(7n) { width: 8px; }
.ring { width: 124px; height: 124px; margin: 18px auto 0; border-radius: 50%; background: conic-gradient(var(--primary) 68%, var(--surface2) 0); display: grid; place-items: center; }
.ring span { width: 96px; height: 96px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; }
.wl { list-style: none; margin-top: 16px; display: grid; gap: 8px; }
.wl li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface2); font-size: 0.88rem; font-weight: 600; }
.wl .sp { width: 22px; height: 30px; border-radius: 4px; flex: none; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.wl li:nth-child(2) .sp { filter: hue-rotate(40deg); } .wl li:nth-child(3) .sp { filter: hue-rotate(-50deg); }
.wl .ic { margin-left: auto; color: var(--primary); fill: var(--primary); font-size: 16px; }
.xp { height: 12px; border-radius: 6px; background: var(--surface2); margin-top: 16px; overflow: hidden; }
.xp i { display: block; height: 100%; width: 62%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.medals { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.medals img { width: 84px; height: 84px; transition: transform 0.2s; }
.medals img:hover { transform: translateY(-6px) rotate(-4deg); }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .tile { grid-column: auto !important; }
  .t-scan .phone { position: static; margin: 22px auto 0; transform: none; }
  .t-scan { min-height: 0; }
}

.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sw { width: 46px; height: 46px; border-radius: 14px; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; transition: transform 0.15s; }
.sw:hover { transform: scale(1.1); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--text); }
#themeName { font-weight: 700; color: var(--link); }
.duo { position: relative; height: 470px; }
.duo .phone { position: absolute; width: 215px; }
.duo .phone:first-child { left: 8%; top: 0; transform: rotate(-6deg); }
.duo .phone:last-child { right: 8%; top: 40px; transform: rotate(5deg); }
@media (max-width: 860px) { .themes { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .duo { height: 380px; } .duo .phone { width: 165px; } .duo .phone:first-child { left: 0; } .duo .phone:last-child { right: 0; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.fact { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.fact h3 { font-size: 1rem; font-weight: 800; margin-top: 14px; letter-spacing: -0.01em; }
.fact p { color: var(--text2); font-size: 0.9rem; margin-top: 4px; }
.fineprint { margin-top: 18px; color: var(--text2); font-size: 0.88rem; }
.fineprint a { color: var(--link); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

.cta { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #000), var(--accent)); color: #fff; border-radius: 36px; padding: 56px 24px; }
.cta h2 { color: #fff; }
.cta p { opacity: 0.92; margin-top: 8px; }
.cta .stores { justify-content: center; }
.coffee { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 9px 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: background 0.15s; }
.coffee:hover { background: rgba(255, 255, 255, 0.26); }
.coffee .ic { font-size: 18px; }

/* ---------- sub pages (privacy, terms, support, 404) ---------- */
.container { max-width: 820px; margin: 0 auto; padding: 0 24px 24px; }
.container > header { padding: 28px 0 32px; }
.container > header h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin: 6px 0 8px; }
.logo { display: none; } /* replaced by the shared .top bar */
.last-updated, .subtitle { color: var(--text2); font-size: 0.95rem; }
.content { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: clamp(22px, 5vw, 48px); box-shadow: var(--shadow); }
.content .intro { font-size: 1.08rem; color: var(--text); padding-bottom: 8px; }
.content section { margin-top: 36px; }
.content h2 { font-size: 1.3rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; line-height: 1.25; }
.content h3 { font-size: 1.02rem; font-weight: 700; margin: 20px 0 6px; }
.content p { color: var(--text2); margin-bottom: 10px; }
.content ul { color: var(--text2); padding-left: 1.3em; margin-bottom: 12px; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--primary); }
.content strong { color: var(--text); }
.content a { color: var(--link); text-underline-offset: 3px; }
.number { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; flex: none; font-size: 0.9rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 88%, #000), var(--accent)); transform: rotate(-4deg); }
.contact-info, .contact-box { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-radius: 18px; padding: 18px 20px; margin-top: 12px; }
.contact-info p { margin: 0; }
.contact-box { text-align: center; padding: 28px 20px; }
.contact-box h2 { justify-content: center; }
.email-link { display: inline-block; margin-top: 8px; padding: 12px 22px; border-radius: 14px; background: var(--primary); color: #fff !important; font-weight: 700; text-decoration: none; }
.email-link:hover { filter: brightness(1.08); }
.faq-item { padding: 16px 0; border-top: 1px solid var(--border); }
.faq-item:first-of-type { border-top: 0; }
.faq-question { color: var(--text) !important; font-weight: 700; margin-bottom: 4px !important; }
.faq-answer { margin: 0 !important; }
.tips-list { padding-left: 1.3em; }
mark { background: #fde68a; color: #1e293b; padding: 0 0.25em; border-radius: 0.25em; }
.container > footer { padding: 28px 0 40px; text-align: center; color: var(--text2); font-size: 0.9rem; }
.container > footer a { color: var(--link); text-decoration: none; }
.container > footer a:hover { text-decoration: underline; }

.lost { text-align: center; padding: 8vh 0 6vh; }
.lost img { width: 150px; height: auto; }
.lost p { color: var(--text2); margin-top: 8px; }
.btn { display: inline-block; margin-top: 22px; padding: 12px 22px; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 700; text-decoration: none; }

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