/* ============================================================
   GOOD NUMBERS v8 redesign
   Design direction: numbers as material, editorial restraint
   ============================================================ */

:root {
  --stone: #F0EEE8;
  --ink: #0E0F0D;
  --blue: #0040FF;
  --dark: #0B0D11;
  --darkline: rgba(255,255,255,.1);
  --line: rgba(14,15,13,.12);
  --muted: #6B6E6A;
  --wrap: 1280px;
  --display: 'Plus Jakarta Sans', 'Arial Black', sans-serif;
  --body: 'Inter', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--stone);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

/* Skip link */
.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 14px;
  z-index: 999; font-size: 13px;
}
.skip:focus { top: 16px; }

/* ============================================================
   NAV
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50; transition: background .2s, border-color .2s;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: rgba(11,13,17,.92);
  backdrop-filter: blur(16px);
  border-color: var(--darkline);
}
.nav {
  height: 72px; display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 800;
  font-size: 15px; letter-spacing: -.02em;
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none; font-size: 14px;
  transition: color .15s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  background: var(--blue); color: #fff;
  text-decoration: none; padding: 10px 20px;
  font-size: 13px; font-weight: 600;
  transition: opacity .15s;
}
.nav-cta:hover { opacity: .85; }

.menu {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--darkline);
  width: 40px; height: 40px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu i { display: block; width: 18px; height: 1px; background: #fff; }
.mobile-nav {
  display: none; background: #0B0D11;
  padding: 8px 24px 20px; border-top: 1px solid var(--darkline);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 15px 0;
  border-bottom: 1px solid var(--darkline);
  color: rgba(255,255,255,.8); text-decoration: none; font-size: 15px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--dark); color: #fff;
  min-height: 100svh; padding: 140px 0 80px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}

.hero-bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 50%, black 30%, transparent 80%);
}

.hero-accent {
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background: radial-gradient(ellipse at 70% 40%, rgba(0,64,255,.14), transparent 60%);
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  position: relative; z-index: 2;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  color: rgba(255,255,255,.4); margin-bottom: 32px;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--blue);
}

h1 {
  font-family: var(--display);
  font-size: clamp(52px, 5.6vw, 88px);
  font-weight: 800; line-height: .96;
  letter-spacing: -.04em;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: 19px; line-height: 1.65;
  color: rgba(255,255,255,.52);
  max-width: 520px; margin-bottom: 44px;
}

.hero-actions { display: flex; gap: 14px; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue); color: #fff;
  text-decoration: none; padding: 14px 28px;
  font-size: 14px; font-weight: 600;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .88; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.55); text-decoration: none;
  font-size: 14px; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 2px; transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.4); }

/* Hero visual: data architecture */
.hero-architecture { position: relative; }
.architecture-frame {
  position: relative; background: #05070B; border: 1px solid rgba(255,255,255,.1);
  padding: 14px; box-shadow: 0 26px 80px rgba(0,0,0,.35);
}
.architecture-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 28%, transparent 72%, rgba(0,64,255,.07));
}
.architecture-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 863; object-fit: contain; }
.architecture-caption {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 12px; color: rgba(255,255,255,.32);
  text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 600;
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trustbar { background: var(--stone); border-bottom: 1px solid var(--line); padding: 20px 0; }
.trustbar-inner { display: flex; align-items: flex-start; gap: 28px; }
.trustbar-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; flex-shrink: 0; padding-top: 6px; }
.trustbar-logos { display: flex; align-items: center; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; width: 100%; }
.trustbar-logos > div { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #777; font-weight: 600; white-space: nowrap; }
.trustbar-logos img { width: 18px; height: 18px; object-fit: contain; }

/* ============================================================
   PROBLEM: big editorial statement
   ============================================================ */
.problem {
  padding: 140px 0;
  border-bottom: 1px solid var(--line);
}
.problem-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px; align-items: start;
}
.problem-aside {
  padding-top: 8px;
}
.problem-aside-label {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}
.problem-aside p {
  font-size: 15px; line-height: 1.7; color: var(--muted);
}

.problem-statement {
  font-family: var(--display);
  font-size: clamp(38px, 4.2vw, 62px);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -.04em; color: var(--ink);
}
.problem-statement .accent { color: var(--blue); }

.problem-signals {
  display: grid; grid-template-columns: repeat(4,1fr);
  margin-top: 80px; border-top: 1px solid var(--line);
}
.problem-signal {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--line);
}
.problem-signal:last-child { border-right: 0; }
.signal-icon {
  width: 32px; height: 32px; margin-bottom: 20px;
  color: var(--blue);
}
.problem-signal b {
  display: block; font-family: var(--display);
  font-size: 17px; font-weight: 700; margin-bottom: 8px;
}
.problem-signal p {
  font-size: 14px; color: var(--muted); line-height: 1.6;
}

/* ============================================================
   CAPABILITIES
   ============================================================ */
.capabilities {
  padding: 140px 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: end;
  margin-bottom: 64px;
}
.section-header h2 {
  font-family: var(--display);
  font-size: clamp(40px, 4vw, 64px);
  font-weight: 800; line-height: 1.02;
  letter-spacing: -.04em;
}
.section-header p {
  font-size: 17px; color: var(--muted);
  line-height: 1.7; max-width: 480px;
  margin: 0; align-self: end;
  padding-bottom: 6px;
}

.cap-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: 1px solid var(--line);
}
.cap-item {
  padding: 36px 28px 32px;
  border-right: 1px solid var(--line);
}
.cap-item:last-child { border-right: 0; }

.cap-num {
  font-family: var(--display); font-size: 48px;
  font-weight: 800; color: var(--blue);
  line-height: 1; letter-spacing: -.04em;
  margin-bottom: 28px; opacity: .25;
}
.cap-item h3 {
  font-family: var(--display);
  font-size: 20px; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 12px;
}
.cap-item p {
  font-size: 14px; color: var(--muted);
  line-height: 1.7; margin-bottom: 24px;
}
.cap-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cap-tag {
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
}

/* ============================================================
   ARCHITECTURE / WORK
   ============================================================ */
.work { background: var(--dark); color: #fff; padding: 140px 0; }
.work .section-header h2 { color: #fff; }
.work .section-header p { color: rgba(255,255,255,.45); }
.architecture-section-header { margin-bottom: 70px; }
.architecture-feature {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  border: 1px solid rgba(255,255,255,.08); background: #0A0D14;
}
.architecture-feature-visual { padding: 26px; border-right: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; min-height: 560px; }
.architecture-feature-visual img { display: block; width: min(100%, 560px); height: auto; object-fit: contain; }
.architecture-feature-copy { padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; }
.feature-kicker { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: rgba(255,255,255,.3); text-transform: uppercase; margin-bottom: 18px; }
.architecture-feature-copy h3 { font-family: var(--display); font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 18px; }
.architecture-feature-copy > p { font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.46); max-width: 540px; }
.architecture-flow { margin-top: 42px; border-top: 1px solid rgba(255,255,255,.08); }
.architecture-flow > div { display: grid; grid-template-columns: 34px 110px 1fr; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.architecture-flow span, .point-index { font-family: var(--display); font-size: 11px; font-weight: 800; color: var(--blue); }
.architecture-flow b { font-size: 13px; color: #fff; }
.architecture-flow small { color: rgba(255,255,255,.35); font-size: 12px; line-height: 1.5; }
.architecture-points { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid rgba(255,255,255,.08); border-top: 0; }
.architecture-points > div { padding: 28px 30px 30px; border-right: 1px solid rgba(255,255,255,.08); }
.architecture-points > div:last-child { border-right: 0; }
.architecture-points b { display: block; margin-top: 14px; font-family: var(--display); font-size: 17px; }
.architecture-points p { margin-top: 7px; color: rgba(255,255,255,.38); font-size: 13px; line-height: 1.65; }

/* ============================================================
   HOW IT WORKS: numbered process, dark
   ============================================================ */
.process {
  background: #0B0D11; color: #fff;
  padding: 140px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.process .section-header h2 { color: #fff; }
.process .section-header p { color: rgba(255,255,255,.4); }

.process-steps {
  display: grid; grid-template-columns: repeat(4,1fr);
  margin-top: 64px; position: relative;
}
.process-steps::before {
  content: ''; position: absolute;
  top: 28px; left: 0; right: 0; height: 1px;
  background: rgba(255,255,255,.08);
}
.process-step { padding: 0 32px 0 0; }
.step-num {
  font-family: var(--display);
  font-size: 13px; font-weight: 700;
  color: var(--blue); margin-bottom: 40px;
  position: relative; z-index: 2;
  width: 56px; height: 56px;
  border: 1px solid rgba(0,64,255,.35);
  display: flex; align-items: center; justify-content: center;
  background: #0B0D11;
}
.process-step h3 {
  font-family: var(--display); font-size: 18px;
  font-weight: 700; letter-spacing: -.02em;
  color: #fff; margin-bottom: 12px;
}
.process-step p { font-size: 14px; color: rgba(255,255,255,.4); line-height: 1.7; }

/* ============================================================
   STACK
   ============================================================ */
.stack { padding: 140px 0; border-bottom: 1px solid var(--line); }
.stack-layout { display: grid; grid-template-columns: 330px 1fr; gap: 88px; align-items: start; }
.section-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; }
.stack-copy h2 { font-family: var(--display); font-size: clamp(38px, 3.5vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin-bottom: 20px; }
.stack-copy p { font-size: 16px; color: var(--muted); line-height: 1.7; }
.stack-note { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: #8a8c88; }
.stack-groups { display: flex; flex-direction: column; gap: 34px; }
.stack-group-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.stack-logos { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); }
.stack-logo { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 14px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.18); transition: background .15s, transform .15s; }
.stack-logo:nth-child(4n) { border-right: 0; }
.stack-logo:nth-last-child(-n+4) { border-bottom: 0; }
.stack-logo:hover { background: #fff; transform: translateY(-1px); }
.stack-logo img { flex: 0 0 auto; width: 19px; height: 19px; object-fit: contain; }

/* ============================================================
   ENGAGEMENT MODELS
   ============================================================ */
.engage {
  padding: 140px 0;
  border-bottom: 1px solid var(--line);
}
.engage-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; margin-top: 64px; background: var(--line);
}
.engage-card {
  background: var(--stone); padding: 48px 40px;
}
.engage-num {
  font-family: var(--display); font-size: 72px;
  font-weight: 800; color: var(--blue); opacity: .15;
  line-height: 1; letter-spacing: -.05em;
  margin-bottom: 32px;
}
.engage-card h3 {
  font-family: var(--display); font-size: 26px;
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px;
}
.engage-card p { font-size: 16px; color: var(--muted); line-height: 1.7; max-width: 400px; }
.engage-card-tag {
  display: inline-block; margin-top: 24px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  color: var(--blue); border: 1px solid rgba(0,64,255,.25);
  padding: 6px 14px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--dark); color: #fff;
  padding: 140px 0;
}

.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 100px; align-items: start;
}
.contact-copy h2 {
  font-family: var(--display);
  font-size: clamp(40px, 4vw, 64px);
  font-weight: 800; letter-spacing: -.04em;
  line-height: 1.05; color: #fff; margin-bottom: 20px;
}
.contact-copy p { font-size: 17px; color: rgba(255,255,255,.45); line-height: 1.7; margin-bottom: 32px; }
.contact-direct {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.5); font-size: 15px;
  text-decoration: none; transition: color .15s;
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 28px;
}
.contact-direct:hover { color: #fff; }
.contact-direct-email { color: #fff; font-weight: 600; }
.contact-direct span { color: rgba(255,255,255,.3); font-size: 13px; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff; padding: 13px 16px;
  font-family: var(--body); font-size: 15px;
  outline: none; transition: border-color .15s; width: 100%;
  appearance: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(255,255,255,.2); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--blue); }
.form-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.3)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; cursor: pointer; }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select option { background: #1a1f2a; color: #fff; }

.btn-submit {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--blue); color: #fff;
  border: none; padding: 16px 32px;
  font-family: var(--body); font-size: 15px; font-weight: 600;
  cursor: pointer; align-self: flex-start;
  transition: opacity .15s;
}
.btn-submit:hover { opacity: .88; }
.btn-submit:disabled { opacity: .5; cursor: default; }

.form-note { font-size: 13px; color: rgba(255,255,255,.25); }
.form-status { font-size: 14px; color: #22C55E; min-height: 20px; }

.field-error { display: none; font-size: 12px; color: #FF8C8C; line-height: 1.4; }
.field-error.visible { display: block; }
.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] { border-color: #FF6B6B; }
.form-status[data-state="error"] { color: #FF8C8C; }
.form-status[data-state="pending"] { color: rgba(255,255,255,.45); }
.menu:focus-visible, .nav a:focus-visible, .btn-primary:focus-visible, .btn-ghost:focus-visible, .work-expand:focus-visible, .btn-submit:focus-visible, .dialog-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
body.menu-open { overflow: hidden; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 40px 0;
}
.footer-grid {
  display: flex; align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  color: #fff; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 14px;
}
.footer-brand img { width: 28px; height: 28px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a {
  font-size: 13px; color: rgba(255,255,255,.35);
  text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,.25); }

/* ============================================================
   DIALOG
   ============================================================ */
dialog {
  background: #10141C; color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  padding: 48px; max-width: 560px; width: calc(100% - 48px);
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  margin: 0;
}
dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
.dialog-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: rgba(255,255,255,.4);
  font-size: 22px; cursor: pointer; line-height: 1; padding: 4px;
}
.dialog-close:hover { color: #fff; }
.dialog-type {
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 16px;
}
dialog h2 {
  font-family: var(--display); font-size: 26px;
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 16px;
}
dialog p { font-size: 15px; color: rgba(255,255,255,.5); line-height: 1.7; margin-bottom: 24px; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; }
.dialog-tags span {
  font-size: 11px; font-weight: 500;
  border: 1px solid rgba(255,255,255,.12);
  padding: 4px 10px; color: rgba(255,255,255,.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .hero-layout { grid-template-columns: 1fr; gap: 60px; }
  .hero-panel { max-width: 640px; }
  .problem-layout { grid-template-columns: 1fr; gap: 40px; }
  .section-header { grid-template-columns: 1fr; gap: 20px; }
  .stack-layout { grid-template-columns: 1fr; gap: 48px; }
  .contact-layout { grid-template-columns: 1fr; gap: 60px; }
}

@media (max-width: 900px) {
  .cap-grid { grid-template-columns: 1fr 1fr; }
  .cap-item:nth-child(2) { border-right: 0; }
  .cap-item:nth-child(3) { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .cap-item:nth-child(4) { border-top: 1px solid var(--line); border-right: 0; }
  .problem-signals { grid-template-columns: 1fr 1fr; }
  .problem-signal:nth-child(2) { border-right: 0; }
  .problem-signal:nth-child(3) { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .problem-signal:nth-child(4) { border-top: 1px solid var(--line); border-right: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; gap: 48px; }
  .process-steps::before { display: none; }
  .process-step { padding: 0; }
  .stack-logos { grid-template-columns: repeat(2,1fr); }
  .stack-logo:nth-child(2) { border-right: 0; }
  .stack-logo:nth-child(3) { border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
  .stack-logo:nth-child(4) { border-top: 1px solid var(--line); border-right: 0; }
  .engage-grid { grid-template-columns: 1fr; }
  .trustbar-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .menu { display: flex; }
  .cap-grid { grid-template-columns: 1fr; }
  .cap-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .cap-item:last-child { border-bottom: 0; }
  .problem-signals { grid-template-columns: 1fr; }
  .problem-signal { border-right: 0; border-bottom: 1px solid var(--line); }
  .problem-signal:last-child { border-bottom: 0; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .panel-metrics { grid-template-columns: 1fr; }
  .panel-metric { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .footer-grid { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   LAUNCH POLISH: accessibility, interaction and edge cases
   ============================================================ */
html { scroll-padding-top: 84px; }

body.menu-open { overflow: hidden; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

button { font: inherit; }

.panel-live.is-static {
  color: rgba(255,255,255,.38);
}
.panel-live.is-static::before {
  background: rgba(255,255,255,.28);
  animation: none;
}

.work-visual-badge.is-example {
  color: #93C5FD;
  background: rgba(147,197,253,.1);
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.field-error {
  display: none;
  font-size: 12px;
  line-height: 1.4;
  color: #FCA5A5;
  margin-top: 2px;
}
.field-error.visible { display: block; }

.form-field input[aria-invalid="true"],
.form-field select[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: #F87171;
}

.form-status[data-state="error"] { color: #FCA5A5; }
.form-status[data-state="pending"] { color: rgba(255,255,255,.55); }
.form-status[data-state="success"] { color: #4ADE80; }

.dialog-close {
  min-width: 40px;
  min-height: 40px;
  display: grid;
  place-items: center;
}

dialog {
  max-height: min(720px, calc(100svh - 48px));
  overflow: auto;
}

dialog .btn-primary {
  white-space: normal;
}

.trustbar-logos {
  scrollbar-width: none;
}
.trustbar-logos::-webkit-scrollbar { display: none; }

.panel-source img,
.trustbar-logos img,
.stack-logo img {
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .trustbar-logos {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }

  .hero {
    padding: 116px 0 64px;
  }

  h1 {
    font-size: clamp(46px, 13vw, 68px);
  }

  .hero-sub {
    font-size: 17px;
    margin-bottom: 32px;
  }

  .btn-primary,
  .btn-ghost,
  .btn-submit {
    min-height: 48px;
  }

  .btn-primary { padding-inline: 22px; }

  .hero-actions {
    gap: 18px;
  }

  .panel-header { padding: 16px 18px; }
  .panel-metric { padding: 16px 18px; }
  .panel-chart { padding: 18px; }
  .panel-sources { padding: 12px 18px; }

  .stack-logo {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .stack-logo:last-child { border-bottom: 0; }

  dialog {
    width: calc(100% - 32px);
    padding: 36px 24px 24px;
    max-height: calc(100svh - 32px);
  }

  .dialog-close {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 380px) {
  .hero-actions { align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { width: 100%; justify-content: center; }

  .funnel-step { gap: 7px; }
  .funnel-step strong { width: 30px; font-size: 12px; }
  .funnel-step span { width: 48px; font-size: 10px; }

  .stack-logo { padding-inline: 14px; }
}

/* ============================================================
   FINAL RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 1100px) {
  .hero-layout { gap: 52px; }
  .trustbar-inner { gap: 20px; }
  .trustbar-logos { justify-content: flex-start; }
  .stack-layout { grid-template-columns: 280px 1fr; gap: 48px; }
  .stack-logos { grid-template-columns: repeat(3,1fr); }
  .stack-logo:nth-child(4n) { border-right: 1px solid var(--line); }
  .stack-logo:nth-child(3n) { border-right: 0; }
  .stack-logo:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .stack-logo:nth-last-child(-n+3) { border-bottom: 0; }
  .architecture-feature-copy { padding: 42px; }
}
@media (max-width: 900px) {
  .hero-layout, .architecture-feature, .stack-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 118px; }
  .hero-architecture { max-width: 680px; width: 100%; margin-inline: auto; }
  .architecture-feature-visual { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); min-height: auto; }
  .architecture-points { grid-template-columns: 1fr; }
  .architecture-points > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .architecture-points > div:last-child { border-bottom: 0; }
  .stack-copy { max-width: 560px; }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .trustbar-inner { display: block; }
  .trustbar-label { display: block; margin-bottom: 12px; }
  .trustbar-logos { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 12px; }
  .hero { padding: 108px 0 54px; }
  .hero-actions { flex-wrap: wrap; }
  .architecture-caption { font-size: 8px; gap: 12px; }
  .architecture-feature-copy { padding: 32px 24px; }
  .architecture-feature-visual { padding: 16px; }
  .architecture-flow > div { grid-template-columns: 28px 84px 1fr; gap: 8px; }
  .architecture-flow small { font-size: 11px; }
  .stack-logos { grid-template-columns: repeat(2,1fr); }
  .stack-logo:nth-child(3n) { border-right: 1px solid var(--line); }
  .stack-logo:nth-child(2n) { border-right: 0; }
  .stack-logo:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .stack-logo:nth-last-child(-n+2) { border-bottom: 0; }
  .form-row { grid-template-columns: 1fr; }
  dialog { padding: 32px 24px; width: calc(100% - 28px); }
}
@media (max-width: 380px) {
  h1 { font-size: 44px; }
  .hero-sub { font-size: 17px; }
  .trustbar-logos { grid-template-columns: 1fr; }
}

.footer-social { display:flex; align-items:center; gap:7px; }
.footer-social img { display:block; opacity:.6; }
.footer-social:hover img { opacity:1; }

/* ============================================================
   HERO SCALE + MOBILE ART DIRECTION
   ============================================================ */
.hero > .wrap {
  width: min(1480px, calc(100% - 48px));
}
.hero-layout {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 54px;
}
.hero-copy { min-width: 0; }
.hero-architecture-desktop { min-width: 0; }
.architecture-frame { padding: 10px; }
.architecture-frame img { width: 100%; max-width: none; }
.mobile-architecture { display: none; }

@media (min-width: 1101px) {
  .hero-architecture-desktop { transform: translateX(8px); }
}

@media (max-width: 1100px) and (min-width: 641px) {
  .hero > .wrap { width: min(1000px, calc(100% - 48px)); }
  .hero-layout { grid-template-columns: 1fr; gap: 42px; }
  .hero-copy { max-width: 760px; }
  .hero-architecture-desktop { max-width: 900px; margin-inline: auto; }
}

@media (max-width: 640px) {
  .hero > .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .hero {
    min-height: auto;
    padding: 102px 0 48px;
  }
  .hero-layout { display: flex; flex-direction: column; gap: 28px; align-items: stretch; }
  .hero-copy { order: 1; }
  .hero-architecture-desktop { display: none; }
  .mobile-architecture {
    order: 2;
    display: block;
    position: relative;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(3,6,12,.68);
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
    overflow: hidden;
  }
  .mobile-architecture::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 48%, rgba(0,64,255,.1), transparent 35%),
      linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: auto, 24px 24px, 24px 24px;
  }
  .mobile-architecture > * { position: relative; z-index: 1; }
  .mobile-architecture-source,
  .mobile-architecture-outcomes {
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(10,14,22,.78);
    padding: 13px;
  }
  .mobile-flow-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255,255,255,.4);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
  }
  .mobile-logo-cloud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .mobile-logo-cloud span {
    min-height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 3px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
    color: rgba(255,255,255,.58);
    font-size: 8px;
    line-height: 1.1;
    text-align: center;
  }
  .mobile-logo-cloud img {
    width: 17px;
    height: 17px;
    object-fit: contain;
  }
  .mobile-logo-cloud .mobile-more {
    color: #8ab2ff;
    justify-content: center;
    flex-direction: row;
    font-size: 10px;
    font-weight: 600;
  }
  .mobile-flow-arrow {
    display: grid;
    place-items: center;
    height: 24px;
    color: var(--blue);
    font-size: 18px;
    line-height: 1;
  }
  .mobile-architecture-core {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(0,64,255,.5);
    background: linear-gradient(135deg, rgba(0,64,255,.12), rgba(0,64,255,.03));
    box-shadow: inset 0 0 30px rgba(0,64,255,.06);
  }
  .mobile-architecture-core img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }
  .mobile-architecture-core strong {
    display: block;
    color: #fff;
    font-family: var(--display);
    font-size: 14px;
    line-height: 1.2;
  }
  .mobile-architecture-core span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
    line-height: 1.4;
  }
  .mobile-architecture-outcomes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .mobile-architecture-outcomes span {
    padding: 9px 8px;
    border: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.62);
    font-size: 9px;
    line-height: 1.25;
  }
  h1 {
    font-size: clamp(44px, 12vw, 60px);
    line-height: .95;
    margin-bottom: 22px;
  }
  .hero-eyebrow { margin-bottom: 22px; }
  .hero-sub {
    font-size: 16px;
    line-height: 1.55;
    margin-bottom: 26px;
    max-width: 34rem;
  }
  .hero-actions {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    min-height: 46px;
  }
  .hero-actions .btn-primary { padding-inline: 18px; }
  .hero-actions .btn-ghost { padding-inline: 4px; }
}

@media (max-width: 380px) {
  .hero { padding-top: 94px; }
  h1 { font-size: 42px; }
  .hero-sub { font-size: 15px; }
  .hero-actions { align-items: stretch; }
  .hero-actions .btn-primary { flex: 1; }
  .hero-actions .btn-ghost { flex: 0 0 auto; }
  .mobile-logo-cloud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-architecture-outcomes { grid-template-columns: 1fr 1fr; }
}
