:root {
  --brand: #196edc;
  --brand-dark: #0f58b8;
  --brand-soft: #eaf3ff;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3ef;
  --danger: #c43242;
  --surface: #ffffff;
  --shadow: 0 24px 60px rgba(34, 69, 140, 0.16);
  --lime: #dfff55;
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(25, 110, 220, 0.16), transparent 34%),
    radial-gradient(circle at 88% 85%, rgba(25, 110, 220, 0.1), transparent 32%),
    #f7f9fd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

a { color: inherit; }
::selection { color: #fff; background: var(--brand); }

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.home-shell { overflow: hidden; }
.home-shell .site-header { position: relative; z-index: 3; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(18, 26, 68, .18);
}

.brand span { display: inline; }

.header-link,
.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.header-link:hover,
.site-nav a:hover { color: var(--brand); }

.site-nav { display: flex; align-items: center; gap: 30px; }

.main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 48px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(48px, 8vw, 104px);
}

.home-section { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.home-shell .hero { min-height: 690px; padding: 56px 0 96px; }
.hero-content { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand);
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(46px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span { color: var(--brand); }

.hero-copy {
  max-width: 580px;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
}

.store-link {
  display: inline-block;
  border-radius: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.store-link:hover,
.store-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(19, 33, 68, 0.2);
  outline: none;
}

.store-link img {
  display: block;
  width: 210px;
  height: auto;
}

.hero-actions { display: flex; align-items: center; gap: 24px; }
.text-link { color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; }
.text-link span { display: inline-block; margin-left: 6px; color: var(--brand); }

.game-preview {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  width: min(100%, 470px);
  aspect-ratio: 1;
  justify-self: end;
  padding: 42px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 38px;
  background: linear-gradient(145deg, #202a61, #11183e);
  box-shadow: 0 40px 90px rgba(18, 29, 75, .28);
  transform: rotate(2deg);
}

.game-preview::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9% -18% -9% 20%;
  border-radius: 50%;
  background: linear-gradient(145deg, #168cf0 5%, #196edc 55%, #18c5d8 100%);
}

.hero-game-icon { display: block; width: min(88%, 370px); height: auto; border-radius: 30px; box-shadow: 0 24px 36px rgba(3,8,33,.42); }
.preview-tagline { margin: 0; color: rgba(255,255,255,.78); font-size: 14px; font-weight: 800; letter-spacing: .02em; text-align: center; }

.intro-strip { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 5vw, 66px); padding: 25px 20px; color: #fff; background: var(--ink); transform: rotate(-1.2deg) scale(1.02); }
.intro-strip p { margin: 0; font-size: clamp(13px, 2vw, 17px); font-weight: 800; }
.intro-strip span { color: var(--lime); font-size: 22px; }

.how-section { padding: 130px 0 120px; }
.section-heading { display: grid; grid-template-columns: .8fr 1.2fr; align-items: end; margin-bottom: 58px; }
.section-kicker { margin: 0 0 10px; color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h2 { margin: 0; font-size: clamp(40px, 6vw, 66px); line-height: .98; letter-spacing: -.05em; }
.section-heading h2 { grid-column: 2; }
.section-heading .section-kicker { grid-column: 1; grid-row: 1; }
.steps-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.steps-list li { position: relative; min-height: 310px; padding: 28px; overflow: hidden; border: 1px solid #e5eaf4; border-radius: 24px; background: rgba(255,255,255,.84); }
.steps-list li:nth-child(2) { color: #fff; border-color: var(--brand); background: var(--brand); }
.step-number { color: #9aa4b9; font-size: 12px; font-weight: 850; letter-spacing: .1em; }
.steps-list li:nth-child(2) .step-number { color: rgba(255,255,255,.62); }
.step-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 46px 0 28px; border-radius: 22px; color: var(--brand); background: var(--brand-soft); font-size: 31px; font-weight: 750; }
.blocks-icon { grid-template-columns: repeat(2, 13px); grid-template-rows: repeat(2, 13px); gap: 3px; }
.blocks-icon i { width: 13px; height: 13px; border-radius: 3px; background: currentColor; }
.blocks-icon i:last-child { grid-column: 2; }
.steps-list li:nth-child(2) .step-icon { color: var(--ink); background: var(--lime); }
.steps-list h3 { margin: 0 0 10px; font-size: 22px; letter-spacing: -.025em; }
.steps-list p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.steps-list li:nth-child(2) p { color: rgba(255,255,255,.78); }

.modes-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; padding: 20px 0 130px; }
.mode-list { border-top: 1px solid var(--line); }
.mode-list article { display: grid; grid-template-columns: 46px 150px 1fr; gap: 16px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line); }
.mode-list span { color: var(--brand); font-size: 12px; font-weight: 850; }
.mode-list h3 { margin: 0; font-size: 18px; }
.mode-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.download-panel { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; margin-bottom: 72px; padding: clamp(42px, 7vw, 78px); border-radius: 34px; color: #fff; background: var(--ink); }
.download-panel .section-kicker { color: var(--lime); }
.download-action { justify-self: end; text-align: center; }
.download-action p { margin: 14px 0 20px; color: #b9c0d1; font-size: 14px; }
.download-icon { display: block; width: 92px; height: 92px; margin: 0 auto; border-radius: 24px; box-shadow: 0 14px 24px rgba(0,0,0,.3); }
.download-action .store-link img { width: 180px; }

.game-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 38% 62% 58% 42% / 48% 38% 62% 52%;
  background: linear-gradient(145deg, #196edc, #72afff);
  box-shadow: var(--shadow);
}

.game-visual::before,
.game-visual::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 28px;
  transform: rotate(10deg);
}

.game-visual::before { inset: 13%; }
.game-visual::after { inset: 23%; transform: rotate(-8deg); }

.game-visual img {
  position: relative;
  z-index: 1;
  width: 34%;
  min-width: 112px;
  border-radius: 26%;
  box-shadow: 0 24px 48px rgba(10, 32, 78, 0.28);
}

.card {
  width: min(100%, 560px);
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(220, 227, 239, 0.9);
  border-radius: 28px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 16px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 27px;
  font-weight: 800;
}

.card h1 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.card-copy {
  margin: 14px 0 28px;
  color: var(--muted);
  line-height: 1.65;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 750;
}

.email-input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.email-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(25, 110, 220, 0.12);
}

.field-error {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 20px rgba(25, 110, 220, 0.22);
}

.primary-button:hover { background: var(--brand-dark); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }

.secondary-button {
  color: var(--ink);
  background: #eef1f6;
}

.privacy-note {
  display: flex;
  gap: 10px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.privacy-note span { color: var(--brand); font-weight: 900; }

.status-message {
  display: none;
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.status-message.success { display: block; color: #14633c; background: #eaf8f0; }
.status-message.error { display: block; color: #9c2534; background: #fff0f2; }

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(17, 27, 49, 0.55);
  backdrop-filter: blur(5px);
}

.dialog-backdrop.open { display: grid; }

.dialog {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(9, 20, 44, 0.3);
}

.dialog h2 { margin: 0 0 10px; font-size: 22px; }
.dialog p { margin: 0; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.dialog .primary-button { margin: 0; }

.result-card { text-align: center; }
.result-card .card-icon { margin: 0 auto 24px; }
.result-card .card-copy { margin-bottom: 0; }
.result-card .retry-button { margin-top: 24px; }

.spinner {
  width: 27px;
  height: 27px;
  border: 3px solid rgba(25, 110, 220, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.home-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-top: 1px solid var(--line); text-align: left; }
.home-footer p { margin: 0; text-align: center; }
.home-footer > a:last-child { justify-self: end; text-decoration: none; }
.footer-brand { font-size: 16px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 10px; }

@media (max-width: 760px) {
  .site-header, .site-footer, .main { width: min(100% - 28px, 560px); }
  .site-header { padding: 18px 0; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { margin-left: auto; margin-right: auto; }
  .game-visual { width: min(80vw, 370px); margin: 0 auto; grid-row: 1; }
  .eyebrow { justify-content: center; }
  .main { padding: 30px 0 54px; }
  .site-nav a:first-child { display: none; }
  .home-section { width: min(100% - 28px, 560px); }
  .home-shell .hero { min-height: auto; padding: 48px 0 80px; gap: 60px; }
  .hero h1 { font-size: clamp(44px, 13vw, 68px); }
  .hero-actions { flex-direction: column; gap: 18px; }
  .game-preview { width: min(88vw, 410px); justify-self: center; grid-row: 2; padding: 18px; border-radius: 30px; transform: rotate(1deg); }
  .intro-strip { gap: 13px; padding: 20px 14px; }
  .intro-strip p { font-size: 11px; text-align: center; }
  .intro-strip span { font-size: 16px; }
  .how-section { padding: 100px 0 84px; }
  .section-heading { display: block; margin-bottom: 38px; text-align: center; }
  .steps-list { grid-template-columns: 1fr; }
  .steps-list li { min-height: 0; text-align: left; }
  .step-icon { margin: 34px 0 24px; }
  .download-panel { grid-template-columns: 1fr; margin-bottom: 48px; padding: 46px 24px; text-align: center; }
  .download-action { justify-self: center; }
  .modes-section { grid-template-columns: 1fr; gap: 42px; padding-bottom: 90px; text-align: center; }
  .mode-list { text-align: left; }
  .mode-list article { grid-template-columns: 36px 120px 1fr; gap: 10px; }
  .home-footer { display: flex; flex-wrap: wrap; justify-content: space-between; width: calc(100% - 28px); }
  .home-footer p { order: 3; flex-basis: 100%; }
}

@media (max-width: 480px) {
  .mode-list article { grid-template-columns: 32px 1fr; }
  .mode-list article p { grid-column: 2; }
  .game-preview { padding: 24px; }
}

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