:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #536078;
  --paper: #fffdf8;
  --line: #dde5df;
  --teal: #0f766e;
  --blue: #2563eb;
  --coral: #f97316;
  --rose: #fb7185;
  --mint: #dff8ef;
  --cream: #fff7ed;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(var(--max), calc(100% - 36px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue) 58%, var(--coral));
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
  color: #26324a;
}

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

.hero {
  min-height: min(720px, calc(100svh - 88px));
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(255,253,248,0.97) 0%, rgba(255,253,248,0.9) 34%, rgba(255,253,248,0.48) 56%, rgba(255,253,248,0.08) 100%),
    url("hero-puzzle.png");
  background-size: auto 100%;
  background-position: right center;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.hero-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 70px 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: normal;
}

.lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: #314057;
  font-size: 19px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.button-primary {
  color: #fff;
  background: var(--ink);
}

.button-primary:hover {
  background: #0f766e;
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(23, 32, 51, 0.16);
}

.section {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 68px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p,
.feature p,
.game-copy p,
.privacy-main p,
.privacy-main li {
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  min-height: 214px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
}

.feature:nth-child(2) .feature-icon {
  background: var(--blue);
}

.feature:nth-child(3) .feature-icon {
  background: var(--coral);
}

.feature h3,
.game-copy h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature p,
.game-copy p {
  margin: 0;
}

.game-band {
  background: #eef8f1;
  border-top: 1px solid rgba(23, 32, 51, 0.08);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.game-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
}

.phone-shot {
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 18px;
  border-radius: 28px;
  background: #172033;
  box-shadow: 0 24px 60px rgba(23, 32, 51, 0.18);
}

.phone-screen {
  aspect-ratio: 9 / 16;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8, #e7f9f2);
  overflow: hidden;
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.tile {
  aspect-ratio: 1;
  border-radius: 8px;
}

.tile:nth-child(4n+1) { background: #2dd4bf; }
.tile:nth-child(4n+2) { background: #60a5fa; }
.tile:nth-child(4n+3) { background: #facc15; }
.tile:nth-child(4n+4) { background: #fb7185; }

.screen-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
}

.score {
  color: #fff;
  background: var(--coral);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
}

.game-copy ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
}

.game-copy li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #334155;
}

.dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.contact-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-radius: 8px;
  background: #172033;
  color: #fff;
}

.contact-strip p {
  margin: 6px 0 0;
  color: #c8d1e2;
}

.contact-strip h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.site-footer {
  border-top: 1px solid rgba(23, 32, 51, 0.08);
  padding: 28px 0;
  color: var(--muted);
}

.footer-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-inner a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.page-hero {
  background: #eef8f1;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.page-hero-inner {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 70px 0 46px;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 70px);
}

.privacy-main {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.privacy-main h2 {
  margin-top: 36px;
  font-size: 28px;
}

.privacy-main ul {
  padding-left: 22px;
}

.privacy-main a {
  color: var(--teal);
  font-weight: 800;
}

@media (max-width: 860px) {
  .nav {
    height: auto;
    min-height: 66px;
    padding: 12px 0;
    align-items: flex-start;
  }

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: 650px;
    background-image:
      linear-gradient(180deg, rgba(255,253,248,0.98) 0%, rgba(255,253,248,0.9) 48%, rgba(255,253,248,0.42) 100%),
      url("hero-puzzle.png");
    background-size: auto 78%;
    background-position: center bottom;
  }

  .lead {
    font-size: 17px;
  }

  .section-heading,
  .game-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .contact-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .nav-links {
    display: none;
  }

  .nav,
  .hero-inner,
  .section,
  .page-hero-inner,
  .privacy-main,
  .footer-inner {
    width: auto;
    max-width: none;
    margin-left: 14px;
    margin-right: 14px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.04;
    max-width: 330px;
    overflow-wrap: anywhere;
  }

  h2,
  .lead,
  .section-heading p,
  .feature p,
  .game-copy p,
  .game-copy li,
  .contact-strip p,
  .privacy-main p,
  .privacy-main li {
    max-width: 330px;
    overflow-wrap: anywhere;
  }

  .hero {
    min-height: 610px;
  }

  .hero-inner {
    padding: 54px 0 46px;
  }

  .button {
    width: 100%;
  }

  .hero-inner,
  .section {
    width: min(var(--max), calc(100% - 28px));
  }

  .feature {
    padding: 20px;
  }
}
