/* The public site's own layout. It reads --tokens from the shared tokens.css the SPA also uses
 * (ADR-0005), so the two front ends cannot drift into different greys and a different teal.
 *
 * No fonts are loaded here. The SPA bundles Plus Jakarta Sans and Lexend; a public page that
 * blocks first paint on two webfonts to look identical is trading the thing search traffic
 * actually cares about for a detail nobody arriving from a search result will notice. That
 * decision costs this page its typeface, so everything else — spacing, the ladder, the one
 * accent — has to carry the weight instead. */

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
}

/* One measure for every band on the page, so nothing is a pixel out of line with the thing
 * above it. */
.site-header__inner,
main,
.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

/* ─── header ─────────────────────────────────────────────────────────────────────────────────── */

/* Sticky, and translucent over whatever is under it. The one action on this site is "start", and
 * it should not require scrolling back to the top to find. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.site-wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--teal-line);
  background: var(--teal-faint);
  color: var(--teal-bright);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* The sign-in link is a button. It is the only place on the page that leaves for the app, and a
 * text link beside another text link makes the reader choose between two identical things. */
.site-nav__cta {
  padding: 7px var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.site-nav__cta:hover {
  border-color: var(--teal-line);
  color: var(--teal-bright);
}

/* ─── the page ───────────────────────────────────────────────────────────────────────────────── */

main {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.hero h1 {
  font-size: var(--text-2xl);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 20ch;
  margin-bottom: var(--space-4);
}

@media (min-width: 800px) {
  .hero h1 {
    font-size: 54px;
  }
}

.hero--small h1 {
  font-size: var(--text-xl);
  max-width: none;
}

.lede {
  color: var(--ink-muted);
  font-size: var(--text-md);
  line-height: 1.6;
  max-width: 54ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* The first question anybody has, answered beside the button rather than three sections below it. */
.hero__note {
  color: var(--ink-dim);
  font-size: var(--text-sm);
  max-width: 34ch;
}

.section-label {
  color: var(--ink-dim);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.explain {
  margin-top: var(--space-8);
}

.explain h2 {
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.explain p {
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 66ch;
}

/* ─── the ladder ─────────────────────────────────────────────────────────────────────────────
 *
 * One continuous track, four joined segments, no gap and **no cell borders**. The same rule the
 * SPA's Rung Indicator carries and for the same reason: four separated boxes read as four
 * exercises rather than one thing with support falling away, and that metaphor is the product.
 *
 * The first version of this file had a `border-left` between segments and padding under each bar,
 * which drew exactly the grid it was written to forbid — and the rule test in pages.test.ts passed
 * throughout, because it reads `data-track="continuous"` out of the markup and markup was never
 * where the mistake was. The bars abut edge to edge now; the segment's opacity is on the bar, so
 * the line gets quieter left to right, which is the support going away. */
.ladder-block {
  margin-top: var(--space-8);
}

.rungs {
  display: flex;
  gap: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-raised);
}

.rung {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.rung__bar {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--teal);
}

.rung__body {
  display: block;
  padding: 0 var(--space-4) var(--space-5);
}

.rung__name {
  display: block;
  color: var(--ink);
  font-weight: 620;
  letter-spacing: -0.01em;
}

.rung__note {
  display: block;
  margin-top: var(--space-2);
  color: var(--ink-dim);
  font-size: var(--text-sm);
  line-height: 1.45;
}

/* ─── how it works ───────────────────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
}

.step__number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--teal-line);
  color: var(--teal);
  font-size: var(--text-sm);
  font-weight: 650;
}

.step__name {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-md);
  letter-spacing: -0.02em;
}

.step__body {
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ─── what this is not ───────────────────────────────────────────────────────────────────────
 *
 * Its own panel. It is the most useful paragraph here — the one that tells somebody arriving from
 * a search for "English speaking app" whether to keep reading — and in a stack of identical
 * headings it read as the third thing rather than the honest one. */
.honest {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal-line);
  border-radius: var(--radius-lg);
  background: var(--bg-sunken);
}

.honest h2 {
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.honest p {
  color: var(--ink-muted);
  font-size: var(--text-md);
  line-height: 1.7;
  max-width: 68ch;
}

/* ─── topics ─────────────────────────────────────────────────────────────────────────────── */

.topic-cards {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 0;
}

@media (min-width: 800px) {
  .topic-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.topic-card {
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  transition: border-color 200ms ease;
}

.topic-card:hover {
  border-color: var(--teal-line);
}

.topic-card h2,
.topic-card h3 {
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.topic-card a {
  color: var(--ink);
  text-decoration: none;
}

.topic-card a:hover {
  color: var(--teal-bright);
}

.dim {
  color: var(--ink-dim);
  font-size: var(--text-sm);
}

.crumb {
  margin-bottom: var(--space-4);
}

.crumb a {
  color: var(--ink-dim);
  font-size: var(--text-sm);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--teal-bright);
}

.topic-detail h1 {
  font-size: var(--text-2xl);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

/* The opening line, and nothing after it. Set as material rather than as a pull quote with
 * decoration: it is what the learner will be reading aloud, not a testimonial. */
.topic-opening {
  margin: var(--space-6) 0 var(--space-8);
  padding: var(--space-5) var(--space-6);
  border-left: 3px solid var(--teal-line);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-sunken);
  color: var(--ink);
  font-size: var(--text-lg);
  line-height: 1.6;
}

/* The Gap, the same shape the app draws: a solid teal baseline about five characters wide. Never
 * whitespace — a hole you cannot see is a hole nobody fills — and never a box. */
.gap {
  color: transparent;
  border-bottom: 2px solid var(--teal);
}

.topic-detail__cta,
.closing {
  margin-top: var(--space-7);
}

/* ─── the one button ─────────────────────────────────────────────────────────────────────────── */

.cta {
  display: inline-block;
  padding: 13px var(--space-6);
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--on-teal);
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.cta:hover {
  background: var(--teal-bright);
}

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

.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
  color: var(--ink-dim);
  font-size: var(--text-sm);
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal-bright);
}

/* The locale you are already in is not a link. Two links that look the same, one of which does
 * nothing, is the smallest possible lie a page can tell. */
.site-footer__locales [aria-current] {
  color: var(--ink);
}
