:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #131720;
  --surface-2: #1a1f2b;
  --line: #2a3140;
  --text: #f7f8fb;
  --muted: #a6adbb;
  --purple: #8b7cff;
  --mint: #55decf;
  --gold: #f4ca64;
  --container: min(1120px, calc(100% - 40px));
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; }
button, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
.container { width: var(--container); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: #111; background: #fff; border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 40; top: 0; background: rgba(11, 13, 18, .96); border-bottom: 1px solid var(--line); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 20px; font-weight: 850; letter-spacing: -.04em; }
.brand img { width: 38px; height: 38px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #c0c6d1; text-decoration: none; font-size: 14px; font-weight: 700; }
.nav-links a:hover, .nav-links a:focus-visible { color: #fff; }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.language-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.language-select { min-height: 42px; padding: 0 34px 0 12px; color: #eef0f5; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.menu-button { display: none; width: 42px; height: 42px; color: #fff; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }

.hero { padding: 108px 0 92px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 72px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; color: #dcd8ff; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kicker::before { width: 8px; height: 8px; content: ""; background: var(--mint); border-radius: 50%; }
h1 { max-width: 720px; margin: 22px 0 24px; font-size: clamp(52px, 7vw, 84px); line-height: 1.01; letter-spacing: -.032em; }
.accent { color: #b3aaff; }
.lead { max-width: 630px; margin: 0; color: #bbc1cd; font-size: 19px; line-height: 1.7; }
.hero-note { max-width: 590px; margin: 28px 0 0; padding-left: 18px; color: var(--muted); border-left: 2px solid var(--mint); font-size: 14px; line-height: 1.65; }
.primary-action { min-height: 54px; margin-top: 34px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: #7161ed; border: 1px solid #9a8fff; border-radius: 14px; text-decoration: none; font-weight: 850; transition: background .18s ease, transform .18s ease; }
.primary-action:hover { background: #7d6ef5; transform: translateY(-2px); }

.product-scene { position: relative; min-height: 580px; display: grid; place-items: center; contain: layout paint; }
.product-scene::before { position: absolute; z-index: -1; width: 430px; height: 430px; content: ""; background: radial-gradient(circle, rgba(139,124,255,.2), transparent 68%); border-radius: 50%; }
.phone { width: 292px; padding: 10px; background: #050609; border: 1px solid #363c49; border-radius: 44px; box-shadow: 0 32px 60px rgba(0,0,0,.42); transform: rotate(2deg); }
.phone-screen { min-height: 554px; padding: 30px 18px 20px; background: #121620; border-radius: 35px; }
.phone-top, .score-head, .challenge-head, .rank-line { display: flex; align-items: center; justify-content: space-between; }
.phone-hello, .phone-label, .rank-meta { color: #8f97a7; font-size: 10px; }
.phone-name { margin-top: 3px; font-size: 20px; font-weight: 850; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: #7161ed; border-radius: 13px; font-size: 11px; font-weight: 900; }
.score-card { margin-top: 20px; padding: 18px; background: #1c2030; border: 1px solid #393752; border-radius: 20px; }
.score-card strong { display: block; margin-top: 4px; font-size: 28px; }
.level-chip, .week-chip { padding: 7px 9px; color: #d9d4ff; background: #2a2648; border-radius: 8px; font-size: 9px; font-weight: 900; }
.progress { height: 7px; margin-top: 14px; overflow: hidden; background: #0b0d12; border-radius: 9px; }
.progress span { display: block; width: 72%; height: 100%; background: linear-gradient(90deg, var(--purple), var(--mint)); }
.phone-heading { margin: 20px 0 10px; font-size: 13px; font-weight: 850; }
.challenge { padding: 14px; background: #191e29; border: 1px solid var(--line); border-radius: 16px; }
.challenge strong { font-size: 11px; }
.challenge p { margin: 5px 0 0; color: #858d9d; font-size: 9px; }
.rank-list { margin-top: 10px; display: grid; gap: 7px; }
.rank-line { padding: 9px 10px; background: #171b25; border-radius: 12px; font-size: 10px; }
.rank-line.is-you { background: #25213e; border: 1px solid #40386c; }
.rank-user { display: flex; align-items: center; gap: 9px; }
.rank-dot { width: 25px; height: 25px; display: grid; place-items: center; background: #343a48; border-radius: 8px; font-size: 8px; font-weight: 800; }
.rank-xp { color: #b8b0ff; font-weight: 850; }
.scene-label { position: absolute; max-width: 190px; padding: 13px 15px; background: #1a1f2a; border: 1px solid #3a4251; border-radius: 15px; box-shadow: 0 16px 30px rgba(0,0,0,.28); font-size: 12px; font-weight: 800; }
.scene-label.one { top: 100px; right: 0; }
.scene-label.two { bottom: 88px; left: 0; color: var(--mint); }

.section { padding: 104px 0; content-visibility: auto; contain-intrinsic-size: 760px; }
.section.alt { background: #0f1219; border-block: 1px solid #1c222d; }
.section-head { max-width: 760px; margin-bottom: 46px; }
.eyebrow { color: var(--mint); font-size: 12px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
h2 { margin: 14px 0 16px; font-size: clamp(36px, 5.2vw, 62px); line-height: 1.07; letter-spacing: -.024em; }
.section-copy { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.activity-grid, .loop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.activity-card, .loop-card { min-height: 270px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.activity-tag { display: inline-block; padding: 7px 9px; color: #dcd8ff; background: #272342; border-radius: 9px; font-size: 10px; font-weight: 850; }
.activity-card:nth-child(2) .activity-tag { color: #b6f5ed; background: #183431; }
.activity-card:nth-child(3) .activity-tag { color: #ffe49b; background: #382f19; }
.activity-card h3, .loop-card h3 { margin: 48px 0 12px; font-size: 23px; letter-spacing: -.03em; }
.activity-card p, .loop-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.loop-index { color: var(--mint); font-size: 13px; font-weight: 900; letter-spacing: .12em; }

.social-layout { display: grid; grid-template-columns: .92fr 1.08fr; gap: 22px; }
.social-copy, .leaderboard { padding: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; }
.social-copy h3 { margin: 12px 0 14px; font-size: 34px; letter-spacing: -.018em; }
.social-copy p { color: var(--muted); line-height: 1.75; }
.plain-list { margin: 26px 0 0; padding: 0; list-style: none; }
.plain-list li { margin-top: 13px; padding-left: 24px; position: relative; color: #d6dae2; }
.plain-list li::before { position: absolute; left: 0; content: "✓"; color: var(--mint); font-weight: 900; }
.leaderboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.leaderboard-header strong { font-size: 18px; }
.leaderboard-row { display: grid; grid-template-columns: 30px 40px 1fr auto; align-items: center; gap: 12px; min-height: 66px; padding: 8px 10px; border-bottom: 1px solid #242b37; }
.leaderboard-row:last-child { border: 0; }
.leaderboard-row.you { background: #211e36; border: 1px solid #413a6b; border-radius: 14px; }
.leaderboard-row .avatar { width: 36px; height: 36px; }
.leaderboard-row small { display: block; margin-top: 3px; color: var(--muted); }

.privacy-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 38px; padding: 42px; background: #171b25; border: 1px solid #303846; border-radius: 28px; }
.privacy-panel h2 { margin-top: 10px; font-size: clamp(32px, 4vw, 48px); }
.privacy-panel p { max-width: 720px; color: var(--muted); line-height: 1.75; }
.panel-links { display: grid; justify-items: start; gap: 14px; min-width: 250px; }
.text-link { color: #c5beff; font-weight: 850; text-underline-offset: 4px; }

.faq-list { border-top: 1px solid var(--line); }
details { padding: 22px 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-size: 18px; font-weight: 800; }
details p { max-width: 780px; margin: 14px 0 0; color: var(--muted); line-height: 1.7; }

footer { padding: 36px 0 44px; border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.footer-copy { color: var(--muted); font-size: 13px; }
.footer-links { max-width: 460px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px 20px; }
.footer-links a { color: #cbd0da; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }

.legal-shell { width: min(900px, calc(100% - 36px)); margin: 56px auto 90px; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 46px; }
.legal-meta { color: var(--muted); }
.legal-nav { margin: 32px 0; padding: 22px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.legal-nav ol { columns: 2; margin: 0; padding-left: 22px; }
.legal-nav li { margin: 8px 18px 8px 0; }
.legal-nav a { color: #c9c4ff; text-underline-offset: 3px; }
.legal-content h1 { margin: 0 0 18px; font-size: clamp(42px, 7vw, 70px); letter-spacing: -.02em; }
.legal-content h2 { margin: 56px 0 16px; font-size: 28px; letter-spacing: -.012em; }
.legal-content h3 { margin: 30px 0 10px; font-size: 19px; }
.legal-content p, .legal-content li { color: #c4c9d3; line-height: 1.78; }
.legal-content li + li { margin-top: 8px; }
.legal-callout { padding: 20px 22px; background: #191d29; border-left: 3px solid var(--mint); border-radius: 8px 16px 16px 8px; }
.embedded-legal .legal-shell { width: min(900px, calc(100% - 28px)); margin-top: 22px; margin-bottom: 48px; }
.embedded-legal .legal-top { display: none; }
.legal-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #181d28; }

@media (max-width: 900px) {
  .hero-grid, .social-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 78px; }
  .hero-copy-col { text-align: center; }
  .lead, .hero-note { margin-inline: auto; }
  .product-scene { min-height: 600px; }
  .activity-grid, .loop-grid { grid-template-columns: 1fr; }
  .activity-card, .loop-card { min-height: auto; }
  .activity-card h3, .loop-card h3 { margin-top: 28px; }
}

@media (max-width: 720px) {
  :root { --container: min(100% - 24px, 1120px); }
  .nav { min-height: 64px; }
  .menu-button { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 64px; right: 12px; left: 12px; padding: 18px; align-items: stretch; flex-direction: column; background: #131720; border: 1px solid var(--line); border-radius: 16px; }
  .nav-links.open { display: flex; }
  .language-select { width: 96px; }
  h1 { font-size: clamp(44px, 12.5vw, 58px); overflow-wrap: break-word; }
  .hero { padding: 66px 0 58px; }
  .product-scene { min-height: 520px; transform: scale(.9); margin: -28px 0; }
  .scene-label.one { right: -14px; }
  .scene-label.two { left: -14px; }
  .section { padding: 76px 0; }
  .social-copy, .leaderboard { padding: 26px 20px; }
  .privacy-panel { grid-template-columns: 1fr; padding: 30px 24px; }
  .panel-links { min-width: 0; }
  .footer-row, .legal-top { align-items: flex-start; flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .legal-nav ol { columns: 1; }
}

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