/* Digital Code Art — structure, layout and motion.
   Colour, texture and personality live in theme-a.css / theme-b.css.
   Nothing here is inline: the CSP is style-src 'self'. */

@font-face {
  font-family: 'Anton';
  src: url('/fonts/Anton-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --page: 1240px;
  --gut: clamp(1.1rem, 4vw, 3.5rem);
  --rail: clamp(30px, 6vw, 86px);      /* left gutter the route line runs in */
  --station: 13px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
button { font: inherit; }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: var(--gut); }
.narrow { max-width: 64ch; }
main { position: relative; }

/* ---------------------------------------------------------------- the route line
   art.js measures the real section positions and draws this path in code, transit-map
   style: two rails, 45-degree elbows, a station ring at every section. */
.spine {
  position: absolute;
  top: 0; left: 0;
  width: var(--rail);
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.spine-track { fill: none; stroke-width: 3; opacity: .17; }
.spine-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--off, var(--len));
}
.spine-stop { stroke-width: 3; transition: transform .45s var(--ease); transform-origin: center; }
.spine-stop.lit { transform: scale(1.55); }
.spine-pulse { opacity: 0; }
.spine-stop.lit + .spine-pulse { opacity: 1; }
@media (max-width: 560px) { .spine { opacity: .85; } }

/* ---------------------------------------------------------------- interchange ring cursor */
.ring {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid currentColor;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: opacity .25s, width .2s var(--ease), height .2s var(--ease), margin .2s var(--ease);
  will-change: transform;
}
.ring.on { opacity: .9; }
.ring.grab { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
.ring-dot {
  position: fixed; top: 0; left: 0; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: currentColor; pointer-events: none; z-index: 90; opacity: 0;
  transform: translate3d(-100px, -100px, 0); will-change: transform;
}
.ring-dot.on { opacity: .9; }
@media (hover: none), (pointer: coarse) { .ring, .ring-dot { display: none; } }

/* tap feedback on touch: an interchange ring blooming where you touched */
.tap {
  position: fixed; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; border: 2px solid currentColor; pointer-events: none; z-index: 90;
  animation: bloom .55s var(--ease) forwards;
}
@keyframes bloom {
  from { opacity: .85; transform: scale(.4); }
  to   { opacity: 0;   transform: scale(3.4); }
}

/* ---------------------------------------------------------------- header / footer */
.site-head {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(1.6) blur(14px);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand svg { width: 150px; height: auto; display: block; }
.nav { display: flex; align-items: center; gap: clamp(.85rem, 2.6vw, 1.8rem); }
.nav a {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: .2rem 0; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  transition: right .3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current]::after { right: 0; }

.site-foot { padding-block: 3.4rem 4rem; margin-top: 4rem; }
.site-foot .cols { display: grid; gap: 1.8rem 3rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot svg { width: 170px; height: auto; }
.site-foot p { margin: 0 0 .4rem; font-size: .82rem; line-height: 1.6; }
.site-foot a { text-decoration: underline; text-underline-offset: 3px; }
.credit { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.legal { margin-top: 2.4rem; font-size: .72rem; line-height: 1.6; max-width: 90ch; }

/* ---------------------------------------------------------------- type */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .005em;
  text-transform: uppercase;
  line-height: .9;
  margin: 0;
}
h1 { font-size: clamp(3rem, 13vw, 9.5rem); }
h2 { font-size: clamp(2rem, 6.5vw, 4.2rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.05; }
p { margin: 0 0 1.05rem; }
.eyebrow {
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .3em; text-transform: uppercase; margin: 0 0 1.1rem;
}
.kicker {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.3rem, 4.6vw, 3rem); line-height: .95; display: block;
}
.lede { font-size: clamp(1.02rem, 1.9vw, 1.22rem); line-height: 1.6; }
.sect { padding-block: clamp(3rem, 9vw, 7rem); position: relative; }
.sect h2 { margin-bottom: 1.15rem; }
.sect h2 + .lede, .sect h2 + .narrow { margin-top: 0; }
.gallery, .numbers, .details, .steps, .edition { margin-top: clamp(1.8rem, 4vw, 2.8rem); }
/* content clears the gutter the route line runs in */
main .wrap { padding-left: calc(var(--gut) + var(--rail)); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- hero */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 6rem); }
.hero h1 { margin-bottom: .1em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; margin-top: 1.6rem; }
.hero-art { margin-top: clamp(2rem, 5vw, 3.4rem); }

/* the artwork plate: the one thing on the page that is always pristine */
.plate { padding: clamp(.45rem, 1.3vw, 1rem); position: relative; }
.plate img { width: 100%; }
figcaption {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .05em;
  margin-top: .8rem; line-height: 1.5;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--mono); font-size: .86rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.9rem; border: 0; cursor: pointer; position: relative;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; pointer-events: none; }
a.btn:not([href]) { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------------- gallery */
.gallery { display: grid; gap: 2rem; align-items: start; }
.piece-card { display: grid; gap: 0; text-decoration: none; }
@media (min-width: 900px) { .piece-card { grid-template-columns: 1.25fr 1fr; } }
.piece-card .thumb { padding: clamp(1rem, 3vw, 2rem); display: grid; place-items: center; }
.piece-card .meta { padding: clamp(1.4rem, 3.4vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; gap: .55rem; }
.piece-card h3 { font-size: clamp(1.8rem, 4vw, 3rem); }
.piece-card p { margin: 0; font-size: .92rem; }
.price-line { font-family: var(--mono); font-size: 1rem; font-weight: 600; margin-top: .5rem; }

.badge {
  display: inline-block; font-family: var(--mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; padding: .34rem .8rem;
  align-self: flex-start;
}

/* ---------------------------------------------------------------- by the numbers */
.numbers { display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); }
@media (min-width: 620px) { .numbers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .numbers { grid-template-columns: repeat(4, 1fr); } }
.numbers > div { padding-top: 1.1rem; }
.numbers b {
  display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.45rem, 2.9vw, 2.1rem); line-height: 1; letter-spacing: .01em;
}
.numbers > div > span { display: block; margin-top: .7rem; font-size: .83rem; line-height: 1.55; }
.tick { font-variant-numeric: tabular-nums; }
.stats-src { font-family: var(--mono); font-size: .68rem; margin-top: 2rem; letter-spacing: .04em; }

/* ---------------------------------------------------------------- steps + lists */
.steps { counter-reset: s; display: grid; gap: 1.8rem; margin: 0; padding: 0; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.steps li { list-style: none; position: relative; padding-left: 3.4rem; }
.steps li::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: -.1rem; width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--mono); font-size: .78rem; font-weight: 600;
}
.steps h3 { margin-bottom: .45rem; }
.steps p { margin: 0; font-size: .9rem; }
ul.plain { margin: 0; padding: 0; list-style: none; }
ul.plain li { padding: .6rem 0; font-size: .9rem; }

/* ---------------------------------------------------------------- details grid */
.details { display: grid; gap: 1.4rem; }
@media (min-width: 760px) { .details { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- edition + reserve */
.edition { display: grid; gap: clamp(2rem, 5vw, 3.4rem); align-items: start; }
@media (min-width: 1020px) { .edition { grid-template-columns: 1fr 430px; } }
.tiers { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .9rem; }
.tiers th, .tiers td { text-align: left; padding: .72rem .5rem; }
.tiers th {
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
}
.tiers td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tiers tr.current td:first-child::after {
  content: ' ◄ NOW'; font-size: .6rem; letter-spacing: .14em;
}
.size-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin: 2.4rem 0 .6rem; }
.size-head .counter { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; }

.reserve { padding: clamp(1.3rem, 3vw, 1.9rem); position: sticky; top: 94px; }
.reserve h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .4rem; }
.reserve .sub { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1.4rem; }
.field { margin-bottom: 1.2rem; }
.field > label {
  display: block; font-family: var(--mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; margin-bottom: .55rem;
}
.opts { display: grid; gap: .55rem; }
.opt {
  display: flex; align-items: flex-start; gap: .7rem; cursor: pointer;
  padding: .8rem .9rem; transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.opt input { margin: .3rem 0 0; flex: none; }
.opt:has(input:disabled) { opacity: .38; cursor: not-allowed; }
.opt .t { font-weight: 600; font-size: .93rem; display: block; }
.opt .d { display: block; font-size: .78rem; line-height: 1.45; margin-top: .15rem; }

.totals { margin-top: 1.5rem; padding-top: 1.2rem; display: grid; gap: .45rem; }
.totals .row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .88rem; }
.totals .row .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.totals .row.big .v {
  font-family: var(--display); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; letter-spacing: .01em;
}
.totals small { font-size: .76rem; line-height: 1.5; display: block; margin-top: .6rem; }
.btn-note { font-size: .74rem; line-height: 1.5; text-align: center; margin: .8rem 0 0; }
.err { margin-top: .9rem; font-size: .84rem; padding: .7rem .85rem; line-height: 1.5; }
.err[hidden] { display: none; }
.fineprint { font-size: .78rem; line-height: 1.6; margin-top: 3rem; padding-top: 1.4rem; }

/* ---------------------------------------------------------------- prose / status */
.prose h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.8rem 0 .9rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: .95rem; }
.status { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.status .inner { max-width: 56ch; }
.status .big { font-family: var(--display); font-size: clamp(3.4rem, 14vw, 9rem); line-height: .85; }

/* ---------------------------------------------------------------- narrow screens */
.hide-xs { display: inline; }
@media (max-width: 760px) {
  .brand svg { width: 112px; }
  .nav { gap: .95rem; }
  .nav a { font-size: .64rem; letter-spacing: .1em; }
  .reserve { position: static; }
}
@media (max-width: 430px) {
  .hide-xs { display: none; }
  .brand svg { width: 96px; }
  .nav { gap: .7rem; }
  .nav a { font-size: .6rem; letter-spacing: .06em; }
}

/* ---------------------------------------------------------------- reveal on scroll */
.rise { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .rise { opacity: 1; transform: none; }
  .ring, .ring-dot, .tap { display: none !important; }
  .spine-line { stroke-dashoffset: 0 !important; }
}
