:root {
  --bg: #f4f9ff;
  --paper: #fff8ed;
  --paper-strong: #fff0d9;
  --ink: #3e2d1e;
  --muted: #6b625a;
  --brand: #b96e3e;
  --brand-dark: #85502d;
  --line: #e7d0bb;
  --mint: #dff5ea;
  --lavender: #eee2ff;
  --peach: #fff0d9;
  --sage: #e4f3dc;
  --shadow: 0 22px 60px rgba(89, 54, 30, 0.16);
  --soft-shadow: 0 12px 30px rgba(89, 54, 30, 0.12);
  color-scheme: light;
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id],
main[id] {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 232, 184, 0.72), transparent 24rem),
    radial-gradient(circle at 85% 16%, rgba(213, 245, 229, 0.9), transparent 22rem),
    linear-gradient(180deg, #f6fbff 0%, #fffaf2 52%, #f8fbff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(185, 110, 62, 0.18) 0 4px, transparent 5px),
    radial-gradient(circle, rgba(93, 181, 121, 0.18) 0 3px, transparent 4px);
  background-position: 6vw 18vh, 88vw 40vh;
  background-size: 42rem 36rem, 34rem 30rem;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(185, 110, 62, 0.22);
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 10px 35px rgba(89, 54, 30, 0.1);
  backdrop-filter: blur(18px);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 1.35rem;
  cursor: pointer;
}

.brand,
.site-footer div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Caveat", cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  white-space: nowrap;
}

.brand img,
.site-footer img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 7px 16px rgba(89, 54, 30, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.nav-links a,
.header-cta,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-links a {
  padding: 0 16px;
  color: var(--muted);
}

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

.header-cta,
.primary-button {
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(180deg, #c47a48 0%, #a95f34 100%);
  box-shadow: 0 12px 24px rgba(169, 95, 52, 0.25);
}

.header-cta:hover,
.primary-button:hover,
.secondary-button:hover,
.rail-button:hover {
  transform: translateY(-2px);
}

.section-pad {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding-top: 64px;
}

.script-logo {
  margin: 0 0 10px;
  font-family: "Caveat", cursive;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--brand);
}

.hero h1,
.section-heading h2,
.habit h2,
.privacy h2 {
  margin: 0;
  max-width: 720px;
  font-family: "Caveat", cursive;
  font-size: clamp(4.4rem, 9vw, 8rem);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: 0;
  color: var(--ink);
}

.hero-subtitle {
  max-width: 560px;
  margin: 30px 0 0;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.55;
  color: #51463d;
}

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

.primary-button,
.secondary-button {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1rem;
}

.secondary-button {
  color: var(--brand-dark);
  border: 1px solid rgba(185, 110, 62, 0.35);
  background: rgba(255, 255, 255, 0.7);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(185, 110, 62, 0.18);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.hero-stats strong {
  font-size: 1.35rem;
  color: var(--brand-dark);
}

.hero-visual {
  position: relative;
  padding: clamp(10px, 1.6vw, 18px);
  border: 1px solid rgba(185, 110, 62, 0.2);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
}

.hero-visual::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -24px;
  width: 44%;
  height: 32%;
  border-radius: 999px;
  background: rgba(223, 245, 234, 0.72);
  filter: blur(20px);
  z-index: -1;
}

.hero-visual img {
  width: 100%;
  border-radius: 20px;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  width: min(1160px, calc(100% - 32px));
  margin: -36px auto 0;
  padding: 20px;
  border: 1px solid rgba(185, 110, 62, 0.18);
  border-radius: 30px;
  background: rgba(255, 250, 242, 0.86);
  box-shadow: var(--soft-shadow);
}

.benefits article {
  min-height: 188px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
}

.benefit-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}

.benefit-icon.memory { background: #efb13f; }
.benefit-icon.focus { background: #5db579; }
.benefit-icon.logic { background: #5077e6; }
.benefit-icon.fun { background: #c77242; }

.benefits h2,
.game-card h3 {
  margin: 16px 0 8px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.benefits p,
.game-card p,
.habit p,
.privacy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: 36px;
}

.section-heading h2,
.habit h2,
.privacy h2 {
  font-size: clamp(3.4rem, 6vw, 5.6rem);
  line-height: 0.9;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.game-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 26px;
  border: 1px solid rgba(185, 110, 62, 0.2);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: auto 24px 24px auto;
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    var(--brand);
  opacity: 0.18;
  transform: rotate(-8deg);
}

.game-card span {
  display: inline-flex;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 900;
}

.game-card h3 {
  margin-top: 58px;
  font-size: 1.75rem;
}

.mint { background: var(--mint); }
.lavender { background: var(--lavender); }
.peach { background: var(--peach); }
.sage { background: var(--sage); }

.habit-panel,
.privacy {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(185, 110, 62, 0.22);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 248, 237, 0.94), rgba(223, 245, 234, 0.82));
  box-shadow: var(--shadow);
}

.habit h2,
.privacy h2 {
  margin-bottom: 24px;
}

.streak-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
}

.progress-line {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
}

.progress-line span {
  height: 16px;
  border-radius: 999px;
  background: #ead6c4;
}

.progress-line .done {
  background: var(--brand);
}

.streak-card strong {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.95;
  color: var(--brand-dark);
}

.screens {
  overflow: hidden;
}

.screen-rail {
  position: relative;
}

.screen-track {
  display: grid;
  grid-auto-columns: minmax(248px, 310px);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 10px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.screen-track img {
  width: 100%;
  aspect-ratio: 941 / 1672;
  object-fit: cover;
  border: 1px solid rgba(185, 110, 62, 0.2);
  border-radius: 28px;
  box-shadow: var(--shadow);
  scroll-snap-align: center;
}

.rail-button {
  position: absolute;
  top: 46%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  font-size: 2.1rem;
  line-height: 1;
}

.rail-button.prev {
  left: -8px;
}

.rail-button.next {
  right: -8px;
}

.privacy {
  margin-bottom: 40px;
}

.privacy p {
  font-size: 1.15rem;
}

.privacy p a {
  color: var(--brand-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--brand-dark);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.site-footer a {
  font-weight: 900;
}

@media (max-width: 940px) {
  .site-header {
    width: min(720px, calc(100% - 24px));
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    order: 4;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    justify-content: center;
  }

  .header-cta {
    order: 3;
  }

  .hero,
  .section-heading,
  .habit-panel,
  .privacy {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
  }

  .hero-visual {
    order: -1;
  }

  .benefits,
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header {
    margin-top: 10px;
    border-radius: 22px;
  }

  .brand span {
    font-size: 1.65rem;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .header-cta {
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .section-pad {
    width: min(100% - 24px, 560px);
    padding: 64px 0;
  }

  .hero h1 {
    font-size: clamp(4rem, 21vw, 5.6rem);
  }

  .hero-subtitle {
    margin-top: 22px;
    font-size: 1.1rem;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .benefits {
    width: min(100% - 24px, 560px);
    grid-template-columns: 1fr;
    margin-top: -20px;
    padding: 12px;
    border-radius: 24px;
  }

  .benefits article {
    min-height: 0;
    padding: 20px;
  }

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

  .game-card {
    min-height: 220px;
  }

  .screen-track {
    grid-auto-columns: minmax(220px, 78vw);
    gap: 16px;
    padding-inline: 2px;
  }

  .rail-button {
    display: none;
  }

  .site-footer {
    width: min(100% - 24px, 560px);
    align-items: flex-start;
    flex-direction: column;
  }
}

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