/* METRIE GP — editorial studio */

:root {
  --bg: #f6f2e8;
  --paper: #fbf8ef;
  --ink: #191816;
  --ink-2: #3a3833;
  --ink-dim: #7a766a;
  --line: rgba(25, 24, 22, 0.12);
  --line-soft: rgba(25, 24, 22, 0.06);
  --dark: #141311;
  --accent: #3a5a48;
  --accent-soft: #d9dfc9;
}

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

html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

img { max-width: 100%; display: block; }

/* TOP NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 24px 48px;
  mix-blend-mode: normal;
  transition: background 0.3s, border-color 0.3s;
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(246, 242, 232, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  z-index: -1;
  opacity: 1;
  transition: background 0.3s;
}
.nav.scrolled::before { background: rgba(246, 242, 232, 0.88); }
.nav.scrolled { border-bottom: 1px solid var(--line-soft); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1480px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-text {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo-text em {
  font-style: italic;
  color: var(--ink-dim);
  font-size: 14px;
  margin-left: 6px;
  letter-spacing: 0;
}
.nav nav { display: flex; gap: 38px; }
.nav nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}
.nav nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav nav a:hover { color: var(--ink); }
.nav nav a:hover::after { transform: scaleX(1); }

.nav-cta {
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.2s;
}
.nav-cta::after { content: '→'; }
.nav-cta:hover { gap: 14px; }

/* Right-side nav cluster: keeps .nav-inner at 3 children so space-between
   distribution (logo · links · actions) is unaffected by the toggle. */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Light / dark theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { display: none; }
html[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
html[data-theme='light'] .theme-toggle .icon-moon { display: block; }

/* SECTION INDICATOR (sticky left) */
.toc {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.toc a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.5;
  transition: opacity 0.25s, color 0.25s;
}
.toc a::before {
  content: '';
  width: 12px;
  height: 1px;
  background: currentColor;
  transition: width 0.25s, background 0.25s;
}
.toc a:hover, .toc a.active {
  opacity: 1;
  color: var(--ink);
}
.toc a.active::before {
  width: 28px;
  background: var(--ink);
}

/* ============================================================
   IMMERSIVE HOME HERO — full viewport, animation as backdrop
   ============================================================ */
body.page-immersive {
  background: #020807;
  overflow: hidden;
}
body.page-immersive main { overflow: hidden; height: 100vh; }

.hero-immersive {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  color: #eef6f0;
}
.hero-immersive .hero-eyebrow { margin-bottom: 28px; font-size: 10px; }
.hero-immersive h1.display {
  font-size: clamp(38px, 4.4vw, 64px);
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero-immersive .hero-lede {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 36px;
  max-width: 420px;
}
.hero-immersive .hero-cta { margin-bottom: 50px; gap: 24px; }
.hero-immersive .btn-primary { padding: 14px 24px; font-size: 13px; }
.hero-immersive .btn-text { font-size: 13px; }
.hero-immersive .hero-meta-grid {
  gap: 44px;
  padding-top: 28px;
  max-width: 500px;
}
.hero-immersive .hero-meta-grid .k { font-size: 9px; }
.hero-immersive .hero-meta-grid .v { font-size: 19px; }
.hero-immersive #scene-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  z-index: 0;
  box-shadow: none;
  background: transparent;
}
.hero-immersive #scene-container::after {
  /* Strong left-column darkening so sonar points don't fight hero text */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 90% at 22% 50%, rgba(1, 6, 10, 0.78) 0%, rgba(1, 6, 10, 0.35) 40%, rgba(1, 6, 10, 0) 65%),
    linear-gradient(to right, rgba(1, 6, 10, 0.7) 0%, rgba(1, 6, 10, 0.25) 38%, rgba(1, 6, 10, 0) 55%),
    linear-gradient(to bottom, rgba(1, 6, 10, 0.45) 0%, rgba(1, 6, 10, 0) 25%);
  z-index: 2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 120px 64px 80px 96px;
  pointer-events: none;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.hero-overlay::-webkit-scrollbar { display: none; }
/* When content is taller than viewport, anchor it from top (no overflow clipping) */
@media (max-height: 820px) {
  .hero-overlay { align-items: flex-start; }
}
.hero-overlay .hero-content {
  pointer-events: auto;
  max-width: 560px;
  position: relative;
}
.hero-overlay .hero-content::before {
  /* Soft glass plate behind text — kills remaining point-cloud noise */
  content: '';
  position: absolute;
  inset: -36px -56px -40px -48px;
  background: radial-gradient(ellipse at 30% 45%, rgba(2, 10, 14, 0.78) 0%, rgba(2, 10, 14, 0.55) 55%, rgba(2, 10, 14, 0) 85%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
  pointer-events: none;
  border-radius: 4px;
}
.hero-immersive .hero-eyebrow {
  color: rgba(184, 255, 216, 0.7);
}
.hero-immersive .hero-eyebrow::before,
.hero-immersive .hero-eyebrow::after {
  background: rgba(184, 255, 216, 0.35);
}
.hero-immersive h1.display { color: #f0fff4; }
.hero-immersive h1.display em { color: rgba(184, 255, 216, 0.75); }
.hero-immersive h1.display .thin { color: #40ff88; }
.hero-immersive .hero-lede { color: rgba(232, 248, 238, 0.82); }
.hero-immersive .hero-lede strong { color: #f0fff4; }
.hero-immersive .hero-meta-grid {
  border-top: 1px solid rgba(184, 255, 216, 0.18);
}
.hero-immersive .hero-meta-grid .k { color: rgba(184, 255, 216, 0.55); }
.hero-immersive .hero-meta-grid .v { color: #f0fff4; }
.hero-immersive .btn-primary {
  background: #40ff88;
  color: #02140a;
}
.hero-immersive .btn-primary:hover { background: #80ffaa; }
.hero-immersive .btn-text {
  color: #eef6f0;
  border-bottom-color: rgba(238, 246, 240, 0.6);
}
.hero-nav-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.55);
  pointer-events: none;
  animation: sc-fadeHint 6s ease-out 1.5s forwards;
  opacity: 0;
}

/* ============================================================
   CONTENT PAGES — dark sonar palette (matches immersive hero)
   ============================================================ */
html[data-theme="dark"] body.page-content {
  /* Override the editorial light palette with the sonar-dark one */
  --bg: #020807;
  --paper: #061510;
  --ink: #eef6f0;
  --ink-2: rgba(238, 246, 240, 0.80);
  --ink-dim: rgba(184, 255, 216, 0.55);
  --line: rgba(184, 255, 216, 0.14);
  --line-soft: rgba(184, 255, 216, 0.06);
  --dark: #000;
  --accent: #40ff88;
  --accent-soft: rgba(64, 255, 136, 0.12);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(10, 40, 28, 0.6) 0%, rgba(2, 8, 7, 0) 60%),
    #020807;
  color: var(--ink);
}
html[data-theme="dark"] body.page-content ::selection { background: var(--accent); color: #02140a; }

/* Dark theme edge cases — neutralize hardcoded light backgrounds */
html[data-theme="dark"] body.page-content .instrument-photo .caption {
  background: rgba(6, 21, 16, 0.8);
  color: var(--ink-dim);
}
html[data-theme="dark"] body.page-content .instrument-photo {
  background: radial-gradient(ellipse at 50% 55%, rgba(10, 40, 28, 0.4) 0%, #020807 70%);
  border: 1px solid var(--line);
}
html[data-theme="dark"] body.page-content .instrument-photo img { filter: contrast(1.08) saturate(1.1) brightness(1.05); }
html[data-theme="dark"] body.page-content .contact-form input,
html[data-theme="dark"] body.page-content .contact-form textarea {
  background: rgba(6, 21, 16, 0.6);
  color: var(--ink);
  border-color: rgba(184, 255, 216, 0.2);
}
html[data-theme="dark"] body.page-content .contact-form input::placeholder,
html[data-theme="dark"] body.page-content .contact-form textarea::placeholder {
  color: rgba(184, 255, 216, 0.35);
}
html[data-theme="dark"] body.page-content .contact-form input:focus,
html[data-theme="dark"] body.page-content .contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(6, 21, 16, 0.9);
}
html[data-theme="dark"] body.page-content .contact-card {
  background: linear-gradient(145deg, rgba(10, 40, 28, 0.3) 0%, rgba(6, 21, 16, 0.8) 100%);
  border: 1px solid var(--line);
}
html[data-theme="dark"] body.page-content .perf-num {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
html[data-theme="dark"] body.page-content .service-row {
  border-top: 1px solid var(--line);
  transition: background 0.3s;
}
html[data-theme="dark"] body.page-content .service-row:hover {
  background: rgba(64, 255, 136, 0.03);
}
html[data-theme="dark"] body.page-content .pill {
  background: rgba(64, 255, 136, 0.06);
  border: 1px solid rgba(64, 255, 136, 0.18);
  color: var(--ink);
}
html[data-theme="dark"] body.page-content .process-step {
  border-top: 1px solid var(--line);
}
html[data-theme="dark"] body.page-content .btn-primary {
  background: var(--accent);
  color: #02140a;
}
html[data-theme="dark"] body.page-content .btn-primary:hover {
  background: #80ffaa;
}
html[data-theme="dark"] body.page-content .btn-text {
  color: var(--ink);
  border-bottom-color: rgba(238, 246, 240, 0.5);
}
html[data-theme="dark"] body.page-content .btn-text:hover { border-bottom-color: var(--accent); color: var(--accent); }
html[data-theme="dark"] body.page-content footer {
  background: #010504;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
html[data-theme="dark"] body.page-content .footer-grid a:hover { color: var(--accent); }
html[data-theme="dark"] body.page-content .direct-link {
  border-color: var(--line);
}
html[data-theme="dark"] body.page-content .direct-link:hover { border-color: var(--accent); }
html[data-theme="dark"] body.page-content .direct-k { color: var(--ink-dim); }
html[data-theme="dark"] body.page-content .direct-v { color: var(--ink); }
html[data-theme="dark"] body.page-content .contact-direct .direct-label { color: var(--ink-dim); }
html[data-theme="dark"] body.page-content .form-trust {
  color: var(--ink-dim);
  border-top-color: var(--line-soft);
}
html[data-theme="dark"] body.page-content .form-trust strong { color: var(--ink); }

/* Dark nav for content pages too (unified look with hero) */
html[data-theme="dark"] body.page-content .nav { color: var(--ink); border-bottom: 1px solid rgba(184, 255, 216, 0.06); }
html[data-theme="dark"] body.page-content .nav::before {
  background: rgba(2, 10, 14, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
html[data-theme="dark"] body.page-content .nav.scrolled::before { background: rgba(2, 10, 14, 0.82); }
html[data-theme="dark"] body.page-content .nav.scrolled { border-bottom-color: rgba(184, 255, 216, 0.14); }
html[data-theme="dark"] body.page-content .logo { color: var(--ink); }
html[data-theme="dark"] body.page-content .logo-text em { color: var(--ink-dim); }
html[data-theme="dark"] body.page-content .nav nav a { color: rgba(238, 246, 240, 0.72); }
html[data-theme="dark"] body.page-content .nav nav a:hover,
html[data-theme="dark"] body.page-content .nav nav a.active { color: var(--ink); }
html[data-theme="dark"] body.page-content .nav nav a::after { background: var(--accent); }
html[data-theme="dark"] body.page-content .nav-cta { color: var(--ink); border-bottom-color: rgba(238, 246, 240, 0.5); }
html[data-theme="dark"] body.page-content .nav-cta.active { color: var(--accent); border-bottom-color: var(--accent); }

.page-main {
  min-height: 100vh;
  padding-top: 84px;
}

/* Page banner — abstract gradient + point-cloud dot pattern + optional image */
.page-banner {
  position: relative;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  height: 180px;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, #0a3020 0%, #020807 70%);
  isolation: isolate;
}
.page-banner::before {
  /* Faint point-cloud lattice */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(64, 255, 136, 0.18) 0%, transparent 35%),
    radial-gradient(circle at 75% 65%, rgba(32, 255, 96, 0.14) 0%, transparent 40%),
    repeating-radial-gradient(circle at 50% 50%, rgba(184, 255, 216, 0.08) 0 1px, transparent 1px 22px);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(2, 8, 7, 0.2) 0%, rgba(2, 8, 7, 0.6) 60%, rgba(2, 8, 7, 1) 100%);
  z-index: 3;
  pointer-events: none;
}
.page-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(1) contrast(1.1) brightness(0.75);
  mix-blend-mode: lighten;
  z-index: 1;
}
.page-banner .banner-brackets {
  position: absolute;
  inset: 18px;
  pointer-events: none;
  z-index: 4;
}
.page-banner .banner-brackets::before,
.page-banner .banner-brackets::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border-color: rgba(200, 215, 230, 0.3);
  border-style: solid;
  border-width: 0;
}
.page-banner .banner-brackets::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.page-banner .banner-brackets::after { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.page-hero {
  padding: 36px 48px 32px;
  max-width: 1480px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
}
.page-hero .block { padding: 0; max-width: 960px; }
.page-hero .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.page-hero .tag::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--ink-dim);
}
.page-title {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 24px;
}
.page-title em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.page-lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.6;
}

.page-cta-block { padding-top: 40px !important; padding-bottom: 120px !important; }
.page-cta {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 48px;
  background: linear-gradient(135deg, rgba(10, 40, 28, 0.5), rgba(6, 21, 16, 0.8));
  border: 1px solid rgba(64, 255, 136, 0.18);
  position: relative;
}
.page-cta::before,
.page-cta::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid rgba(64, 255, 136, 0.45);
}
.page-cta::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.page-cta::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.page-cta h2 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
}
.page-cta p {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 28px;
}

/* ============================================================
   Service illustrations (inline SVG)
   ============================================================ */
.service-illus {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 20px;
}
.service-illus svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   Scan-to-BIM Guadeloupe feature block
   ============================================================ */
.sb-guadeloupe {
  max-width: 1480px;
  margin: 0 auto;
  padding: 60px 48px 40px;
}
.sb-guadeloupe-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  padding: 64px 56px;
  background: linear-gradient(145deg, rgba(10, 40, 28, 0.55) 0%, rgba(6, 21, 16, 0.8) 100%);
  border: 1px solid rgba(64, 255, 136, 0.2);
  position: relative;
  overflow: hidden;
}
.sb-guadeloupe-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(64, 255, 136, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(32, 255, 96, 0.06) 0%, transparent 40%);
  pointer-events: none;
}
.sb-guadeloupe-card > * { position: relative; z-index: 1; }
.sb-gp-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.sb-gp-tag::before {
  content: '◉';
  font-size: 8px;
  color: var(--accent);
}
.sb-gp-title {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--ink);
}
.sb-gp-title em { font-style: normal; color: var(--ink-dim); }
.sb-gp-text p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.sb-gp-text strong { color: var(--ink); font-weight: 500; }
.sb-gp-usecases h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(184, 255, 216, 0.15);
}
.sb-gp-usecase {
  padding: 18px 0;
  border-bottom: 1px solid rgba(184, 255, 216, 0.08);
}
.sb-gp-usecase:last-child { border-bottom: none; }
.sb-gp-usecase .uc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 6px;
}
.sb-gp-usecase h5 {
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}
.sb-gp-usecase p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
@media (max-width: 1080px) {
  .sb-guadeloupe { padding: 40px 24px; }
  .sb-guadeloupe-card {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 28px;
  }
}

/* Active nav state */
.nav nav a.active { color: var(--ink); }
.nav nav a.active::after { transform: scaleX(1); }
.nav-cta.active { color: var(--accent); }

/* ============================================================
   DARK NAV VARIANT (overlay on immersive hero)
   ============================================================ */
.nav-dark { color: #eef6f0; }
.nav-dark .logo { color: #eef6f0; }
.nav-dark .logo-text em { color: rgba(184, 255, 216, 0.6); }
.nav-dark nav a { color: rgba(238, 246, 240, 0.75); }
.nav-dark nav a:hover { color: #f0fff4; }
.nav-dark nav a::after { background: #40ff88; }
.nav-dark .nav-cta {
  color: #eef6f0;
  border-bottom-color: rgba(238, 246, 240, 0.6);
}
.nav-dark::before {
  background: rgba(2, 10, 14, 0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  opacity: 1;
}
.nav-dark.scrolled::before { background: rgba(2, 10, 14, 0.78); }
.nav-dark { border-bottom: 1px solid rgba(184, 255, 216, 0.06); }
.nav-dark.scrolled { border-bottom-color: rgba(184, 255, 216, 0.14); }

/* ============================================================
   LEGACY (single-page) HERO STYLES — kept as fallback shell
   ============================================================ */
#hero.legacy {
  min-height: 100vh;
  padding: 180px 48px 80px 120px;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero-content { z-index: 2; }

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  flex: 0 0 40px;
  height: 1px;
  background: var(--ink-dim);
}
.hero-eyebrow::after { flex: 1; }

h1.display {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(52px, 6.2vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: 36px;
  color: var(--ink);
}
h1.display em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-dim);
}
h1.display .thin {
  display: inline;
  font-weight: 500;
  font-size: 1em;
  color: var(--accent);
  letter-spacing: -0.045em;
}

.hero-lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: 52px;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  padding: 18px 30px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s, padding 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary::after { content: '→'; transition: transform 0.2s; }
.btn-primary:hover { background: var(--accent); }
.btn-primary:hover::after { transform: translateX(4px); }

.btn-text {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.2s;
}

.btn-text:hover { gap: 14px; }

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}
.hero-meta-grid > div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-grid .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-meta-grid .v {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* 3D SCENE — sonar-green stage embedded in the light hero */
#scene-container {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 560px;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 45%, #051a15 0%, #01060a 72%);
  overflow: hidden;
  box-shadow:
    0 40px 120px -40px rgba(10, 40, 28, 0.45),
    inset 0 0 0 1px rgba(120, 180, 150, 0.08);
  isolation: isolate;
}
#scanner-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#three-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#three-canvas:active { cursor: grabbing; }

/* Corner brackets */
.sc-bracket {
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(200, 215, 230, 0.25);
  border-style: solid;
  border-width: 0;
  z-index: 3;
  pointer-events: none;
}
.sc-bracket.tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.sc-bracket.tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.sc-bracket.bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.sc-bracket.br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }

/* Sonar HUD (scoped to #scene-container) */
.sc-hud {
  position: absolute;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a7a68;
  z-index: 4;
}
.sc-hud .sc-row { display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.sc-hud .sc-label { color: #4a7a68; }
.sc-hud .sc-value { color: #b8ffd8; font-weight: 500; }
.sc-hud .sc-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #1aff80;
  box-shadow: 0 0 8px #1aff80;
  animation: sc-pulse 1.2s ease-in-out infinite;
}
@keyframes sc-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.sc-hud-tl { top: 22px; left: 22px; }
.sc-hud-tr { top: 22px; right: 22px; text-align: right; }
.sc-hud-tr .sc-row { justify-content: flex-end; }
.sc-hud-bl { bottom: 22px; left: 22px; }
.sc-hud-br { bottom: 46px; right: 46px; text-align: right; min-width: 180px; }
.sc-hud-br .sc-row { justify-content: flex-end; }

.sc-title {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: #b8ffd8;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.sc-subtitle {
  color: #4a7a68;
  font-size: 9px;
  letter-spacing: 0.15em;
}

/* Drag/zoom hint */
#scanner-hint {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a7a68;
  pointer-events: none;
  opacity: 0;
  animation: sc-fadeHint 6s ease-out 1.5s forwards;
  z-index: 4;
}
.hint-pulse {
  width: 6px; height: 6px;
  background: #1aff80;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(26, 255, 128, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(26, 255, 128, 0.5); }
  70% { box-shadow: 0 0 0 14px rgba(26, 255, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(26, 255, 128, 0); }
}
@keyframes sc-fadeHint {
  0% { opacity: 0; }
  20% { opacity: 0.7; }
  80% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* RULE (divider) */
.rule {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 48px;
}
.rule hr {
  border: 0;
  height: 1px;
  background: var(--line);
}

/* SECTION FRAME */
section.block {
  max-width: 1480px;
  margin: 0 auto;
  padding: 80px 48px;
}

.section-kicker {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 100px;
  align-items: baseline;
}
.section-kicker .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 14px;
}
.section-kicker h2 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.section-kicker h2 em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.section-kicker .sub {
  margin-top: 24px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 540px;
  line-height: 1.6;
}

/* INSTRUMENT — large product section */
#instrument {
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
#instrument .block { padding: 40px 48px 100px; }

.instrument-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.instrument-photo {
  position: relative;
  aspect-ratio: 4/5;
  background:
    radial-gradient(ellipse at 50% 58%, #ffffff 0%, #ebe6d8 55%, #dcd5c0 100%);
  overflow: hidden;
}
.instrument-photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 8% 12% 6%;
  filter: contrast(1.05) saturate(1.05);
  mix-blend-mode: multiply;
}
.instrument-photo .caption {
  position: absolute;
  bottom: 20px; left: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(251, 248, 239, 0.8);
  padding: 6px 10px;
  z-index: 3;
}

/* ============================================================
   3D scanner viewer (instrument.html) — replaces the static image
   ============================================================ */
.scanner-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(20, 48, 36, 0.95) 0%, rgba(6, 18, 14, 1) 55%, rgba(2, 8, 7, 1) 100%);
  overflow: hidden;
  cursor: grab;
}
.scanner-viewer:active { cursor: grabbing; }
.scanner-viewer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Sonar point-lattice ground plane suggestion */
.scanner-viewer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 50% 72%, rgba(64, 255, 136, 0.05) 0 1px, transparent 1px 26px),
    radial-gradient(ellipse at 50% 100%, rgba(64, 255, 136, 0.14) 0%, rgba(64, 255, 136, 0) 55%);
  pointer-events: none;
  z-index: 1;
}
.scanner-viewer-corners { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.scanner-viewer-corners .sc-bracket {
  position: absolute;
  width: 22px; height: 22px;
  border: 0 solid rgba(184, 255, 216, 0.55);
}
.scanner-viewer-corners .sc-bracket.tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.scanner-viewer-corners .sc-bracket.tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.scanner-viewer-corners .sc-bracket.bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.scanner-viewer-corners .sc-bracket.br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }

.scanner-viewer-hud {
  position: absolute;
  top: 18px; right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.7);
  z-index: 5;
  pointer-events: none;
}
.scanner-viewer-hud .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #40ff88;
  box-shadow: 0 0 8px #40ff88;
  animation: sc-pulse 1.4s ease-in-out infinite;
}
.scanner-viewer-hint {
  position: absolute;
  left: 22px; bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.4);
  z-index: 5;
  pointer-events: none;
  max-width: 60%;
}
.scanner-viewer-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.55);
  z-index: 2;
  pointer-events: none;
  animation: sc-pulse 2s ease-in-out infinite;
}
html[data-theme="dark"] body.page-content .instrument-photo:has(.scanner-viewer) {
  /* Override the beige background when the viewer is mounted */
  background: transparent !important;
}
html[data-theme="dark"] body.page-content .scanner-viewer + .caption,
html[data-theme="dark"] body.page-content .instrument-photo .caption {
  background: rgba(2, 10, 14, 0.78);
  color: rgba(184, 255, 216, 0.85);
  border: 1px solid rgba(184, 255, 216, 0.15);
  left: auto;
  right: 20px;
}

/* ============================================================
   Touch / interaction hint overlay — shown when an interactive
   3D surface is first visible; dismissed on any input or after 6s.
   Used on index.html hero scene AND instrument.html scanner viewer.
   ============================================================ */
.touch-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
  animation: touchHintFadeIn 0.8s ease-out 0.4s both, touchHintAutoHide 0.6s ease-in 5.5s forwards;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.touch-hint.dismissed {
  opacity: 0 !important;
  transform: translateY(-8px);
  pointer-events: none;
}
@keyframes touchHintAutoHide {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); visibility: hidden; }
}
/* Hero scene: anchor the hint to the right half so it doesn't hide behind the hero text */
#scene-container .touch-hint {
  justify-content: flex-end;
  padding-right: clamp(32px, 6vw, 96px);
  padding-left: 38%; /* reserves the left 38% for hero-content on wide screens */
}
@media (max-width: 960px) {
  #scene-container .touch-hint {
    justify-content: center;
    padding-left: 24px;
    padding-right: 24px;
    align-items: flex-end;
    padding-bottom: 140px;
  }
}
.touch-hint-card {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 26px 18px 22px;
  background: rgba(2, 10, 14, 0.72);
  border: 1px solid rgba(64, 255, 136, 0.28);
  border-radius: 2px;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(64, 255, 136, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(64, 255, 136, 0.08);
  color: #eef6f0;
  max-width: 92%;
}
.touch-hint-icon {
  width: 36px;
  height: 36px;
  color: #40ff88;
  flex-shrink: 0;
  animation: touchHintPulse 2s ease-in-out infinite;
}
.touch-hint-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.touch-hint-text strong {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #f0fff4;
}
.touch-hint-text span {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.65);
}
@keyframes touchHintFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes touchHintPulse {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-3px); opacity: 0.75; }
}
/* Viewer hint sits inside a smaller container — tighter padding */
.touch-hint.viewer-hint .touch-hint-card {
  padding: 14px 20px 14px 16px;
  gap: 14px;
}
.touch-hint.viewer-hint .touch-hint-icon { width: 30px; height: 30px; }
.touch-hint.viewer-hint .touch-hint-text strong { font-size: 12px; }
.touch-hint.viewer-hint .touch-hint-text span { font-size: 9px; }

.instrument-text .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.instrument-text h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
}
.instrument-text h3 em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.instrument-text p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.instrument-text p:last-of-type { margin-bottom: 36px; }
.instrument-text .pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.instrument-text .pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: var(--bg);
}

/* SERVICES — editorial cards */
.services-list {
  display: grid;
  gap: 0;
}
.service-row {
  display: grid;
  grid-template-columns: 80px 1.2fr 1fr;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
  transition: padding 0.3s ease;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row:hover { padding-left: 16px; padding-right: 16px; }
.service-row:hover h3 { color: var(--accent); }
.service-row .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.service-row h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  transition: color 0.3s;
}
.service-row h3 em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.service-row .desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
.service-row .desc ul {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-row .desc li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-left: 16px;
  position: relative;
}
.service-row .desc li::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 6px; height: 1px;
  background: var(--accent);
}

/* PERFORMANCE — dark minimal */
.perf {
  background: var(--dark);
  color: #f0ece2;
}
.perf .block { padding: 40px 48px 100px; }
.perf .section-kicker .num { color: rgba(240,236,226,0.5); }
.perf .section-kicker h2 { color: #f0ece2; }
.perf .section-kicker h2 em { color: rgba(240,236,226,0.5); }
.perf .section-kicker .sub { color: rgba(240,236,226,0.7); }

.perf-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.perf-num {
  padding: 48px 32px 48px 0;
  border-top: 1px solid rgba(240,236,226,0.12);
}
.perf-num:nth-child(n+4) { padding-top: 40px; }
.perf-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240,236,226,0.5);
  margin-bottom: 24px;
}
.perf-value {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(52px, 6.4vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #f0ece2;
}
.perf-value sub {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: rgba(240,236,226,0.6);
  margin-left: 8px;
  vertical-align: baseline;
  letter-spacing: 0;
}
.perf-desc {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(240,236,226,0.6);
  line-height: 1.6;
  max-width: 280px;
}

/* PROCESS */
.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.process-step {
  padding: 48px 32px 48px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.process-step .step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: 32px;
}
.process-step h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.process-step h3 em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.process-step p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 240px;
}

/* CONTACT — conversion-focused */
#contact {
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
}
#contact .block { padding: 40px 48px 120px; }

.contact-intro {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}
.contact-intro .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
}
.contact-intro h2 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 20px;
}
.contact-intro p {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
}

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 56px 56px 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-form .field > span {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.contact-form .field > span em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-dim);
  margin-left: 4px;
}
.contact-form input,
.contact-form textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
  border-radius: 2px;
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(25,24,22,0.35); font-weight: 400; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--bg);
}
.contact-form button {
  margin-top: 8px;
  align-self: stretch;
  justify-content: center;
  padding: 20px 30px;
  font-size: 15px;
  font-weight: 600;
}
.contact-form button[disabled] {
  background: var(--accent);
  cursor: default;
  opacity: 0.9;
}
.contact-form button[disabled]::after { content: ''; }

.form-trust {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.form-trust strong { color: var(--ink); font-weight: 600; }

.contact-direct {
  max-width: 720px;
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 36px;
  border-top: 1px solid var(--line-soft);
}
.contact-direct .direct-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-direct .direct-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s;
}
.contact-direct .direct-link:hover { transform: translateY(-1px); }
.contact-direct .direct-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-direct .direct-v {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.contact-direct .direct-link:hover .direct-v { color: var(--accent); }

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 80px 48px 40px;
}
.footer-grid {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}
.footer-brand h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 20px;
}
.footer-brand h3 em {
  font-style: normal;
  color: var(--ink-dim);
  font-weight: 500;
}
.footer-brand p { color: var(--ink-2); font-size: 14px; max-width: 340px; line-height: 1.6; }
.footer-grid h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-grid a {
  display: block;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1480px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ================================================================
   HOME — about grid + stat cards
   ================================================================ */
.home-about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}
.home-about-text h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 16px 0 24px;
}
.home-about-text h2 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }
.home-about-text p {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 60ch;
}
.home-about-text strong { font-weight: 600; color: var(--ink); }

.home-about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 28px 24px 24px;
  position: relative;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 24px; height: 1px;
  background: var(--accent);
}
.stat-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.stat-v {
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}
.stat-v sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-dim);
  vertical-align: baseline;
  margin-left: 4px;
}
.stat-d {
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.45;
}

/* ================================================================
   HOME — services cards
   ================================================================ */
.home-services-head {
  max-width: 760px;
  margin-bottom: 56px;
}
.home-services-head h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 16px 0 20px;
}
.home-services-head h2 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }

.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 36px 32px 36px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
}
.service-card:hover {
  border-color: var(--ink-2);
  transform: translateY(-2px);
}
.service-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-bottom: 20px;
}
.service-card-illus {
  width: 64px;
  height: 64px;
  color: var(--accent);
  margin-bottom: 24px;
}
.service-card-illus svg { width: 100%; height: 100%; }
.service-card h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.service-card h3 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }
.service-card p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 20px;
}
.service-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}
.service-card-list li {
  font-size: 13px;
  color: var(--ink-dim);
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}
.service-card-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* ================================================================
   HOME — why us grid
   ================================================================ */
.home-why { background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.home-why-head { max-width: 760px; margin-bottom: 56px; }
.home-why-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 16px 0 0;
}
.home-why-head h2 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }

.home-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.why-item {
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.why-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.why-item h4 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.why-item p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
}
.why-item strong { font-weight: 600; color: var(--ink); }

/* ================================================================
   DEMO PAGE — two-column layout: sidebar (text + CTAs) + stage (3D)
   ================================================================ */
.demo-layout {
  position: relative;
  display: grid;
  grid-template-columns: 380px 1fr;
  height: 100vh;
  width: 100%;
  margin: 0;
  background: #020807;
  overflow: hidden;
}

/* ----- Sidebar ----- */
.demo-sidebar {
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, rgba(2, 10, 14, 0.96) 0%, rgba(4, 18, 14, 0.92) 100%);
  border-right: 1px solid rgba(184, 255, 216, 0.1);
  padding: 108px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  overflow-y: auto;
  color: #f1eee6;
}
.demo-sidebar::-webkit-scrollbar { width: 0; }

.demo-intro {
  position: static;
  max-width: 100%;
  pointer-events: auto;
}
.demo-intro .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.7);
  margin-bottom: 20px;
  display: block;
}
.demo-intro h1 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: clamp(32px, 2.6vw, 44px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: #f0fff4;
}
.demo-intro h1 em {
  font-style: italic;
  font-weight: 400;
  color: rgba(184, 255, 216, 0.75);
}
.demo-intro p {
  font-size: 14.5px;
  color: rgba(232, 248, 238, 0.78);
  line-height: 1.6;
  max-width: 100%;
  margin: 0;
}
.demo-intro strong { color: #f0fff4; font-weight: 500; }

.demo-sidebar-foot {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(184, 255, 216, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.demo-sidebar-foot .btn-primary {
  background: #40ff88;
  color: #02140a;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  border: none;
  transition: background 0.2s, transform 0.2s;
}
.demo-sidebar-foot .btn-primary:hover {
  background: #80ffaa;
  transform: translateY(-1px);
}
.demo-sidebar-foot .btn-text {
  color: rgba(232, 248, 238, 0.75);
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding: 2px 0;
}
.demo-sidebar-foot .btn-text:hover { color: #40ff88; }
.demo-sidebar-legal {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(184, 255, 216, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 248, 238, 0.4);
  line-height: 1.7;
}
.demo-sidebar-legal a {
  color: rgba(232, 248, 238, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.demo-sidebar-legal a:hover { color: #40ff88; }

/* ----- Stage (3D scene area) ----- */
.demo-stage {
  position: relative;
  overflow: hidden;
  height: 100vh;
}
.demo-layout #scene-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: transparent;
  box-shadow: none;
}

/* HUD repositioned to top-right of stage (out of scanner sight-line) */
.demo-stage .sc-hud-tr {
  top: 28px;
  right: 28px;
  min-width: 180px;
  text-align: right;
}
.demo-stage .sc-hud-tr .sc-row { justify-content: flex-end; }

/* Controls — bottom-right of stage (away from scanner body) */
.demo-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  left: auto;
  z-index: 10;
  width: 280px;
  background: rgba(10, 12, 16, 0.62);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1eee6;
  transition: transform 0.3s ease;
}
.demo-controls.collapsed .demo-controls-body { display: none; }
.demo-controls-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(241, 238, 230, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(241, 238, 230, 0.85);
  width: 24px;
  height: 24px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  font-family: monospace;
  transition: background 0.2s;
}
.demo-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.demo-controls-body { padding: 14px 16px 18px; }
.demo-ctl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin-bottom: 14px;
  align-items: center;
}
.demo-ctl > span:first-child {
  grid-column: 1 / 2;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(241, 238, 230, 0.65);
}
.demo-ctl .demo-val {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #fff;
  text-align: right;
}
.demo-ctl input[type='range'] {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  height: 2px;
  width: 100%;
  cursor: pointer;
  outline: none;
  padding: 0;
}
.demo-ctl input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: #ff3050;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 48, 80, 0.5);
}
.demo-ctl input[type='range']::-moz-range-thumb {
  width: 12px; height: 12px;
  background: #ff3050;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.demo-reset {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(241, 238, 230, 0.85);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.demo-reset:hover { background: rgba(255, 48, 80, 0.15); border-color: rgba(255, 48, 80, 0.5); color: #fff; }

/* ================================================================
   OUTILS PAGE — pipeline + tool cards
   ================================================================ */
.tools-stack-head {
  max-width: 760px;
  margin-bottom: 48px;
}
.tools-stack-head h2 {
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 16px 0 20px;
}
.tools-stack-head h2 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }

.tools-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 48px;
  overflow-x: auto;
}
.pipe-step {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.pipe-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.18em;
}
.pipe-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.pipe-arrow {
  color: var(--ink-dim);
  font-size: 14px;
  margin-left: 8px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.tool-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px 22px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}
.tool-card:hover {
  border-color: var(--ink-2);
  transform: translateY(-2px);
}
.tool-card-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--paper) 0%, #f3f0e1 100%);
}
.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.tool-logo {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  border-radius: 4px;
}
.tool-logo-fjd          { background: #222; }
.tool-logo-cloudcompare { background: #3f7ba8; }
.tool-logo-recap        { background: #e34f26; }
.tool-logo-revit        { background: #0696d7; }
.tool-logo-archicad     { background: #0e74bb; }
.tool-logo-autocad      { background: #c1272d; }
.tool-logo-cyclone      { background: #ffcc00; color: #1a1a1a; }
.tool-logo-ifc          { background: #3a5a48; font-size: 11px; }

.tool-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.tool-kind {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.tool-stage {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.16em;
}
.tool-card h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 12px;
  line-height: 1.25;
}
.tool-card p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.tool-card code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(58, 90, 72, 0.08);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--accent);
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}
.tool-tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

/* ================================================================
   PORTFOLIO — case studies
   ================================================================ */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 100px;
}
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.case-study-reverse { direction: rtl; }
.case-study-reverse > * { direction: ltr; }

.case-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-media-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(20, 19, 17, 0.78);
  color: #f6f2e8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  padding: 6px 10px;
}

.case-body h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 22px 0 16px;
}
.case-body h2 em { font-style: italic; color: var(--ink-dim); font-weight: 400; }

.case-meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
}
.case-meta-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.case-meta-v { color: var(--ink); font-weight: 500; }

.case-lede {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.55;
  margin-bottom: 28px;
}

.case-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  margin-bottom: 24px;
}
.case-blocks h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.case-blocks p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.case-blocks ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.case-blocks li {
  font-size: 13px;
  color: var(--ink-2);
  padding: 4px 0 4px 14px;
  position: relative;
}
.case-blocks li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-dim);
}
.case-pills { margin-top: 14px; }

/* ================================================================
   DEVIS FORM — enriched contact form
   ================================================================ */
.contact-card-wide {
  max-width: 1000px;
  margin: 0 auto;
}
.devis-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.form-section {
  border: 1px solid var(--line);
  padding: 28px 28px 24px;
  background: rgba(255, 255, 255, 0.4);
}
.form-section legend {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0 12px;
  margin-left: -8px;
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-num {
  color: var(--accent);
  font-weight: 600;
}
.form-section .field-row { margin-top: 8px; }
.field em { color: var(--accent); font-style: normal; }

.field select,
.field textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }

/* Checkbox pills */
.field-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.field-check-group .field-label {
  width: 100%;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.2s;
  user-select: none;
}
.check-pill:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}
.check-pill input {
  accent-color: var(--accent);
  margin: 0;
}
.check-pill:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.check-consent {
  display: flex;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.check-consent span:not([class]) {
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.check-consent input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.direct-loc {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ================================================================
   DEVIS V2 — editorial layout, progressive disclosure
   ================================================================ */
.devis-section { padding-bottom: 120px; }

.devis-hero {
  max-width: 720px;
  margin: 0 auto 72px;
  text-align: center;
}
.devis-hero .tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.devis-hero .page-title {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 24px;
}
.devis-hero .page-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.devis-hero .page-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 560px;
  margin: 0 auto;
}
.devis-hero .page-lede strong { color: var(--ink); font-weight: 500; }

/* Layout : form (2/3) + aside (1/3) */
.devis-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 72px;
  align-items: start;
}

/* -------- FORM -------- */
.devis-form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: transparent;
  border: none;
  padding: 0;
}
.devis-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.devis-form .field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.devis-form .field > span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
.devis-form .field > span em {
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
  letter-spacing: 0;
}

/* Underlined editorial input style */
.devis-form input,
.devis-form textarea,
.devis-form select {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 12px;
  letter-spacing: -0.005em;
  transition: border-color 0.25s, color 0.25s;
  width: 100%;
  border-radius: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.devis-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}
.devis-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-dim) 50%),
                    linear-gradient(135deg, var(--ink-dim) 50%, transparent 50%);
  background-position: right 2px top 18px, right 8px top 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 20px;
  cursor: pointer;
}
.devis-form input::placeholder,
.devis-form textarea::placeholder {
  color: var(--ink-dim);
  opacity: 0.6;
}
.devis-form input:focus,
.devis-form textarea:focus,
.devis-form select:focus {
  border-bottom-color: var(--accent);
}

/* Pills group — type de projet */
.devis-form .field-check-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0;
}
.devis-form .field-check-group .field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
.devis-form .field-check-group .field-label em {
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
}
.devis-form .pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.devis-form .check-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.2s;
  user-select: none;
  border-radius: 2px;
}
.devis-form .check-pill:hover {
  border-color: var(--ink-2);
  color: var(--ink);
}
.devis-form .check-pill input {
  width: auto;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
  border: none;
  background: none;
}
.devis-form .check-pill:has(input:checked) {
  background: rgba(64, 255, 136, 0.12);
  border-color: var(--accent);
  color: var(--ink);
}

/* Collapsible extras */
.form-extras {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 4px 0;
  margin: 4px 0;
}
.form-extras summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  user-select: none;
  transition: color 0.2s;
}
.form-extras summary::-webkit-details-marker { display: none; }
.form-extras summary::marker { display: none; }
.form-extras .extras-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  transition: transform 0.3s ease, background 0.25s, color 0.25s, border-color 0.25s;
  flex-shrink: 0;
}
.form-extras .extras-label {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.form-extras .extras-hint {
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: -0.005em;
}
.form-extras .extras-hint em {
  font-style: normal;
  opacity: 0.7;
  margin-left: 2px;
}
.form-extras[open] .extras-icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #02140a;
}
.form-extras[open] summary { padding-bottom: 24px; }
.form-extras .extras-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 4px 0 20px;
}

/* Consent */
.devis-form .check-consent {
  display: flex;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
  border-top: none;
  margin-top: 0;
}
.devis-form .check-consent input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.devis-form .check-consent span:not([class]) {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  color: var(--ink-dim);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.devis-form .check-consent a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.devis-form .check-consent em {
  color: var(--accent);
  font-style: normal;
  margin-left: 2px;
}

/* Actions + trust */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 8px;
}
.devis-form .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.devis-form .btn-primary:hover { transform: translateY(-1px); }
.devis-form button[disabled] {
  opacity: 0.85;
  cursor: default;
  transform: none;
}
.form-actions .form-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  flex-wrap: wrap;
}
.form-actions .form-trust strong { color: var(--ink); font-weight: 600; }
.form-actions .trust-sep { opacity: 0.4; }

/* -------- ASIDE -------- */
.devis-aside {
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: sticky;
  top: 120px;
}
.aside-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}
.aside-block:last-child { border-bottom: none; padding-bottom: 0; }
.aside-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
}
.aside-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 4px 0;
  transition: transform 0.2s;
}
.aside-link:hover { transform: translateX(2px); }
.aside-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0.7;
}
.aside-v {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.aside-link:hover .aside-v { color: var(--accent); }
.aside-loc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aside-loc strong {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.aside-loc em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.aside-promise p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}
.aside-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aside-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.aside-steps .step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* -------- DARK PAGE overrides (html[data-theme="dark"] body.page-content) -------- */
html[data-theme="dark"] body.page-content .devis-form input,
html[data-theme="dark"] body.page-content .devis-form textarea,
html[data-theme="dark"] body.page-content .devis-form select {
  background: transparent;
  color: var(--ink);
  border-bottom-color: rgba(184, 255, 216, 0.15);
}
html[data-theme="dark"] body.page-content .devis-form input::placeholder,
html[data-theme="dark"] body.page-content .devis-form textarea::placeholder {
  color: rgba(184, 255, 216, 0.35);
}
html[data-theme="dark"] body.page-content .devis-form input:focus,
html[data-theme="dark"] body.page-content .devis-form textarea:focus,
html[data-theme="dark"] body.page-content .devis-form select:focus {
  border-bottom-color: var(--accent);
  background: transparent;
}
html[data-theme="dark"] body.page-content .devis-form .check-pill {
  border-color: rgba(184, 255, 216, 0.18);
}
html[data-theme="dark"] body.page-content .devis-form .check-pill:has(input:checked) {
  background: rgba(64, 255, 136, 0.14);
  border-color: var(--accent);
  color: var(--ink);
}
html[data-theme="dark"] body.page-content .form-extras {
  border-color: rgba(184, 255, 216, 0.08);
}
html[data-theme="dark"] body.page-content .form-extras .extras-icon {
  border-color: rgba(184, 255, 216, 0.2);
  color: var(--ink);
}
html[data-theme="dark"] body.page-content .aside-steps .step-num {
  border-color: rgba(184, 255, 216, 0.2);
}

/* -------- DEVIS responsive -------- */
@media (max-width: 1080px) {
  .devis-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .devis-aside {
    position: static;
    top: auto;
    padding-top: 40px;
    border-top: 1px solid var(--line-soft);
  }
  .devis-section { padding-bottom: 80px; }
  .devis-hero { margin-bottom: 56px; }
}
@media (max-width: 640px) {
  .devis-form .field-row { grid-template-columns: 1fr; gap: 24px; }
  .devis-form { gap: 24px; }
  .form-actions { align-items: stretch; }
  .form-actions .btn-primary { width: 100%; }
  .form-actions .form-trust { justify-content: center; }
  .form-extras summary { flex-wrap: wrap; }
  .form-extras .extras-hint { font-size: 12px; width: 100%; padding-left: 40px; }
  .devis-aside { gap: 28px; }
  .aside-block { padding-bottom: 24px; }
}

/* ================================================================
   RESPONSIVE additions for new pages
   ================================================================ */
@media (max-width: 1080px) {
  .home-about-grid { grid-template-columns: 1fr; gap: 48px; }
  .home-about-stats { grid-template-columns: 1fr 1fr; }
  .service-cards { grid-template-columns: 1fr; gap: 16px; }
  .home-why-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .case-study,
  .case-study-reverse { grid-template-columns: 1fr; gap: 32px; direction: ltr; }
  .case-blocks { grid-template-columns: 1fr; }
  .tools-pipeline { padding: 16px 18px; gap: 8px; }
  .pipe-step { gap: 8px; }
  .pipe-label { font-size: 11px; }
  /* Demo page layout collapses to vertical stack below 1080px */
  .demo-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
  }
  .demo-sidebar {
    padding: 84px 24px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(184, 255, 216, 0.12);
    gap: 16px;
    overflow: visible;
  }
  .demo-sidebar-foot { display: none; }
  .demo-intro .tag { font-size: 9.5px; margin-bottom: 10px; }
  .demo-intro h1 { font-size: 24px; margin-bottom: 10px; line-height: 1.1; }
  /* keep <br> visible — collapsing it produced "Le scanneren action." */
  .demo-intro p {
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .demo-stage { height: auto; min-height: 0; }
  .demo-stage .sc-hud-tr { top: 16px; right: 16px; font-size: 9px; min-width: 0; }
  .demo-controls {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-width: 360px;
    margin-left: auto;
  }
  .portfolio-list { gap: 60px; }
  .form-section { padding: 22px 20px 20px; }
  .check-pill { font-size: 12.5px; padding: 9px 14px; }
}

@media (max-width: 640px) {
  .home-about-stats { grid-template-columns: 1fr; }
  .home-why-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .case-meta { grid-template-columns: auto 1fr; }
}

/* ================================================================
   .tag styling for new section blocks (home, tools, portfolio)
   Scoped tightly so we don't override existing .page-hero .tag
   ================================================================ */
.home-about-text .tag,
.home-services-head .tag,
.home-why-head .tag,
.tools-stack-head .tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--accent);
  margin-bottom: 18px;
}

/* RESPONSIVE */
@media (max-width: 1340px) {
  .toc { display: none; }
}
@media (max-width: 1080px) {
  .hero-overlay { padding: 100px 24px 72px; }
  .hero-overlay .hero-content { max-width: 100%; }
  #hero.legacy {
    grid-template-columns: 1fr;
    padding: 120px 24px 60px;
  }
  .page-hero { padding: 28px 24px 28px; }
  .page-banner { height: 140px; }
  .page-cta-block { padding-bottom: 80px !important; }
  .page-cta { padding: 40px 24px; }
  section.block { padding: 60px 24px; }
  .section-kicker { grid-template-columns: 1fr; gap: 20px; margin-bottom: 60px; }
  .instrument-grid { grid-template-columns: 1fr; gap: 48px; }
  .service-row { grid-template-columns: 60px 1fr; }
  .service-row .desc { grid-column: 2; margin-top: 20px; }
  .perf-numbers { grid-template-columns: 1fr 1fr; }
  .process-rail { grid-template-columns: 1fr 1fr; }
  .process-step { padding: 32px 16px 32px 0; }
  #contact .block { padding: 80px 20px; }
  .contact-card { padding: 32px 24px; }
  .contact-form .field-row { grid-template-columns: 1fr; }
  .contact-direct { grid-template-columns: 1fr; gap: 16px; text-align: left; padding-top: 24px; margin-top: 28px; }
  .contact-direct .direct-label { font-size: 10px; }
  .form-trust { gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { padding: 16px 24px; }
  .nav nav { display: none; }
  .hero-meta-grid { gap: 32px; }
  .sc-hud { font-size: 9px; }
  .sc-hud-br { bottom: 16px; right: 16px; }
  .hero-overlay { padding: 92px 20px 140px 24px; }
}

/* ============================================================================
   MOBILE UX — hamburger drawer, form a11y, demo mobile, safe-area
   ============================================================================ */

/* iOS: stop text-size-adjust fiddling, stop tap highlights */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { -webkit-tap-highlight-color: transparent; }

/* iOS safe-area — apply inside nav + footer */
@supports (padding: env(safe-area-inset-top)) {
  .nav {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-left: max(48px, env(safe-area-inset-left));
    padding-right: max(48px, env(safe-area-inset-right));
  }
  footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

/* ----------------------------------------------------------------------------
   Hamburger button — hidden >1080px
   ---------------------------------------------------------------------------- */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  position: relative;
  z-index: 60;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease, background 0.3s;
  transform-origin: center;
}
.nav-dark .nav-burger span { background: #f1eee6; }

/* Animated to X when open */
.nav.open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Prevent body scroll when drawer open */
body.nav-open { overflow: hidden; }

/* Drawer-only Contact link is hidden on desktop (the .nav-cta button handles it there) */
.nav nav a.nav-drawer-cta { display: none; }

/* ----------------------------------------------------------------------------
   Mobile nav drawer — dropdown pattern (robust on iOS Safari)
   ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav-burger { display: flex; }

  /* Nav bar must be the positioning parent for the dropdown */
  .nav {
    padding: 14px 18px;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
  .nav-inner { position: relative; }

  /* Hide the inline CTA on mobile — the drawer contains the Contact link */
  .nav-actions > .nav-cta { display: none !important; }

  /* Drawer = opaque dropdown below the nav bar. No fixed position,
     no backdrop-filter, no transforms — bulletproof on every browser. */
  .nav nav {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 18px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(20, 19, 17, 0.08);
    z-index: 48;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .nav-dark nav {
    background: rgba(2, 10, 14, 0.98);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  }
  .nav.open nav { display: flex; }

  /* Drawer links — big, full-width, separated */
  .nav nav a {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 18px 4px;
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    display: block;
  }
  .nav-dark nav a {
    color: rgba(241, 238, 230, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
  }
  .nav nav a:last-child { border-bottom: none; }
  .nav nav a::after { display: none; }
  .nav nav a.active {
    color: var(--accent);
    font-weight: 500;
  }
  .nav-dark nav a.active { color: #ff6080; }

  /* Contact link inside drawer — styled as primary action, brand green */
  .nav nav a.nav-drawer-cta {
    display: block;
    margin-top: 12px;
    padding: 16px;
    text-align: center;
    background: #40ff88;
    color: #02140a;
    border: none;
    font-weight: 600;
    letter-spacing: 0;
    border-radius: 2px;
  }
  .nav nav a.nav-drawer-cta.active { color: #02140a; }
}

/* ----------------------------------------------------------------------------
   Form inputs — prevent iOS zoom on focus (min 16px), bigger touch targets
   ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .field input,
  .field textarea,
  .field select {
    font-size: 16px !important;   /* prevent iOS zoom */
    min-height: 44px;
    padding: 12px 0;
  }
  .field textarea { min-height: 120px; }
  .check-pill {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  .check-pill input { width: 18px; height: 18px; }
  .btn-primary {
    min-height: 48px;
    font-size: 15px;
    padding: 14px 22px;
  }
  .btn-text {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
  }
}

/* ----------------------------------------------------------------------------
   Spacing refinements for mobile
   ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav { padding: 16px 20px; }
  .page-main { padding-top: 72px; }
  .page-banner { height: 120px; }
  section.block { padding: 56px 22px; }
  .page-hero { padding: 22px 22px 20px; }
  .page-title { font-size: clamp(30px, 8vw, 42px) !important; }
  .hero-cta { flex-wrap: wrap; gap: 14px; }
  .hero-cta .btn-primary { flex: 1; min-width: 180px; text-align: center; justify-content: center; }

  /* Nav CTA in normal top bar: hide visually so burger handles it */
  .nav-actions > .nav-cta {
    /* On mobile the nav-cta is the one inside the drawer (fixed position).
       The original inline one should not also show — hide it except when open. */
    display: none;
  }
  .nav.open .nav-actions > .nav-cta { display: flex; }

  /* Case study meta — 2 cols instead of 4 */
  .case-meta { grid-template-columns: auto 1fr; gap: 4px 10px; }
  .case-media-tag { top: 12px; left: 12px; font-size: 10px; padding: 5px 8px; }

  /* Form sections — tighter */
  .form-section { padding: 20px 16px 18px; }
  .form-section legend { font-size: 10px; padding: 0 10px; }
  .contact-intro { padding: 0 4px; }

  /* Tools pipeline — scroll with fade edges */
  .tools-pipeline {
    position: relative;
    padding: 14px 18px;
    justify-content: flex-start;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }

  /* Pill rows (hero meta, pill rows) — wrap + smaller */
  .pill-row { gap: 8px; }
  .pill { font-size: 11px; padding: 6px 10px; }

  /* Hero meta grid on hero-immersive — stack */
  .hero-meta-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    font-size: 12px;
  }
  .hero-meta-grid .v { font-size: 18px; }

  /* Footer — tighter */
  footer { padding: 56px 22px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: left;
    align-items: flex-start;
    padding-top: 24px;
  }
}

/* ----------------------------------------------------------------------------
   Small phones (≤ 480px) — further tightening
   ---------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .nav { padding: 12px 16px; }
  .logo-text { font-size: 18px; }
  section.block { padding: 48px 18px; }
  .page-hero { padding: 18px 18px 14px; }
  .page-banner { height: 100px; }
  .page-title { font-size: 30px !important; line-height: 1.08; }
  .page-lede { font-size: 15px; }

  /* Home stats: single column card, large figure */
  .stat-card { padding: 22px 20px 20px; }
  .stat-v { font-size: 40px; }

  /* Service cards */
  .service-card { padding: 28px 22px; }
  .service-card h3 { font-size: 20px; }

  /* Why grid spacing */
  .home-why-grid { gap: 20px; }
  .why-item { padding-top: 18px; }

  /* Tools */
  .tool-card { padding: 20px 18px; }
  .tool-card h3 { font-size: 16px; }
  .tool-logo { width: 40px; height: 40px; font-size: 12px; }

  /* Case study */
  .case-body h2 { font-size: 26px; margin: 18px 0 12px; }
  .case-lede { font-size: 15px; margin-bottom: 20px; }
  .portfolio-list { gap: 48px; }
  section.block .portfolio-list { padding: 0; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Drawer links tighter on very small screens */
  .nav nav a { font-size: 20px; padding: 18px 4px; }
}

/* ----------------------------------------------------------------------------
   Demo page — phone layout (bottom-sheet controls, compact HUD)
   ---------------------------------------------------------------------------- */
@media (max-width: 820px) {
  /* Controls become a bottom sheet attached to the stage */
  .demo-controls {
    left: 0; right: 0; bottom: 0;
    width: auto;
    max-width: none;
    margin-left: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .demo-controls.collapsed {
    transform: translateY(calc(100% - 48px));
  }
  .demo-controls-body { padding: 16px 20px 20px; }
  .demo-ctl { margin-bottom: 16px; }

  /* HUD top-right of stage, compact */
  .demo-stage .sc-hud-tr {
    top: 14px;
    right: 14px;
    min-width: 130px;
    font-size: 9px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .demo-sidebar { padding: 78px 18px 16px; gap: 10px; }
  .demo-intro .tag { font-size: 9px; margin-bottom: 8px; }
  .demo-intro h1 { font-size: 22px; margin-bottom: 8px; }
  .demo-intro p {
    font-size: 12.5px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .demo-stage .sc-hud-tr { display: none; }   /* free up space on tiny phones */
}

/* ----------------------------------------------------------------------------
   Scanner viewer (outils page) — make it taller on mobile so the 3D model
   has breathing room, and avoid the static hint colliding with the caption.
   ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .scanner-viewer { min-height: 340px; }
  .instrument-text h2 { font-size: clamp(28px, 6vw, 40px); }
  /* The bottom-left hint and the bottom-right caption both anchor near
     bottom:20px and overlap on a 375px viewport. The animated touch-hint
     card already covers initial interaction guidance, so the persistent
     small hint is redundant on phones. */
  .scanner-viewer-hint { display: none; }
}

/* ----------------------------------------------------------------------------
   Touch-hint card — ensure readability on mobile
   ---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .touch-hint-card {
    padding: 14px 18px;
    max-width: 88vw;
  }
  .touch-hint-icon { width: 28px; height: 28px; }
  .touch-hint-text strong { font-size: 13px; }
  .touch-hint-text span { font-size: 11.5px; }
}

/* ============================================================
   COOKIE BANNER + PREFERENCES MODAL — CNIL-compliant
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9000;
  background: rgba(2, 10, 14, 0.96);
  border: 1px solid rgba(184, 255, 216, 0.18);
  color: #f0fff4;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-family: 'Open Sans', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-radius: 4px;
}
.cookie-banner-in { opacity: 1; transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.cookie-banner-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #f0fff4;
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(232, 248, 238, 0.78);
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.cookie-banner-text p strong { display: inline; font-family: inherit; text-transform: none; letter-spacing: 0; font-size: inherit; color: #f0fff4; margin: 0; }
.cookie-banner-text a {
  color: #40ff88;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner-text a:hover { color: #80ffaa; }

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-btn {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  border-radius: 2px;
  white-space: nowrap;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-primary {
  background: #40ff88;
  color: #02140a;
  font-weight: 600;
}
.cookie-btn-primary:hover { background: #80ffaa; }
.cookie-btn-secondary {
  background: transparent;
  color: rgba(232, 248, 238, 0.92);
  border-color: rgba(184, 255, 216, 0.28);
}
.cookie-btn-secondary:hover {
  background: rgba(184, 255, 216, 0.08);
  border-color: rgba(184, 255, 216, 0.55);
  color: #f0fff4;
}

/* ----- Preferences modal ----- */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(2, 5, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
  font-family: 'Open Sans', system-ui, sans-serif;
}
.cookie-modal-in { opacity: 1; }
.cookie-modal-card {
  background: #061510;
  border: 1px solid rgba(184, 255, 216, 0.18);
  color: #f0fff4;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
}
.cookie-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(184, 255, 216, 0.1);
}
.cookie-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #f0fff4;
}
.cookie-close {
  background: transparent;
  border: none;
  color: rgba(232, 248, 238, 0.65);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.cookie-close:hover { color: #40ff88; }

.cookie-modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
}
.cookie-intro {
  font-size: 13.5px;
  color: rgba(232, 248, 238, 0.75);
  line-height: 1.55;
  margin: 0 0 22px;
  letter-spacing: -0.005em;
}
.cookie-cat {
  padding: 18px 0;
  border-top: 1px solid rgba(184, 255, 216, 0.08);
}
.cookie-cat:first-of-type { border-top: none; padding-top: 0; }
.cookie-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.cookie-cat-head strong {
  font-size: 14px;
  font-weight: 600;
  color: #f0fff4;
  letter-spacing: -0.005em;
}
.cookie-cat p {
  font-size: 13px;
  color: rgba(232, 248, 238, 0.7);
  line-height: 1.55;
  margin: 0;
  letter-spacing: -0.005em;
}
.cookie-cat p em { font-style: italic; opacity: 0.85; }
.cookie-cat p strong { display: inline; font-size: inherit; color: #f0fff4; }
.cookie-pill-required {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(184, 255, 216, 0.6);
  padding: 4px 10px;
  border: 1px solid rgba(184, 255, 216, 0.18);
  border-radius: 2px;
}

/* iOS-style switch */
.cookie-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.cookie-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cookie-switch-track {
  width: 40px;
  height: 22px;
  border-radius: 22px;
  background: rgba(184, 255, 216, 0.18);
  border: 1px solid rgba(184, 255, 216, 0.22);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.cookie-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: rgba(232, 248, 238, 0.9);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.cookie-switch input:checked + .cookie-switch-track {
  background: #40ff88;
  border-color: #40ff88;
}
.cookie-switch input:checked + .cookie-switch-track .cookie-switch-knob {
  transform: translateX(18px);
  background: #02140a;
}
.cookie-switch input:focus-visible + .cookie-switch-track {
  outline: 2px solid #40ff88;
  outline-offset: 2px;
}

.cookie-modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid rgba(184, 255, 216, 0.1);
  background: rgba(2, 8, 7, 0.4);
}

/* Responsive */
@media (max-width: 820px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
  .cookie-banner-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px 20px;
  }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .cookie-btn { flex: 1 1 calc(50% - 5px); text-align: center; padding: 12px 12px; font-size: 12.5px; }
  .cookie-banner-actions .cookie-btn-primary { flex-basis: 100%; order: -1; }
  .cookie-modal { padding: 0; align-items: flex-end; }
  .cookie-modal-card { max-height: 92vh; border-radius: 16px 16px 0 0; }
  .cookie-modal-head, .cookie-modal-body, .cookie-modal-foot { padding-left: 20px; padding-right: 20px; }
  .cookie-modal-foot { flex-direction: column-reverse; }
  .cookie-modal-foot .cookie-btn { width: 100%; text-align: center; }
}

/* ============================================================
   LEGAL PAGES — mentions légales, confidentialité
   ============================================================ */
.legal-page .block { padding-top: 140px; padding-bottom: 100px; max-width: 880px; }

.legal-hero {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.legal-hero .tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.legal-hero .page-title {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 18px;
}
.legal-hero .page-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.legal-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0;
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.legal-body .legal-lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line-soft);
}
.legal-body h2 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 48px 0 18px;
  padding-top: 8px;
}
.legal-body h2:first-of-type { margin-top: 0; }
.legal-body h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 28px 0 12px;
}
.legal-body p { margin: 0 0 16px; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body em {
  font-style: italic;
  color: var(--ink-dim);
}
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.legal-body a:hover { color: #80ffaa; }
.legal-body ul {
  padding-left: 20px;
  margin: 0 0 18px;
}
.legal-body ul li {
  margin-bottom: 8px;
  padding-left: 4px;
}
.legal-body ul li::marker { color: var(--accent); }
.legal-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: rgba(64, 255, 136, 0.08);
  border: 1px solid rgba(64, 255, 136, 0.18);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--ink);
}

.legal-block {
  background: rgba(64, 255, 136, 0.04);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.65;
}
.legal-block strong { color: var(--ink); }

.legal-table-wrap {
  position: relative;
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
}
/* Subtle right-edge fade on mobile to hint that the table scrolls horizontally */
@media (max-width: 720px) {
  .legal-table-wrap {
    background:
      linear-gradient(to right, rgba(2, 8, 7, 0) 0%, rgba(2, 8, 7, 0) 88%, rgba(2, 8, 7, 0.85) 100%)
      right center / 100% 100% no-repeat;
    background-attachment: local, scroll;
  }
  .legal-table-wrap::before {
    content: '← faire défiler →';
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-dim);
    padding: 8px 12px 0;
    opacity: 0.7;
  }
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: rgba(64, 255, 136, 0.02);
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
  letter-spacing: -0.005em;
  line-height: 1.5;
}
.legal-table th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-dim);
  background: rgba(64, 255, 136, 0.06);
  border-bottom-color: var(--line);
}
.legal-table td { color: var(--ink-2); }
.legal-table td strong { color: var(--ink); }
.legal-table tr:last-child td { border-bottom: none; }

@media (max-width: 720px) {
  .legal-page .block { padding-top: 110px; padding-bottom: 64px; }
  .legal-hero { margin-bottom: 40px; }
  .legal-body { font-size: 14.5px; }
  .legal-body h2 { font-size: 19px; margin-top: 36px; }
  .legal-body h3 { font-size: 15px; }
  .legal-body .legal-lede { font-size: 15.5px; }
  .legal-block { padding: 14px 16px; font-size: 13.5px; }
  .legal-table { font-size: 12.5px; }
  .legal-table th, .legal-table td { padding: 10px 11px; }
}

/* ============================================================
   FOOTER — legal links row
   ============================================================ */
.footer-bottom .footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.footer-bottom .footer-legal a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.footer-bottom .footer-legal a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 720px) {
  .footer-bottom .footer-legal { font-size: 12px; }
}

/* ============================================================================
   BLOG
   ============================================================================ */
.blog-list-section { padding-top: 8px; padding-bottom: 96px; }

.blog-empty {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  color: var(--ink-dim);
  font-size: 16px;
  padding: 48px 0;
}

/* shared meta row */
.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.blog-dot { opacity: 0.5; }
/* inline icon alignment (lucide) */
.blog-card-meta time,
.blog-card-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.blog-card-meta svg { flex: none; opacity: 0.85; }
.blog-article-foot .btn-text,
.blog-article-foot .btn-primary { display: inline-flex; align-items: center; gap: 8px; }
.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--ink-2);
}

/* featured (latest) post */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0 0 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line-soft);
}
.blog-featured-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
}
.blog-featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.blog-featured:hover .blog-featured-media img { transform: scale(1.04); }
.blog-featured-body h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 14px;
}
.blog-featured-body p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 20px;
}
.blog-read {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  transition: letter-spacing 0.2s;
}
.blog-featured:hover .blog-read { letter-spacing: 0.1em; }

/* grid of remaining posts */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s, transform 0.2s;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.blog-card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.blog-card-body h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}
.blog-card-body p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0;
}

/* article page */
.blog-article .block { max-width: 820px; }
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}
.blog-back:hover { gap: 11px; }
.blog-back:hover { color: var(--accent); }
.blog-article-head { margin-bottom: 36px; }
.blog-article-head .page-title {
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.08;
  margin: 8px 0 14px;
}
.blog-article-head .blog-card-meta { margin-bottom: 0; }
.blog-article-cover {
  margin: 0 auto 44px;
  max-width: 720px;
  border: 1px solid var(--line);
  overflow: hidden;
}
.blog-article-cover img { width: 100%; display: block; }
.blog-body h2:first-child { margin-top: 0; }
.blog-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  font-style: italic;
}
.blog-body img { margin: 24px auto; border: 1px solid var(--line); }
.blog-body h2 { font-size: 24px; }
.blog-article-foot {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .blog-featured { grid-template-columns: 1fr; gap: 24px; }
  .blog-featured-media { order: -1; }
}
@media (max-width: 720px) {
  .blog-list-section { padding-bottom: 72px; }
  .blog-grid { gap: 24px; }
}
