/* Landing page. The world console is the one loud element; everything else stays quiet. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: clamp(32px, 7vw, 88px) var(--gutter) var(--s-7);
}

.eyebrow {
  margin: 0 0 var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 var(--s-4);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 700;
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
}

.hero h1 span:not(.hero-mark) {
  display: block;
}

/* The yellow highlighter stroke: the only gradient-free emphasis on the page. */
.hero-mark {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background: linear-gradient(transparent 62%, var(--highlight-band) 62%, var(--highlight-band) 92%, transparent 92%);
}

.hero-lead {
  max-width: 34em;
  margin: 0 0 var(--s-5);
  font-size: var(--fs-md);
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ world console */

.world-console {
  min-width: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  background: var(--code-surface);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.world-tabs {
  display: flex;
  gap: 2px;
  padding: var(--s-2);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.world-tabs [role="tab"] {
  flex: 0 0 auto;
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.world-tabs [role="tab"]:hover {
  color: var(--ink);
  background: var(--surface);
}

.world-tabs [role="tab"][aria-selected="true"] {
  background: var(--yellow);
  color: var(--on-yellow);
}

.world-tabs [role="tab"]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.console-body {
  padding: var(--s-4) var(--s-5) var(--s-5);
}

.console-body:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}

.console-lead {
  min-height: 3.4em;
  margin: 0 0 var(--s-3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

.console-code,
.console-output pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1.6vw, 0.92rem);
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
  text-align: left;
}

.console-code {
  color: var(--syn-variable);
}

.tok-kw { color: var(--syn-keyword); font-weight: 500; }
.tok-fn { color: var(--syn-function); }
.tok-str { color: var(--syn-string); }
.tok-num { color: var(--syn-number); }

.console-output {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-inline-start: 3px solid var(--yellow);
}

.console-output-label {
  display: block;
  margin-bottom: var(--s-1);
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.console-note {
  margin: 0;
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ bands */

.band {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--s-7) var(--gutter);
  border-top: 1px solid var(--rule);
}

.band-title {
  margin: 0 0 var(--s-3);
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: var(--lh-display);
}

.band-lead {
  max-width: 44em;
  margin: 0 0 var(--s-5);
  color: var(--ink-2);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  gap: var(--s-1);
  padding-top: var(--s-3);
  border-top: 2px solid var(--accent-line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--accent);
}

.steps strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
}

.steps span {
  color: var(--ink-2);
  font-size: var(--fs-sm);
}

/* Levels: a real sequence, so they are numbered (0 to 17), and the ready ones are marked. */
.levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.level {
  display: grid;
  grid-template-columns: 2.4em 1fr auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--surface);
}

.level-number {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  color: var(--ink-3);
  text-align: center;
}

.level.is-ready .level-number {
  color: var(--accent);
}

.level-name {
  font-weight: 600;
  line-height: 1.5;
}

.level-state {
  padding: 2px var(--s-2);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  color: var(--ink-3);
  background: var(--surface-2);
}

.level.is-ready .level-state {
  color: var(--on-yellow);
  background: var(--yellow);
}

/* ------------------------------------------------------------------ capstone */

.capstone {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: center;
}

.capstone p {
  max-width: 40em;
  color: var(--ink-2);
}

.fine-print {
  font-size: var(--fs-sm);
  color: var(--ink-3);
}

.cert-preview {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-6) var(--s-5);
  border-radius: var(--r-md);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--accent), var(--yellow)) border-box;
  border: 2px solid transparent;
  direction: ltr;
  text-align: center;
  font-family: "Plus Jakarta Sans", var(--font-body);
}

.cert-brand {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
}

.cert-title {
  font-family: "Readex Pro", var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
}

.cert-name {
  margin: var(--s-2) 0;
  font-family: "Readex Pro", var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  background: linear-gradient(transparent 65%, var(--highlight-band) 65%);
  justify-self: center;
}

.cert-line,
.cert-id {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.cert-id {
  font-family: var(--font-mono);
}

.final-cta {
  text-align: center;
}

.final-cta h2 {
  margin: 0 0 var(--s-2);
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
}

.final-cta p {
  margin: 0 0 var(--s-5);
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .hero,
  .capstone {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .console-body {
    padding: var(--s-3) var(--s-4) var(--s-4);
  }

  .band-title,
  .final-cta h2 {
    font-size: var(--fs-xl);
  }
}
