/* The public landing page. Built on the laboratory's tokens (styles.css) and scenes. */
body.landing {
  --sidebar-width: 0px;
}
.la-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.la-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.la-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}
.la-brand .brand-mark {
  width: 32px;
  height: 32px;
}
.la-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.la-nav a {
  white-space: nowrap;
}
.la-nav a:hover {
  color: var(--ink);
}
/* Six links fit between 960 and 1180px (Spanish too) with a narrower gap and smaller text. */
@media (max-width: 1180px) {
  .la-nav {
    gap: var(--space-4);
    font-size: var(--text-sm);
  }
}
.la-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* The theme switch holds both icons; the theme set before paint picks one. */
#theme-toggle > span {
  display: contents;
}
html:not([data-theme='dark']) #theme-toggle .la-theme-sun,
html[data-theme='dark'] #theme-toggle .la-theme-moon {
  display: none;
}
.la-header-cta {
  min-height: 38px;
  font-size: 14px;
  white-space: nowrap;
}
.landing #main {
  max-width: 1200px;
  padding: 0 32px;
  outline: none;
}

/* Hero */
.la-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 88px;
  scroll-margin-top: 80px;
}
.la-hero h1 {
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.la-hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.la-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--lede);
  max-width: 560px;
  margin-top: 22px;
}
.la-hero .hero-actions {
  margin-top: 30px;
}
.la-trust {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--muted);
}
.la-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.la-trust svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}
.la-demo {
  display: grid;
  /* A column no wider than the page: the finished test code scrolls inside the card. */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
.la-tabs {
  justify-self: start;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-raised);
}
.la-tabs button {
  border: 0;
  border-radius: 7px;
  background: none;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.la-tabs button[aria-selected='true'] {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.la-tabs button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.la-demo [role='tabpanel'] {
  animation: reveal-in 0.35s ease both;
}

/* Sections */
.la-section {
  padding: 72px 0;
  scroll-margin-top: 70px;
}
.la-section-head {
  max-width: 720px;
  margin-bottom: 32px;
}
.la-section-head .eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}
.la-section-head h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  letter-spacing: -0.03em;
}
.la-section-head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--lede);
}
.la-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font: 600 11px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid;
}
.la-status:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.la-status.is-available {
  color: var(--emerald-ink);
  background: var(--emerald-soft);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}
.la-status.is-next {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}
.la-status.is-planned {
  color: var(--warning-ink);
  background: var(--warning-surface);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}
.la-status.is-exploring {
  color: var(--muted);
  background: var(--surface-raised);
  border-color: var(--line-strong);
}

/* Paths */
.la-paths {
  display: grid;
  gap: 16px;
}
.la-path {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.la-path h3 {
  font-size: 20px;
}
.la-path p {
  font-size: 15px;
  color: var(--muted);
}
/* The available path: its description beside its stages; the paths still to come are
   listed once, in the roadmap section. */
.la-path-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px 40px;
  align-items: start;
  padding: 28px;
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
}
.la-path-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.la-path-main h3 {
  font-size: 26px;
}
.la-path-main .btn {
  margin-top: 6px;
}
.la-path-main .la-stages {
  margin: 0;
}
.la-paths-more {
  font-size: 15px;
  color: var(--muted);
}
.la-labs + .la-paths-more {
  margin-top: 18px;
}
.la-road .la-tags {
  margin-top: 12px;
}
.la-stages {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.la-stages li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
}
.la-stages span {
  font: 600 11px var(--mono);
  color: var(--primary);
}
.la-stats {
  font: 500 12px var(--mono) !important;
  color: var(--subtle) !important;
  margin-bottom: 8px;
}
.la-tags {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.la-tags li {
  font: 500 12px var(--mono);
  color: var(--muted);
  background: var(--surface-raised);
  border-radius: 6px;
  padding: 2px 8px;
}

/* How you learn */
.la-method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.la-feature {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.la-feature h3 {
  font-size: 17px;
  margin: 16px 0 8px;
}
.la-feature p {
  font-size: 14px;
  color: var(--muted);
}
.la-feature-art {
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 12px 12px;
  overflow: hidden;
}
.la-feature-art svg {
  width: 82%;
}
.la-feature-art .mini-graphic {
  width: 100%;
  display: flex;
  justify-content: center;
}
.la-node {
  fill: var(--surface-raised);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.la-node.la-primary {
  fill: var(--primary-soft);
  stroke: var(--primary);
}
.la-node.la-success {
  fill: var(--emerald-soft);
  stroke: var(--success);
}
.la-edge {
  stroke: var(--subtle);
  stroke-width: 2;
  fill: none;
}
/* Contribute: three cards like «how you learn», each with a small picture that loops slowly. */
.la-contribute {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.la-contribute .la-feature {
  display: flex;
  flex-direction: column;
}
.la-contribute .la-feature p {
  flex: 1;
  margin-bottom: var(--space-3);
}
.la-ct-issue circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
}
.la-ct-issue rect,
.la-ct-page rect {
  fill: var(--line);
}
.la-ct-first circle {
  stroke: var(--success);
}
.la-ct-check {
  fill: none;
  stroke: var(--success);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.la-ct-label {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.2;
}
.la-ct-note {
  stroke: var(--human);
  stroke-width: 1.6;
  stroke-linecap: round;
  fill: none;
}
.la-ct-lens circle,
.la-ct-lens path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
}
.la-ct-lens circle {
  fill: color-mix(in srgb, var(--paper) 60%, transparent);
}
.la-ct-new-edge {
  stroke: var(--success);
  stroke-width: 2;
  stroke-dasharray: 3 3;
  fill: none;
}
/* Still, the pictures show the end state: the check drawn, the line noted, the lab joined. */
@media (prefers-reduced-motion: no-preference) {
  .la-ct-check {
    stroke-dasharray: 10;
    animation: la-ct-check 6s ease-in-out infinite;
  }
  .la-ct-note {
    stroke-dasharray: 118;
    animation: la-ct-note 7s ease-in-out infinite;
  }
  .la-ct-lens {
    animation: la-ct-lens 7s ease-in-out infinite;
  }
  .la-ct-new,
  .la-ct-new-edge {
    animation: la-ct-new 6s ease-in-out infinite;
  }
  .la-ct-new-edge {
    animation-name: la-ct-flow, la-ct-new;
    animation-duration: 1.2s, 6s;
    animation-timing-function: linear, ease-in-out;
  }
}
@keyframes la-ct-check {
  0%,
  25% {
    stroke-dashoffset: 10;
  }
  45%,
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes la-ct-note {
  0%,
  40% {
    stroke-dashoffset: 118;
  }
  60%,
  90% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 118;
  }
}
@keyframes la-ct-lens {
  0%,
  100% {
    transform: translate(0, 0);
  }
  45%,
  60% {
    transform: translate(70px, 12px);
  }
}
@keyframes la-ct-new {
  0%,
  30% {
    opacity: 0;
  }
  50%,
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes la-ct-flow {
  to {
    stroke-dashoffset: -6;
  }
}
.la-code {
  width: 88%;
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.6;
  box-shadow: none;
}
.la-pass {
  color: var(--code-pass);
  font-weight: 700;
}
.la-pills {
  display: flex;
  gap: 6px;
}
.la-pills i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  background: var(--white);
}
.la-pills i.is-done {
  background: var(--success);
  border-color: var(--success);
}

/* Project timeline */
.la-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  position: relative;
}
.la-timeline:before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  top: 17px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--success));
  opacity: 0.5;
}
.la-timeline li {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
}
.la-step {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--primary);
  color: var(--primary);
  font: 700 12px var(--mono);
  margin-bottom: 6px;
}
.la-timeline strong {
  font-size: 14px;
  line-height: 1.35;
}
.la-timeline small {
  font-size: 12px;
  color: var(--subtle);
}

/* Labs: every lab as a card that opens it */
.la-labs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.la-lab a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.la-lab.is-bench a {
  border-top-color: var(--success);
}
.la-lab.is-practice a {
  border-top-color: var(--warning);
}
.la-lab a:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.la-lab-kind {
  font: 600 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.la-lab-kicker {
  font: 600 12px var(--mono);
  color: var(--primary);
}
.la-lab strong {
  font-size: 18px;
  line-height: 1.3;
}
.la-lab-body {
  font-size: 14px;
  color: var(--muted);
}
.la-lab-open {
  margin-top: auto;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* Roadmap: a group of labs, then a group of paths */
.la-roadmap-label {
  margin: 28px 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.la-section-head + .la-roadmap-label {
  margin-top: 0;
}
.la-roadmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.la-road {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--white) 70%, transparent);
}
.la-road.is-next {
  border-style: solid;
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.la-road-num {
  font: 700 22px var(--mono);
  color: var(--subtle);
}
.la-road.is-next .la-road-num {
  color: var(--primary);
}
.la-road-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.la-road-kind {
  font: 600 11px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
}
.la-road h4 {
  font-size: 19px;
  margin: 10px 0 8px;
}
.la-road p {
  font-size: 14px;
  color: var(--muted);
}

/* Principles and closing */
.la-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.la-principles article {
  padding: 20px 0;
  border-top: 2px solid var(--line);
}
.la-principles h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.la-principles p {
  font-size: 15px;
  color: var(--muted);
}
.la-closing {
  margin: 24px 0 80px;
  padding: 48px 32px;
  text-align: center;
  border-radius: 20px;
  background: var(--panel-green);
  color: var(--panel-ink);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}
.la-closing:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
}
.la-closing h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--panel-ink);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}
.la-closing p {
  margin: 12px auto 0;
  max-width: 520px;
  color: var(--panel-muted);
  font-size: 17px;
}
.la-closing .hero-actions {
  justify-content: center;
}
.la-closing .btn:not(.btn-primary) {
  background: color-mix(in srgb, var(--panel-ink) 6%, transparent);
  border-color: color-mix(in srgb, var(--panel-muted) 35%, transparent);
  color: var(--panel-ink);
}
.la-footer {
  border-top: 1px solid var(--line);
  padding: 24px 32px;
  text-align: center;
  font: 12px var(--mono);
  color: var(--subtle);
  position: relative;
}
.la-footer a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.la-footer a:hover {
  color: var(--primary);
}
.la-noscript {
  padding: 40px;
}

/* Responsive */
@media (max-width: 1100px) {
  .la-method {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .la-timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 28px;
  }
  .la-timeline:before {
    display: none;
  }
}
@media (max-width: 960px) {
  .la-nav {
    display: none;
  }
  .la-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 48px;
  }
  .la-paths,
  .la-roadmap,
  .la-principles {
    grid-template-columns: 1fr;
  }
  .la-path-main {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .la-header-inner,
  .landing #main {
    padding-inline: 16px;
  }
  .la-header-inner {
    gap: 10px;
  }
  .la-brand > span:last-child,
  .la-header-cta {
    display: none;
  }
  .la-hero {
    padding: 36px 0 56px;
    gap: 36px;
  }
  .la-hero h1 {
    font-size: 40px;
  }
  .la-lead {
    font-size: 17px;
  }
  .la-section {
    padding: 48px 0;
  }
  .la-stages,
  .la-method {
    grid-template-columns: 1fr;
  }
  .la-timeline {
    grid-template-columns: 1fr 1fr;
  }
  .la-closing {
    padding: 36px 20px;
  }
}
