/* ==========================================================================
   Eneon Technologies — site styles
   Brand colours come from the Eneon logo: deep navy (#003D92), electric blue
   (#068CE3) and cyan (#0DBDF1). The visual language (navy, two-tone white/cyan
   headings, cyan ring icons, circuit traces) follows the Eneon service flyers.
   Dark is the default theme. Change tokens here, not in components.
   ========================================================================== */

:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Montserrat", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --brand-navy: #003d92;
  --brand-blue: #068ce3;
  --brand-cyan: #0dbdf1;
  --grad-brand: linear-gradient(120deg, #003d92 0%, #0668e1 55%, #0dbdf1 100%);

  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --ink: #0a1324;
  --ink-2: #475569;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --primary: #0559d4;
  --primary-soft: rgba(5, 89, 212, 0.08);
  --accent: #0789c4;
  --btn: #0559d4;
  --btn-hover: #0346ad;
  --btn-grad: linear-gradient(90deg, #0b74e5 0%, #0559d4 100%);
  --ring: #0a7fe0;
  --grad-text: linear-gradient(100deg, #003d92 0%, #0559d4 45%, #0789c4 100%);
  --grid-line: rgba(10, 19, 36, 0.05);
  --glow: rgba(13, 189, 241, 0.16);
  --header-bg: rgba(255, 255, 255, 0.82);
  --danger: #d92d3a;
  --success: #15803d;
  --shadow: 0 18px 40px -18px rgba(10, 19, 36, 0.22);
  --shadow-lg: 0 30px 60px -24px rgba(10, 19, 36, 0.3);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --header-h: 72px;
}

/* Dark tokens: the dark theme, plus sections that are always dark. */
html[data-theme="dark"],
.hero-home,
.section-dark,
.site-footer {
  --bg: #060d1f;
  --bg-alt: #081329;
  --surface: #0b1730;
  --surface-2: #10203d;
  --ink: #eaf1fb;
  --ink-2: #a9b8d0;
  --ink-3: #7f90ad;
  --line: rgba(120, 160, 230, 0.16);
  --line-2: rgba(120, 160, 230, 0.3);
  --primary: #2ec0ff;
  --primary-soft: rgba(30, 180, 255, 0.1);
  --accent: #22d3ff;
  --btn: #0b74e5;
  --btn-hover: #1a86f5;
  --btn-grad: linear-gradient(90deg, #18b4f5 0%, #0a6fe6 100%);
  --ring: #1ab8ff;
  --grad-text: linear-gradient(90deg, #22d3ff 0%, #1cb4ff 100%);
  --grid-line: rgba(120, 160, 230, 0.07);
  --glow: rgba(20, 170, 255, 0.2);
  --header-bg: rgba(6, 13, 31, 0.8);
  --danger: #ff6b72;
  --success: #4ade80;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.8);
}
html[data-theme="dark"] { color-scheme: dark; }
.hero-home, .section-dark, .site-footer { color: var(--ink); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
h1 em, h2 em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
::selection { background: rgba(13, 189, 241, 0.28); }
:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: 3px; border-radius: 4px; }

.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 200; left: 12px; top: -60px; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--btn); color: #fff; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Pages: index.html holds every page; only the active one is shown (see build-static-pages.mjs). */
.page { display: none; }
.page.active { display: block; }

/* ---------- Typography helpers ---------- */
.eyebrow, .label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font: 700 13px/1.3 var(--font-display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--primary);
}
.label { margin-bottom: 10px; font-size: 11px; letter-spacing: 0.18em; }
/* Short cyan bar under key titles, as on the flyers. */
.hero-home h1::after, .page-hero h1::after, .band-copy h2::after, .not-found h1::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 26px; border-radius: 2px; background: var(--accent); }
.lede, .hero-lede { font-size: 19px; line-height: 1.65; color: var(--ink-2); max-width: 640px; }

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-grad);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(24, 180, 245, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}
.button:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 14px 34px -10px rgba(24, 180, 245, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.button .i { width: 16px; height: 16px; transition: transform 0.2s; }
.button:hover .i:last-child { transform: translateX(3px); }
.button .i:first-child:not(:last-child) { width: 20px; height: 20px; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.button-ghost { background: transparent; filter: none; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.button-ghost:hover { background: var(--surface-2); border-color: var(--ink-3); box-shadow: none; }
.button-light { background: #fff; color: #06204a; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5); }
.button-light:hover { filter: none; background: #e8f4ff; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.55); }
.button[disabled] { opacity: 0.6; pointer-events: none; }
.button-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--primary); text-decoration: none; }
.text-link .i { width: 16px; height: 16px; transition: transform 0.2s; }
.text-link:hover .i { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -16px rgba(10, 19, 36, 0.25); }
.nav-wrap { height: var(--header-h); display: flex; align-items: center; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font: 800 19px/1 var(--font-display); letter-spacing: -0.02em; }
.brand-name span { margin-left: 5px; font-weight: 600; color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.site-nav ul a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav ul a.is-active { color: var(--primary); background: var(--primary-soft); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover, .menu-toggle:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.theme-toggle .i { grid-area: 1 / 1; }
html[data-theme="dark"] .theme-toggle .i-moon, html:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
.menu-toggle { display: none; }
.menu-toggle > span:not(.sr-only) { grid-area: 1 / 1; width: 16px; height: 1.75px; border-radius: 2px; background: currentColor; transition: transform 0.25s; }
.menu-toggle > span:nth-of-type(2) { transform: translateY(-3.5px); }
.menu-toggle > span:nth-of-type(3) { transform: translateY(3.5px); }
.menu-toggle[aria-expanded="true"] > span:nth-of-type(2) { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] > span:nth-of-type(3) { transform: rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-tight { padding-top: 64px; }
.pb-0 { padding-bottom: 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-dark { position: relative; overflow: hidden; background: radial-gradient(60% 80% at 100% 0%, rgba(6, 104, 225, 0.22), transparent 60%), radial-gradient(50% 70% at 0% 100%, rgba(13, 189, 241, 0.12), transparent 60%), #050b1c; }
.section-dark h2 { font-size: clamp(32px, 4vw, 50px); }
.section-dark p:not(.eyebrow) { color: var(--ink-2); }

.section-heading { margin-bottom: 56px; max-width: 760px; }
.section-heading h2, .split-feature h2 { font-size: clamp(32px, 4vw, 50px); }
.section-heading.split { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.section-heading.split > p, .split-feature p:not(.eyebrow) { font-size: 17px; color: var(--ink-2); }
.split-feature p:not(.eyebrow) { margin-bottom: 18px; }
.split-feature h2 { margin-bottom: 22px; }

/* Shared hero background: soft glow plus a fading engineering grid. */
.hero-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(55% 60% at 80% 30%, var(--glow), transparent 65%), radial-gradient(45% 55% at 5% 0%, rgba(6, 104, 225, 0.12), transparent 60%); }
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 35%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 35%, #000 25%, transparent 80%);
}

/* ---------- Home hero ---------- */
.hero-home { position: relative; overflow: hidden; background: #050b1c; }
.hero-home .hero-bg { background: radial-gradient(50% 60% at 78% 45%, rgba(13, 189, 241, 0.2), transparent 65%), radial-gradient(50% 60% at 0% 0%, rgba(6, 104, 225, 0.28), transparent 60%); }
.hero-layout { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; min-height: min(760px, calc(100vh - var(--header-h))); padding: 88px 0; }
.hero-home h1 { font-size: clamp(44px, 6vw, 78px); letter-spacing: -0.04em; line-height: 1.02; margin-bottom: 26px; }
.hero-lede { margin-bottom: 36px; }

.hero-visual { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; justify-self: end; }
.orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(94, 231, 250, 0.14); }
.orbit-outer { inset: 0; animation: spin 48s linear infinite; }
.orbit-outer::after { content: ""; position: absolute; top: 14%; left: 14%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--brand-cyan); box-shadow: 0 0 14px 3px rgba(13, 189, 241, 0.6); }
.orbit-mid { inset: 13%; border-color: rgba(74, 163, 255, 0.2); }
.orbit-inner { inset: 26%; border-style: dashed; border-color: rgba(94, 231, 250, 0.22); animation: spin 70s linear infinite reverse; }
.hero-glow { position: absolute; inset: 28%; border-radius: 50%; background: radial-gradient(circle, rgba(13, 189, 241, 0.45), rgba(6, 104, 225, 0.15) 55%, transparent 72%); filter: blur(18px); }
.hero-mark { position: absolute; left: 27%; top: 27%; width: 46%; height: auto; filter: drop-shadow(0 0 28px rgba(13, 189, 241, 0.45)); animation: float 7s ease-in-out infinite; }
.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 21, 39, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: #d6e6f8;
  white-space: nowrap;
  animation: float 8s ease-in-out infinite;
}
.chip .i { width: 16px; height: 16px; color: var(--accent); }
.chip-1 { top: 8%; left: 2%; animation-delay: -1s; }
.chip-2 { top: 20%; right: -4%; animation-delay: -3s; }
.chip-3 { top: 52%; left: -8%; animation-delay: -5s; }
.chip-4 { bottom: 4%; right: 10%; animation-delay: -2s; }
.chip-5 { top: 60%; right: -8%; animation-delay: -4s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 120px 0 88px; border-bottom: 1px solid var(--line); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 68px); letter-spacing: -0.04em; line-height: 1.04; margin-bottom: 24px; }
.compact-hero { padding: 96px 0 64px; }

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

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { font-size: 21px; margin: 22px 0 10px; }
.feature-card p { font-size: 15px; color: var(--ink-2); }

/* Icon in a glowing cyan ring, as on the flyers. */
.icon-tile { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid var(--ring); background: radial-gradient(circle, var(--primary-soft), transparent 70%); color: var(--ring); box-shadow: 0 0 18px -4px var(--glow), inset 0 0 12px -4px var(--glow); }
.icon-tile .i { width: 24px; height: 24px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 22px; font-size: 14px; font-weight: 600; color: var(--primary); }
.card-link .i { width: 15px; height: 15px; transition: transform 0.2s; }
.feature-card:hover .card-link .i { transform: translateX(4px); }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding-top: 26px; border-top: 1px solid var(--line-2); }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: var(--grad-brand); }
.step-num { font: 500 13px var(--font-mono); color: var(--primary); }
.steps h3 { font-size: 22px; margin: 14px 0 8px; }
.steps p { font-size: 15px; color: var(--ink-2); }

/* ---------- Dark feature / stats ---------- */
.work-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.work-feature h2 { margin-bottom: 22px; }
.work-feature p:not(.eyebrow) { font-size: 17px; margin-bottom: 32px; max-width: 520px; }
.stat-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 30px 28px; background: rgba(11, 21, 39, 0.92); }
.stat .i { width: 24px; height: 24px; color: var(--accent); margin-bottom: 14px; }
.stat b { font: 600 18px var(--font-display); letter-spacing: -0.02em; }
.stat span { font-size: 14px; color: var(--ink-2); }
.lead-dark { font-size: 18px; }

/* ---------- Split feature & roadmap ---------- */
.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.split-feature-top { align-items: start; }
.prose-block p { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose-block p + p { margin-top: 18px; }

.roadmap { position: relative; height: 320px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: radial-gradient(70% 90% at 15% 50%, var(--glow), transparent 70%), var(--bg-alt); }
.roadmap::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 40px 40px; }
.roadmap-track { position: absolute; top: 50%; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan) 50%, transparent 50%), repeating-linear-gradient(90deg, var(--line-2) 0 8px, transparent 8px 16px); }
.roadmap-node { position: absolute; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transform: translate(-50%, -14px); }
.roadmap-node:nth-child(2) { left: 18%; }
.roadmap-node:nth-child(3) { left: 82%; }
.roadmap-node::before { content: ""; order: -1; width: 28px; height: 28px; margin-bottom: 14px; border-radius: 50%; border: 2px dashed var(--line-2); background: var(--bg-alt); }
.roadmap-node.is-now::before { border: 0; background: var(--grad-brand); box-shadow: 0 0 0 8px rgba(13, 189, 241, 0.14), 0 0 24px rgba(13, 189, 241, 0.5); }
.roadmap-node span { font: 500 11px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.roadmap-node b { font: 600 16px var(--font-display); white-space: nowrap; }

/* ---------- CTA ---------- */
.cta-section { padding-top: 0; }
.section-alt + .cta-section, .section-dark + .cta-section { padding-top: 112px; }
.cta-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 64px;
  border-radius: var(--radius-lg);
  background: radial-gradient(60% 120% at 100% 0%, rgba(94, 231, 250, 0.35), transparent 60%), var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.cta-card > * { position: relative; z-index: 1; }
.cta-card .eyebrow { color: #c9f1ff; }
.cta-card .eyebrow::before { background: #fff; }
.cta-card h2 { font-size: clamp(28px, 3.2vw, 42px); max-width: 640px; }
.cta-card p:not(.eyebrow) { margin-top: 14px; max-width: 560px; color: rgba(255, 255, 255, 0.82); }
.cta-card .button { flex: none; }

/* ---------- Media (Cloudinary images & video) ---------- */
.media-frame { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--shadow); }
.media-frame img, .media-frame video { width: 100%; height: auto; }
.media-frame figcaption { padding: 14px 18px; font: 12px var(--font-mono); color: var(--ink-3); border-top: 1px solid var(--line); }

/* ---------- Services (flyer-style bands) ---------- */
.service-index { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service-index a { display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: transform 0.2s, border-color 0.2s; }
.service-index a:hover { transform: translateY(-3px); border-color: var(--ring); }
.service-index .icon-tile { width: 44px; height: 44px; margin-bottom: 8px; }
.service-index .icon-tile .i { width: 20px; height: 20px; }
.service-index small { font: 500 11px var(--font-mono); color: var(--ink-3); }
.service-index b { font: 700 14px/1.3 var(--font-display); }

.service-band { position: relative; overflow: hidden; }
.band-media { position: relative; margin: 0 0 56px; overflow: hidden; border-radius: var(--radius-lg); }
.band-media img { width: 100%; aspect-ratio: 21 / 8; object-fit: cover; }
.band-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--bg) 100%); }
.section-alt .band-media::after { background: linear-gradient(180deg, transparent 45%, var(--bg-alt) 100%); }
.band-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; }
.band-copy h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.06; }
.band-copy h2 em { display: block; }
.band-copy > p:not(.eyebrow) { margin: 28px 0 0; font-size: 18px; line-height: 1.7; color: var(--ink-2); max-width: 600px; }
.band-copy .tag-list { margin-top: 22px; }
.band-copy .button { margin-top: 34px; }
.band-side { position: relative; padding-left: 40px; border-left: 2px solid var(--accent); }
.ring-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.ring-list li { display: flex; align-items: center; gap: 20px; }
.ring-list .icon-tile { width: 60px; height: 60px; }
.ring-list .icon-tile .i { width: 26px; height: 26px; }
.ring-list h3 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.ring-list p { font-size: 15px; color: var(--ink-2); }
.band-signoff { display: flex; align-items: center; gap: 14px 24px; margin-top: 36px; }
.band-signoff span { display: inline-flex; align-items: center; gap: 8px; flex: none; font-weight: 600; }
.band-signoff span .i { width: 20px; height: 20px; color: var(--ink); }
.band-signoff b { padding-left: 24px; border-left: 1px solid var(--line-2); font: 700 12px/1.6 var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.hero-signoff { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-signoff b { letter-spacing: 0.16em; }

/* Circuit-trace corner decoration, as on the flyers. */
.circuit-deco {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 260px;
  height: 260px;
  pointer-events: none;
  opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 260' fill='none' stroke='%231a7fff' stroke-width='2'%3E%3Cpath d='M0 70h30l40 40v150'/%3E%3Cpath d='M0 100h20l34 34v126'/%3E%3Cpath d='M0 130h10l28 28v102'/%3E%3Cpath d='M0 40h46l52 52v40l24 24v104'/%3E%3Cpath d='M0 190h14l20 20v50'/%3E%3Ccircle cx='122' cy='156' r='5' fill='%23060d1f'/%3E%3Ccircle cx='30' cy='70' r='4' fill='%23060d1f'/%3E%3Ccircle cx='14' cy='190' r='4' fill='%23060d1f'/%3E%3C/svg%3E") no-repeat left bottom / contain;
}
.page-hero .circuit-deco { opacity: 0.35; width: 200px; height: 200px; }

/* Concept-to-deployment pipeline */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.pipeline::before { content: ""; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px; background: linear-gradient(90deg, var(--ring), var(--accent)); opacity: 0.6; }
.pipeline li { position: relative; }
.pipeline-node { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--ring); background: var(--bg-alt); color: var(--ring); font: 700 15px var(--font-display); box-shadow: 0 0 20px -4px var(--glow); }
.pipeline h3 { font-size: 19px; margin: 22px 0 8px; }
.pipeline p { font-size: 14px; color: var(--ink-2); }

/* Technology marquee */
.tech-strip { padding: 44px 0; border-block: 1px solid var(--line); overflow: hidden; }
.tech-label { margin-bottom: 22px; text-align: center; font: 700 12px var(--font-display); letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); }
.marquee { display: flex; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; flex: none; gap: 14px; margin: 0; padding: 0 7px; list-style: none; animation: marquee 38s linear infinite; }
.marquee-track li { padding: 10px 20px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font: 600 15px var(--font-display); color: var(--ink-2); white-space: nowrap; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

.more-link { margin-top: 32px; text-align: center; color: var(--ink-2); }
.more-link .text-link { margin-left: 6px; }

/* ---------- Projects ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-button { min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.filter-button:hover { color: var(--ink); border-color: var(--ink-3); }
.filter-button.is-selected { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.projects:not(:has(.project-card)) .filter-bar, .project-grid:not(:has(.project-card)), .product-grid:not(:has(.product-card)) { display: none; }
.projects:has(.project-card) .empty-state { display: none; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform 0.25s, box-shadow 0.25s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card.is-hidden { display: none; }
.project-media { position: relative; display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-media:hover img { transform: scale(1.04); }
.play-badge { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: rgba(5, 10, 20, 0.55); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform 0.25s, background-color 0.25s; }
.play-badge .i { width: 22px; height: 22px; margin-left: 3px; stroke: none; }
.project-media:hover .play-badge { transform: scale(1.08); background: var(--btn); }
.project-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.project-body h2 { font-size: 21px; margin-bottom: 10px; }
.project-body > p:not(.label) { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: auto 0 0; padding: 0; }
.tag-list li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font: 500 11px var(--font-mono); color: var(--ink-2); }

.empty-state { display: flex; gap: 24px; padding: 44px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: radial-gradient(60% 100% at 100% 0%, var(--glow), transparent 70%), var(--surface); }
.empty-state h2 { font-size: 28px; margin: 8px 0 12px; }
.empty-state p { max-width: 640px; color: var(--ink-2); }
.empty-state p + p { margin-top: 10px; }
.empty-state .button-row { margin-top: 28px; gap: 24px; }

/* ---------- Project case studies ---------- */
.project-body h2 a { color: inherit; text-decoration: none; }
.project-body h2 a:hover { color: var(--primary); }
.card-cta { margin-top: 20px; }
.project-body > p.project-client:not(.label) { margin: -4px 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
a.project-media { cursor: pointer; }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(60% 70% at 50% 45%, var(--glow), transparent 70%), linear-gradient(135deg, var(--surface-2), var(--bg-alt)); color: var(--ring); }
.media-fallback .i { width: 64px; height: 64px; stroke-width: 1.25; filter: drop-shadow(0 0 18px var(--glow)); }

.breadcrumb { margin-bottom: 28px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .i { width: 16px; height: 16px; }
.case-hero .lede { max-width: 760px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.case-meta dt { margin-bottom: 4px; font: 700 11px var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.case-meta dd { margin: 0; font-weight: 600; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.gallery:not(:has(.gallery-item)) { display: none; }
.gallery-item { position: relative; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); cursor: zoom-in; }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:has(.play-badge) { cursor: pointer; }
.case-hero + section .band-copy p + p { margin-top: 16px; }
.pipeline-4 { grid-template-columns: repeat(4, 1fr); }
/* Portrait media (phone photos/videos): uniform 4:5 tiles, 3 across. */
.gallery.gallery-portrait { grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; gap: 16px; }
.gallery-portrait .gallery-item, .gallery-portrait .gallery-item:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 72px; background: rgba(3, 6, 12, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: min(1120px, 100%); text-align: center; }
.lightbox-content img, .lightbox-content video { max-width: 100%; max-height: 78vh; margin: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); background: #000; }
.lightbox-figure figcaption { margin-top: 16px; font-size: 14px; color: #c6d2e3; }
.lightbox-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; transition: background-color 0.2s; }
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-btn .i { width: 22px; height: 22px; }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: calc(50% - 24px); }
.lightbox-next { right: 20px; top: calc(50% - 24px); }
.lightbox-btn[hidden] { display: none; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 24px; }
.product-card { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.product-visual { position: relative; min-height: 240px; background: var(--surface-2); }
.product-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product-body { display: flex; flex-direction: column; padding: 28px; }
.product-body h3 { font-size: 23px; margin-bottom: 10px; }
.product-body p:not(.label) { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.product-body .text-link { margin-top: auto; }
.badge { position: absolute; top: 14px; left: 14px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 500 11px var(--font-mono); letter-spacing: 0.04em; color: var(--primary); }
.badge-inline { position: static; align-self: flex-start; margin-top: 22px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.contact-details h2 { font-size: 32px; margin-bottom: 14px; }
.contact-details > p { color: var(--ink-2); }
.contact-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list small { display: block; font: 500 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.contact-list div > span { font-weight: 600; }
.contact-list a { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--primary); }
.next-steps { margin-top: 40px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.next-steps h3 { font-size: 17px; margin-bottom: 16px; }
.next-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.next-steps li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); }
.next-steps b { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font: 500 12px var(--font-mono); }

.inquiry-form { position: relative; padding: 40px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); }
.form-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.form-heading h2 { font-size: 24px; }
.form-heading p { font-size: 13px; color: var(--ink-3); }
.form-heading b, label b { color: var(--danger); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { padding: 12px 14px; resize: vertical; min-height: 150px; line-height: 1.55; }
::placeholder { color: var(--ink-3); opacity: 0.8; }
select { appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8ca4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.was-validated :invalid { border-color: var(--danger); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.form-status { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }

/* ---------- Prose & 404 ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 17px; color: var(--ink-2); }
.prose a { color: var(--primary); }

.not-found { position: relative; overflow: hidden; min-height: 72vh; display: flex; align-items: center; padding: 96px 0; }
.not-found .container { position: relative; }
.not-found h1 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 20px; }
.not-found .lede { margin-bottom: 34px; }
.error-code { font: 700 clamp(96px, 18vw, 200px)/0.85 var(--font-display); letter-spacing: -0.06em; margin-bottom: 24px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.9; }

/* ---------- Footer ---------- */
.site-footer { background: #040919; border-top: 1px solid var(--line); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 64px; }
.footer-intro .footer-tagline { margin-top: 18px; font: 700 12px var(--font-display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.footer-intro p { margin-top: 18px; max-width: 340px; font-size: 14px; color: var(--ink-2); }
.footer-contact { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.footer-contact .i { color: var(--accent); }
.footer-contact a:hover { color: var(--accent); }
.site-footer h2 { margin: 6px 0 18px; font: 500 12px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-links a { font-size: 14px; color: var(--ink-2); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.footer-bottom a { color: var(--ink-2); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  height: 60px;
  padding: 0 18px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: wa-pulse 2.6s ease-out infinite; pointer-events: none; }
.wa-float .i { width: 26px; height: 26px; }
.wa-label { max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: 15px; transition: max-width 0.3s ease, margin 0.3s ease; }
.wa-float:hover, .wa-float:focus-visible { background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(37, 211, 102, 0.7), 0 6px 14px rgba(0, 0, 0, 0.3); }
.wa-float:hover .wa-label, .wa-float:focus-visible .wa-label { max-width: 140px; margin-left: 10px; }
@keyframes wa-pulse { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
@media (max-width: 1360px) { .footer-bottom { padding-right: 84px; } }
@media (max-width: 640px) { .wa-float { right: 16px; bottom: 16px; height: 56px; padding: 0 15px; } }
@media print { .wa-float { display: none; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
  .pipeline-4 { grid-template-columns: repeat(2, 1fr); }
  .service-index { grid-template-columns: repeat(4, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .pipeline::before { display: none; }
  .band-grid { gap: 48px; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .product-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .chip-2 { right: 0; }
  .chip-3 { left: 0; }
  .chip-5 { right: -2%; }
}

@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .nav-actions { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0;
    padding: 12px 24px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(10, 19, 36, 0.35);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav ul a { padding: 12px 14px; font-size: 16px; border-radius: var(--radius-sm); }
  .nav-cta { min-height: 48px; }

  .hero-layout { grid-template-columns: 1fr; min-height: 0; padding: 72px 0 80px; gap: 40px; }
  .hero-visual { justify-self: center; max-width: 420px; }
  .section-heading.split, .split-feature, .work-feature, .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .section-heading.split { align-items: start; }
  .card-grid-3, .product-grid { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: 1fr; }
  .band-side { padding-left: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-intro { grid-column: 1 / -1; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 48px; }
  .section { padding: 88px 0; }
  .section-tight { padding-top: 56px; }
  .pb-0 { padding-bottom: 0; }
  .section-alt + .cta-section, .section-dark + .cta-section { padding-top: 88px; }
  .page-hero { padding: 88px 0 64px; }
}

@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 10px; }
  .gallery.gallery-portrait { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .pipeline-4 { grid-template-columns: 1fr; }
  .case-meta { gap: 16px 28px; }
  :root { --header-h: 64px; }
  .container { width: min(calc(100% - 32px), var(--container)); }
  .brand { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 17px; }
  .brand-name span { margin-left: 4px; }
  .site-nav { padding: 8px 16px 20px; }
  .hero-home h1 { font-size: clamp(38px, 11vw, 48px); }
  .lede, .hero-lede { font-size: 17px; }
  .hero-visual { max-width: 340px; }
  .chip { padding: 7px 11px; font-size: 11px; }
  .chip .i { width: 14px; height: 14px; }
  .chip-2 { right: -2%; }
  .chip-3 { left: -4%; }
  .chip-5 { top: 73%; right: -4%; }
  .button-row .button { flex: 1 1 auto; }
  .card-grid-3, .card-grid-4, .project-grid, .product-grid, .steps, .form-grid { grid-template-columns: 1fr; }
  .service-index { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .band-side { padding-left: 20px; }
  .ring-list .icon-tile { width: 52px; height: 52px; }
  .band-signoff { flex-wrap: wrap; }
  .band-signoff b { padding-left: 0; border-left: 0; flex-basis: 100%; }
  .band-copy .button { width: 100%; }
  .circuit-deco { width: 160px; height: 160px; }
  .eyebrow { letter-spacing: 0.22em; font-size: 12px; }
  .stat-panel { grid-template-columns: 1fr; }
  .roadmap { height: 260px; }
  .roadmap-node b { font-size: 14px; white-space: normal; max-width: 120px; }
  .cta-card { padding: 36px 24px; }
  .cta-card .button { width: 100%; }
  .empty-state { flex-direction: column; padding: 28px 22px; }
  .empty-state .button-row { gap: 18px; }
  .inquiry-form { padding: 26px 20px; }
  .form-heading { flex-direction: column; gap: 6px; }
  .form-footer .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; }
  .section { padding: 72px 0; }
  .section-tight { padding-top: 48px; }
  .pb-0 { padding-bottom: 0; }
  .section-alt + .cta-section, .section-dark + .cta-section { padding-top: 72px; }
  .page-hero { padding: 72px 0 56px; }
  /* Mobile viewer: media + caption on top, prev/next in their own row below, so nothing overlaps.
     Media height uses the visible viewport (dvh) so browser toolbars can't push it into the controls. */
  .lightbox { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "figure figure" "prev next"; column-gap: 16px; row-gap: 16px; height: 100vh; height: 100dvh; padding: 76px 12px max(16px, env(safe-area-inset-bottom)); }
  .lightbox-figure { grid-area: figure; align-self: center; display: flex; flex-direction: column; align-items: center; min-height: 0; max-height: 100%; }
  .lightbox-content img, .lightbox-content video { max-height: calc(100vh - 212px); max-height: calc(100dvh - 212px); }
  .lightbox-figure figcaption { margin-top: 12px; padding: 0 8px; line-height: 1.4; }
  .lightbox-prev, .lightbox-next { position: static; }
  .lightbox-prev { grid-area: prev; justify-self: end; }
  .lightbox-next { grid-area: next; justify-self: start; }
  .lightbox-close { top: 16px; right: 16px; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 15px; }
  .brand img { width: 30px; height: 30px; }
  .chip { display: none; }
}

@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; }
  .js .reveal { opacity: 1; transform: none; }
}
