/* Kulma visual refresh: horizontal low-poly wordmark */
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #171b19;
  --muted: #68716d;
  --paper: #f3f5f1;
  --surface: #ffffff;
  --surface-strong: #e9ede8;
  --blue: #2758f5;
  --blue-dark: #193dc2;
  --blue-soft: #e7ecff;
  --coral: #ed6048;
  --coral-soft: #ffebe6;
  --gold: #e9ae2f;
  --gold-soft: #fff3d4;
  --green: #16845a;
  --green-soft: #def3e8;
  --line: #d8ded9;
  --line-strong: #aeb8b1;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 99;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.section-title {
  margin: 16px 0 20px;
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: .96;
  letter-spacing: -.06em;
}
.section-copy {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.6;
}

.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.brand img { width: 34px; height: 34px; }
.site-nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 14px; font-weight: 500; }
.site-nav a { transition: color 160ms ease; }
.site-nav a:hover { color: var(--ink); }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-2px); }
.button--header { min-height: 42px; padding-inline: 15px; }
.button--light { border-color: #fff; background: #fff; color: var(--ink); }
.button--light:hover { border-color: var(--paper); background: var(--paper); }
.button .arrow { font-size: 18px; line-height: 1; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}
.button:focus-visible, .text-link:focus-visible, .site-nav a:focus-visible, .brand:focus-visible, .footer-nav a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.hero {
  min-height: calc(100svh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
  padding: 74px 0 92px;
}
.hero h1 {
  max-width: 690px;
  margin: 18px 0 25px;
  font-size: clamp(58px, 7.5vw, 102px);
  line-height: .89;
  letter-spacing: -.075em;
}
.hero h1 .accent { color: var(--blue); }
.hero-wordmark-frame {
  display: block;
  width: min(100%, 500px);
  aspect-ratio: 1900 / 828;
  margin: 0 0 18px;
  overflow: hidden;
}
.hero-wordmark {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  object-position: left center;
}
.hero-copy > p:not(.eyebrow) { max-width: 610px; margin: 0; color: var(--muted); font-size: clamp(18px, 2vw, 21px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.proof-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.proof::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.phone-wrap { position: relative; width: min(100%, 470px); margin: 0; justify-self: end; }
.phone-wrap::before {
  content: "";
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  right: -11%;
  top: 8%;
  background: var(--gold-soft);
  clip-path: polygon(50% 0, 100% 28%, 88% 85%, 37% 100%, 0 54%, 15% 11%);
  transform: rotate(7deg);
}
.phone { position: relative; width: min(100%, 414px); margin-left: auto; border: 1px solid var(--line-strong); border-radius: 27px; padding: 13px; background: var(--ink); }
.phone-screen { overflow: hidden; min-height: 650px; border-radius: 17px; background: var(--paper); }
.phone-top { min-height: 58px; display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.lesson-close, .lesson-top-spacer { width: 30px; height: 30px; }
.lesson-close { display: grid; place-items: center; color: var(--muted); font-size: 24px; font-weight: 400; line-height: 1; }
.lesson-statuses { display: flex; align-items: center; justify-content: center; gap: 9px; }
.lesson-status {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  transition: border-color .22s ease, background-color .22s ease, transform .22s ease;
}
.lesson-status::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--line-strong); border-radius: 50%; }
.lesson-status--current { border: 2px solid var(--blue); background: var(--blue-soft); transform: scale(1.04); }
.lesson-status--current::before { border-color: var(--blue); }
.lesson-status--success { border-color: var(--green); background: var(--green-soft); }
.lesson-status--success::before { content: "✓"; width: auto; height: auto; border: 0; border-radius: 0; color: var(--green); font-size: 16px; font-weight: 700; line-height: 1; }
.lesson-status--hinted { border-color: var(--gold); background: var(--gold-soft); }
.lesson-status--hinted::before { content: "✦"; width: auto; height: auto; border: 0; border-radius: 0; color: var(--gold); font-size: 14px; line-height: 1; }
.lesson-status--failure { border-color: var(--coral); background: var(--coral-soft); }
.lesson-status--failure::before { content: "×"; width: auto; height: auto; border: 0; border-radius: 0; color: var(--coral); font-size: 19px; font-weight: 700; line-height: 1; }
.scene { height: 303px; margin: 10px 18px 0; overflow: hidden; border: 1px solid var(--line); background: #c7badf; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.scene img.is-entering { animation: scene-enter .42s ease both; }
@keyframes scene-enter { from { opacity: .22; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
.prompt-block { min-height: 74px; display: grid; align-content: center; justify-items: center; padding: 11px 20px 8px; border-bottom: 2px solid transparent; transition: background-color .2s ease, border-color .2s ease; }
.prompt-block.is-correct { border-bottom-color: var(--green); background: var(--green-soft); }
.prompt-block.is-wrong { border-bottom-color: var(--coral); background: var(--coral-soft); }
.sentence { font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: -.04em; text-align: center; }
.translation-hint { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.2; }
.translation-hint[hidden] { display: none; }
.wheels { display: grid; width: min(210px, calc(100% - 36px)); margin: 10px auto 14px; }
.wheel { min-height: 108px; display: grid; grid-template-rows: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.wheel.is-turning { animation: wheel-turn .24s ease; }
@keyframes wheel-turn { 50% { transform: translateY(2px); } }
.wheel-option { display: grid; place-items: center; min-width: 0; padding: 5px 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; line-height: 1.15; overflow-wrap: anywhere; cursor: pointer; transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.wheel-option.is-selected { box-shadow: inset 0 1px var(--blue), inset 0 -1px var(--blue); background: var(--blue-soft); color: var(--ink); font-size: 14px; font-weight: 700; }
.wheel-option.is-correct { box-shadow: inset 0 1px var(--green), inset 0 -1px var(--green); background: var(--green-soft); color: var(--green); }
.wheel-option.is-wrong { box-shadow: inset 0 1px var(--coral), inset 0 -1px var(--coral); background: var(--coral-soft); color: #a13d2d; }
.wheel-option:disabled { cursor: default; opacity: 1; }
.wheel-option:focus-visible, .hint:focus-visible, .check:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(39, 88, 245, .35); outline-offset: -3px; }
.phone-actions { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 0 18px 18px; }
.hint, .check { min-height: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: inherit; }
.hint { color: var(--gold); font-size: 18px; cursor: pointer; }
.hint[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); }
.check { border-color: var(--blue); background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.offline-note {
  position: absolute;
  right: -13px;
  bottom: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transform: rotate(-2deg);
}
.offline-note::before { content: "↓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--coral-soft); color: var(--coral); }

.loop-strip { border-block: 1px solid var(--line); background: rgba(255, 255, 255, .76); }
.loop-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.loop-step { min-height: 194px; padding: 28px 24px; border-left: 1px solid var(--line); }
.loop-step:last-child { border-right: 1px solid var(--line); }
.loop-number { color: var(--coral); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.loop-step h2 { margin: 34px 0 8px; font-size: 21px; line-height: 1.08; letter-spacing: -.04em; }
.loop-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.memory { padding: 132px 0; }
.memory-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr); align-items: center; gap: clamp(64px, 8vw, 120px); }
.memory-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.chart-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.chart-head { display: flex; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.chart-label { color: var(--muted); font-size: 12px; }
.chart-score { display: block; margin-top: 3px; font-size: 36px; font-weight: 700; letter-spacing: -.06em; }
.chart-change { align-self: center; color: var(--green); font-size: 13px; font-weight: 700; }
.chart-body { padding: 20px 24px 24px; }
.memory-chart { width: 100%; height: auto; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-path { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--surface); stroke: var(--blue); stroke-width: 4; }
.chart-dot--now { fill: var(--blue); }
.status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.status { padding: 13px 12px; border-radius: var(--radius); font-size: 11px; font-weight: 700; text-align: center; }
.status--fragile { background: var(--coral-soft); color: #a13d2d; }
.status--steady { background: var(--gold-soft); color: #8b6515; }
.status--mastered { background: var(--green-soft); color: var(--green); }

.languages { padding: 120px 0; background: var(--ink); color: #fff; }
.languages .eyebrow { color: #96adff; }
.language-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr); gap: 70px; align-items: end; }
.language-intro .section-copy { color: #b7c0bc; }
.language-metric { border-left: 1px solid #3a413e; padding-left: 30px; }
.language-metric strong { display: block; color: #fff; font-size: clamp(64px, 8vw, 108px); line-height: .8; letter-spacing: -.08em; }
.language-metric span { display: block; margin-top: 18px; color: #b7c0bc; font-size: 14px; }
.language-cloud { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 70px; border-top: 1px solid #3a413e; border-left: 1px solid #3a413e; }
.language { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; border-right: 1px solid #3a413e; border-bottom: 1px solid #3a413e; }
.language .language-flag { color: inherit; font-size: 28px; line-height: 1; }
.language strong { overflow-wrap: anywhere; font-size: 18px; font-weight: 500; letter-spacing: -.03em; }
.route-note { display: flex; justify-content: space-between; gap: 30px; margin-top: 24px; color: #8f9994; font-size: 12px; }

.collection { padding: 132px 0; }
.collection-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr); gap: 70px; align-items: end; }
.collection-head .section-copy { font-size: 18px; }
.collection-showcase { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 22px; margin-top: 66px; }
.mosaic-card, .dictionary-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 61px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.panel-head strong { font-size: 14px; }
.panel-head span { color: var(--muted); font-size: 11px; }
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: 20px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); background: var(--surface-strong); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: attr(data-word); position: absolute; left: 7px; right: 7px; bottom: 7px; width: fit-content; max-width: calc(100% - 14px); overflow: hidden; padding: 3px 5px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 9px; font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.dictionary-body { padding: 22px; }
.word-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.word { font-size: 34px; font-weight: 700; letter-spacing: -.06em; }
.definition { margin-top: 5px; color: var(--muted); font-size: 13px; }
.strength { padding: 7px 9px; border-radius: 999px; background: var(--gold-soft); color: #8b6515; font-size: 10px; font-weight: 700; }
.definition-rule { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.memory-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.mini-curve { margin: 8px 0 20px; width: 100%; }
.next-review { display: flex; justify-content: space-between; gap: 20px; padding: 13px; background: var(--blue-soft); font-size: 12px; }
.next-review strong { color: var(--blue-dark); }

.offline { padding: 128px 0; border-top: 1px solid var(--line); background: var(--surface); }
.offline-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); gap: clamp(64px, 9vw, 130px); align-items: start; }
.offline-cards { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.mode-card { min-height: 330px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mode-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 19px; font-weight: 700; }
.mode-card--online .mode-icon { background: var(--coral-soft); color: var(--coral); }
.mode-card h3 { margin: 28px 0 8px; font-size: 22px; letter-spacing: -.04em; }
.mode-card p { min-height: 52px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mode-list { display: grid; gap: 13px; padding: 0; margin: 0; list-style: none; font-size: 13px; }
.mode-list li { display: flex; gap: 9px; }
.mode-list li::before { content: "✓"; color: var(--green); font-weight: 700; }

.download { padding: 54px 0; background: var(--blue); color: #fff; }
.download-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 60px; }
.download .eyebrow { color: #dce4ff; }
.download h2 { max-width: 800px; margin: 14px 0 15px; font-size: clamp(40px, 6vw, 76px); line-height: .95; letter-spacing: -.065em; }
.download p { max-width: 640px; margin: 0; color: #dce4ff; font-size: 16px; line-height: 1.55; }
.download-action { min-width: 240px; }
.download-action .button { width: 100%; }
.download-action small { display: block; margin-top: 10px; color: #dce4ff; font-size: 14px; line-height: 1.5; text-align: center; }

.site-footer { background: var(--ink); color: #fff; }
.footer-main { min-height: 150px; display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.footer-brand img { width: 38px; height: 38px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 24px; color: #aeb8b1; font-size: 13px; }
.footer-base { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0; border-top: 1px solid #353b38; color: #78817d; font-size: 11px; }

@media (max-width: 980px) {
  .site-nav { display: none; }
  .hero { min-height: 0; grid-template-columns: 1fr; gap: 62px; padding-top: 62px; }
  .hero-copy { text-align: center; }
  .hero-wordmark-frame { margin-inline: auto; }
  .hero-wordmark { object-position: center; }
  .hero-copy > p:not(.eyebrow) { margin-inline: auto; }
  .hero-actions, .proof-row { justify-content: center; }
  .phone-wrap { justify-self: center; }
  .phone { margin-inline: auto; }
  .loop-grid { grid-template-columns: 1fr 1fr; }
  .loop-step:nth-child(2) { border-right: 1px solid var(--line); }
  .loop-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .memory-grid, .offline-grid { grid-template-columns: 1fr; }
  .chart-card { width: min(680px, 100%); }
  .language-cloud { grid-template-columns: repeat(2, 1fr); }
  .collection-head { grid-template-columns: 1fr; gap: 22px; }
  .collection-showcase { grid-template-columns: 1fr; }
  .dictionary-card { width: min(560px, 100%); }
  .download-grid { grid-template-columns: 1fr; }
  .download-action { width: min(320px, 100%); }
}

@media (max-width: 660px) {
  .shell { width: min(100% - 28px, 560px); }
  .site-header { min-height: 70px; }
  .button--header .header-label { display: none; }
  .hero { padding: 48px 0 68px; }
  .hero-wordmark-frame { width: min(88vw, 360px); margin-bottom: 14px; }
  .hero h1 { font-size: clamp(53px, 17vw, 74px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .phone { width: calc(100% - 12px); padding: 9px; border-radius: 22px; }
  .phone-screen { min-height: 590px; }
  .scene { height: 250px; }
  .prompt-block { min-height: 70px; }
  .sentence { font-size: 23px; }
  .wheel-option { font-size: 12px; }
  .wheel-option.is-selected { font-size: 13px; }
  .offline-note { right: -5px; bottom: 40px; }
  .loop-grid { grid-template-columns: 1fr; }
  .loop-step, .loop-step:nth-child(2) { min-height: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .loop-step:last-child { border-bottom: 0; }
  .loop-step h2 { margin-top: 18px; }
  .memory, .collection { padding: 90px 0; }
  .memory-grid, .collection-showcase { gap: 46px; }
  .chart-head { padding: 18px; }
  .chart-body { padding: 17px; }
  .status-row { grid-template-columns: 1fr; }
  .languages { padding: 90px 0; }
  .language-intro { grid-template-columns: 1fr; gap: 42px; }
  .language-metric { border-left: 0; border-top: 1px solid #3a413e; padding: 28px 0 0; }
  .language-cloud { grid-template-columns: 1fr 1fr; margin-top: 50px; }
  .language { min-height: 98px; }
  .route-note { flex-direction: column; gap: 7px; }
  .collection-showcase { margin-top: 46px; }
  .mosaic { grid-template-columns: repeat(3, 1fr); padding: 14px; }
  .offline { padding: 90px 0; }
  .offline-cards { grid-template-columns: 1fr; }
  .mode-card { min-height: 0; }
  .download { padding: 70px 0; }
  .footer-main { min-height: 180px; flex-direction: column; align-items: flex-start; justify-content: center; }
  .footer-nav { justify-content: flex-start; }
  .footer-base { flex-direction: column; gap: 8px; }
}

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