/*
 * Language Island — marketing site.
 *
 * The palette, the type and the tone mark are lifted from the app itself rather
 * than invented for the sales page. Someone who clicks through to a language
 * site should arrive somewhere that looks like where they came from; a
 * marketing page that looks nothing like the product is a small lie told before
 * anyone has paid anything.
 */

:root {
  --ink-900: #10171c;
  --ink-850: #131c22;
  --ink-800: #182229;
  --ink-750: #1d2830;
  --ink-700: #24323b;
  --ink-600: #33454f;

  --bone: #e8e3d9;
  --bone-dim: #9ba6ac;
  --bone-faint: #6b7880;

  --cinnabar: #e0503a;
  --cinnabar-deep: #b8351f;
  --celadon: #7fb8a4;
  --celadon-deep: #4d8f78;
  --amber: #e0a63c;

  --surface: var(--ink-850);
  --surface-raised: var(--ink-800);
  --surface-input: var(--ink-750);
  --ground: var(--ink-900);
  --line: var(--ink-700);
  --line-strong: var(--ink-600);
  --text: var(--bone);
  --text-dim: var(--bone-dim);
  --text-faint: var(--bone-faint);

  --font-han: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
  --font-ui: ui-sans-serif, system-ui, "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --font-data: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --step: 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);

  --page: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 650;
}

h3 {
  font-size: 1.16rem;
  font-weight: 620;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--celadon);
  text-decoration-color: color-mix(in srgb, var(--celadon) 40%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--bone);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--surface-raised);
  padding: 0.6rem 1rem;
  border-radius: var(--r-md);
}

:focus-visible {
  outline: 2px solid var(--celadon);
  outline-offset: 2px;
}

/* ───────────────────────────────────────────────────────── top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.logo-words {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-zh {
  font-family: var(--font-han);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.logo-en {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.92rem;
}

.topnav a {
  color: var(--text-dim);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--text);
}

@media (max-width: 46rem) {
  .topnav {
    display: none;
  }
  .topbar .btn {
    margin-left: auto;
  }
}

/* ───────────────────────────────────────────────────────── buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--step), border-color var(--step), color var(--step);
}

.btn:hover {
  border-color: var(--celadon-deep);
  color: var(--text);
}

.btn.is-primary {
  background: var(--celadon-deep);
  border-color: var(--celadon-deep);
  color: #06110d;
  font-weight: 640;
}

.btn.is-primary:hover {
  background: var(--celadon);
  border-color: var(--celadon);
}

.btn.is-large {
  padding: 0.8rem 1.6rem;
  font-size: 1.03rem;
}

.btn.is-small {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
}

.btn.is-quiet {
  background: none;
  border-color: transparent;
  color: var(--text-dim);
}

.btn.is-quiet:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.btn.full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ───────────────────────────────────────────────────────── layout */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
}

.section.alt {
  max-width: none;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section.alt > * {
  max-width: var(--page);
  margin-inline: auto;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.4rem;
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--celadon);
  margin: 0 0 0.5rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
}

.muted {
  color: var(--text-dim);
}

.fineprint {
  font-size: 0.84rem;
  color: var(--text-faint);
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 1.1rem 0;
}

.card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}

/* ───────────────────────────────────────────────────────── hero */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 56rem) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-figure {
    order: -1;
  }
}

.hero h1 {
  margin-bottom: 1.2rem;
}

.accent {
  color: var(--cinnabar);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.6rem 0 0.8rem;
}

.wave-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}

.wave {
  width: 100%;
  height: auto;
}

.wave-label,
.wave-note {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0;
}

.wave-label {
  font-family: var(--font-data);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.wave-note {
  margin-top: 0.6rem;
}

/* ───────────────────────────────────────────────────────── strip */

.strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
}

.strip div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.strip strong {
  font-size: 1.9rem;
  font-weight: 680;
  color: var(--cinnabar);
  line-height: 1;
}

.strip span {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.3rem;
}

/* ───────────────────────────────────────────────────────── demo */

.demo {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.demo-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.chip {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--step), color var(--step), border-color var(--step);
}

.chip:hover {
  color: var(--text);
  border-color: var(--celadon-deep);
}

.chip.is-on {
  background: var(--celadon-deep);
  border-color: var(--celadon-deep);
  color: #06110d;
  font-weight: 620;
}

.demo-cue {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}

.demo-play {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.demo-target {
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
}

.demo-target.is-han {
  font-family: var(--font-han);
}

.demo-phonetic {
  font-family: var(--font-data);
  color: var(--celadon);
  margin: 0 0 1rem;
}

.field {
  display: block;
  margin-bottom: 0.9rem;
}

.field-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

.input {
  width: 100%;
  background: var(--surface-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  padding: 0.65rem 0.8rem;
}

.input:focus {
  outline: none;
  border-color: var(--celadon);
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.demo-actions .muted {
  font-size: 0.86rem;
}

.demo-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.demo-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.5rem;
}

.demo-score span {
  font-size: 2.4rem;
  font-weight: 680;
  line-height: 1;
}

.demo-score small {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.demo-score.good span {
  color: var(--celadon);
}
.demo-score.ok span {
  color: var(--amber);
}
.demo-score.bad span {
  color: var(--cinnabar);
}

.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 1.15rem;
}

.tok {
  padding: 0.1rem 0.35rem;
  border-radius: var(--r-sm);
  border-bottom: 2px solid transparent;
}

.tok.is-han {
  font-family: var(--font-han);
}

.tok.correct {
  color: var(--celadon);
  border-bottom-color: var(--celadon-deep);
}

.tok.near {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.tok.wrong {
  color: var(--cinnabar);
  border-bottom-color: var(--cinnabar-deep);
}

.tok.missing {
  color: var(--text-faint);
  border-bottom-color: var(--text-faint);
  text-decoration: line-through;
}

.demo-foot {
  margin: 1.3rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.92rem;
}

.demo-caveat {
  margin-top: 1rem;
  font-size: 0.84rem;
  color: var(--text-faint);
}

/* ───────────────────────────────────────────────────────── method */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 52rem) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.pullbox {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cinnabar);
  border-radius: var(--r-lg);
  padding: 1.4rem;
}

.pull {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.pull-src {
  font-size: 0.84rem;
  color: var(--text-faint);
}

.links {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.note-strip {
  margin-top: 2.5rem;
  padding: 1.4rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

.note-strip h3 {
  margin-bottom: 0.4rem;
}

.note-strip p {
  margin: 0;
  color: var(--text-dim);
}

/* ───────────────────────────────────────────────────────── grids */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.grid.small {
  margin-top: 1rem;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.feature.wide h3 {
  font-size: 1.3rem;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: none;
}

.dot-celadon {
  background: var(--celadon);
}
.dot-amber {
  background: var(--amber);
}
.dot-cinnabar {
  background: var(--cinnabar);
}

/* ───────────────────────────────────────────────────────── languages */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.lang {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.3rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--step), transform var(--step);
}

a.lang:hover {
  border-color: var(--celadon);
  transform: translateY(-2px);
}

.lang-native {
  font-family: var(--font-han);
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--cinnabar);
}

.lang-name {
  font-size: 1.1rem;
  font-weight: 620;
}

.lang-meta {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-family: var(--font-data);
}

.lang-extra {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.lang-go {
  margin-top: auto;
  padding-top: 0.9rem;
  color: var(--celadon);
  font-weight: 620;
  font-size: 0.95rem;
}

.is-quiet-card {
  border-style: dashed;
}

.is-quiet-card .lang-native {
  color: var(--text-faint);
}

/* ───────────────────────────────────────────────────────── pricing */

.price-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 52rem) {
  .price-wrap {
    grid-template-columns: 1fr;
  }
}

.price {
  border-color: var(--celadon-deep);
}

.price-head {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.price-figure {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.price-unit {
  font-size: 0.86rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  margin-top: 0.35rem;
}

.ticks {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ticks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.35rem;
  border-left: 2px solid var(--celadon);
  border-bottom: 2px solid var(--celadon);
  transform: rotate(-45deg);
}

.price .fineprint {
  margin: 1rem 0 0;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--celadon);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.7rem 0 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ───────────────────────────────────────────────────────── closer */

.closer {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
}

.closer p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 1.6rem;
}

/* ───────────────────────────────────────────────────────── footer */

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

@media (max-width: 46rem) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.footer .stat-label {
  margin-bottom: 0.3rem;
}

.footer .logo-zh {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

/* ───────────────────────────────────────────────── wordmark, concept-first */

/*
 * The app's wordmark is 语言岛, which is right on a Mandarin site and wrong on a
 * page selling a method that has nothing to do with Chinese. The tone-contour
 * mark stays — it reads as a shoreline before it reads as a tone — but the
 * words are in the language of the person being sold to.
 */
.logo-name {
  font-size: 1.02rem;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.logo-tag {
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.footer-name {
  font-size: 1.15rem;
  font-weight: 640;
  margin: 0 0 0.5rem;
}

/* Mandarin needs the Han stack; the other four must not inherit it. */
.input.is-han,
.demo-target.is-han {
  font-family: var(--font-han);
}

.lang-native {
  font-family: var(--font-ui);
}

.lang-native.is-han {
  font-family: var(--font-han);
}
