/*
  Topple — public landing page. Same two themes as the game (see style.css),
  so a visitor who signs in doesn't see the colours change under them.
*/

:root,
:root[data-theme="light"] {
  --bg: #EEF3FB; --panel: #FFFFFF; --line: #C9D4E8;
  --text: #0B1530; --muted: #4A5675; --head: #0B1530;
  --accent: #1F6FD6; --accent-ink: #FFFFFF; --accent-2: #134C9A;
  --sky-top: #76C0F6; --sky-bottom: #C8ECFF; --grass: #4CAF50;
  --cloud: rgba(255,255,255,.85);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B1530; --panel: #111D3D; --line: #2E4074;
  --text: #F1F4FB; --muted: #A9B4D4; --head: #FFD23F;
  --accent: #4EA6FF; --accent-ink: #06102A; --accent-2: #2A70C2;
  --sky-top: #101C42; --sky-bottom: #263A6E; --grass: #1F5A43;
  --cloud: rgba(150,170,220,.18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; }
h1, h2 { font-family: "Archivo Black", "Arial Black", system-ui, sans-serif; letter-spacing: 0.01em; }
main > section { max-width: 1040px; margin: 0 auto; padding: 48px 20px; }

.nav { max-width: 1040px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.mark { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.mark i { display: block; height: 7px; border-radius: 2px; }
.mark i:nth-child(1) { width: 12px; background: #FFD23F; transform: translateX(2px) rotate(-8deg); }
.mark i:nth-child(2) { width: 19px; background: #F2545B; }
.mark i:nth-child(3) { width: 26px; background: #3A9BFF; }
.wordmark { font-family: "Archivo Black", system-ui, sans-serif; font-size: 21px; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-cta { font-weight: 700; text-decoration: none; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--accent); }

.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 24px !important; }
.eyebrow { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--muted); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); margin: 0 0 16px; color: var(--head); }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.cta {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 18px;
  padding: 14px 26px; border-radius: 16px; background: var(--accent); color: var(--accent-ink);
  border-bottom: 4px solid var(--accent-2); transition: transform .08s;
}
.cta:active { transform: translateY(2px); }
.cta.ghost { background: transparent; color: var(--text); border: 2px solid var(--line); border-bottom-width: 4px; }
.small { font-size: 14px; color: var(--muted); margin: 0; }

/* The hero tower: pure CSS, so it costs nothing to load. */
.hero-art { display: flex; justify-content: center; }
.sky { position: relative; width: min(100%, 380px); aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(var(--sky-top), var(--sky-bottom)); }
:root[data-theme="dark"] .sky::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(2px 2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 70% 10%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 30%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 86% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 52%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 58% 22%, #fff 50%, transparent 51%); }
:root[data-theme="dark"] .sky::after { content: ""; position: absolute; right: 12%; top: 8%; width: 46px; height: 46px; border-radius: 50%; background: #F4EFD8; }
.cloud { position: absolute; width: 90px; height: 30px; background: var(--cloud); border-radius: 30px; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 44px; height: 44px; left: 14px; top: -20px; }
.cloud::after { width: 34px; height: 34px; left: 44px; top: -14px; }
.c1 { left: 8%; top: 12%; animation: drift 18s linear infinite; }
.c2 { right: 6%; top: 34%; transform: scale(.7); animation: drift 24s linear infinite reverse; }
@keyframes drift { from { translate: -20px 0; } 50% { translate: 20px 0; } to { translate: -20px 0; } }
.plank { position: absolute; left: 14%; right: 14%; bottom: 23%; height: 18px; background: #9C6B43; border: 4px solid #5E3B22; border-radius: 8px; transform: rotate(-2deg); }
.stand { position: absolute; left: calc(50% - 40px); width: 80px; bottom: 9%; height: 14%; background: #5B6B8C; clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%); }
.grass { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: var(--grass); }
.tower { position: absolute; left: 0; right: 0; bottom: calc(23% + 18px); display: flex; flex-direction: column; align-items: center; }
.blk { display: flex; justify-content: center; align-items: center; gap: 7px; border: 4px solid rgba(0,0,0,.28); border-radius: 7px; margin-top: -1px; animation: land .6s cubic-bezier(.3,1.5,.5,1) both; }
.blk i, .blk i::after { width: 9px; height: 9px; background: #fff; border-radius: 50%; box-shadow: inset 1px -3px 0 #1A1A2E; display: block; }
.blk i { position: relative; margin-left: -16px; }
.blk i::after { content: ""; position: absolute; left: 16px; top: 0; }
.yellow { background: #FFD23F; } .purple { background: #A66CFF; } .green { background: #3DDC84; }
.red { background: #F2545B; } .orange { background: #FF9F1C; } .blue { background: #3A9BFF; }
.t6 { width: 62%; height: 38px; animation-delay: .1s; }
.t5 { width: 38%; height: 34px; transform: translateX(-14%); animation-delay: .35s; }
.t4 { width: 46%; height: 30px; transform: translateX(8%) rotate(3deg); animation-delay: .6s; }
.t3 { width: 26%; height: 42px; transform: translateX(-4%); animation-delay: .85s; }
.t2 { width: 50%; height: 26px; transform: rotate(-4deg); animation-delay: 1.1s; }
.t1 { width: 22%; height: 30px; transform: translateX(26%) rotate(18deg); animation-delay: 1.35s; }
@keyframes land { from { opacity: 0; translate: 0 -60px; } to { opacity: 1; translate: 0 0; } }

.how h2, .features h2, .faq h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 24px; text-align: center; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li, .feature-grid li { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.step-ico { font-size: 32px; }
.steps h3, .feature-grid h3 { margin: 10px 0 6px; font-size: 20px; }
.steps p, .feature-grid p { margin: 0; color: var(--muted); }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid h3 { margin-top: 0; }

.faq { max-width: 760px !important; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq p { margin: 0 0 14px; color: var(--muted); }

.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 20px; color: var(--head); }
.foot { text-align: center; padding: 30px 20px 40px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; }
  .sky { width: min(100%, 340px); aspect-ratio: 5 / 4; }
  .hero { padding-top: 8px !important; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  main > section { padding: 32px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
