@font-face { font-family: "Jost"; src: url("/fonts/Jost.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --cryostat: #1B2530; --vacuum: #EEF0EE; --iris: #9D85F1; --niob: #8A9099;
  --bg: var(--vacuum); --surface: #E4E7E6; --ink: var(--cryostat); --muted: #5E6670; --rule: #C9CED2;
  --link: #5B45B8; --error: #A3312B;
  --display: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141B23; --surface: var(--cryostat); --ink: #E6E9EA; --muted: #9AA2AB; --rule: #2C3844; --link: #B9A8F6; --error: #F08A80; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--serif); }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 64px; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: 0.01em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 56px); margin: 32px 0 16px; }
h2 { font-size: clamp(24px, 3.5vw, 34px); margin: 48px 0 16px; }
h3 { font-size: 21px; margin: 12px 0 4px; }
a { color: var(--link); }
img { max-width: 100%; height: auto; display: block; }
.label { font: 11.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; }
.tagline { color: var(--muted); margin: 0; }
.error { color: var(--error); }
.notice { border-left: 3px solid var(--iris); padding: 8px 12px; background: var(--surface); }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; }

.button {
  display: inline-block; font: 500 15px/1 var(--display); letter-spacing: 0.04em; padding: 14px 22px;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 3px; cursor: pointer; text-decoration: none;
}
.button:disabled { opacity: 0.5; cursor: wait; }
button.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto; padding: 16px; border-bottom: 1px solid var(--rule); }
.brand { color: var(--ink); }
.brand .wm { width: 120px; height: auto; display: block; }
.site-header nav, .site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; font: 15px var(--display); }
.site-header nav a, .site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 32px 16px 48px; border-top: 1px solid var(--rule); display: grid; gap: 12px; }
.site-footer .tagline { font: 300 22px var(--display); color: var(--ink); }

.hero { padding: 48px 0 16px; }
.hero h1 { font-size: clamp(44px, 10vw, 96px); margin: 0 0 12px; }
.lede { font-size: clamp(19px, 2.4vw, 24px); max-width: 38ch; margin: 0; }
.form-line { display: grid; gap: 12px; padding-block: 56px 8px; }
.form-line .display { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -0.015em; margin: 0; }
.form-line .lede { max-width: 44ch; color: var(--muted); margin-bottom: 20px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.card { color: inherit; text-decoration: none; display: block; }
.card img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: var(--surface); border-radius: 4px; }
.price { font-size: 16px; margin: 6px 0; }
.price-note { font-size: 14px; color: var(--muted); }

.product { display: grid; gap: 32px; padding-top: 24px; }
@media (min-width: 800px) { .product { grid-template-columns: 1fr 1fr; } }
.media { display: grid; gap: 12px; align-content: start; }
.main-image { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface); border-radius: 4px; }
.viewer { width: 100%; aspect-ratio: 1; background: var(--surface); border-radius: 4px; overflow: hidden; touch-action: none; }
.viewer canvas { width: 100%; height: 100%; display: block; }
.info h1 { margin-top: 0; }
fieldset { border: 0; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
/* radio | name | price in shared columns, so the prices line up; text sits on one baseline despite the mixed fonts */
.add-form fieldset { grid-template-columns: auto max-content max-content; column-gap: 12px; justify-content: start; }
.add-form fieldset legend { grid-column: 1 / -1; margin-bottom: 10px; }
.finish { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; cursor: pointer; }
/* a radio's baseline is its bottom edge: lift its centre to half the cap height (≈0.36em in Newsreader), the middle of the text */
.finish input { width: 14px; height: 14px; margin: 0; transform: translateY(calc(7px - 0.36em)); }
.finish .mono { justify-self: end; }
.qty { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
input[type=number] { width: 4.5em; }
input, textarea { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin-top: 32px; border-top: 1px solid var(--rule); padding-top: 16px; }
.specs dd { margin: 0; }

.lines { list-style: none; padding: 0; margin: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.line img { width: 64px; height: 64px; object-fit: contain; background: var(--surface); border-radius: 3px; grid-row: span 2; }
.line.unavailable { opacity: 0.7; }
.line .controls { grid-column: 2 / 4; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.subtotal, .sum { display: flex; justify-content: space-between; max-width: 420px; margin: 8px 0 0 auto; }
.subtotal { font-size: 19px; margin-top: 16px; }
#checkout { display: grid; gap: 16px; justify-items: start; margin-top: 24px; }
#checkout[hidden] { display: none; }
.accept { display: flex; gap: 10px; align-items: flex-start; max-width: 60ch; }

.legal { max-width: 70ch; }
.withdraw { max-width: 60ch; }
.withdraw form { display: grid; gap: 14px; }
.withdraw label { display: grid; gap: 4px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Heroes: a dark Cryostat band, full-bleed, with its own tokens in both themes. */
.band {
  --bg: #1B2530; --surface: #223140; --ink: #EEF0EE; --muted: #B9C0C7; --faint: #8A9099; --rule: rgba(238, 240, 238, 0.16); --link: #B9A8F6;
  color-scheme: dark; background: var(--bg); color: var(--ink);
  box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax);
  padding-block: 40px 56px;
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } }
.band .copy { display: grid; gap: 20px; align-content: start; }
.start .display { max-width: 9ch; }
.band .display { font-size: clamp(48px, 7vw, 96px); line-height: 0.94; letter-spacing: -0.015em; margin: 0; }
.band .lede { max-width: 26ch; }
.band .body { margin: 0; color: var(--muted); max-width: 46ch; }
.eq { margin: 0; line-height: 1.7; }
.eq span { display: block; }
.band fieldset, .band .specs { margin: 0; }
.band .specs { margin-top: 8px; }
.band .price-note, .band .label { color: var(--faint); }


.pills { display: flex; gap: 8px; flex-wrap: wrap; font: 400 15px var(--display); }
.pills a { color: var(--muted); text-decoration: none; border: 1px solid var(--rule); border-radius: 999px; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; }
.pills a:hover { color: var(--ink); }
.pills a[aria-current="page"] { color: var(--ink); border-color: var(--iris); }

.stage { display: grid; gap: 16px; justify-items: center; }
@media (max-width: 859px) { .stage { order: -1; } }
.stage .view { width: 100%; max-width: 680px; aspect-ratio: 1; position: relative; touch-action: pan-y; }
.stage .view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.readout { position: absolute; left: 0; bottom: 3%; margin: 0; font-size: 14px; color: var(--muted); }
.fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--faint); margin: 0; padding: 24px; }
.fallback[hidden] { display: none; }
.steps { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; width: 100%; max-width: 680px; }
.steps li { flex: 1 1 0; min-width: 0; }
.step {
  width: 100%; text-align: left; background: none; border: 0; border-top: 2px solid var(--rule); cursor: pointer;
  color: var(--faint); font: 400 15px var(--display); padding: 10px 0 6px; display: grid; gap: 4px; min-height: 44px;
}
.step small { font: italic 400 14px/1.35 var(--serif); color: var(--faint); }
.step:hover { color: var(--ink); }
.step[aria-current="step"] { color: var(--ink); border-top-color: var(--ink); }

.about { display: grid; gap: 24px; padding-top: 40px; }
.about p { max-width: 62ch; margin: 0; }
.renders { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.renders img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface); border-radius: 4px; }
.worn { padding-top: 40px; }
.photos { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--surface); }
/* The section's line art sits beside the headline, above the photos; lines.js sways it and turns it to the cursor. */
.line-head {
  --art: clamp(140px, 22vw, 210px); position: relative; isolation: isolate; padding-right: min(34vw, 250px);
  min-height: calc(var(--art) + 24px); display: flex; flex-direction: column; justify-content: flex-end;
}
.line-art {
  position: absolute; z-index: -1; inset: 0 0 0 auto; margin-block: auto; width: auto; height: var(--art);
  max-width: 45%; color: var(--ink); opacity: 0.28; pointer-events: none; will-change: transform;
}
/* lines.js splits the art into depth layers; opacity sits on the layers, since on the wrapper it would flatten the 3D. */
.line-art.is-3d { opacity: 1; transform-style: preserve-3d; }
.line-art .layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0.32; }
.line-art .layer path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s cubic-bezier(0.4, 0, 0.2, 1); }
.line-art.drawn .layer path { stroke-dashoffset: 0; }
@media (max-width: 600px) {
  .line-head { padding-right: 0; min-height: 0; }
  .line-art { opacity: 0.16; } .line-art .layer { opacity: 0.18; }
}
