/* draper.digital — "Black Level"
   Everything on this page is treated as light, not ink. The page black is a level
   (#08090E), never zero; the only saturated colour comes from the photographs,
   thrown into the black by the blooms behind each frame. */

:root {
  --bg: #08090E;
  --surface: #0F1017;
  --ink: #ECEAE3;
  --ink-88: rgba(236, 234, 227, 0.88);
  --haze: #8A8FA6;
  --copper: #C9895A;
  --red: #FF3B30;
  --green: #3FE08A;
  --amber: #E0A83F;
  --line: rgba(138, 143, 166, 0.25);
  --font-display: "Archivo", "Archivo Expanded", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --container: 1200px;
  --gutter: 24px;
  --section: 160px;
  --bloom: none;
}
@media (max-width: 720px) { :root { --section: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-88);
  font: 400 17px/1.55 var(--font-body);
  overflow-x: clip;
}
@media (max-width: 720px) { body { font-size: 16px; } }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--haze);
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.98;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; font-variation-settings: "wdth" 110; line-height: 1.15; }
p { margin: 0 0 1em; }
.lead { font-weight: 500; font-size: 1.125rem; max-width: 58ch; color: var(--ink); }
.muted { color: var(--haze); }
.eyebrow { margin: 0 0 18px; }
.section { padding-top: var(--section); }
.section-head { margin-bottom: 48px; max-width: 760px; }
.section-head p { margin-top: 18px; max-width: 62ch; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 14, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em;
  text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px;
}
.brand .px { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 12px rgba(63, 224, 138, 0.55); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--haze); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links { gap: 18px; } .nav-links li:not(:last-child) { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding: 72px 0 56px; isolation: isolate; overflow: clip;
}
.hero-media { position: absolute; inset: 0 0 0 32%; z-index: -1; }
.hero-media img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 60% 55%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42%),
                      linear-gradient(to bottom, transparent 0%, #000 16%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 42%),
                      linear-gradient(to bottom, transparent 0%, #000 16%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.hero-bloom {
  position: absolute; inset: -12% -12% -12% 20%; z-index: -2;
  background: var(--bloom) center / cover no-repeat;
  filter: blur(80px) saturate(1.35); opacity: 0.3;
  mix-blend-mode: plus-lighter; pointer-events: none;
}
.hero-copy { max-width: 660px; position: relative; }
.hero-copy .kicker { margin: 0 0 28px; }
.hero-copy h1 { margin-bottom: 26px; }
.hero-copy .lead { margin-bottom: 40px; }
.cta {
  display: inline-flex; align-items: baseline; gap: 0.4em;
  font-weight: 500; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--copper); padding-bottom: 4px;
}
.cta .arrow { color: var(--copper); transition: transform 0.25s; display: inline-block; }
.cta:hover .arrow { transform: translateX(4px); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 22px;
  display: flex; justify-content: space-between; gap: 16px; pointer-events: none;
}
.hero-foot .container { display: flex; justify-content: space-between; gap: 16px; }
@media (max-width: 860px) {
  .hero { display: flex; flex-direction: column; justify-content: center; min-height: auto; padding: 56px 0 40px; }
  .hero-media { position: relative; inset: auto; width: calc(100% + 2 * var(--gutter)); margin: 44px calc(-1 * var(--gutter)) 0; aspect-ratio: 16 / 9; }
  .hero-media img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 88%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 88%, transparent 100%);
    -webkit-mask-composite: source-over; mask-composite: add; object-position: 62% 55%;
  }
  .hero-bloom { inset: -12%; }
  .hero-foot { position: static; margin-top: 20px; }
}

/* power-on: the wall comes up from black level */
.hero-media, .hero-bloom { opacity: 0; animation: power-on 0.9s ease-out 0.15s forwards; }
.hero-bloom { animation-name: power-on-bloom; }
.hero-copy { opacity: 0; animation: fade-in 0.45s ease-out 0.05s forwards; }
@keyframes power-on { to { opacity: 1; } }
@keyframes power-on-bloom { to { opacity: 0.3; } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------- the wall (image + bloom) ---------- */
.wall { position: relative; margin: 0; }
.wall::before {
  content: ""; position: absolute; inset: -10%; z-index: 0;
  background: var(--bloom) center / cover no-repeat;
  filter: blur(28px) saturate(1.5); opacity: 0;
  mix-blend-mode: plus-lighter; pointer-events: none;
  transition: opacity 0.6s ease-out;
}
@supports not (mix-blend-mode: plus-lighter) { .wall::before, .hero-bloom, .nosignal-wrap::before { mix-blend-mode: screen; } }
.wall.lit::before { opacity: 0.45; }
.wall:hover::before, .wall:focus-within::before { opacity: 0.8; }
.wall .frame {
  position: relative; z-index: 1; display: block;
  aspect-ratio: 16 / 9; border-radius: 2px; overflow: clip; background: var(--surface);
}
.wall.square .frame { aspect-ratio: 1 / 1; }
.wall.wide .frame { aspect-ratio: 21 / 9; }
.wall .frame img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: brightness(0.55); transition: filter 0.6s ease-out;
}
.wall.lit .frame img { filter: brightness(1); }
.wall .frame::after {
  /* walk up to a wall and it resolves into pixels */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(8, 9, 14, 0.95) 0.7px, transparent 0.85px) 0 0 / 4px 4px;
  opacity: 0; transition: opacity 0.25s;
}
.wall:hover .frame::after { opacity: 0.14; }
.wall figcaption {
  position: relative; z-index: 1; margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--haze); transition: color 0.25s;
}
.wall:hover figcaption { color: var(--ink); }

/* ---------- how a show gets built: scan → surface → previz → show ---------- */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; }
.flow-4 { grid-template-columns: repeat(4, 1fr); gap: 48px 36px; }
.flow-col { position: relative; }
a.flow-col { text-decoration: none; color: inherit; display: block; }
a.flow-col:hover h3 { color: var(--copper); }
a.flow-col h3 { transition: color 0.2s; }
.flow-col .stage {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.flow-col .stage::before { content: ""; width: 12px; height: 2px; background: var(--copper); }
.flow-col + .flow-col::before {
  content: "→"; position: absolute; left: -30px; top: -3px;
  font-family: var(--font-mono); color: var(--copper); font-size: 16px;
}
.flow-col h3 { margin-bottom: 12px; }
.flow-col p { color: var(--ink-88); }
.spec {
  margin-top: 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
  letter-spacing: 0.04em; color: var(--haze);
}
.spec b { font-weight: 500; color: var(--ink); margin-right: 0.6em; }
.also { margin-top: 56px; max-width: 62ch; }
.tools { margin-top: 36px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--haze); line-height: 1.9; }
.tools b { color: var(--ink); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-right: 0.8em; }
.behind { margin-top: 72px; }
@media (max-width: 1023px) and (min-width: 641px) {
  .flow-4 { grid-template-columns: 1fr 1fr; }
  .flow-4 .flow-col:nth-child(3)::before { display: none; }
}
@media (max-width: 860px) {
  .flow:not(.flow-4) { grid-template-columns: 1fr; gap: 40px; }
  .flow-col + .flow-col::before { left: 0; top: -26px; content: "↓"; }
}
@media (max-width: 640px) {
  .flow-4 { grid-template-columns: 1fr; gap: 40px; }
  .flow-4 .flow-col:nth-child(3)::before { display: block; }
}

/* ---------- case studies ---------- */
.case { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 56px; padding: 56px 0; border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 0; padding-top: 8px; }
.case-head h3 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.12; max-width: 22ch; }
.case-head .status { margin-top: 18px; }
.case-body > p:first-child { color: var(--ink); }
.did { list-style: none; padding: 0; margin: 18px 0 0; }
.did li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--ink-88); }
.did li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 12px; height: 2px; background: var(--copper); }
.proof { margin-top: 24px; padding-left: 18px; border-left: 2px solid var(--copper); color: var(--ink); max-width: 60ch; }
.case .spec, .soft .spec { margin-top: 18px; }
.case .cta { margin-top: 8px; }
.software { margin-top: 24px; padding-top: 56px; border-top: 1px solid var(--line); }
.soft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; }
.soft h3 { margin-bottom: 12px; }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; padding: 44px 0; } .case-head h3 { max-width: none; } .soft-grid { grid-template-columns: 1fr; } }

/* ---------- selected work ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px 24px; }
.span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; } .span-4 { grid-column: span 4; }
@media (max-width: 1023px) { .span-8, .span-6, .span-4 { grid-column: span 6; } }
@media (max-width: 640px) { .span-8, .span-6, .span-4 { grid-column: span 12; } }

/* ---------- track record ---------- */
.record { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 116px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; color: var(--haze); padding-top: 4px; white-space: nowrap; }
.timeline .what { color: var(--ink); }
.timeline .what small { display: block; color: var(--haze); font-size: 0.92em; margin-top: 2px; }
.delivered { margin-top: 32px; }
.delivered .mono { display: block; margin-bottom: 8px; }
.delivered p { color: var(--ink); max-width: 60ch; }
.delivered p span { color: var(--haze); margin: 0 0.35em; }
@media (max-width: 860px) { .record { grid-template-columns: 1fr; gap: 40px; } .record .wall { max-width: 420px; } .timeline li { grid-template-columns: 96px 1fr; } }

/* ---------- Cupra: no signal yet ---------- */
.nosignal-wrap { position: relative; }
.nosignal-wrap::before {
  content: ""; position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, #fff, #ff0, #0ff, #0f0, #f0f, #f00, #00f);
  filter: blur(48px); opacity: 0; mix-blend-mode: plus-lighter; transition: opacity 0.8s ease-out;
}
.nosignal-wrap.lit::before { opacity: 0.18; }
.nosignal {
  position: relative; z-index: 1; aspect-ratio: 21 / 9; border-radius: 2px; overflow: clip;
  background: #000; display: grid; place-items: center;
}
.bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); opacity: 0.22; }
.bars i { display: block; }
.bars i:nth-child(1) { background: #fff; } .bars i:nth-child(2) { background: #ff0; }
.bars i:nth-child(3) { background: #0ff; } .bars i:nth-child(4) { background: #0f0; }
.bars i:nth-child(5) { background: #f0f; } .bars i:nth-child(6) { background: #f00; }
.bars i:nth-child(7) { background: #00f; } .bars i:nth-child(8) { background: #000; }
.pixels { position: absolute; inset: 0; background: radial-gradient(circle, rgba(0, 0, 0, 0.9) 0.7px, transparent 0.85px) 0 0 / 4px 4px; }
.nosignal-label {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background: rgba(8, 9, 14, 0.7); border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
  text-align: center;
}
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.cupra-copy { margin-top: 24px; max-width: 62ch; }
@media (max-width: 640px) { .nosignal { aspect-ratio: 16 / 9; } .nosignal-label { font-size: 11px; padding: 10px 12px; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.contact-copy p { max-width: 42ch; }
.contact-copy .where { margin-top: 28px; }
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--haze); }
.field input, .field textarea {
  width: 100%; background: rgba(236, 234, 227, 0.04); border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); font: 400 17px/1.4 var(--font-body); padding: 14px 16px; min-height: 52px;
}
.field textarea { min-height: 176px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; border-color: transparent; }
.field input::placeholder, .field textarea::placeholder { color: rgba(138, 143, 166, 0.6); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.turnstile-wrap { margin: 4px 0 20px; min-height: 65px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tally {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--haze);
}
.tally i { width: 10px; height: 10px; border-radius: 50%; background: var(--haze); transition: background 0.2s; }
.tally[data-state="ready"] i { background: var(--green); }
.tally[data-state="sending"] i { background: var(--amber); animation: pulse 0.9s ease-in-out infinite; }
.tally[data-state="sent"] i { background: var(--green); }
.tally[data-state="error"] i { background: var(--red); }
.tally[data-state="error"] { color: var(--red); }
.btn {
  background: var(--ink); color: var(--bg); border: 0; border-radius: 2px;
  padding: 0 24px; height: 52px; font: 500 16px var(--font-body); cursor: pointer;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.45; cursor: default; }
.form-error { width: 100%; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; letter-spacing: 0.02em; color: var(--red); margin: 0; }
.form-error[hidden] { display: none; }
.sent {
  border: 1px solid var(--line); border-radius: 2px; padding: 28px;
  background: rgba(236, 234, 227, 0.03);
}
.sent .tally { margin-bottom: 16px; }
.sent p { color: var(--ink); max-width: 48ch; margin: 0; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- footer ---------- */
.footer { margin-top: var(--section); border-top: 1px solid var(--line); padding: 30px 0 48px; }
.footer .container { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.footer a { color: var(--haze); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- reduced motion: light is state, motion is optional ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-media, .hero-copy { opacity: 1; animation: none; }
  .hero-bloom { opacity: 0.3; animation: none; }
  .rec, .tally[data-state="sending"] i { animation: none; }
}
