:root {
  --paper: #fbfaf3;
  --paper-strong: #fffdf7;
  --ink: #162322;
  --muted: #60706e;
  --line: #d7ddd0;
  --teal: #158f86;
  --mint: #9ad8bf;
  --sun: #f2c84b;
  --coral: #ee725f;
  --leaf: #5f9f62;
  --violet: #6b5bd6;
  --shadow: 0 24px 70px rgba(22, 35, 34, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-180%);
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 5vw;
  background: rgba(251, 250, 243, 0.92);
  border-bottom: 1px solid rgba(22, 35, 34, 0.1);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--sun);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: #edf3e7;
  outline: none;
}

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 96px 5vw 64px;
  background:
    linear-gradient(90deg, rgba(251, 250, 243, 0.93) 0%, rgba(251, 250, 243, 0.68) 48%, rgba(251, 250, 243, 0.9) 100%),
    repeating-linear-gradient(0deg, rgba(22, 35, 34, 0.06) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(90deg, rgba(22, 35, 34, 0.05) 0 1px, transparent 1px 58px);
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -18%;
  width: 54%;
  height: 54%;
  background: linear-gradient(135deg, rgba(154, 216, 191, 0.45), rgba(242, 200, 75, 0.34));
  transform: rotate(-8deg);
  border-radius: 8px;
}

.hero-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.word-stage {
  position: absolute;
  right: 5vw;
  top: 88px;
  width: 520px;
  height: 520px;
}

.tablet {
  position: absolute;
  inset: 64px 44px 52px 54px;
  background: #193330;
  border: 10px solid #203c39;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.tablet-topline {
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tablet-topline span {
  width: 10px;
  height: 10px;
  background: var(--mint);
  border-radius: 50%;
}

.tablet-topline span:nth-child(2) {
  background: var(--sun);
}

.tablet-topline span:nth-child(3) {
  background: var(--coral);
}

.tablet-body {
  position: relative;
  min-height: 360px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(21, 143, 134, 0.25), transparent 50%),
    linear-gradient(45deg, rgba(238, 114, 95, 0.16), transparent 45%);
}

.ai-chip {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--sun);
  border: 3px solid #fff4c8;
  border-radius: 8px;
  font-size: 1.9rem;
  font-weight: 900;
}

.word-tile {
  position: absolute;
  min-width: 104px;
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 2px solid rgba(22, 35, 34, 0.18);
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.tile-a {
  top: 40px;
  right: 32px;
}

.tile-b {
  top: 128px;
  left: 42px;
}

.tile-c {
  top: 172px;
  right: 28px;
  background: #dff4ea;
}

.tile-d {
  bottom: 86px;
  left: 96px;
  background: #ffe9df;
}

.caption-line,
.caption-line.short {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 46px;
  height: 10px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.caption-line.short {
  right: 128px;
  bottom: 24px;
}

.learning-card {
  position: absolute;
  width: 174px;
  padding: 16px;
  background: var(--paper-strong);
  border: 1px solid rgba(22, 35, 34, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.learning-card span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.learning-card b {
  display: block;
  margin-top: 4px;
  font-size: 1.3rem;
}

.card-one {
  left: 0;
  top: 82px;
  border-top: 7px solid var(--coral);
}

.card-two {
  right: 0;
  bottom: 86px;
  border-top: 7px solid var(--mint);
}

.card-three {
  left: 52px;
  bottom: 20px;
  border-top: 7px solid var(--sun);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 6.4rem;
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.55rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 700px;
  margin: 26px 0 0;
  color: #334744;
  font-size: 1.25rem;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 rgba(22, 35, 34, 0.16);
  outline: none;
}

.button.primary {
  background: var(--sun);
}

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

.button.small {
  min-width: 110px;
  min-height: 42px;
  padding: 9px 14px;
  background: var(--ink);
  color: #fff;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  max-width: 600px;
  margin: 42px 0 0;
}

.hero-metrics div {
  padding: 16px;
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(22, 35, 34, 0.12);
  border-radius: 8px;
}

.hero-metrics dt {
  font-size: 2rem;
  font-weight: 900;
}

.hero-metrics dd {
  margin: 0;
  color: var(--muted);
}

.intro-band,
.closing-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 64px 5vw;
  background: #18332f;
  color: #fff;
}

.intro-band .eyebrow,
.closing-band .eyebrow {
  color: var(--mint);
}

.intro-band p,
.closing-band p {
  margin: 0;
  color: #e2f1ec;
  font-size: 1.08rem;
}

.section {
  padding: 86px 5vw;
}

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

.section-heading.compact {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.method-card,
.game-panel,
.support-panel,
.selector-panel,
.plan-panel,
.timeline article {
  background: var(--paper-strong);
  border: 1px solid rgba(22, 35, 34, 0.13);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(22, 35, 34, 0.08);
}

.method-card {
  min-height: 290px;
  padding: 24px;
}

.method-card:nth-child(1) {
  border-top: 7px solid var(--teal);
}

.method-card:nth-child(2) {
  border-top: 7px solid var(--sun);
}

.method-card:nth-child(3) {
  border-top: 7px solid var(--coral);
}

.method-card:nth-child(4) {
  border-top: 7px solid var(--leaf);
}

.method-number {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--muted);
  font-weight: 900;
}

.method-card p,
.support-panel p,
.plan-panel p,
.timeline p {
  color: var(--muted);
}

.lab-section {
  background:
    linear-gradient(180deg, #eef7eb 0%, #fbfaf3 100%);
}

.lab-layout,
.ai-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.12fr) minmax(280px, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.game-panel,
.support-panel,
.selector-panel,
.plan-panel {
  padding: 24px;
}

.game-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.score-pill {
  min-width: 68px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid rgba(22, 35, 34, 0.16);
  border-radius: 8px;
  background: #eff7ef;
  font-weight: 900;
}

.game-scene {
  position: relative;
  min-height: 230px;
  margin: 24px 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #e7f4f1 0%, #f7eec3 100%);
  border: 2px solid rgba(22, 35, 34, 0.12);
  border-radius: 8px;
}

.game-scene::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background:
    repeating-linear-gradient(90deg, rgba(22, 35, 34, 0.07) 0 1px, transparent 1px 48px),
    #d6ead0;
}

.scene-token {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 12px 18px;
  border: 2px solid rgba(22, 35, 34, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-strong);
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(22, 35, 34, 0.11);
}

.token-main {
  left: 12%;
  top: 32%;
  min-width: 116px;
  min-height: 74px;
  background: #fff4c8;
}

.token-side {
  right: 12%;
  top: 18%;
  min-width: 96px;
  min-height: 58px;
  background: #dff4ea;
}

.token-action {
  right: 24%;
  bottom: 18%;
  min-width: 120px;
  min-height: 56px;
  background: #ffe1d8;
}

.game-question {
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 800;
}

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

.choice {
  min-height: 54px;
  padding: 12px;
  border: 2px solid rgba(22, 35, 34, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.choice.correct {
  background: #dff4ea;
  border-color: var(--teal);
}

.choice.wrong {
  background: #ffe1d8;
  border-color: var(--coral);
}

.game-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.progress-shell {
  flex: 1;
  height: 12px;
  overflow: hidden;
  background: #e7eadf;
  border-radius: 999px;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--sun));
  transition: width 0.24s ease;
}

.feedback {
  min-height: 28px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 800;
}

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

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.ai-section {
  background: #fffdf7;
}

.selector-panel h3 + .segmented {
  margin-top: 12px;
}

.selector-panel .segmented + h3 {
  margin-top: 26px;
}

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

.segment {
  min-height: 46px;
  padding: 9px 10px;
  border: 2px solid rgba(22, 35, 34, 0.14);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

.segment.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.plan-panel {
  background:
    linear-gradient(135deg, rgba(154, 216, 191, 0.24), transparent 46%),
    var(--paper-strong);
}

.plan-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.plan-steps span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--ink);
  background: #eff7ef;
  border: 1px solid rgba(22, 35, 34, 0.12);
  border-radius: 8px;
  font-weight: 800;
}

.lesson-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1.25fr);
  gap: 36px;
}

.lesson-copy {
  position: sticky;
  top: 112px;
  align-self: start;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  display: grid;
  grid-template-columns: 86px 170px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.timeline span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--sun);
  font-weight: 900;
}

.timeline p {
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 5vw;
  color: #e2f1ec;
  background: #132724;
}

@media (max-width: 1080px) {
  .word-stage {
    right: -120px;
    opacity: 0.82;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .timeline article {
    grid-template-columns: 86px 1fr;
  }

  .timeline article p {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .hero::after {
    width: 82%;
    height: 38%;
  }

  .hero-visual {
    opacity: 0.38;
  }

  .word-stage {
    right: -210px;
    top: 20px;
    transform: scale(0.8);
  }

  h1 {
    font-size: 3.9rem;
    line-height: 0.98;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.08rem;
  }

  .hero-metrics,
  .intro-band,
  .closing-band,
  .section-heading,
  .lab-layout,
  .ai-layout,
  .lesson-section {
    grid-template-columns: 1fr;
  }

  .lesson-copy {
    position: static;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-nav a {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero,
  .section,
  .intro-band,
  .closing-band,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-metrics,
  .method-grid,
  .segmented {
    grid-template-columns: 1fr;
  }

  .game-topbar,
  .game-footer,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline article {
    grid-template-columns: 1fr;
  }

  .timeline article p {
    grid-column: auto;
  }
}

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