/* Downstage Digital
   Palette: blackout stage, gaffer white, work-light amber, spike-tape cyan */

:root {
  --bg: #111214;
  --bg-2: #17191c;
  --bg-3: #1f2226;
  --line: #2c3036;
  --text: #ecebe6;
  --muted: #9a9ca1;
  --amber: #ffb21e;
  --amber-dim: #a8741a;
  --cyan: #4fd1c5;
  --radius: 6px;
  --wrap: 1180px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-stretch: 75%; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 850; text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; text-transform: uppercase; }
h3 { font-size: 1.35rem; font-weight: 750; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
section { padding: 104px 0; border-top: 1px solid var(--line); }

.kicker, .eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.center { text-align: center; }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { margin-bottom: 20px; }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--amber);
  color: #15120a;
  font-family: var(--font);
  font-weight: 750;
  font-size: 1rem;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 15px 26px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #ffc24d; transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-small { padding: 10px 16px; font-size: 0.85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 18, 20, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-stretch: 80%; text-transform: uppercase; font-size: 1.1rem; letter-spacing: 0.02em; }
.brand-tag { font-family: var(--mono); font-size: 0.64rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s; }

/* Hero */
.hero { border-top: 0; padding: 88px 0 112px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, rgba(255, 178, 30, 0.13), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; position: relative; }
.hero-grid > *, .col, .node, .field, .who-card, .pkg { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.hero h1 { margin-bottom: 26px; }
.lede { font-size: 1.18rem; color: #c9c9c4; max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Signal flow diagram */
.patch { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.patch-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-3);
}
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--cyan); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.patch-body { display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr; align-items: stretch; padding: 22px 18px; min-height: 320px; }
.col { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.col-out { justify-content: center; }
.node {
  background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 9px 11px; font-weight: 700; font-size: 0.88rem; font-stretch: 85%;
}
.node small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.62rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-hub { border-color: var(--amber); color: var(--amber); padding: 18px 12px; text-transform: uppercase; box-shadow: 0 0 0 4px rgba(255,178,30,.08); }
.wires { width: 100%; height: 100%; }
.wires path { fill: none; stroke: var(--amber-dim); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4 6; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }

/* Problem */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pain { background: var(--bg); padding: 34px 30px; }
.pain-num { font-family: var(--mono); color: var(--amber); font-size: 0.85rem; display: block; margin-bottom: 26px; }
.pain h3 { margin-bottom: 12px; }
.pain p { color: var(--muted); }

/* Who */
.who { background: var(--bg-2); }
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.who-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 32px 28px; position: relative; }
.who-card::before { content: ""; position: absolute; top: -1px; left: 28px; width: 46px; height: 4px; background: var(--amber); border-radius: 0 0 2px 2px; }
.who-label { font-size: 1.7rem; font-weight: 800; font-stretch: 75%; text-transform: uppercase; line-height: 1.05; margin-bottom: 12px; }
.who-list { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { padding-left: 26px; position: relative; color: #cfcfca; font-size: 0.98rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 7px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg); }

/* Audit */
.audit { background: var(--amber); color: #15120a; border-top: 0; padding: 88px 0; }
.audit-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px 64px; align-items: start; }
.audit-tag { grid-column: 1 / -1; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.audit h2 { margin-bottom: 18px; }
.audit-copy p { font-size: 1.12rem; }
.audit-steps { list-style: none; margin: 0; padding: 0; border-top: 2px solid #15120a; }
.audit-steps li { padding: 16px 0; border-bottom: 1px solid rgba(21,18,10,.25); font-size: 1.05rem; }
.audit-steps b { display: inline-block; min-width: 108px; text-transform: uppercase; font-stretch: 80%; font-weight: 800; letter-spacing: 0.03em; }
.audit .btn { background: #15120a; color: var(--amber); justify-self: start; }
.audit .btn:hover { background: #2a2416; }

/* Packages */
.pkg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pkg { border: 1px solid var(--line); border-radius: 10px; padding: 30px; background: linear-gradient(180deg, var(--bg-2), var(--bg)); transition: border-color .2s; }
.pkg:hover { border-color: var(--amber-dim); }
.pkg-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.pkg-code { background: var(--bg-3); border: 1px solid var(--line); color: var(--amber); padding: 4px 8px; border-radius: 4px; }
.pkg-for { color: var(--muted); }
.pkg h3 { font-size: 2rem; text-transform: uppercase; font-stretch: 75%; font-weight: 800; margin-bottom: 12px; }
.pkg p { color: #c4c4bf; }

.addons { margin-top: 56px; border: 1px dashed var(--line); border-radius: 10px; padding: 34px; }
.addons h3 { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 22px; }
.addons ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
.addons li { color: var(--muted); font-size: 0.98rem; }
.addons b { color: var(--text); }

/* Process */
.process { background: var(--bg-2); }
.ros { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ros li { display: flex; gap: 18px; padding: 30px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.ros-time { font-family: var(--mono); font-size: 0.8rem; color: var(--bg); background: var(--amber); height: fit-content; padding: 3px 7px; border-radius: 3px; font-weight: 600; }
.ros h3 { margin-bottom: 8px; }
.ros p { color: var(--muted); font-size: 0.96rem; }

/* Why */
.vs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vs-row { display: grid; grid-template-columns: 1fr 1.5fr; border-top: 1px solid var(--line); }
.vs-row:first-child { border-top: 0; }
.vs-row span { padding: 22px 28px; }
.vs-row span:first-child { font-weight: 700; font-stretch: 85%; font-size: 1.08rem; border-right: 1px solid var(--line); }
.vs-row span:last-child { color: #c4c4bf; }
.vs-head { background: var(--bg-3); }
.vs-head span, .vs-head span:first-child { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding-top: 14px; padding-bottom: 14px; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.trust-list li { padding-left: 22px; border-left: 2px solid var(--cyan); color: var(--muted); }
.trust-list b { color: var(--text); display: block; margin-bottom: 2px; }

/* Tools */
.tools { padding: 72px 0; background: var(--bg-2); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); margin: 10px 0 26px; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: scroll 50s linear infinite; }
.marquee-track span { font-weight: 700; font-stretch: 80%; font-size: 1.25rem; text-transform: uppercase; color: #c4c4bf; border: 1px solid var(--line); border-radius: 40px; padding: 8px 20px; white-space: nowrap; background: var(--bg); }
@keyframes scroll { to { transform: translateX(calc(-50% - 7px)); } }
.fineprint { font-size: 0.78rem; color: #6e7076; max-width: 640px; margin: 0 auto; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 20px; }
.contact-copy > p { color: var(--muted); font-size: 1.08rem; margin-bottom: 36px; }
.contact-meta { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 26px; }
.contact-meta div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; }
.contact-meta span { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.contact-meta a { color: var(--amber); text-decoration: none; }
.contact-meta a:hover { text-decoration: underline; }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 32px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font: inherit; font-size: 1rem;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #5c5f65; }
.field .invalid { border-color: #e5694f; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-note { color: var(--muted); font-size: 0.92rem; }
.form-note.ok { color: var(--cyan); }
.form-note.err { color: #e5694f; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: var(--text); }
.copyright { color: #6e7076; font-size: 0.85rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; }
  .who-grid { grid-template-columns: 1fr; }
  .ros { grid-template-columns: repeat(2, 1fr); }
  .contact-grid, .trust-grid { grid-template-columns: 1fr; gap: 40px; }
  .audit-inner { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(2) { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-3.5px) rotate(-45deg); }
  .pain-grid, .pkg-grid, .addons ul { grid-template-columns: 1fr; }
  .vs-row { grid-template-columns: 1fr; }
  .vs-row span:first-child { border-right: 0; padding-bottom: 4px; }
  .vs-row span:last-child { padding-top: 4px; }
  .vs-head span:last-child { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .brand-tag { display: none; }
  .ros { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; padding: 22px; }
  .patch-body { grid-template-columns: 1fr 22px 0.9fr 22px 1fr; padding: 16px 10px; min-height: 280px; }
  .node { padding: 7px 7px; font-size: 0.76rem; }
  .node small { font-size: 0.55rem; }
  .node-hub { padding: 12px 6px; }
  .contact-meta div { grid-template-columns: 1fr; gap: 2px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; }
  .hero h1 { font-size: 2.35rem; }
}
