/* ============================================================
   landing.css — public landing page
   Scoped under #landing-root with --lp-* tokens.
   ============================================================ */

#landing-root {
  /* ── Tokens ── */
  --lp-bg:            rgba(255, 255, 255, 1);
  --lp-surface:       rgba(255, 255, 255, 1);
  --lp-surface-2:     rgba(245, 246, 248, 1);   /* cool grey card tint */
  --lp-ink:           rgba(28, 32, 38, 1);
  --lp-ink-soft:      rgba(75, 82, 92, 1);
  --lp-ink-faint:     rgba(130, 138, 148, 1);
  --lp-line:          rgba(0, 0, 0, 0.08);
  --lp-line-strong:   rgba(0, 0, 0, 0.16);

  /* Tübingen burgundy — the brand colour from the reference. */
  --lp-accent:        rgba(165, 30, 45, 1);     /* #a51e2d */
  --lp-accent-soft:   rgba(165, 30, 45, 0.10);
  --lp-accent-deep:   rgba(125, 22, 35, 1);
  --lp-accent-tint:   rgba(165, 30, 45, 0.04);  /* faintest wash for backgrounds */

  /* Dark navigation rail (the strip beneath the logos). */
  --lp-nav-bg:        rgba(44, 56, 69, 1);      /* #2c3845 */
  --lp-nav-bg-hover:  rgba(56, 70, 86, 1);
  --lp-nav-ink:       rgba(255, 255, 255, 1);

  /* Grading bucket colours — burgundy stays out of the bucket palette */
  --lp-green:         rgba(22, 130, 70, 1);
  --lp-green-soft:    rgba(22, 130, 70, 0.10);
  --lp-orange:        rgba(196, 110, 18, 1);
  --lp-orange-soft:   rgba(196, 110, 18, 0.12);
  --lp-red:           rgba(190, 35, 50, 1);
  --lp-red-soft:      rgba(190, 35, 50, 0.10);

  --lp-radius:        4px;                      /* tighter, more institutional */
  --lp-radius-sm:     3px;
  --lp-shadow:        0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 28px rgba(20, 30, 50, 0.06);

  /* Type stack — slab headline echoes the Hector "I" letterform and the
     reference site's institutional typography. Body stays clean sans. */
  --lp-font:          "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --lp-font-display:  "Roboto Slab", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --lp-font-serif:    var(--lp-font-display);   /* alias kept for older rules */

  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: var(--lp-font);
  font-size: 16px;
  line-height: 1.55;
  _min-height: 100vh;
}

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

/* ============================================================
   HERO + DEMO (two-column on desktop)
   ────────────────────────────────────────────────────────────
   The institutional header (logos + nav) lives in a separate
   partial. This block is just the supporting copy + demo card.
   ============================================================ */

.lp-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

/* ── Two-column split ── */
.lp-hero__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}

/* ── Left column: copy ── */
.lp-hero__copy {
  padding-top: 8px;
}

.lp-hero__headline {
  font-family: var(--lp-font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--lp-ink);
  margin: 0 0 18px;
  font-weight: 500;
}

.lp-hero__subhead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--lp-ink-soft);
  margin: 0 0 28px;
  max-width: 460px;
}

.lp-hero__cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.lp-hero__note {
  font-size: 13px;
  color: var(--lp-ink-faint);
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--lp-line);
  max-width: 460px;
}

/* ── Right column: demo ── */
.lp-demo {
  background: var(--lp-surface);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  padding: 20px;
  box-shadow: var(--lp-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lp-demo__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.lp-demo__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lp-ink-faint);
}

.lp-demo__hint {
  font-size: 12px;
  color: var(--lp-ink-faint);
}

/* ── Sample tabs ── */
.lp-demo__samples {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lp-sample-tab {
  flex: 0 1 auto;
  padding: 6px 12px;
  border: 1px solid var(--lp-line-strong);
  background: var(--lp-surface);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  color: var(--lp-ink-soft);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lp-sample-tab:hover {
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}

.lp-sample-tab.is-active {
  background: var(--lp-ink);
  border-color: var(--lp-ink);
  color: var(--lp-surface);
}

.lp-sample-tab__title {
  font-weight: 500;
}

.lp-sample-tab__meta {
  font-size: 10px;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

/* ── Canvas ── */
.lp-demo__canvas {
  background: var(--lp-surface-2);
  border-radius: var(--lp-radius-sm);
  padding: 20px 22px;
  min-height: 200px;
  position: relative;
}

.lp-canvas__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--lp-ink-faint);
  font-size: 14px;
  min-height: 160px;
}

.lp-canvas__loader[hidden] {
  display: none;
}

.lp-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--lp-line-strong);
  border-top-color: var(--lp-accent);
  border-radius: 50%;
  animation: lp-spin 700ms linear infinite;
}

@keyframes lp-spin {
  to { transform: rotate(360deg); }
}

.lp-canvas__text {
  font-family: var(--lp-font-serif);
  font-size: 16px;
  line-height: 1.95;
  color: var(--lp-ink);
}

.lp-canvas__text[hidden] {
  display: none;
}

/* ── Token rendering (unchanged) ── */
.lp-tok {
  /* plain word — inherit baseline */
}

.lp-tok--punct {
  /* sit tight against previous word */
}

.lp-gap {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  vertical-align: baseline;
}

.lp-gap__visible {
  /* visible portion of c-test/capitalisation gaps */
}

.lp-gap__input {
  font: inherit;
  color: var(--lp-ink);
  background: var(--lp-surface);
  border: 1px solid var(--lp-line-strong);
  border-radius: 4px;
  padding: 1px 4px;
  min-width: 1.5ch;
  text-align: left;
  outline: none;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.lp-gap__input:focus {
  background: var(--lp-surface);
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 2px var(--lp-accent-soft);
}

/* Result-coloured inputs */
.lp-gap__input.is-green {
  background: var(--lp-green-soft);
  border-color: var(--lp-green);
  color: var(--lp-green);
}
.lp-gap__input.is-orange {
  background: var(--lp-orange-soft);
  border-color: var(--lp-orange);
  color: var(--lp-orange);
}
.lp-gap__input.is-red {
  background: var(--lp-red-soft);
  border-color: var(--lp-red);
  color: var(--lp-red);
}

/* ── Strategy chips ── */
.lp-demo__strategies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lp-strategy-chip {
  padding: 5px 11px;
  border: 1px solid var(--lp-line-strong);
  background: var(--lp-surface);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  color: var(--lp-ink-soft);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.lp-strategy-chip:hover {
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}

.lp-strategy-chip.is-active {
  background: var(--lp-accent);
  border-color: var(--lp-accent);
  color: var(--lp-surface);
}

/* ── Actions row ── */
.lp-demo__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lp-checks-remaining {
  font-size: 12px;
  color: var(--lp-ink-faint);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--lp-radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
}

.lp-btn--ghost {
  background: transparent;
  color: var(--lp-ink);
  border-color: var(--lp-line-strong);
}
.lp-btn--ghost:hover {
  background: var(--lp-surface-2);
  border-color: var(--lp-ink-soft);
}

.lp-btn--solid {
  background: var(--lp-accent);
  color: #fff;
  border-color: var(--lp-accent);
}
.lp-btn--solid:hover {
  background: var(--lp-accent-deep);
  border-color: var(--lp-accent-deep);
}

.lp-btn--check {
  padding: 12px 28px;
  font-size: 15px;
}

.lp-btn--lg {
  padding: 12px 22px;
  font-size: 15px;
}

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


/* ============================================================
   TESTIMONIALS
   ============================================================ */

.lp-testimonials {
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.lp-card {
  background: var(--lp-surface);
  border: 1px solid var(--lp-line);
  border-left: 3px solid var(--lp-accent);
  border-radius: var(--lp-radius);
  padding: 28px 28px 24px 32px;
  box-shadow: var(--lp-shadow);
}

.lp-card__quote {
  font-family: var(--lp-font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--lp-ink);
  margin: 0 0 20px;
  font-style: normal;     /* slab serif doesn't need italic for emphasis */
  font-weight: 400;
}

.lp-card__author {
  border-top: 1px solid var(--lp-line);
  padding-top: 16px;
}

.lp-card__name {
  font-weight: 600;
  font-size: 14px;
  color: var(--lp-ink);
}

.lp-card__role {
  font-size: 13px;
  color: var(--lp-ink-faint);
  margin-top: 2px;
}

/* ============================================================
   CONTACT + FOOTER
   ============================================================ */

.lp-section__title {
  font-family: var(--lp-font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--lp-ink);
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--lp-accent);
}

.lp-contact {
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 0 32px;
  text-align: center;
}

.lp-contact__line {
  font-size: 16px;
  color: var(--lp-ink-soft);
}

.lp-contact__line a {
  color: var(--lp-accent-deep);
  text-decoration: none;
}

.lp-contact__line a:hover {
  text-decoration: underline;
}

/* ============================================================
   RESULT DIALOG — content only
   ────────────────────────────────────────────────────────────
   The shell (.d-backdrop / .d-box / .d-head / .d-body / .d-foot
   / .d-close / .d-btn) brings its own CSS for layout, padding,
   borders, and show/hide. We only style what lives INSIDE the
   d-body — score, legend, grade rows, conversion state.
   ============================================================ */

/* Score + legend block (sits at top of d-body) */
.lp-result__header {
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--lp-line);
}

.lp-result__score-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.lp-result__score {
  font-family: var(--lp-font-serif);
  font-size: 44px;
  font-weight: 600;
  color: var(--lp-ink);
  line-height: 1;
}

.lp-result__score::after {
  content: "%";
  font-size: 20px;
  color: var(--lp-ink-faint);
  margin-left: 2px;
}

.lp-result__score-label {
  font-size: 14px;
  color: var(--lp-ink-faint);
}

.lp-result__legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.lp-legend {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lp-ink-soft);
}

.lp-legend::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.lp-legend--green::before  { background: var(--lp-green); }
.lp-legend--orange::before { background: var(--lp-orange); }
.lp-legend--red::before    { background: var(--lp-red); }

/* Per-gap rows */
.lp-result__body {
  /* d-body already scrolls; nothing to do here. */
}

.lp-grade-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lp-line);
}

.lp-grade-row:last-child {
  border-bottom: none;
}

.lp-grade__pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  text-transform: lowercase;
  white-space: nowrap;
}

.lp-grade__pill.is-green  { background: var(--lp-green-soft);  color: var(--lp-green); }
.lp-grade__pill.is-orange { background: var(--lp-orange-soft); color: var(--lp-orange); }
.lp-grade__pill.is-red    { background: var(--lp-red-soft);    color: var(--lp-red); }

.lp-grade__answer {
  flex: 1 1 auto;
  font-family: var(--lp-font-serif);
  font-size: 15px;
}

.lp-grade__user {
  color: var(--lp-ink);
}

.lp-grade__correct {
  color: var(--lp-ink-faint);
  font-size: 13px;
  margin-left: 4px;
}

.lp-grade__correct::before {
  content: "→ ";
}

/* Footer "checks remaining" label sits inside d-foot via d-foot--spread */
.lp-result__remaining {
  font-size: 13px;
  color: var(--lp-ink-faint);
}

/* ── Conversion state ── */
/* When data-state="conversion", hide the grading view and show the
   call-to-action instead. The dialog shell's d-foot is left as-is —
   the close button stays useful in either state. */
.lp-result[data-state="conversion"] .lp-result__header,
.lp-result[data-state="conversion"] .lp-result__body {
  display: none;
}

.lp-conversion {
  padding: 24px 4px;
  text-align: center;
}

.lp-conversion__title {
  font-family: var(--lp-font-serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--lp-ink);
}

.lp-conversion__body {
  font-size: 15px;
  color: var(--lp-ink-soft);
  margin: 0 0 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.lp-conversion__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ============================================================
   MOBILE — narrow viewport
   ============================================================ */

/* Tablet — collapse the two-column hero to a single column */
@media (max-width: 900px) {
  .lp-hero__split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Demo first on mobile (per design choice) */
  .lp-demo {
    order: 1;
  }
  .lp-hero__copy {
    order: 2;
    padding-top: 0;
    text-align: center;
  }
  .lp-hero__subhead,
  .lp-hero__cta {
    margin-left: auto;
    margin-right: auto;
  }
  .lp-hero__cta {
    justify-content: center;
  }
}

/* Phone — tighten paddings, shrink type, single-column testimonials */
@media (max-width: 640px) {
  .lp-hero,
  .lp-testimonials,
  .lp-contact {
    padding-left: 20px;
    padding-right: 20px;
  }

  .lp-demo {
    padding: 16px;
  }

  .lp-demo__canvas {
    padding: 16px;
  }

  .lp-canvas__text {
    font-size: 15px;
    line-height: 1.85;
  }

  .lp-testimonials {
    grid-template-columns: 1fr;
  }

  .lp-hero__cta .lp-btn--lg {
    flex: 1 1 auto;
  }
}