:root {
  --night: #101830;
  --deep: #17223F;
  --ether: #8FA6E0;
  --ether-bright: #B9CBFF;
  --mist: #D9DEEE;
  --morning: #EEF1F6;
  --ink: #1E2340;
  --ink-soft: #4A5170;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 36rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--morning); color: var(--ink); font: 400 1.125rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p, ol, ul, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ether-bright); outline-offset: 3px; border-radius: 2px; }

.nav { position: fixed; inset: 0 0 auto; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 1.1rem var(--gutter); color: var(--mist); transition: color .4s, background-color .4s; }
.nav.scrolled { background: rgba(16, 24, 48, .92); }
.nav.on-light { color: var(--ink); background: rgba(238, 241, 246, .92); }
.wordmark { font-variation-settings: "wdth" 125; font-weight: 600; font-size: 1.2rem; letter-spacing: .04em; text-decoration: none; }
.nav nav { display: flex; gap: clamp(.9rem, 2.5vw, 2rem); }
.nav nav a { font-size: .95rem; text-decoration: none; opacity: .85; }
.nav nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { min-height: 100vh; background: radial-gradient(120% 90% at 75% 40%, #1B2A55 0%, var(--night) 60%); color: var(--mist); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding: 6rem var(--gutter) 4rem; }
.hero h1 { font-variation-settings: "wdth" 125; font-weight: 300; font-size: clamp(2.4rem, 5.2vw, 4.75rem); line-height: 1.04; color: #fff; }
.lede { margin-top: 1.75rem; max-width: var(--measure); font-size: 1.25rem; line-height: 1.55; }
.links { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.links a { font-weight: 500; color: var(--ether-bright); text-underline-offset: 6px; }
.formation { width: 100%; height: auto; }
.bob { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* One job, many roads */
.roads { background: var(--night); color: var(--mist); padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.roads h2, .become h2 { font-variation-settings: "wdth" 120; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; color: #fff; }
.roads-intro p { margin-top: 1.25rem; max-width: 40rem; }
.roads-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; margin-top: 3rem; }
.roads-figure { position: sticky; top: 14vh; align-self: start; order: 2; }
#roads-svg { width: 100%; height: auto; }
.config { margin-top: 1rem; font: 400 .85rem/1.6 var(--mono); color: var(--mist); background: var(--deep); padding: .75rem 1rem; border-radius: 8px; border: 1px solid #263459; max-width: 26rem; }
.c-key { color: var(--ether-bright); }
.c-val { color: #F2D28A; }
.road-steps { list-style: none; padding: 0; order: 1; }
.road-steps li { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; gap: .5rem; max-width: 30rem; opacity: .35; transition: opacity .5s; }
.road-steps li.active { opacity: 1; }
.road-steps h3 { font-variation-settings: "wdth" 115; font-size: 1.7rem; color: #fff; }
.roads-close { margin-top: 2rem; max-width: 40rem; font-size: 1.3rem; line-height: 1.5; color: #fff; }

.prov rect { fill: var(--deep); stroke: #2C3B66; transition: fill .4s, stroke .4s; }
.prov text { fill: #8D97B8; font: 500 15px var(--font); transition: fill .4s; }
.wire { stroke: #2C3B66; stroke-width: 1.5; fill: none; transition: stroke .4s; }
.prov { cursor: pointer; }
.prov:focus { outline: none; }
.prov:focus-visible rect { stroke: #fff; stroke-width: 2.5; }
.prov:hover rect { stroke: var(--ether); }
.prov.later rect, .wire.later { stroke-dasharray: 5 6; }
.prov.on rect { fill: #22335F; stroke: var(--ether-bright); }
.prov.on text { fill: #fff; }
.wire.on { stroke: var(--ether-bright); stroke-dasharray: 6 8; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }

/* Anatomy */
.anatomy, .elements { padding: clamp(4rem, 9vw, 7rem) var(--gutter); }
.anatomy h2, .elements h2 { font-variation-settings: "wdth" 125; font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.05; }
.anatomy-grid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3rem; align-items: center; margin-top: 3rem; }
#anatomy-svg { width: 100%; height: auto; }
.parts { display: grid; gap: 1.6rem; max-width: var(--measure); }
.parts dt { font-variation-settings: "wdth" 115; font-weight: 500; font-size: 1.35rem; display: flex; align-items: center; gap: .7rem; }
.parts dd { margin: .3rem 0 0 2.4rem; color: var(--ink-soft); }
.dot { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: var(--ether-bright); display: grid; place-items: center; font-size: .85rem; flex: none; }

/* Elements as a periodic table */
.elements { background: #fff; }
.intro { margin-top: 1rem; max-width: var(--measure); color: var(--ink-soft); }
.legend { display: flex; gap: 1rem; margin: 1.75rem 0 1.5rem; flex-wrap: wrap; }
.tag { font-size: .9rem; padding: .25rem .7rem; border-radius: 6px; }
.tag.now { background: #DCE4FA; color: #24335F; }
.tag.next { border: 1.5px dashed #9AA6CC; color: var(--ink-soft); }
.catalog { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.el { position: relative; padding: 1rem 1.1rem 1.2rem; border-radius: 10px; min-height: 12.5rem; display: flex; flex-direction: column; }
.el.now { background: #DCE4FA; }
.el.next { border: 1.5px dashed #9AA6CC; }
.el svg { position: absolute; top: 1rem; right: 1rem; width: 26px; height: 26px; stroke: #33467F; }
.el .sym { font-variation-settings: "wdth" 125; font-weight: 600; font-size: 2.6rem; line-height: 1; margin-top: .2rem; }
.el.more { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 1.5rem; border: 1.5px dashed #9AA6CC; background: linear-gradient(90deg, #EEF2FD, #fff 70%); }
.el.more .sym { margin: 0; color: #5E73B5; }
.more-text { display: flex; flex-direction: column; max-width: 44rem; }
.el.more .name { margin-top: 0; }
.el .name { font-weight: 500; margin-top: .4rem; }
.el .desc { font-size: .95rem; line-height: 1.5; color: var(--ink-soft); margin-top: .35rem; }

/* Become */
.become { background: radial-gradient(110% 120% at 85% 100%, #3A3466 0%, var(--night) 65%); color: var(--mist); padding: clamp(5rem, 11vw, 9rem) var(--gutter); }
.become p { margin-top: 1.5rem; max-width: var(--measure); font-size: 1.2rem; }
.cta { display: inline-block; margin-top: 2rem; padding: .85rem 1.4rem; border-radius: 8px; background: var(--ether-bright); color: var(--night); font-weight: 600; text-decoration: none; }
.cta:hover { background: #fff; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.5rem var(--gutter); background: var(--night); color: #9AA3C4; font-size: .9rem; border-top: 1px solid #22305A; }
.footer a { margin-left: 1.25rem; }
.footer p:first-child a, .footer p:last-child a:first-child { margin-left: 0; }

@media (max-width: 1200px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .el { min-height: 0; padding: .85rem .85rem 1rem; }
  .el .sym { font-size: 2.1rem; }
  .el .desc { font-size: .88rem; }
  .hero { grid-template-columns: 1fr; padding-top: 7rem; }
  .roads-body { grid-template-columns: 1fr; }
  .roads-figure { position: sticky; top: 4.5rem; order: 0; background: var(--night); padding-bottom: .5rem; z-index: 2; }
  .road-steps li { min-height: 38vh; }
  .anatomy-grid { grid-template-columns: 1fr; }
  #anatomy-svg { max-width: 18rem; }
  .nav nav a:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bob, .wire.on { animation: none; }
  .road-steps li, .nav { transition: none; }
}
