:root {
  --ink: #13212b;
  --muted: #5a6a73;
  --paper: #f7fbfd;
  --ice: #dff4f8;
  --line: rgba(19, 33, 43, 0.14);
  --color-accent: #19a974;
  --number-accent: #1e79d8;
  --warm: #fff7df;
  --shadow: 0 24px 60px rgba(19, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 52px);
  color: var(--ink);
  background: rgba(247, 251, 253, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(19, 33, 43, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.mark-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, #f05252, #f6d64a, #2e8fff, #f05252);
  box-shadow: 0 0 0 5px rgba(19, 33, 43, 0.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 680px);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
  padding: 96px clamp(20px, 6vw, 84px) 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(46, 143, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #f9fdff 0%, #eaf7fb 52%, #fff8e7 100%);
}

.hero.copy-narrow {
  grid-template-columns: minmax(0, 620px) minmax(320px, 640px);
}

.hero-text {
  max-width: 660px;
  animation: rise-in 720ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: 0;
}

.subtitle {
  max-width: 560px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button.primary {
  color: white;
  border-color: transparent;
  background: var(--accent, var(--color-accent));
  box-shadow: 0 16px 32px rgba(19, 33, 43, 0.16);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(19, 33, 43, 0.14);
}

.hero-visual {
  position: relative;
  min-height: min(70svh, 680px);
  display: grid;
  place-items: center;
  animation: fade-in 900ms 120ms ease both;
}

.phone {
  width: min(360px, 76vw);
  aspect-ratio: 9 / 19;
  padding: 18px;
  border-radius: 38px;
  background: #10202b;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.phone-screen {
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff8e7, #e8f8fb);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.game-top {
  display: flex;
  justify-content: space-between;
  padding: 18px 16px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.board {
  width: calc(100% - 30px);
  aspect-ratio: 1;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(19, 33, 43, 0.08);
}

.cell {
  position: relative;
  border-radius: 8px;
  background: rgba(210, 239, 245, 0.9);
}

.cell.block {
  background: rgba(19, 33, 43, 0.18);
}

.cell.goal-color::after,
.cell.goal-number::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  border: 2px solid var(--accent, var(--color-accent));
}

.piece {
  position: absolute;
  z-index: 3;
  width: 11.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  left: calc(10.7% + var(--x) * 12.4%);
  top: calc(18.2% + var(--y) * 6.08%);
  background: var(--piece);
  box-shadow: 0 8px 18px rgba(19, 33, 43, 0.2);
  animation: slide-piece 4.8s ease-in-out infinite;
}

.piece:nth-of-type(2) {
  animation-delay: 240ms;
}

.piece:nth-of-type(3) {
  animation-delay: 480ms;
}

.number-piece {
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  font-size: 15px;
  background: var(--number-accent);
}

.operator {
  position: absolute;
  inset: 18%;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--number-accent);
  font-size: 12px;
  font-weight: 900;
}

.section {
  padding: clamp(62px, 10vw, 128px) clamp(20px, 6vw, 84px);
}

.section.alt {
  background: #ffffff;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(30px, 7vw, 90px);
  align-items: start;
}

.section h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
}

.section p,
.policy p,
.policy li {
  color: var(--muted);
  font-size: 17px;
}

.feature-list {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.feature-list strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.policy {
  max-width: 900px;
  margin: 0 auto;
  padding: 112px 22px 80px;
}

.policy h1 {
  font-size: clamp(42px, 8vw, 84px);
}

.policy h2 {
  margin-top: 46px;
  font-size: 28px;
}

.policy a {
  color: var(--accent, var(--color-accent));
  font-weight: 800;
}

.footer {
  padding: 34px clamp(20px, 6vw, 84px);
  color: var(--muted);
  background: #10202b;
}

.footer,
.footer a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.color-theme {
  --accent: var(--color-accent);
}

.number-theme {
  --accent: var(--number-accent);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-piece {
  0%, 18%, 100% {
    transform: translate(0, 0);
  }
  44%, 62% {
    transform: translate(82px, 0);
  }
  78% {
    transform: translate(82px, 96px);
  }
}

@media (max-width: 820px) {
  .site-header {
    height: auto;
    min-height: 58px;
    padding: 12px 18px;
  }

  .nav-links {
    gap: 12px;
    font-size: 12px;
  }

  .hero,
  .hero.copy-narrow,
  .section-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 88px;
  }

  .hero-visual {
    min-height: 460px;
  }
}

