/* ============================================================
   Techno Mesa — Design System
   Dark, premium, precision-engineering aesthetic
   ============================================================ */

:root {
  /* Base — cool near-black */
  --bg:        #07090c;
  --bg-1:      #0b0f14;
  --bg-2:      #10161d;
  --bg-3:      #161e27;
  --line:      rgba(150, 180, 200, 0.10);
  --line-2:    rgba(150, 180, 200, 0.18);
  --glass:     rgba(14, 20, 27, 0.72);

  /* Text */
  --text:      #e9eef3;
  --text-dim:  #9fb0bd;
  --text-faint:#5d6e7b;

  /* Accents — matched chroma/lightness, varied hue */
  --cyan:      oklch(0.80 0.12 215);
  --cyan-dim:  oklch(0.80 0.12 215 / 0.14);
  --green:     oklch(0.80 0.12 152);
  --green-dim: oklch(0.80 0.12 152 / 0.14);
  --amber:     oklch(0.82 0.12 72);
  --amber-dim: oklch(0.82 0.12 72 / 0.14);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --maxw: 1240px;
  --gut:  clamp(20px, 5vw, 64px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 232px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle global circuit-grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
section { position: relative; z-index: 1; }

.section-pad { padding-block: clamp(72px, 11vw, 140px); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--cyan);
  display: inline-block;
}

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 68px); }
.section-head h2 { font-size: clamp(32px, 5vw, 54px); margin: 18px 0 0; }
.section-head p { color: var(--text-dim); font-size: clamp(16px, 1.5vw, 19px); margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.04em;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  position: relative;
}
.btn-primary {
  background: var(--cyan);
  color: #04161c;
  font-weight: 600;
  box-shadow: 0 0 0 0 var(--cyan-dim);
}
.btn-primary:hover { box-shadow: 0 14px 40px -12px var(--cyan); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--text);
  background: rgba(255,255,255,0.015);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 216px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; white-space: nowrap; }
.brand .logo-mark { flex-shrink: 0; }
.nav-loc { white-space: nowrap; }
.brand .logo-mark {
  width: 180px; height: 180px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--bg-3), var(--bg-1));
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
}
.brand .logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand .logo-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  box-shadow: inset 0 0 12px -4px var(--cyan);
}
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 14px; color: var(--text-dim); padding: 8px 14px; border-radius: 8px;
  transition: color 0.2s, background 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--cyan); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-loc { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.02em; }

.menu-btn { display: none; width: 42px; height: 42px; border-radius: 9px; border: 1px solid var(--line-2); }
.menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--text); margin: 4px auto; transition: 0.3s var(--ease); }
.menu-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 216px 0 auto 0; z-index: 99;
  background: var(--glass); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 18px var(--gut) 30px;
  display: grid; gap: 4px;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: 0.35s var(--ease);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a { padding: 14px 6px; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.mobile-menu .btn { margin-top: 18px; }

/* ---------- Hero ---------- */
.hero { padding-top: 244px; padding-bottom: clamp(60px, 8vw, 96px); position: relative; }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 760px;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.hero-glow::before, .hero-glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.7;
}
.hero-glow::before {
  width: 620px; height: 520px; top: -8%; left: 28%;
  background: radial-gradient(circle, var(--cyan-dim), transparent 68%);
  animation: drift-a 16s var(--ease) infinite alternate;
}
.hero-glow::after {
  width: 480px; height: 440px; top: 6%; left: 56%;
  background: radial-gradient(circle, var(--green-dim), transparent 68%);
  animation: drift-b 19s var(--ease) infinite alternate;
}
@keyframes drift-a { to { transform: translate(80px, 40px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-70px, 30px) scale(0.9); } }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(38px, 5.6vw, 70px); margin: 22px 0 0; }
.hero h1 .accent {
  background: linear-gradient(115deg, var(--cyan) 10%, oklch(0.86 0.13 175) 55%, var(--green) 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { color: var(--text-dim); font-size: clamp(16px, 1.6vw, 20px); margin-top: 24px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.chip {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em;
  color: var(--text-dim); padding: 7px 13px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.015);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------- Hero Schematic ---------- */
.schematic {
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 120px -50px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.04);
}
.schematic::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.5; pointer-events: none;
}
.sch-flow { display: flex; flex-direction: column; gap: 0; position: relative; z-index: 1; }
.sch-node {
  background: rgba(8, 12, 16, 0.6);
  border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 16px 18px;
  position: relative;
}
.sch-node .nlabel { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sch-node .ntag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); }
.sch-node h4 { font-size: 17px; }
.sch-node .npill { font-family: var(--font-mono); font-size: 10px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-dim); }
.sch-node .ngrid { display: flex; flex-wrap: wrap; gap: 6px; }
.sch-node .scell {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim);
  padding: 5px 9px; border-radius: 6px; background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
}
.sch-node.edge { border-color: color-mix(in oklch, var(--green) 30%, transparent); }
.sch-node.edge .ntag, .sch-node.edge .nicon { color: var(--green); }
.sch-node.transport { border-color: color-mix(in oklch, var(--amber) 30%, transparent); }
.sch-node.transport .ntag, .sch-node.transport .nicon { color: var(--amber); }
.sch-node.cloud { border-color: color-mix(in oklch, var(--cyan) 30%, transparent); }
.sch-node.cloud .ntag, .sch-node.cloud .nicon { color: var(--cyan); }
.nicon { width: 16px; height: 16px; }

/* connector with traveling pulse */
.sch-conn { height: 38px; position: relative; display: grid; place-items: center; }
.sch-conn .track { width: 2px; height: 100%; background: var(--line-2); position: relative; overflow: hidden; border-radius: 2px; }
.sch-conn .track::after {
  content: ""; position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--cyan), transparent);
  animation: pulse-down 2.2s linear infinite;
}
.sch-conn.green .track::after { background: linear-gradient(to bottom, transparent, var(--green), transparent); }
.sch-conn.amber .track::after { background: linear-gradient(to bottom, transparent, var(--amber), transparent); }
.sch-conn .ctag { position: absolute; left: calc(50% + 16px); font-family: var(--font-mono); font-size: 9.5px; color: var(--text-faint); letter-spacing: 0.12em; white-space: nowrap; }
@keyframes pulse-down { 0% { top: -40%; } 100% { top: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .sch-conn .track::after { animation: none; opacity: 0.6; top: 30%; }
  * { scroll-behavior: auto; }
}

/* ---------- Capabilities marquee ---------- */
.caps { border-block: 1px solid var(--line); padding-block: 28px; overflow: hidden; }
.caps-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 18px; text-align: center; }
.marquee { display: flex; gap: 14px; width: max-content; animation: scroll-x 28s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee .chip { font-size: 13px; padding: 10px 18px; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(260px 260px at var(--mx, 30%) var(--my, 0%), var(--cyan-dim), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(140deg, color-mix(in oklch, var(--cyan) 40%, transparent), transparent 45%);
  -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.4s var(--ease); pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 28px 60px -40px rgba(0,0,0,0.9); }
.card:hover::after { opacity: 1; }
.card .knum { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.1em; }
.card h3 { font-size: 21px; margin: 16px 0 14px; }
.card .clist { list-style: none; display: grid; gap: 9px; }
.card .clist li { font-size: 14.5px; color: var(--text-dim); padding-left: 20px; position: relative; }
.card .clist li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px;
  border: 1px solid var(--cyan); border-radius: 2px; transform: rotate(45deg);
}
.card .cicon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(255,255,255,0.02); color: var(--cyan); }

/* ---------- Deliverables band ---------- */
.band { background: var(--bg-1); border-block: 1px solid var(--line); }
.deliv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.deliv-cell { background: var(--bg-1); padding: 26px; }
.deliv-cell h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-bottom: 16px; font-weight: 500; }
.deliv-cell ul { list-style: none; display: grid; gap: 8px; }
.deliv-cell li { font-size: 14px; color: var(--text-dim); }

/* ---------- Platforms feature row ---------- */
.feat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.feat {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1));
}
.feat .ftag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); }
.feat p { font-size: 14px; color: var(--text-dim); margin-top: 10px; }

/* ---------- Work ---------- */
.work-card { padding: 0; overflow: hidden; }
.work-vis { aspect-ratio: 16/10; position: relative; background: var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.work-vis svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.work-tag { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); background: rgba(7,9,12,0.7); padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.work-body { padding: 24px 26px 28px; }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; margin-top: 16px; }
.tl-item { padding: 0 22px; position: relative; }
.tl-item:not(:last-child)::after { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--cyan); background: var(--bg); position: relative; z-index: 1; }
.tl-week { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--cyan); margin: 18px 0 8px; }
.tl-item h4 { font-size: 18px; margin-bottom: 14px; }
.tl-item ul { list-style: none; display: grid; gap: 7px; }
.tl-item li { font-size: 13.5px; color: var(--text-dim); padding-left: 16px; position: relative; }
.tl-item li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; background: var(--text-faint); border-radius: 50%; }

/* ---------- Process steps ---------- */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); transition: padding-left 0.4s var(--ease); }
.step:hover { padding-left: 14px; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-num { font-family: var(--font-display); font-size: clamp(32px, 4vw, 52px); font-weight: 600; color: var(--text-faint); line-height: 1; transition: color 0.4s var(--ease); }
.step:hover .step-num { color: var(--cyan); }
.step-body h3 { font-size: 22px; margin-bottom: 6px; }
.step-body p { color: var(--text-dim); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  background: linear-gradient(150deg, var(--bg-2), var(--bg-1));
  position: relative; overflow: hidden; text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 50% 0%, var(--cyan-dim), transparent 70%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(28px, 4vw, 46px); position: relative; }
.cta-band p { color: var(--text-dim); margin: 16px auto 30px; max-width: 480px; position: relative; font-size: 17px; }
.cta-band .hero-cta { justify-content: center; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 4px; text-align: left; font-family: var(--font-display); font-size: clamp(17px, 2vw, 22px); font-weight: 500; color: var(--text); transition: color 0.3s; }
.faq-q:hover { color: var(--cyan); }
.faq-icon { flex-shrink: 0; width: 26px; height: 26px; position: relative; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--cyan); transition: transform 0.35s var(--ease); }
.faq-icon::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
.faq-item.open .faq-icon::after { transform: translateX(-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.45s var(--ease); }
.faq-a-inner { padding: 0 4px 28px; color: var(--text-dim); max-width: 760px; font-size: 16px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 5vw, 64px); }
.contact-info { display: grid; gap: 8px; align-content: start; }
.info-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.info-row .ilabel { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.info-row .ival { font-size: 15.5px; color: var(--text); }
.info-row .ival a:hover { color: var(--cyan); }

.form { display: grid; gap: 16px; background: linear-gradient(165deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 36px); }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--text);
  background: rgba(7,9,12,0.6); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color 0.25s, box-shadow 0.25s; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.field textarea { resize: vertical; min-height: 110px; }
.field.error input, .field.error textarea { border-color: oklch(0.7 0.16 25); }
.field .err-msg { font-family: var(--font-mono); font-size: 11px; color: oklch(0.75 0.16 25); display: none; }
.field.error .err-msg { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Honeypot — visually hidden, off-screen */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Cloudflare Turnstile */
.cf-turnstile { min-height: 65px; margin-top: 2px; }

/* Flash messages (server redirect ?ok / ?err) */
.form-flash {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: var(--radius-sm);
  margin-bottom: 28px; font-size: 15px;
  border: 1px solid var(--line-2);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.form-flash.dismiss { opacity: 0; transform: translateY(-8px); }
.form-flash .ff-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; font-weight: 600;
}
.form-flash.ok { background: var(--green-dim); border-color: color-mix(in oklch, var(--green) 40%, transparent); color: var(--text); }
.form-flash.ok .ff-icon { background: var(--green); color: #04160d; }
.form-flash.err { background: oklch(0.7 0.16 25 / 0.14); border-color: oklch(0.7 0.16 25 / 0.45); color: var(--text); }
.form-flash.err .ff-icon { background: oklch(0.7 0.16 25); color: #1a0606; }
.form-success {
  display: none; text-align: center; padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .sicon { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--green); color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; }
.form-success h3 { font-size: 22px; margin-bottom: 8px; }
.form-success p { color: var(--text-dim); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-1); padding-block: 64px 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 18px; font-weight: 500; }
.footer ul { list-style: none; display: grid; gap: 11px; }
.footer ul a { font-size: 14px; color: var(--text-dim); transition: color 0.2s; }
.footer ul a:hover { color: var(--cyan); }
.footer-brand p { color: var(--text-dim); font-size: 14px; margin-top: 16px; max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.footer-bottom p { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .deliv-grid, .timeline { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 980px) {
  .nav-links, .nav-loc { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 860px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .feat-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 6px; }
  .tl-item:not(:last-child)::after { display: none; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4, .deliv-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   Refinement layer — texture, depth, micro-interactions
   ============================================================ */

/* Fine film grain for depth */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 200;
  width: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--green), var(--cyan) 55%, var(--amber));
  box-shadow: 0 0 12px var(--cyan);
}

/* Primary button sheen */
.btn-primary { overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); transition: none;
}
.btn-primary:hover::before { animation: sheen 0.8s var(--ease); }
@keyframes sheen { to { left: 130%; } }

/* Marquee edge fade */
.marquee-mask {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  overflow: hidden;
}

/* Schematic telemetry header */
.sch-head {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 16px; position: relative; z-index: 1;
}
.sch-leds { display: flex; gap: 6px; }
.sch-leds span { width: 9px; height: 9px; border-radius: 50%; opacity: 0.9; }
.sch-leds span:nth-child(1) { background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2.4s steps(1) infinite; }
.sch-leds span:nth-child(2) { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.sch-leds span:nth-child(3) { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.25; } }
.sch-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-dim); }
.sch-eq { margin-left: auto; display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.sch-eq span { width: 3px; background: var(--cyan); border-radius: 2px; opacity: 0.85; animation: eq 1.1s var(--ease) infinite; }
.sch-eq span:nth-child(2) { animation-delay: 0.15s; background: var(--green); }
.sch-eq span:nth-child(3) { animation-delay: 0.3s; }
.sch-eq span:nth-child(4) { animation-delay: 0.45s; background: var(--green); }
.sch-eq span:nth-child(5) { animation-delay: 0.6s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 18px; } }

/* Section index marker in eyebrow */
.eyebrow .idx { color: var(--text-faint); margin-left: 2px; }

/* Hero — always visible; motion comes from glow drift + schematic telemetry */
.hero-copy > * { opacity: 1; transform: none; }
.schematic { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-glow::before, .hero-glow::after, .sch-eq span, .sch-leds span { animation: none; }
}
