:root {
  color-scheme: light;
  --bg: #fff8ee;
  --bg-deep: #f6ebdd;
  --surface: #fffefb;
  --ink: #3f4037;
  --muted: #77786e;
  --primary: #4b8a68;
  --primary-dark: #326a50;
  --primary-soft: #ddeddd;
  --feature-panel: #326a50;
  --accent: #f4a261;
  --accent-dark: #d97846;
  --purple: #8e87d8;
  --danger: #e8654b;
  --line: rgba(63, 64, 55, .14);
  --shadow: 0 24px 70px rgba(77, 64, 42, .14);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141b17;
    --bg-deep: #0d120f;
    --surface: #1e2822;
    --ink: #f0f5f2;
    --muted: #9aa9a1;
    --primary: #62c28d;
    --primary-dark: #8ae8b6;
    --primary-soft: #1e2e25;
    --feature-panel: #234b38;
    --accent: #f6b372;
    --accent-dark: #de8840;
    --purple: #a79ff2;
    --danger: #ff6363;
    --line: rgba(240, 245, 242, .15);
    --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 92% 6%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 25rem),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.brand:hover { text-decoration: none; }
.brand img { border-radius: 10px; box-shadow: 0 4px 12px rgba(63, 64, 55, .14); }

nav { display: flex; gap: 22px; font-size: 14px; }
nav a { color: var(--muted); font-weight: 600; }

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.landing {
  max-width: none;
  margin: 0;
  padding: 0 0 96px;
}

.page-shell {
  width: min(1120px, calc(100% - 56px));
  margin-inline: auto;
}

.landing-hero {
  min-height: 650px;
  padding: 72px 0 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: center;
  gap: 64px;
}

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

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(50px, 6.4vw, 78px);
  line-height: .98;
  letter-spacing: -.055em;
}

.landing-hero .lead {
  max-width: 610px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 50px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(63, 64, 55, .12);
  transition: transform .18s ease, opacity .18s ease;
}

.store img, .store-logo { width: 21px; height: 21px; flex: 0 0 auto; }
.store:hover { opacity: .9; text-decoration: none; transform: translateY(-2px); }
.store.soon { border-color: var(--line); background: var(--surface); color: var(--muted); cursor: default; }
.store-note, .platform-note { color: var(--muted); font-size: 13px; }
.platform-note { margin: 15px 0 0; }

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.app-icon {
  position: relative;
  z-index: 1;
  width: min(100%, 410px);
  height: auto;
  border-radius: 23%;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.app-icon-glow {
  position: absolute;
  width: 84%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--purple));
  filter: blur(48px);
  opacity: .22;
}

.rules-section {
  padding: 72px;
  border-radius: 36px;
  background: var(--feature-panel);
  color: #fffefb;
  display: grid;
  grid-template-columns: minmax(290px, 440px) minmax(0, 1fr);
  align-items: center;
  gap: 80px;
  box-shadow: var(--shadow);
}

.rules-section .eyebrow { color: #dcefe2; }
.rules-copy h2,
.section-heading h2,
.privacy-strip h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.puzzle-preview {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  padding: 12px;
  border-radius: 22px;
  background: #fffefb;
  box-shadow: 0 20px 45px rgba(20, 27, 23, .25);
  transform: rotate(-1.5deg);
}

.puzzle-preview span {
  position: relative;
  aspect-ratio: 1;
  border-radius: 5px;
}

.puzzle-preview .r1 { background: #f07c7c; }
.puzzle-preview .r2 { background: #7dc46e; }
.puzzle-preview .r3 { background: #6faff5; }
.puzzle-preview .r4 { background: #e8c93c; }
.puzzle-preview .r5 { background: #b892e6; }
.puzzle-preview .r6 { background: #f59a4a; }
.puzzle-preview .r7 { background: #62cfd4; }
.puzzle-preview .r8 { background: #f09cd4; }

.puzzle-preview .flower::after {
  content: "";
  position: absolute;
  inset: 6%;
  background: url("/piece-flower.webp") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(40, 35, 25, .22));
}

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

.rule-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.rule-list > li > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  font-weight: 800;
}
.rule-list strong { display: block; margin-top: 1px; font-size: 17px; }
.rule-list p { margin: 2px 0 0; color: rgba(255, 254, 251, .73); font-size: 14px; }

.feature-section { padding: 120px 0 48px; }
.section-heading { max-width: 640px; margin-bottom: 36px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.card {
  min-height: 225px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 10px 32px rgba(77, 64, 42, .06);
}

.card:nth-child(2) { background: color-mix(in srgb, var(--primary-soft) 84%, var(--surface)); }
.card:nth-child(3) { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.card:nth-child(4) { background: color-mix(in srgb, var(--purple) 12%, var(--surface)); }
.card-kicker { margin-bottom: 36px; font-size: 11px; }
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.card p:last-child { margin: 0; color: var(--muted); font-size: 14px; }

.privacy-strip {
  margin-top: 72px;
  padding: 44px 48px;
  border: 1px solid var(--line);
  border-radius: 28px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: 64px;
  background: var(--primary-soft);
}

.privacy-strip h2 { font-size: clamp(30px, 3.5vw, 42px); }
.privacy-strip > p { margin: 0; color: var(--muted); font-size: 17px; }

.final-cta {
  margin-top: 72px;
  padding: 44px 48px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.final-cta img { border-radius: 22px; box-shadow: 0 8px 20px rgba(63, 64, 55, .14); }
.final-cta h2 { font-size: clamp(27px, 3vw, 36px); }
.final-cta p { margin: 4px 0 0; color: var(--muted); }

.hero { text-align: center; padding: 24px 0 40px; }
.hero h1 { margin: 0 0 12px; font-size: clamp(34px, 6vw, 52px); line-height: 1.1; }
.hero p.lead { max-width: 540px; margin: 0 auto 28px; color: var(--muted); font-size: 18px; }
.hero .stores { justify-content: center; }
.download-icon { margin-bottom: 20px; border-radius: 26px; box-shadow: var(--shadow); }
.download-hero .eyebrow { margin-bottom: 8px; }

article h1 { margin: 0 0 4px; font-size: 38px; line-height: 1.15; letter-spacing: -.035em; }
article .updated { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
article h2 { margin: 36px 0 8px; font-size: 21px; line-height: 1.3; }
article p, article li { color: var(--ink); }
article ul { padding-left: 20px; }
article table { width: 100%; border-collapse: collapse; font-size: 14px; }
article th, article td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
article th { color: var(--muted); font-weight: 700; }

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .landing-hero { min-height: auto; grid-template-columns: 1fr .7fr; gap: 34px; }
  .rules-section { padding: 48px; gap: 48px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 200px; }
  .final-cta { grid-template-columns: auto 1fr; }
  .final-cta .store { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  header { padding: 18px 20px 0; align-items: flex-start; }
  nav { justify-content: flex-end; gap: 12px 16px; flex-wrap: wrap; font-size: 12px; }
  nav a[href="#features"] { display: none; }
  main { padding: 42px 20px 64px; }
  .landing { padding: 0 0 64px; }
  .page-shell { width: min(100% - 40px, 560px); }
  .landing-hero { padding: 64px 0 72px; grid-template-columns: 1fr; text-align: center; }
  .landing-hero h1 { font-size: clamp(46px, 14vw, 66px); }
  .landing-hero .lead { font-size: 17px; }
  .landing-hero .stores { justify-content: center; }
  .hero-art { order: -1; }
  .app-icon { width: min(72vw, 300px); transform: rotate(1deg); }
  .rules-section { padding: 30px 24px 38px; grid-template-columns: 1fr; gap: 46px; border-radius: 28px; }
  .puzzle-preview { max-width: 410px; width: 100%; margin: 0 auto; padding: 9px; gap: 2px; }
  .feature-section { padding: 88px 0 28px; }
  .features { grid-template-columns: 1fr; }
  .card { min-height: auto; }
  .card-kicker { margin-bottom: 24px; }
  .privacy-strip { margin-top: 54px; padding: 32px 26px; grid-template-columns: 1fr; gap: 20px; }
  .final-cta { margin-top: 54px; padding: 30px 26px; grid-template-columns: 1fr; text-align: center; }
  .final-cta img { margin: 0 auto; }
  .final-cta .store { grid-column: auto; }
  article table { display: block; overflow-x: auto; }
  footer { margin-inline: 20px; padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store { transition: none; }
}
