:root {
  --ink: #17212b;
  --muted: #5e6975;
  --paper: #fffaf2;
  --surface: #ffffff;
  --line: #e5dfd5;
  --coral: #ff6b57;
  --teal: #0b9c95;
  --gold: #f3b521;
  --berry: #7f5af0;
  --sky: #5c9ded;
  --shadow: 0 24px 70px rgba(23, 33, 43, 0.16);
}

* {
  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);
  letter-spacing: 0;
}

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

p {
  color: var(--muted);
  line-height: 1.75;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(255, 250, 242, 0.9);
  border-bottom: 1px solid rgba(229, 223, 213, 0.78);
  backdrop-filter: blur(16px);
}

.site-header.compact {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--coral), var(--berry));
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
}

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

.site-nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: clamp(36px, 7vw, 92px);
  min-height: calc(100vh - 76px);
  padding: clamp(52px, 8vw, 98px) clamp(20px, 5vw, 72px) 64px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 107, 87, 0.11) 0, rgba(255, 107, 87, 0) 34%),
    linear-gradient(180deg, #fffaf2 0%, #f5fbff 100%);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(44px, 7vw, 88px);
}

h2 {
  font-size: clamp(30px, 4vw, 54px);
}

h3 {
  font-size: 22px;
}

.hero-text {
  max-width: 590px;
  margin: 24px 0 0;
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  font-weight: 850;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

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

.button.secondary {
  background: var(--surface);
}

.game-stage {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.phone-shell {
  width: min(360px, 80vw);
  aspect-ratio: 0.54;
  padding: 18px;
  background: #252f3a;
  border: 4px solid var(--ink);
  border-radius: 42px;
  box-shadow: var(--shadow), 12px 12px 0 var(--ink);
  transform: rotate(2deg);
}

.phone-top {
  width: 90px;
  height: 9px;
  margin: 0 auto 14px;
  background: #0e151c;
  border-radius: 999px;
}

.game-screen {
  position: relative;
  height: calc(100% - 23px);
  padding: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(92, 157, 237, 0.72), rgba(11, 156, 149, 0.7)),
    #dff8ff;
  border-radius: 27px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.tile-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.tile {
  aspect-ratio: 1;
  border: 3px solid rgba(23, 33, 43, 0.95);
  border-radius: 8px;
  box-shadow: 3px 3px 0 rgba(23, 33, 43, 0.95);
}

.tile.cherry {
  background: var(--coral);
}

.tile.mint {
  background: #57d7a2;
}

.tile.sun {
  background: var(--gold);
}

.tile.ocean {
  background: var(--sky);
}

.level-card {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
  display: grid;
  gap: 4px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.93);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
}

.level-card strong {
  font-size: 18px;
}

.level-card span {
  color: var(--muted);
  font-weight: 700;
}

.floating-badge {
  position: absolute;
  padding: 12px 15px;
  color: var(--ink);
  font-weight: 900;
  background: var(--gold);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
}

.badge-one {
  top: 92px;
  left: 12px;
  transform: rotate(-9deg);
}

.badge-two {
  right: 20px;
  bottom: 118px;
  background: #57d7a2;
  transform: rotate(8deg);
}

.section {
  padding: 86px clamp(20px, 5vw, 72px);
  background: var(--surface);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.section-heading p:last-child {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 17px;
}

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

.feature-card {
  min-height: 340px;
  padding: 24px;
  background: #fffaf2;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.feature-card p {
  margin-bottom: 0;
}

.mini-scene {
  height: 138px;
  margin-bottom: 28px;
  background: #f5fbff;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
}

.match-scene {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 18px;
}

.match-scene span {
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.match-scene span:nth-child(1),
.match-scene span:nth-child(5) {
  background: var(--coral);
}

.match-scene span:nth-child(2),
.match-scene span:nth-child(6) {
  background: var(--teal);
}

.match-scene span:nth-child(3),
.match-scene span:nth-child(4) {
  background: var(--gold);
}

.reward-scene {
  position: relative;
  overflow: hidden;
}

.reward-scene span {
  position: absolute;
  bottom: 20px;
  width: 56px;
  background: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 8px 8px 0 0;
}

.reward-scene span:nth-child(1) {
  left: 28px;
  height: 44px;
}

.reward-scene span:nth-child(2) {
  left: 96px;
  height: 76px;
  background: var(--coral);
}

.reward-scene span:nth-child(3) {
  left: 164px;
  height: 104px;
  background: var(--teal);
}

.craft-scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px;
}

.craft-scene span {
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.craft-scene span:nth-child(1) {
  grid-row: span 2;
  background: var(--sky);
}

.craft-scene span:nth-child(2) {
  background: var(--gold);
}

.craft-scene span:nth-child(3) {
  background: var(--coral);
}

.craft-scene span:nth-child(4) {
  grid-column: span 2;
  background: var(--teal);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  padding: 90px clamp(20px, 5vw, 72px);
  background: #f5fbff;
}

.studio-copy p {
  margin-top: 0;
  font-size: 17px;
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 30px 0 0;
}

.stats-list div {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 8px;
}

.stats-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-list dd {
  margin: 8px 0 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 58px clamp(20px, 5vw, 72px);
  background: var(--gold);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.contact-band h2 {
  max-width: 820px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  background: var(--ink);
}

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

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 750;
}

.legal-page {
  padding: 56px clamp(20px, 5vw, 72px) 86px;
  background: #f5fbff;
}

.legal-document {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 8px;
}

.legal-document h1 {
  font-size: clamp(40px, 6vw, 72px);
}

.legal-document h2 {
  margin-top: 36px;
  font-size: 25px;
  line-height: 1.2;
}

.legal-document p,
.legal-document li {
  font-size: 16px;
  line-height: 1.8;
}

.legal-document a {
  color: #006fba;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-document ul {
  padding-left: 22px;
}

.last-updated {
  margin-top: 14px;
  font-weight: 750;
}

@media (max-width: 940px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .game-stage {
    min-height: 500px;
  }

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

  .feature-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 8px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 12px;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(40px, 14vw, 58px);
  }

  .game-stage {
    min-height: 430px;
  }

  .phone-shell {
    width: min(300px, 82vw);
    border-radius: 34px;
    box-shadow: var(--shadow), 8px 8px 0 var(--ink);
  }

  .floating-badge {
    display: none;
  }

  .contact-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .legal-page {
    padding-top: 28px;
  }

  .legal-document {
    padding: 24px;
  }
}

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