:root {
  --night: #071426;
  --night-2: #0c1f38;
  --grid: rgba(120, 180, 255, 0.07);
  --grid-strong: rgba(120, 180, 255, 0.14);
  --ink: #e8f0fb;
  --muted: #8ea3bf;
  --hazard: #ffc629;
  --hazard-ink: #121212;
  --orange: #ff8a1f;
  --steel: #9fb4d0;
  --steel-dim: #4d6585;
  --glass: rgba(255, 255, 255, 0.04);
  --line: rgba(160, 200, 255, 0.18);
  --ok: #3ee08f;
  --font: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background-color: var(--night);
  background-image:
    radial-gradient(1200px 600px at 70% -10%, rgba(255, 198, 41, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(80, 140, 255, 0.12), transparent 60%),
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  animation: grid-pan 40s linear infinite;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
@keyframes grid-pan { to { background-position: 0 0, 0 0, 120px 120px, 120px 120px, 24px 24px, 24px 24px; } }

.mono { font-family: var(--mono); }
#sparks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ---------- hazard tape ---------- */
.tape {
  position: relative;
  overflow: hidden;
  height: 34px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 22px, var(--hazard-ink) 22px 44px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  z-index: 6;
}
.tape--top { transform: rotate(-1deg) scale(1.03); margin-top: 10px; }
.tape--bottom { transform: rotate(1deg) scale(1.03); }
.tape__track {
  position: absolute; inset: 5px 0;
  display: flex; width: max-content;
  background: var(--hazard);
  color: var(--hazard-ink);
  font: 700 14px/24px var(--mono);
  letter-spacing: 0.12em;
  animation: marquee 30s linear infinite;
}
.tape__track--rev { animation-direction: reverse; }
.tape__track span { padding-right: 0; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 22px auto 0; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand__hat { width: 38px; height: 38px; fill: var(--hazard); filter: drop-shadow(0 0 10px rgba(255, 198, 41, 0.45)); animation: hat-bob 3.2s ease-in-out infinite; }
.brand__ridge { fill: var(--night); opacity: 0.35; }
@keyframes hat-bob { 50% { transform: translateY(-3px) rotate(-4deg); } }
.brand__name { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.brand__name span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(6px);
  font: 500 12px var(--mono); color: var(--muted); white-space: nowrap;
}
.status b { color: var(--hazard); font-weight: 600; }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 138, 31, 0.7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 138, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 138, 31, 0); } }

/* ---------- hero ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 56px 0 8px; text-align: center; }
.eyebrow { margin: 0 0 18px; font: 500 12px var(--mono); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
h1 {
  margin: 0; font-weight: 700; letter-spacing: -0.04em; line-height: 0.98;
  font-size: clamp(42px, 8.2vw, 96px);
  text-wrap: balance;
}
.weld {
  position: relative; display: inline-block;
  padding: 0 0.04em 0.12em; margin-bottom: -0.12em; /* room for the "g" descender inside the clipped gradient */
  background: linear-gradient(90deg, var(--hazard) 0%, #fff4c2 20%, var(--orange) 40%, var(--hazard) 60%, #fff4c2 80%, var(--orange) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: weld-sweep 3s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255, 160, 40, 0.35));
}
@keyframes weld-sweep { to { background-position: -200% 0; } }
.weld-point { position: absolute; right: -0.08em; bottom: 0.14em; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 6px rgba(255, 220, 140, 0.9), 0 0 40px 14px rgba(255, 140, 30, 0.5); animation: arc 0.12s steps(2) infinite; }
@keyframes arc { 50% { opacity: 0.4; transform: scale(0.7); } }
.lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.progress { max-width: 560px; margin: 34px auto 0; text-align: left; }
.progress__head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.progress__head #status-text { min-height: 1.2em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.progress__head #status-text::after { content: '▋'; margin-left: 2px; color: var(--hazard); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.progress__pct { color: var(--hazard); font-weight: 600; }
.progress__bar { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); overflow: hidden; }
.progress__fill {
  width: 0%; height: 100%; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 10px, var(--orange) 10px 20px);
  background-size: 28px 28px;
  animation: stripes 0.8s linear infinite;
  box-shadow: 0 0 16px rgba(255, 170, 40, 0.5);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes stripes { to { background-position: 28px 0; } }

/* ---------- stage (crane scene) ---------- */
.stage { margin: 36px auto 0; max-width: 980px; }
#scene { display: block; width: 100%; height: auto; overflow: visible; }
.lattice { stroke: var(--steel-dim); stroke-width: 1.2; }
.mast-frame, .arm-frame { fill: none; stroke: var(--hazard); stroke-width: 2; }
.mast { stroke: none; }
.cab { fill: var(--hazard); }
.cab-window { fill: #9fd8ff; opacity: 0.85; }
.counterweight { fill: #37506f; stroke: var(--steel-dim); }
.tie { fill: none; stroke: var(--steel); stroke-width: 1.4; }
.beacon { fill: #ff4b3a; animation: beacon 1.2s ease-in-out infinite; }
@keyframes beacon { 50% { fill: #5a1410; filter: none; } 0%, 100% { filter: drop-shadow(0 0 6px #ff4b3a); } }
.jib { transform-origin: 121px 60px; animation: sway 7s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(0.6deg); } }
.trolley { fill: var(--steel); }
.cable { stroke: var(--steel); stroke-width: 1.5; }
.hookshape { fill: none; stroke: var(--hazard); stroke-width: 2.5; stroke-linecap: round; }
.ground { stroke: var(--line); stroke-width: 2; stroke-dasharray: 6 6; }
.dim { stroke: rgba(160, 200, 255, 0.35); stroke-width: 1; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 3s ease forwards 0.6s; }
.dim-text { fill: rgba(160, 200, 255, 0.6); font: 11px var(--mono); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.block rect.body { fill: #1b3557; stroke: #5d86b8; stroke-width: 1.5; }
.block .mortar { stroke: rgba(160, 200, 255, 0.18); stroke-width: 1; }
.block .win { fill: #0d2440; }
.block .win.lit { fill: url(#glow); filter: drop-shadow(0 0 4px rgba(255, 190, 60, 0.8)); }
.pallet .block rect.body { fill: #162c48; }
.dust { fill: rgba(200, 215, 235, 0.55); }

.sign text { font: 700 26px var(--mono); letter-spacing: 0.08em; fill: #ffe9a8; opacity: 0; }
.sign.on text { animation: neon-on 1.4s steps(1) forwards; }
@keyframes neon-on { 0% { opacity: 0.2; } 10% { opacity: 1; } 18% { opacity: 0.1; } 26% { opacity: 1; } 34% { opacity: 0.3; } 42%, 100% { opacity: 1; } }
.stamp { opacity: 0; transform-box: fill-box; transform-origin: center; }
.stamp rect { fill: none; stroke: var(--ok); stroke-width: 3; }
.stamp text { fill: var(--ok); font: 700 15px var(--mono); letter-spacing: 0.06em; }
.stamp.on { animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes stamp { from { opacity: 0; transform: scale(2.4) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(-6deg); } }
.stage__hint { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.stage__hint span { color: var(--hazard); }

/* ---------- cards ---------- */
.coming { margin: 64px 0 80px; }
.coming h2 { font-size: 14px; color: var(--muted); font-weight: 500; margin: 0 0 16px; text-align: center; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); perspective: 900px; }
.card {
  position: relative; padding: 22px 20px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.card:nth-child(2) { animation-delay: 0.1s; } .card:nth-child(3) { animation-delay: 0.2s; } .card:nth-child(4) { animation-delay: 0.3s; } .card:nth-child(5) { animation-delay: 0.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, var(--hazard) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; animation: spin-border 2.4s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --a: 360deg; } }
.card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center;
  background: linear-gradient(100deg, rgba(255, 198, 41, 0.10), rgba(255, 255, 255, 0.02) 60%); }
.card--wide svg { grid-row: 1 / 3; width: 52px; height: 52px; }
.card--wide h3 { margin-top: 0; }
.card--wide p { max-width: 640px; }
@media (max-width: 560px) { .card--wide { display: block; } .card--wide svg { width: 40px; height: 40px; } .card--wide h3 { margin-top: 14px; } }
.card:hover { border-color: transparent; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.card svg { width: 40px; height: 40px; fill: none; stroke: var(--hazard); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transform: translateZ(30px); }
.card h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: -0.01em; transform: translateZ(20px); }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tag {
  position: absolute; top: 14px; right: 14px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--hazard-ink); background: var(--hazard); padding: 3px 7px; border-radius: 4px;
  transform: rotate(4deg);
}

/* ---------- footer + pile ---------- */
.foot { padding-bottom: 90px; }
.foot__line { text-align: center; color: var(--muted); font-size: 12px; margin: 22px 16px 0; }
.pile { position: fixed; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; z-index: 7; }
.brick {
  position: fixed; width: 44px; height: 20px; border-radius: 3px; pointer-events: none; z-index: 7;
  background: linear-gradient(180deg, #e06a3a, #b8481f);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4);
}
.brick.gone { transition: opacity 0.6s, transform 0.6s; opacity: 0; transform: translateY(30px) rotate(10deg) !important; }
.plus { position: fixed; z-index: 8; pointer-events: none; font: 700 14px var(--mono); color: var(--hazard); animation: plus 0.9s ease-out forwards; }
@keyframes plus { to { opacity: 0; transform: translateY(-40px); } }

@media (max-width: 560px) {
  .status { display: none; }
  .hero { padding-top: 36px; }
  .eyebrow { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .tape__track { animation: none; }
}
