/* Producer Freedom — hub homepage. Tokens in /heroes/ds-tokens.css.
   Amber = brand (fill only) · red = announce bar only on this page.
   Hairlines, no drop shadows. CTA = hard 0px square. Fully responsive. */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-text); }
.band--dark a:hover, .hero a:hover { color: var(--inv-brand-text); }

.wrap { max-width: 1328px; margin: 0 auto; padding: 0 56px; }

/* type */
h1, h2 { font-variation-settings: "wdth" 118; font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; margin: 0; }
h2 { font-size: clamp(34px, 4.4vw, 58px); }
h3 { font-size: 22px; font-variation-settings: "wdth" 112; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.lab {
  font-family: "SpaceMono", monospace; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); margin: 0; font-weight: 400;
}
.mono { font-family: "SpaceMono", monospace; font-size: 12px; }
.body-copy { color: var(--muted); max-width: 58ch; text-wrap: pretty; }

/* bands */
.band { padding: 128px 0; }
.band--dark { background: var(--inv-ground); color: var(--inv-ink); }
.band--dark .lab { color: var(--inv-muted); }
.band--dark .body-copy { color: var(--inv-muted); }
.band--cream { background: var(--ground); }

/* ═══ chrome ═══ */
.announce {
  min-height: 38px; background: var(--live); color: #141414;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: "SpaceMono", monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700; text-align: center; padding: 4px 16px;
}
.nav {
  height: 78px; display: flex; align-items: center; gap: 4px;
  border-bottom: 1px solid var(--inv-line);
  background: var(--inv-ground); color: var(--inv-ink);
  padding: 0 56px;
  position: sticky; top: 0; z-index: 200;
}
.brand { font-variation-settings: "wdth" 118; font-weight: 800; font-size: 17px; letter-spacing: 0.01em; text-transform: uppercase; margin-right: 28px; text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 11px; }
.brand:hover { color: inherit; }
.brand svg { width: 24px; height: 20px; display: block; }
.brand svg path { stroke: var(--brand); }
.navitem {
  font: inherit; font-size: 14px; font-weight: 600; background: transparent; color: inherit;
  border: 0; cursor: pointer; padding: 8px 16px; border-radius: 12px; text-decoration: none;
  transition: background var(--fast) var(--ease);
  position: relative; display: inline-flex; align-items: center; gap: 7px;
}
.navitem:hover { color: inherit; background: color-mix(in oklab, currentColor 8%, transparent); }
.navitem .chev { font-size: 9px; transform: translateY(1px); transition: transform var(--mid) var(--ease); }
.nav-spacer { flex: 1; }

/* ── the Tools mega-menu (hover bridge: transparent apron spans the gap) ── */
.menu-root { position: relative; }
.menu-root > .navitem::after { content: ""; position: absolute; inset: 0 0 -26px; }
.menu-panel {
  position: absolute; top: calc(100% + 18px); left: -12px; width: 424px;
  background: var(--inv-ground); border: 1px solid var(--inv-line);
  padding: 10px; z-index: 300;
  opacity: 0; transform: translateY(-6px); pointer-events: none; visibility: hidden;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease), visibility 0s linear var(--mid);
}
.menu-root:hover .menu-panel, .menu-root:focus-within .menu-panel, .menu-root.open .menu-panel {
  opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease), visibility 0s;
}
.menu-root:hover > .navitem .chev, .menu-root.open > .navitem .chev { transform: translateY(1px) rotate(180deg); }
.menu-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 14px;
  padding: 14px 16px; text-decoration: none; color: var(--inv-ink);
  transition: background var(--fast) var(--ease);
}
.menu-row:hover { background: color-mix(in oklab, currentColor 7%, transparent); color: var(--inv-ink); }
.menu-row + .menu-row { border-top: 1px solid var(--inv-line); }
.menu-row .name { font-variation-settings: "wdth" 112; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.menu-row .desc { grid-column: 1 / -1; font-size: 13px; color: var(--inv-muted); line-height: 1.45; }
.menu-row .lab { white-space: nowrap; }
.menu-row .lab.live { color: var(--inv-live-text); }

/* ctas */
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: "Archivo", sans-serif; font-weight: 800; font-variation-settings: "wdth" 112;
  font-size: 15px; padding: 16px 30px; background: var(--brand); color: #141414;
  transition: transform var(--fast) var(--ease), filter var(--fast) var(--ease);
}
.cta:hover { transform: translateY(-1px); filter: brightness(1.08); color: #141414; }
.cta:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.cta--ghost { background: transparent; border: 1px solid var(--inv-line); color: var(--inv-ink); }
.cta--ghost.on-cream { border-color: var(--line); color: var(--ink); }
.cta--ghost:hover { color: var(--inv-ink); }
.cta--ghost.on-cream:hover { color: var(--ink); }
.cta--sm { font-size: 14px; padding: 12px 22px; }

/* ═══ hero ═══ */
.hero { padding: 104px 0 120px; background: var(--inv-ground); color: var(--inv-ink); }
.hero .kicker { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(52px, 8.6vw, 118px); max-width: 12ch; }
.hero h1 .accent { color: var(--inv-brand-text); }
.hero .under { display: flex; justify-content: space-between; align-items: flex-end; gap: 64px; margin-top: 40px; }
.hero .cta-row { display: flex; gap: 12px; flex: none; }

/* entrance: staggered rise on load (JS adds .booted to body) */
.boot { opacity: 0; transform: translateY(18px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.booted .boot { opacity: 1; transform: none; }
.booted .boot.b2 { transition-delay: 90ms; }
.booted .boot.b3 { transition-delay: 180ms; }
.booted .boot.b4 { transition-delay: 280ms; }

/* ── the rack: three tool units ── */
.rack { margin-top: 72px; border: 1px solid var(--inv-line); }
.unit {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 340px 56px;
  align-items: center; gap: 32px; padding: 30px 36px;
  text-decoration: none; color: var(--inv-ink);
  background: var(--inv-ground);
  transition: background var(--mid) var(--ease);
  position: relative;
}
.unit + .unit { border-top: 1px solid var(--inv-line); }
.unit:hover { background: var(--inv-surface); color: var(--inv-ink); }
.unit .no { font-family: "SpaceMono", monospace; font-size: 11px; letter-spacing: 0.14em; color: var(--inv-muted); display: flex; flex-direction: column; gap: 8px; }
.unit .no .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.unit .info h3 { font-size: clamp(24px, 2.6vw, 34px); font-variation-settings: "wdth" 118; font-weight: 800; letter-spacing: -0.02em; }
.unit .info p { margin-top: 8px; font-size: 15px; color: var(--inv-muted); max-width: 46ch; }
.unit .info .meta { margin-top: 12px; }
.unit .go {
  font-family: "SpaceMono", monospace; font-size: 20px; color: var(--inv-muted);
  justify-self: end; transition: transform var(--mid) var(--ease), color var(--mid) var(--ease);
}
.unit:hover .go { transform: translateX(6px); color: var(--inv-brand-text); }

/* micro-demos (CSS-only loops, paused for reduced-motion) */
.demo { height: 96px; border: 1px solid var(--inv-line); background: #101010; position: relative; overflow: hidden; }
.demo .dlab { position: absolute; top: 7px; left: 10px; font-family: "SpaceMono", monospace; font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--inv-muted); z-index: 2; }

/* demo 1: mess → uniform crossfade (real thumbnails) */
.demo-bb .phase { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 22px 14px 14px; }
.demo-bb .phase.mess span { display: block; background: linear-gradient(#5f5f5f, #3a3a3a); border: 1px solid #2E2E2E; }
.demo-bb .phase.mess span:nth-child(1) { width: 26px; height: 40px; transform: rotate(-7deg); }
.demo-bb .phase.mess span:nth-child(2) { width: 44px; height: 30px; transform: rotate(4deg); }
.demo-bb .phase.mess span:nth-child(3) { width: 32px; height: 32px; transform: rotate(-3deg); }
.demo-bb .phase.mess span:nth-child(4) { width: 24px; height: 46px; transform: rotate(9deg); }
.demo-bb .phase.done span { display: block; width: 74px; height: 41.6px; border: 1px solid #2E2E2E; background-size: cover; background-position: center; }
.demo-bb .phase.mess { animation: bbmess 6s var(--ease) infinite; }
.demo-bb .phase.done { animation: bbdone 6s var(--ease) infinite; }
@keyframes bbmess { 0%, 38% { opacity: 1; } 50%, 88% { opacity: 0; } 100% { opacity: 1; } }
@keyframes bbdone { 0%, 38% { opacity: 0; } 50%, 88% { opacity: 1; } 100% { opacity: 0; } }

/* demo 2: EQ bars → render progress */
.demo-bv .eq { position: absolute; left: 14px; bottom: 26px; display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.demo-bv .eq i { width: 7px; background: #4a4a4a; animation: eq 1.1s ease-in-out infinite alternate; }
.demo-bv .eq i:nth-child(1) { height: 45%; animation-delay: 0ms; }
.demo-bv .eq i:nth-child(2) { height: 90%; animation-delay: 120ms; }
.demo-bv .eq i:nth-child(3) { height: 60%; animation-delay: 240ms; }
.demo-bv .eq i:nth-child(4) { height: 100%; animation-delay: 60ms; }
.demo-bv .eq i:nth-child(5) { height: 35%; animation-delay: 300ms; }
.demo-bv .eq i:nth-child(6) { height: 75%; animation-delay: 180ms; }
@keyframes eq { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }
.demo-bv .render { position: absolute; right: 14px; bottom: 30px; width: 132px; }
.demo-bv .render .bar { height: 3px; background: #2E2E2E; position: relative; overflow: hidden; }
.demo-bv .render .bar i { position: absolute; inset: 0; background: var(--brand); transform-origin: left; animation: render 6s linear infinite; }
.demo-bv .render .out { margin-top: 7px; font-family: "SpaceMono", monospace; font-size: 8.5px; letter-spacing: 0.12em; color: var(--inv-muted); animation: renderout 6s linear infinite; }
@keyframes render { 0% { transform: scaleX(0); } 78% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
@keyframes renderout { 0%, 74% { color: #8C8880; } 80%, 100% { color: #E0A83C; } }

/* demo 3: typewriter title */
.demo-uk .line { position: absolute; left: 14px; right: 14px; font-family: "SpaceMono", monospace; font-size: 10.5px; color: var(--inv-ink); white-space: nowrap; overflow: hidden; }
.demo-uk .line.t { top: 32px; width: 0; border-right: 6px solid var(--brand); animation: type 6s steps(34) infinite; }
.demo-uk .line.g { top: 58px; color: var(--inv-muted); font-size: 9px; opacity: 0; animation: tagsin 6s linear infinite; }
@keyframes type { 0% { width: 0; } 55% { width: 78%; } 88% { width: 78%; } 100% { width: 0; } }
@keyframes tagsin { 0%, 55% { opacity: 0; } 62%, 88% { opacity: 1; } 100% { opacity: 0; } }

.factline { margin-top: 40px; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--inv-line); padding-top: 18px; flex-wrap: wrap; }

/* ═══ receipts (the math) ═══ */
.receipts-head { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 72px; align-items: end; margin-bottom: 56px; }
.receipts-head h2 { max-width: 16ch; }
.mathrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.mathrow .cell { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.mathrow .big { font-variation-settings: "wdth" 118; font-weight: 800; font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.mathrow .cell p { font-size: 14px; color: var(--muted); }
.mathrow .big em { font-style: normal; color: var(--brand-text); }

/* ═══ output marquee ═══ */
.made { padding: 96px 0 104px; background: var(--inv-ground); color: var(--inv-ink); overflow: hidden; }
.made .made-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 44px; flex-wrap: wrap; }
.marquee {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee .track { display: flex; gap: 14px; width: max-content; animation: marquee 64s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .shot { flex: none; width: 264px; aspect-ratio: 16 / 9; border: 1px solid var(--inv-line); background-size: cover; background-position: center; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══ guides ═══ */
.guides-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 56px; gap: 16px; flex-wrap: wrap; }
.guide-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide-card { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; transition: border-color var(--mid) var(--ease), transform var(--mid) var(--ease); }
.guide-card:hover { border-color: var(--brand); transform: translateY(-2px); color: inherit; }
.guide-card h3 { font-size: 24px; max-width: 24ch; }
.guide-card p { font-size: 15px; color: var(--muted); max-width: 52ch; }
.guide-card .foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }

/* ═══ founder ═══ */
.founder-band { padding: 128px 0; background: var(--inv-ground); color: var(--inv-ink); }
.founder { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; align-items: start; }
.founder blockquote { margin: 0; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.5; font-weight: 500; max-width: 44ch; color: var(--inv-ink); text-wrap: pretty; }
.founder .sig { margin-top: 24px; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.founder .sig .brand { margin: 0; font-size: 14px; }

.final-cta { margin-top: 96px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border: 1px dashed #8c888059; padding: 40px 48px; flex-wrap: wrap; }
.final-cta h3 { font-size: clamp(24px, 2.8vw, 34px); font-variation-settings: "wdth" 118; font-weight: 800; }

/* footer */
footer { background: var(--ground); border-top: 1px solid var(--line); padding: 48px 0; }
footer .wrap { display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; }
footer .brand { margin: 0; font-size: 15px; }
footer .spacer { flex: 1; }
footer a.lab { text-decoration: none; transition: color var(--fast) var(--ease); }
footer a.lab:hover { color: var(--ink); }

/* ═══ scroll reveals ═══ */
.rise { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.rise.in { opacity: 1; transform: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.live-word { color: var(--inv-live-text); }

/* ═══ responsive ═══ */
@media (max-width: 1080px) {
  .unit { grid-template-columns: 64px minmax(0, 1fr) 260px; }
  .unit .go { display: none; }
  .receipts-head { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 28px; }
  .nav { padding: 0 28px; }
  .nav .navitem.hide-m { display: none; }
  .menu-panel { position: fixed; top: calc(38px + 78px + 8px); left: 16px; right: 16px; width: auto; }
  .hero { padding: 72px 0 88px; }
  .hero .under { flex-direction: column; align-items: flex-start; gap: 32px; }
  .band { padding: 88px 0; }
  .founder-band { padding: 88px 0; }
  .unit { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 26px 24px; }
  .unit .no { flex-direction: row; align-items: center; }
  .demo { width: 100%; max-width: 360px; }
  .mathrow { grid-template-columns: 1fr; }
  .guide-cards { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; gap: 28px; }
  .final-cta { padding: 28px; }
}
@media (max-width: 540px) {
  .wrap { padding: 0 20px; }
  .nav { padding: 0 16px; gap: 0; }
  .brand { margin-right: 10px; font-size: 13px; gap: 8px; white-space: nowrap; }
  .brand svg { width: 18px; height: 15px; }
  .nav .navitem { font-size: 14px; padding: 8px 12px; }
  .nav .cta--sm { display: none; }
  .hero h1 { font-size: clamp(44px, 12.5vw, 64px); }
  .hero .kicker { flex-direction: column; gap: 6px; }
  .factline { flex-direction: column; gap: 10px; }
  .marquee .shot { width: 200px; }
  .cta-row { flex-direction: column; width: 100%; }
  .cta-row .cta { width: 100%; }
}

/* reduced motion: kill loops + reveals */
@media (prefers-reduced-motion: reduce) {
  .boot, .rise { opacity: 1 !important; transform: none !important; transition: none !important; }
  .demo-bb .phase, .demo-bv .eq i, .demo-bv .render .bar i, .demo-bv .render .out,
  .demo-uk .line.t, .demo-uk .line.g, .marquee .track { animation: none !important; }
  .demo-bb .phase.done { opacity: 1; }
  .demo-bb .phase.mess { opacity: 0; }
  .demo-uk .line.t { width: 78%; }
  .demo-uk .line.g { opacity: 1; }
  .demo-bv .render .bar i { transform: scaleX(1); }
}
