/* Pivots one-page site. One visual world, the game's own: dark slate, glass tiles, the cyan accent from the app
   and the sky blue from the icon. Layout: a hero with a playing phone, then alternating bands, each one idea. */
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #141b21;
  --band: #182129;
  --surface: #1f2932;
  --ink: #eaf0f3;
  --muted: #9cabb7;
  --accent: #74e6f0;
  --sky: #5fb0ff;
  --line: rgba(255, 255, 255, 0.08);
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 54px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 24px; }
p { margin: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #0b1418; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.center { text-align: center; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px;
  background:
    radial-gradient(900px 600px at 18% 20%, rgba(116, 230, 240, 0.13), transparent 70%),
    radial-gradient(900px 700px at 85% 75%, rgba(95, 176, 255, 0.14), transparent 70%),
    linear-gradient(180deg, #172028, var(--bg)); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.logo { width: min(440px, 100%); height: auto; margin-left: -12px; }
.lead { font-size: 20px; color: #d3dde3; max-width: 34em; }
.small { font-size: 15px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions.center { justify-content: center; }
.button { display: inline-flex; align-items: center; min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 18px/1 var(--display); text-decoration: none; color: var(--ink); border: 2px solid rgba(116, 230, 240, 0.55); }
.button:hover { background: rgba(116, 230, 240, 0.08); }
.button.primary { background: var(--accent); color: #0b1d22; border-color: var(--accent); }
.button.primary:hover { background: #95eef5; }

.floaters img { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: auto; opacity: 0.32;
  transform: rotate(var(--r)); filter: blur(0.5px); }

/* Phones: the simulator's own screen, inside a plain bezel. */
.hero-phone { display: flex; justify-content: center; }
.phone { position: relative; width: min(330px, 100%); aspect-ratio: 600 / 1304; border-radius: 46px; padding: 9px; background: #0b1015;
  box-shadow: 0 0 0 2px #2c3943, 0 30px 70px rgba(0, 0, 0, 0.55); }
.phone video, .phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; background: #141c23; }
.small-phone { width: min(290px, 100%); justify-self: center; }
.loop-toggle { position: absolute; right: 22px; bottom: 22px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font: 600 15px/1 var(--display); color: var(--ink); background: rgba(11, 16, 21, 0.78); border: 1px solid rgba(255, 255, 255, 0.18); cursor: pointer; }
.loop-toggle:hover { background: rgba(11, 16, 21, 0.92); }
.loop-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Bands */
.band { padding: 88px 0; }
.band.alt { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.split.reverse { grid-template-columns: 1.2fr 0.8fr; }
.copy { display: grid; gap: 22px; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 40em; margin: 14px auto 0; text-align: center; }
#pieces h2, #modes h2 { text-align: center; }
.note { color: var(--muted); font-size: 16px; max-width: 40em; }
.note.center { margin: 28px auto 0; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; color: var(--muted); }
.steps li::before { content: counter(step); grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 600 22px/1 var(--display); color: #0b1d22; background: var(--accent); }
.steps strong { color: var(--ink); font-weight: 700; }

.modes { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 22px 22px 26px; display: grid; gap: 12px; align-content: start; }
.mode img { width: 100%; height: auto; aspect-ratio: 600 / 1000; object-fit: cover; object-position: top; border-radius: 16px; margin-bottom: 8px; }
.mode p { color: var(--muted); }

.pieces { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pieces li { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; justify-items: center; gap: 6px; text-align: center; }
.pieces img { width: 90px; height: 90px; }
.pieces strong { font: 600 20px/1.2 var(--display); }
.pieces span { color: var(--muted); font-size: 15px; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.facts li { position: relative; padding-left: 30px; color: #d3dde3; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 16px; border-radius: 5px;
  background: var(--accent); transform: rotate(45deg) scale(0.8); }

.trailer { margin: 36px auto 0; padding: 0; max-width: 960px; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); background: #0b1015; }
.trailer video { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.trailer figcaption { padding: 16px 22px 20px; color: var(--muted); font-size: 15px; background: var(--surface); }

.cta { background: radial-gradient(700px 400px at 50% 30%, rgba(95, 176, 255, 0.16), transparent 70%); }
.cta .icon { width: 132px; height: 132px; border-radius: 30px; margin: 0 auto 26px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.cta .actions { margin-top: 28px; }

.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; color: var(--muted); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-head { font: 600 17px/1.2 var(--display); color: var(--ink); margin-bottom: 10px; }
.footer p + p { margin-top: 6px; }
.footer-logo { width: 150px; height: auto; margin-bottom: 10px; }
.legal { margin-top: 36px; font-size: 13px; }

/* Privacy policy and terms pages */
.legal-header { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #172028, var(--bg)); }
.legal-header-row { display: flex; align-items: center; min-height: 92px; }
.home-link { display: inline-block; border-radius: 10px; }
.home-link img { width: 150px; height: auto; }
.home-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.legal-page { max-width: 760px; padding: 56px 0 88px; }
.legal-page h1 { font-size: clamp(32px, 4vw, 44px); }
.legal-page .effective { color: var(--muted); margin: 10px 0 28px; }
.legal-page h2 { font-size: 24px; margin: 36px 0 10px; }
.legal-page p, .legal-page li { color: #d3dde3; }
.legal-page p + p { margin-top: 14px; }
.legal-page ul { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.legal-page .summary { margin-top: 18px; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid, .split, .split.reverse { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { justify-items: center; text-align: center; }
  .actions { justify-content: center; }
  .logo { margin-left: 0; }
  .modes { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .pieces { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .band { padding: 64px 0; }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
  .pieces { gap: 12px; }
  .lead { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
