:root {
  --bg: #DADDE0;
  --bg-2: #C4C8CC;
  --ink: #22262D;
  --ink-soft: #4B525B;
  --rule: #9AA1A8;
  --light: #FFC870;
  --red: #C5362C;
  --accent: #18233D;
  --glow: 0;
  --ease: cubic-bezier(.2,.7,.2,1);
  --t: 700ms;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-stretch: 100%;
}
:root[data-lit="true"] {
  --bg: #18233D;
  --bg-2: #111A30;
  --ink: #EEF0F1;
  --ink-soft: #AEB8CC;
  --rule: #40507A;
  --accent: #FFC870;
  --glow: 1;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.55;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

/* header */
.top {
  position: relative; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.4rem clamp(1rem, 5vw, 4.5rem) 0;
}
.wordmark {
  font-stretch: 125%; font-weight: 700; font-size: 1.2rem; letter-spacing: .14em;
  text-decoration: none;
}
.top nav { display: flex; gap: clamp(.9rem, 2.4vw, 2.2rem); flex-wrap: wrap; }
.top nav a { text-decoration: none; font-weight: 500; font-size: .95rem; padding: .3rem 0; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: currentColor; }

/* layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  padding: 0 clamp(1rem, 5vw, 4.5rem);
  column-gap: clamp(1rem, 4vw, 4rem);
}
main { min-width: 0; }
.stage {
  position: sticky; top: 0; align-self: start;
  height: 100vh; height: 100svh;
  margin-top: -3.6rem;
  display: grid; place-items: center;
}
.lamp { position: relative; width: 100%; height: min(86vh, 54rem); overflow: visible; }
.hint {
  position: absolute; bottom: 1.2rem; left: 0; right: 0; margin: 0;
  text-align: center; font-size: .85rem; color: var(--ink-soft);
  transition: opacity 300ms;
}
:root[data-lit="true"] .hint { opacity: 0; }

/* lamp drawing: flat line schematic */
.lamp * { vector-effect: none; }
.floor { stroke: var(--rule); stroke-width: .6; fill: none; transition: stroke var(--t); }
.rings circle {
  stroke: var(--light); stroke-width: .7; stroke-dasharray: 1.5 4;
  opacity: calc(var(--glow) * .55); transition: opacity var(--t) var(--ease);
  transform-origin: 18px 145px; animation: breathe 6s ease-in-out infinite;
}
.lamp-spodek .rings circle { transform-origin: 11px -36px; }
.lamp-spodek .scale { opacity: .45; }
.rings circle:nth-child(2) { animation-delay: -2s; }
.rings circle:nth-child(3) { animation-delay: -4s; }
@keyframes breathe { 50% { transform: scale(1.06); } }
.wheel { stroke: var(--red); }
.wheel .spokes { transform-origin: 6px -2px; animation: turn 14s linear infinite; }
:root[data-lit="true"] .wheel .spokes { animation-duration: 5s; }
@keyframes turn { to { transform: rotate(360deg); } }
.shaftbg { fill: var(--bg); transition: fill var(--t) var(--ease); }
.glow { fill: var(--light); opacity: var(--glow); transition: opacity var(--t) var(--ease); }
.strip, .feed { fill: none; stroke-width: 1.1; stroke-dasharray: 3 3; stroke-linecap: round; }
.strip { stroke: #18233D; opacity: .55; }
.feed { stroke: var(--accent); transition: stroke var(--t); }
:root[data-lit="true"] .strip, :root[data-lit="true"] .feed { animation: flow 900ms linear infinite; }
:root[data-lit="true"] .strip { opacity: .8; }
@keyframes flow { to { stroke-dashoffset: -6; } }
.plates { fill: var(--bg); stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; transition: fill var(--t) var(--ease), stroke var(--t) var(--ease); }
.plates .rungs { fill: none; stroke-width: 2.2; }
.plates .thin { fill: none; stroke-width: .5; }
.drawing .draw > * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s var(--ease) forwards; }
.drawing .draw > :nth-child(n+4) { animation-delay: .25s; }
.drawing .draw > :nth-child(n+7) { animation-delay: .5s; }
.drawing .draw > :last-child { animation-delay: 0s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.knob { cursor: pointer; }
.knob .halo { fill: var(--light); opacity: 0; transition: opacity 200ms; }
.knob:hover .halo, .knob:focus-visible .halo { opacity: .35; }
.knob .cap { fill: var(--bg); stroke: var(--ink); stroke-width: 1.1; transition: fill var(--t), stroke var(--t); }
.knob .dot { fill: var(--ink); transition: fill var(--t); }
:root[data-lit="true"] .knob .dot { fill: var(--light); }
.knob:focus, .knob:focus-visible { outline: none; }
.knob:focus-visible .cap { stroke: var(--accent); stroke-width: 2; }
.marks path { stroke: var(--rule); stroke-width: .6; fill: none; transition: stroke var(--t); }
.marks text { fill: var(--ink-soft); font-size: 7.2px; font-weight: 500; font-variant-numeric: tabular-nums; transition: fill var(--t); }

@keyframes strike {
  0% { opacity: 0; } 8% { opacity: .9; } 14% { opacity: .15; } 26% { opacity: 1; } 34% { opacity: .5; } 100% { opacity: 1; }
}
:root[data-lit="true"].striking .glow { animation: strike 620ms linear both; }

/* hero */
.hero { min-height: calc(100vh - 3.6rem); min-height: calc(100svh - 3.6rem); display: flex; flex-direction: column; justify-content: center; padding: 3rem 0 4rem; }
h1, h2 { font-stretch: 62%; font-weight: 800; line-height: .9; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3.2rem, 8.4vw, 7.8rem); max-width: 9.5ch; }
h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: .96; max-width: 16ch; margin-bottom: 1.6rem; }
.lede { font-size: 1.25em; line-height: 1.45; max-width: 34ch; margin: 2rem 0 0; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.8rem; margin-top: 2.4rem; }
.switch, .signup button {
  font: inherit; font-weight: 700; font-stretch: 100%;
  color: var(--bg); background: var(--ink);
  border: 0; border-radius: 999px; padding: .95rem 1.7rem; cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease), transform 120ms;
}
.switch:active, .signup button:active { transform: translateY(1px); }
:root[data-lit="true"] .switch { background: var(--light); color: #18233D; }
.link { font-weight: 600; text-underline-offset: .28em; text-decoration-thickness: 2px; }

/* blocks */
.block { padding: clamp(4rem, 9vw, 8rem) 0; border-top: 1px solid var(--rule); transition: border-color var(--t); }
.block p { max-width: 46ch; margin: 0 0 1.1rem; font-size: 1.12em; }
.note { color: var(--ink-soft); font-size: .9em; }

.points { list-style: none; padding: 0; margin: 2.4rem 0 0; max-width: 40rem; color: var(--ink-soft); }
.points li { padding: .9rem 0; border-top: 1px solid var(--rule); transition: border-color var(--t); }
.points strong { color: var(--ink); font-weight: 700; margin-right: .3em; }

.next { list-style: none; padding: 0; margin: 1.6rem 0 0; max-width: 40rem; color: var(--ink-soft); }
.next li { padding: .8rem 0; border-top: 1px solid var(--rule); transition: border-color var(--t); }
.next strong { color: var(--ink); font-weight: 700; margin-right: .5em; }

.products { list-style: none; padding: 0; margin: 2.2rem 0 0; max-width: 40rem; }
.products li { padding: 1.4rem 0; border-top: 1px solid var(--rule); transition: border-color var(--t); }
.products a { display: block; font-stretch: 62%; font-weight: 800; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; text-decoration: none; margin-bottom: .5rem; }
.products a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .12em; }
.products span { color: var(--ink-soft); }

.signup label { display: block; font-weight: 600; margin: 2rem 0 .5rem; }
.signup .row { display: flex; flex-wrap: wrap; gap: .7rem; max-width: 34rem; }
.signup input {
  flex: 1 1 14rem; font: inherit; color: var(--ink);
  background: transparent; border: 2px solid var(--ink); border-radius: 999px; padding: .85rem 1.3rem;
  transition: border-color var(--t), color var(--t);
}
.signup input::placeholder { color: var(--ink-soft); opacity: .8; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup .fine { font-size: .85em; color: var(--ink-soft); max-width: 34rem; margin-top: .4rem; }
.msg { min-height: 1.6em; margin-top: .9rem; font-weight: 600; }
footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .9em; transition: border-color var(--t); }
footer p { margin: 0; }

@media (max-width: 860px) {
  .layout { display: flex; flex-direction: column-reverse; }
  .stage { position: relative; height: auto; margin: 1.5rem 0 0; }
  .lamp { height: 50vh; height: 50svh; max-height: 30rem; }
  .hint { position: static; margin-top: .4rem; }
  .hero { min-height: 0; padding: 2rem 0 4rem; }
  .top nav a:not(:last-child) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --t: 0ms; }
  html { scroll-behavior: auto; }
  .lamp * { animation: none !important; }
}
