/* ==========================================================================
   Nima Recotecture Design — styles.css (v5 · "Obsidian & Blood")
   Deep obsidian darks and warm organic materials (walnut, linen, bone) lit
   by blood-red / crimson accents and warm golden highlights. No blue tones.
   Bright accents (--ember, --gold) are reserved for dark scenes, where they
   read as light; light chapters use the deeper inks (--blood-ink).
   Type: Syne (constructivist geometric display) · Archivo (grotesk body) ·
   JetBrains Mono (figures, pricing, technical labels).
   Descenders: display lines carry generous line-height + bottom padding so
   "g", "y", "p" never clip inside overflow masks.
   Motion initial states are set in JS only.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Obsidian + warm organic materials */
  --obsidian:   #08080a;   /* the screen */
  --mahogany:   #1a0e0b;
  --walnut:     #2c1712;
  --linen:      #ede3d1;   /* plaster / linen pages */
  --bone:       #f8f1e4;
  --terracotta: #a8321f;
  --rust:       #b5481f;
  --brass:      #b8925a;

  /* Blood red + gold */
  --blood:      #8b0000;
  --crimson:    #cc061e;
  --ember:      #ff3b4e;   /* lit crimson for text/glow on dark — 5.9:1 on obsidian */
  --gold:       #f2b84b;   /* warm golden highlight — 10.9:1 on obsidian */
  --gold-2:     #ffd27a;
  --blood-ink:  #8b0000;   /* 7.4:1 on linen */
  --gold-ink:   #7a4f0c;   /* 6.1:1 on linen */

  --glow-ember: 0 0 .45em rgba(255, 59, 78, .55), 0 0 1.4em rgba(204, 6, 30, .3);
  --glow-gold:  0 0 .45em rgba(242, 184, 75, .55), 0 0 1.6em rgba(230, 140, 30, .25);
  --glow-blood: 0 0 .45em rgba(204, 6, 30, .6), 0 0 1.4em rgba(139, 0, 0, .35);

  /* Roles — dark scenes */
  --d-text:  #f5ece0;     /* 17.6:1 on obsidian */
  --d-muted: #c2ad98;     /* 9.4:1 on obsidian */
  --d-line:  rgba(245, 236, 224, .12);
  --d-line-2: rgba(245, 236, 224, .22);
  --d-panel: rgba(16, 10, 10, .86);
  --d-field: rgba(6, 4, 4, .6);
  --d-edge:  rgba(255, 59, 78, .24);   /* crimson hairline */

  /* Roles — light chapters */
  --l-text:  #170d0b;     /* 15.5:1 on linen */
  --l-muted: #5c4638;     /* 6.6:1 on linen */
  --l-line:  rgba(23, 13, 11, .14);
  --l-line-2: rgba(23, 13, 11, .28);
  --l-card:  #f8f1e4;

  --f-display: 'Syne', 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --fs-xs: .75rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem);
  --fs-xl: clamp(2rem, 1.2rem + 3vw, 3.875rem);
  --fs-hero: clamp(2.5rem, .9rem + 6.4vw, 7.25rem);

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4.5rem; --s9: clamp(5rem, 3.5rem + 6vw, 10rem);

  --gutter: clamp(1rem, .4rem + 2.6vw, 3rem);
  --max: 1360px;
  --header-h: 72px;
  --r: 18px;
  --r-sm: 10px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 160ms;
  --t: 300ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* scrollbar-gutter: the loader and modals lock scrolling, which hides the
   Windows scrollbar; reserving its gutter stops the page jumping sideways
   when scrolling is unlocked again. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); scrollbar-gutter: stable; }
html.no-js, html.no-lenis { scroll-behavior: smooth; }
body {
  background: var(--obsidian);
  color: var(--d-text);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
ul, ol { list-style: none; padding: 0; }
/* No overflow masks or fixed heights on headings or their wrappers, so
   descenders (g, y, p, j) are always fully visible. */
h1, h2, h3 { font-weight: 600; line-height: 1.12; padding-bottom: .06em; text-wrap: balance; overflow-wrap: break-word; }
p { text-wrap: pretty; overflow-wrap: break-word; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--obsidian); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.tone-light :focus-visible { outline-color: var(--blood-ink); }
.tone-red :focus-visible { outline-color: var(--bone); }

/* Lenis (smooth scroll) contract */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--s4); top: -100px; z-index: 1000;
  background: var(--gold); color: var(--obsidian); padding: var(--s3) var(--s4); border-radius: var(--r-sm);
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none;
}
.skip-link:focus { top: var(--s4); }

/* ---------- Scene (fixed WebGL background) ---------- */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scene > * { position: absolute; inset: 0; }
.scene-fallback { z-index: 0; }
.scene-canvas { z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity 1.8s var(--ease); }
.scene-grain, .scene-vignette { z-index: 2; }
.scene.is-ready .scene-canvas { opacity: 1; }
.scene-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(48vw 44vh at 76% 28%, rgba(204, 6, 30, .16), transparent 70%),
    radial-gradient(55vw 50vh at 70% 40%, rgba(242, 184, 75, .12), transparent 70%),
    radial-gradient(50vw 60vh at 8% 95%, rgba(139, 0, 0, .3), transparent 70%),
    linear-gradient(180deg, #120a09, var(--obsidian));
}
.scene-grain {   /* film grain + faint CRT scanlines */
  position: absolute; inset: 0; opacity: .1; mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .5) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.scene-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(8, 8, 10, .92) 100%); }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- Tones ---------- */
.tone-dark { color: var(--d-text); }
.tone-light { background: var(--linen); color: var(--l-text); }
.tone-red { background: var(--blood-ink); color: var(--bone); }

/* Constructivist stripe band (gold · crimson · blood) with an ember line */
.stripes { display: grid; grid-template-rows: repeat(3, 6px) 2px; }
.stripes span:nth-child(1) { background: var(--gold); }
.stripes span:nth-child(2) { background: var(--crimson); }
.stripes span:nth-child(3) { background: var(--blood); }
.stripes::after { content: ''; background: var(--ember); box-shadow: 0 0 10px rgba(255, 59, 78, .7); }
.stripes-hero { position: absolute; left: 0; right: 0; bottom: 0; transform-origin: left; }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader { display: grid; place-items: center; position: fixed; inset: 0; z-index: 500; background: var(--obsidian); }
.loader-inner { display: grid; gap: var(--s5); width: min(340px, 80vw); }
.loader-stripes { display: grid; grid-template-rows: repeat(3, 8px); gap: 0; }
.loader-stripes span { transform-origin: left; animation: stripe 1s var(--ease) both; }
.loader-stripes span:nth-child(1) { background: var(--gold); }
.loader-stripes span:nth-child(2) { background: var(--crimson); animation-delay: .1s; }
.loader-stripes span:nth-child(3) { background: var(--blood); animation-delay: .2s; }
@keyframes stripe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.loader-label { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--d-muted); }
.loader-count { color: var(--ember); text-shadow: var(--glow-ember); }
.loader-bar { height: 1px; background: var(--d-line-2); overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--ember); box-shadow: 0 0 8px var(--ember); transform-origin: left; transform: scaleX(0); }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: 0; transition: opacity var(--t); mix-blend-mode: difference; }
  .has-cursor .cursor.is-active { opacity: 1; }
  .cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
  .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ember); }
  .cursor-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--ember); transition: width var(--t) var(--ease), height var(--t) var(--ease), margin var(--t) var(--ease), background-color var(--t); }
  .cursor.is-hover .cursor-ring { width: 68px; height: 68px; margin: -34px 0 0 -34px; background: rgba(255, 59, 78, .2); }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--s9); position: relative; }
.section-head { max-width: 50rem; margin-bottom: var(--s8); }
.section-head-wide { max-width: 64rem; }
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--s5); color: var(--d-muted);
}
.eyebrow .idx { display: inline-flex; align-items: center; padding: .25rem .625rem; border-radius: 999px; border: 1px solid var(--ember); color: var(--ember); font-weight: 500; letter-spacing: .1em; box-shadow: 0 0 12px -2px rgba(255, 59, 78, .5), inset 0 0 8px -2px rgba(255, 59, 78, .4); }
.tone-light .eyebrow { color: var(--l-muted); }
.tone-light .eyebrow .idx { border-color: var(--blood-ink); background: var(--blood-ink); color: var(--bone); box-shadow: none; }
.tone-red .eyebrow { color: rgba(247, 239, 225, .85); }
.tone-red .eyebrow .idx { border-color: var(--obsidian); background: var(--obsidian); color: var(--gold); box-shadow: none; }
.section-title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-xl); letter-spacing: -.025em; line-height: 1.12; padding-bottom: .08em; }
.section-lede { margin-top: var(--s5); font-size: var(--fs-md); max-width: 40rem; color: var(--d-muted); }
.tone-light .section-lede { color: var(--l-muted); }
.tone-red .section-lede { color: rgba(247, 239, 225, .9); }
[data-anim="words"] .w { display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s3);
  min-height: 52px; padding: .875rem 1.75rem; border-radius: 999px;
  font-family: var(--f-body); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .04em; text-decoration: none; text-align: center;
  overflow: hidden; isolation: isolate; will-change: transform;
  transition: color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t) var(--ease); flex-shrink: 0; }
.btn:hover svg { transform: translateX(3px); }
.btn::before {   /* organic fill blooming from the pointer entry point */
  content: ''; position: absolute; z-index: -1; left: var(--bx, 50%); top: var(--by, 50%);
  width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: translate(-50%, -50%) scale(60); }
.btn-primary { background: var(--gold); color: var(--obsidian); box-shadow: 0 0 0 1px rgba(242, 184, 75, .6), 0 10px 34px -10px rgba(230, 140, 30, .75); }
.btn-primary::before { background: var(--crimson); }
.btn-primary:hover { color: var(--bone); box-shadow: 0 0 0 1px rgba(204, 6, 30, .7), 0 10px 40px -8px rgba(204, 6, 30, .7); }
.btn-ghost { color: var(--d-text); box-shadow: inset 0 0 0 1.5px var(--d-edge); background: rgba(8, 8, 10, .4); }
.btn-ghost::before { background: var(--ember); }
.btn-ghost:hover { color: var(--obsidian); box-shadow: inset 0 0 0 1.5px var(--ember), 0 0 24px -4px rgba(255, 59, 78, .6); }
.btn-ink { background: var(--obsidian); color: var(--gold); }
.btn-ink::before { background: var(--gold); }
.btn-ink:hover { color: var(--obsidian); }
.btn-sm { min-height: 44px; padding: .5rem 1.25rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid transparent; transition: background-color var(--t), border-color var(--t); }
.site-header.is-scrolled { background: rgba(8, 8, 10, .82); -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%); border-bottom-color: var(--d-line); }
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: linear-gradient(90deg, var(--gold), var(--gold), var(--crimson), var(--ember)); box-shadow: 0 0 10px rgba(242, 184, 75, .6); transform-origin: left; transform: scaleX(0); }
.header-inner { display: flex; align-items: center; gap: var(--s6); height: var(--header-h); }
.brand { flex-shrink: 0; display: block; }
.brand-logo { height: 40px; width: auto; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; gap: var(--s1); }
.primary-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); font-size: var(--fs-sm); font-weight: 500; letter-spacing: .02em; color: var(--d-muted); text-decoration: none; transition: color var(--t-fast); }
.primary-nav a::after { content: ''; position: absolute; left: var(--s3); right: var(--s3); bottom: 8px; height: 2px; background: var(--ember); box-shadow: 0 0 8px var(--ember); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
.primary-nav a:hover, .primary-nav a[aria-current="true"] { color: var(--d-text); }
.primary-nav a:hover::after, .primary-nav a[aria-current="true"]::after { transform: scaleX(1); }

.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; position: relative; }
.menu-toggle span { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--d-text); transition: transform var(--t) var(--ease); }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: 0; z-index: 90; padding: calc(var(--header-h) + var(--s5)) var(--gutter) var(--s6); background: var(--obsidian); display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu li { border-bottom: 1px solid var(--d-line); }
.mobile-menu nav a { display: flex; align-items: baseline; gap: var(--s4); min-height: 68px; padding-block: var(--s3); font-family: var(--f-display); font-size: 2rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; text-decoration: none; }
.mobile-menu nav a:hover { color: var(--gold); }
.mobile-menu nav a span { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--ember); letter-spacing: .1em; }
.mobile-menu-contact { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--d-muted); min-height: 44px; display: inline-flex; align-items: center; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--header-h) + var(--s7)) var(--s8); }
.hero-inner { position: relative; }
.hero-kicker { display: inline-flex; align-items: center; gap: var(--s3); padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--d-edge); background: rgba(8, 8, 10, .5); font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--d-muted); margin-bottom: var(--s6); }
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); flex-shrink: 0; }
.pulse-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ember); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }

.hero-title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-hero); line-height: 1.08; letter-spacing: -.035em; padding-bottom: 0; }
/* No overflow mask: lines reveal with a rise + fade, so descenders are never cut. */
.hero-title .line { display: block; }
.hero-title .line-inner { display: block; will-change: transform; }
.hero-title em { font-style: normal; font-weight: 800; color: var(--ember); text-shadow: var(--glow-ember); }
.hero-sub { margin-top: var(--s6); max-width: 36rem; font-size: clamp(1.125rem, 1rem + .3vw, 1.3125rem); color: var(--d-muted); line-height: 1.6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s7); }
/* Core value badge: Existing + Analysis + Design */
.hero-formula {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .35em .5em; margin-top: var(--s5);
  padding: .65rem 1.1rem; border-radius: var(--r-sm); border: 1px solid var(--d-edge); background: rgba(8, 8, 10, .62);
  font-family: var(--f-mono); font-size: clamp(.8125rem, .75rem + .25vw, .9375rem); letter-spacing: .04em; line-height: 1.5; color: var(--d-text);
}
.hero-formula span { color: var(--ember); }

/* Metrics: hairlines are the grid gap, so wrapping never cuts through text */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1px; margin-top: var(--s8); max-width: 68rem;
  background: var(--d-edge); border: 1px solid var(--d-edge); border-radius: var(--r-sm); overflow: hidden;
  box-shadow: 0 0 40px -18px rgba(255, 59, 78, .5);
}
.metric { padding: var(--s4) var(--s5); background: rgba(8, 8, 10, .82); min-width: 0; }
.metric dt { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); }
.metric dd { margin-top: var(--s1); font-family: var(--f-mono); font-size: clamp(1.125rem, .85rem + .8vw, 1.5rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.35; color: var(--ember); text-shadow: var(--glow-ember); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Proposition ---------- */
.prop-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s8); align-items: end; }
.prop-list li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s4); padding-block: var(--s5); border-top: 1px solid var(--d-line-2); }
.prop-list li:last-child { border-bottom: 1px solid var(--d-line-2); }
.prop-k { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.prop-list p { color: var(--d-muted); }

/* ---------- Service cards (light) ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.card {
  position: relative; display: flex; flex-direction: column; padding: var(--s7) var(--s6) var(--s6); border-radius: var(--r); background: var(--l-card);
  border: 1px solid var(--l-line); overflow: hidden; isolation: isolate; min-width: 0;
  transition: translate var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);   /* not transform: GSAP owns it */
}
.card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--gold), var(--crimson), var(--blood)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.card::before {   /* crimson light spot that follows the pointer (set by JS) */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), rgba(204, 6, 30, .1), rgba(242, 184, 75, .06) 40%, transparent 70%);
  transition: opacity var(--t) var(--ease);
}
.card:hover::before { opacity: 1; }
.card:hover { translate: 0 -4px; box-shadow: 0 24px 48px -28px rgba(36, 19, 12, .55); border-color: var(--l-line-2); }
.card:hover::after { transform: scaleX(1); }
.card-icon { width: 46px; height: 46px; margin-bottom: var(--s6); fill: none; stroke: var(--blood-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.card-num { position: absolute; top: var(--s7); right: var(--s6); font-family: var(--f-display); font-weight: 700; font-size: 1.625rem; line-height: 1.15; color: var(--brass); }
.card-title { font-family: var(--f-display); font-size: clamp(1.3125rem, 1.1rem + .6vw, 1.625rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.18; margin-bottom: var(--s4); max-width: 24ch; padding-right: 2.5rem; }
.nowrap { white-space: nowrap; }
.card p { color: var(--l-muted); font-size: var(--fs-sm); }
.card-spec { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: auto; padding-top: var(--s5); }
.card-spec li { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .02em; line-height: 1.3; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--l-line-2); color: var(--gold-ink); }
.card-spec li:first-child { background: var(--l-text); border-color: var(--l-text); color: var(--gold-2); }

/* ---------- Projects (dark) ---------- */
.project { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 5rem); align-items: center; padding-block: var(--s7); }
.project + .project { border-top: 1px solid var(--d-line); }
.project > * { min-width: 0; }
.project-flip .project-media { order: 2; }
.gallery-stage { position: relative; }
.gallery-main {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r);
  background: var(--mahogany); cursor: zoom-in; isolation: isolate;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 0 1px var(--d-edge), 0 0 50px -24px rgba(255, 59, 78, .55);
}
.gallery-main img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; will-change: transform; transition: filter var(--t), opacity .35s ease; }
.gallery-main img.is-swapping { opacity: 0; }
.gallery-main:hover img { filter: saturate(1.08) brightness(1.04); }
.gallery-main::after {   /* "view" cue, no overlay lines */
  content: 'View gallery'; position: absolute; right: var(--s4); bottom: var(--s4); z-index: 2;
  padding: .4rem .8rem; border-radius: 999px; background: var(--gold); color: var(--obsidian);
  font-family: var(--f-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity var(--t), transform var(--t) var(--ease);
}
.gallery-main:hover::after, .gallery-main:focus-visible::after { opacity: 1; transform: none; }
.gallery-nav { position: absolute; left: var(--s4); bottom: var(--s4); z-index: 3; display: flex; align-items: center; gap: var(--s2); padding: 4px; border-radius: 999px; background: rgba(8, 8, 10, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px var(--d-edge); }
.gallery-nav button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--d-text); transition: background-color var(--t-fast), color var(--t-fast); }
.gallery-nav button:hover { background: var(--ember); color: var(--obsidian); }
.gallery-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-count { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; color: var(--ember); min-width: 4.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.gallery-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); margin-top: var(--s3); }
.gallery-thumbs button { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-sm); background: var(--mahogany); cursor: pointer; min-height: 44px; box-shadow: 0 0 0 1px var(--d-line); transition: box-shadow var(--t); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: opacity var(--t), transform .6s var(--ease); }
.gallery-thumbs button:hover, .gallery-thumbs button:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
.gallery-thumbs button[aria-current="true"] { box-shadow: 0 0 0 2px var(--ember), 0 0 16px -2px rgba(255, 59, 78, .7); }
.gallery-thumbs button:hover img, .gallery-thumbs button:focus-visible img, .gallery-thumbs button[aria-current="true"] img { opacity: 1; }
.gallery-thumbs button:hover img { transform: scale(1.06); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.chips li { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .04em; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--d-line-2); color: var(--d-text); white-space: nowrap; }
.chips li:first-child { border-color: var(--ember); color: var(--ember); font-weight: 500; box-shadow: 0 0 12px -3px rgba(255, 59, 78, .6); }
.chips-light li { border-color: var(--l-line-2); color: var(--l-text); background: transparent; }
.chips-light li:first-child { background: transparent; border-color: var(--l-line-2); color: var(--l-text); font-weight: 400; box-shadow: none; }
.chips-light li:hover { border-color: var(--blood-ink); color: var(--blood-ink); }
.project-title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-lg); letter-spacing: -.025em; line-height: 1.16; margin-bottom: var(--s5); }
.project-body { color: var(--d-muted); margin-bottom: var(--s6); }
.project-body strong { color: var(--d-text); font-weight: 600; }

/* Video preview card (opens the film modal) */
.video-card { position: relative; border-radius: var(--r); overflow: hidden; background: var(--mahogany); box-shadow: 0 0 0 1px var(--d-edge); }
.video-launch { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); align-items: center; gap: var(--s4); width: 100%; padding: var(--s2); padding-right: var(--s5); text-align: left; transition: background-color var(--t); }
.video-launch:hover { background: var(--walnut); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: var(--obsidian); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.video-launch:hover .video-thumb img { transform: scale(1.06); }
.video-play { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--crimson); display: grid; place-items: center; animation: glow 2.6s var(--ease) infinite; }
.video-play svg { width: 16px; height: 16px; fill: var(--bone); margin-left: 2px; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(204, 6, 30, .65); } 70% { box-shadow: 0 0 0 14px rgba(204, 6, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(204, 6, 30, 0); } }
.video-meta { min-width: 0; }
.video-kicker { display: block; font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); }
.video-name { display: block; margin-top: 2px; font-family: var(--f-display); font-size: 1.125rem; line-height: 1.3; color: var(--d-text); }
.video-ext { display: block; margin-top: 4px; font-size: .8125rem; color: var(--d-muted); }
.video-fallback { display: flex; align-items: center; min-height: 56px; padding: var(--s3) var(--s4); color: var(--gold); font-weight: 600; }

/* Film modal */
.video-modal { margin: auto; width: min(1100px, 100vw - 32px); max-width: none;   /* margin: the global reset strips the UA centring */ max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--r); background: var(--obsidian); color: var(--d-text); box-shadow: 0 0 0 1px var(--d-edge), 0 0 80px -20px rgba(255, 59, 78, .45), 0 60px 120px -40px #000; overflow: auto; }
.video-modal::backdrop { background: rgba(8, 5, 3, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vm-inner { display: grid; gap: var(--s4); padding: var(--s5); }
.vm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s1) var(--s4); }
.vm-kicker { grid-column: 1; display: inline-flex; align-items: center; gap: var(--s3); font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); }
.vm-title { grid-column: 1; font-family: var(--f-display); font-size: clamp(1.375rem, 1rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -.015em; }
.vm-head .vm-close { position: static; grid-column: 2; grid-row: 1 / span 2; }
.vm-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-sm); overflow: hidden; background: #000; }
.vm-stage iframe, .vm-stage .vm-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vm-poster { display: grid; place-items: center; align-content: center; gap: var(--s4); padding: var(--s5); text-align: center; text-decoration: none; color: var(--d-text); }
.vm-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; z-index: 0; }
.vm-poster > :not(img) { position: relative; z-index: 1; }
.vm-poster .video-play { position: relative; left: auto; top: auto; margin: 0; width: 72px; height: 72px; }
.vm-poster .video-play svg { width: 26px; height: 26px; }
.vm-poster-text { max-width: 30rem; font-size: var(--fs-sm); background: rgba(8, 8, 10, .78); padding: var(--s2) var(--s4); border-radius: var(--r-sm); }
.vm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s2) var(--s4); font-size: .8125rem; color: var(--d-muted); }
.vm-foot a { color: var(--gold); min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* ---------- Track record (light) ---------- */
.record-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.sectors { border-radius: var(--r); background: var(--l-card); border: 1px solid var(--l-line); overflow: hidden; }
.sectors table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); table-layout: fixed; }
.sectors th, .sectors td { text-align: left; vertical-align: top; padding: .875rem 1rem; border-bottom: 1px solid var(--l-line); overflow-wrap: break-word; }
.sectors thead th { font-family: var(--f-mono); font-size: .6875rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--l-muted); background: var(--linen); }
.sectors thead th:nth-child(1) { width: 28%; }
.sectors tbody tr:last-child > * { border-bottom: 0; }
.sectors tbody th { font-family: var(--f-display); font-size: 1.0625rem; font-weight: 600; color: var(--blood-ink); }
.sectors td { color: var(--l-muted); }
.sectors td:nth-child(2) { color: var(--l-text); }
.sectors td:nth-child(3) { font-family: var(--f-mono); font-size: .8125rem; line-height: 1.5; color: var(--gold-ink); }
.sectors tbody tr { transition: background-color var(--t); }
.sectors tbody tr:hover { background: rgba(242, 184, 75, .18); }

.timeline-wrap { position: relative; padding: var(--s6) var(--s6) var(--s6) calc(var(--s6) * 2); border-radius: var(--r); background: var(--obsidian); color: var(--d-text); box-shadow: 0 0 0 1px var(--d-edge); }
/* Rail is centred on the 13px bullets (bullet centre = rail left + 1px) */
.timeline-line { position: absolute; left: calc(var(--s6) + 6.5px); top: calc(var(--s6) + 12px); bottom: calc(var(--s6) + 12px); width: 2px; background: var(--d-line-2); overflow: hidden; }
.timeline-fill { position: absolute; inset: 0; background: linear-gradient(180deg, var(--gold), var(--crimson) 60%, var(--ember)); box-shadow: 0 0 10px rgba(242, 184, 75, .7); transform-origin: top; }
.timeline li { position: relative; padding-bottom: var(--s6); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: calc(-1 * var(--s6) + 1px); top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--obsidian); border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(242, 184, 75, .6); z-index: 1; }
.t-year { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--gold); }
.timeline h3 { font-family: var(--f-display); font-size: 1.375rem; font-weight: 500; margin-block: var(--s1) var(--s2); }
.timeline p { color: var(--d-muted); font-size: var(--fs-sm); }

.stack { margin-top: var(--s8); display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s4); align-items: center; }
.stack .chips { margin: 0; }
.stack-k { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--l-muted); }

/* ---------- Process (dark) ---------- */
.process { position: relative; }
/* Rail runs through the centre of the 16px step nodes (12px margin + 8px) */
.process-path { position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--d-line-2); overflow: hidden; }
.process-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold), var(--gold), var(--crimson), var(--ember)); box-shadow: 0 0 10px rgba(242, 184, 75, .7); transform-origin: left; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); position: relative; }
.step { min-width: 0; }
.step-node { position: relative; display: block; width: 16px; height: 16px; margin-top: 12px; border-radius: 50%; background: var(--terracotta); border: 3px solid var(--gold); box-shadow: 0 0 12px rgba(242, 184, 75, .7); }
.step-num { display: block; margin-block: var(--s6) var(--s2); font-family: var(--f-display); font-weight: 800; font-size: 2.75rem; line-height: 1.15; color: var(--gold); text-shadow: var(--glow-gold); }
.step h3 { font-family: var(--f-display); font-size: 1.625rem; font-weight: 500; margin-bottom: var(--s2); }
.step p { color: var(--d-muted); font-size: var(--fs-sm); }

/* ---------- Estimator ---------- */
.panel { border-radius: var(--r); background: var(--d-panel); border: 1px solid var(--d-edge); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.engine { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--s4); align-items: start; }
.est-group { border: 0; padding: var(--s6); min-width: 0; }
.est-group + .est-group { border-top: 1px solid var(--d-line); }
.est-legend { float: left; width: 100%; display: flex; align-items: center; gap: var(--s3); padding: 0; margin-bottom: var(--s5); font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); }
.est-legend + * { clear: both; }
.est-legend span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--ember); color: var(--ember); font-weight: 500; letter-spacing: 0; box-shadow: 0 0 10px -2px rgba(255, 59, 78, .6); }

.field { margin-bottom: var(--s5); min-width: 0; }
.field:last-child { margin-bottom: 0; }
.size-panel { margin-top: var(--s5); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-bottom: var(--s5); }
.field-row .field { margin-bottom: 0; }
.label { display: flex; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); font-size: var(--fs-sm); font-weight: 500; }
.label output { font-family: var(--f-mono); color: var(--ember); font-weight: 500; }
.req { color: var(--gold); }
.opt { font-weight: 400; color: var(--d-muted); }
.hint { margin-top: var(--s2); font-size: var(--fs-sm); color: var(--d-muted); }
.hint-accent { color: var(--ember); font-family: var(--f-mono); font-size: .8125rem; }

.select, .input, .textarea {
  display: block; width: 100%; min-height: 50px; padding: .75rem 1rem;
  background: var(--d-field); border: 1px solid var(--d-line-2); border-radius: var(--r-sm);
  font-size: var(--fs-base); line-height: 1.4; color: var(--d-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.select {
  -webkit-appearance: none; appearance: none; padding-right: 2.75rem; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ff3b4e' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.select option { background: var(--mahogany); color: var(--d-text); }
.select:hover, .input:hover, .textarea:hover { border-color: rgba(245, 236, 224, .4); }
.select:focus-visible, .input:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 59, 78, .22), 0 0 18px -4px rgba(255, 59, 78, .6); }
.select:disabled { opacity: .45; cursor: not-allowed; }
.textarea { resize: vertical; min-height: 120px; }
.textarea::placeholder, .input::placeholder { color: rgba(196, 173, 146, .7); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(204, 6, 30, .22); }
.field-error { margin-top: var(--s2); font-size: var(--fs-sm); color: #ff6b80; font-weight: 600; }   /* 6.2:1 on panel */

.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; --fill: 0%; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ember) var(--fill), var(--d-line-2) var(--fill)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--d-line-2); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ember); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--obsidian); border: 3px solid var(--ember); box-shadow: 0 0 12px var(--ember); transition: transform var(--t-fast); }
.range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--obsidian); border: 3px solid var(--ember); box-shadow: 0 0 12px var(--ember); }
.range:active::-webkit-slider-thumb { transform: scale(1.2); }

.engine-out { position: sticky; top: calc(var(--header-h) + 16px); padding: var(--s6); overflow: hidden; }
.out-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding-bottom: var(--s4); margin-bottom: var(--s4); border-bottom: 1px solid var(--d-line); }
.out-title { display: inline-flex; align-items: center; gap: var(--s3); font-family: var(--f-mono); font-size: var(--fs-xs); font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--d-muted); }
.out-status { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .14em; color: var(--ember); padding: .125rem .5rem; border: 1px solid rgba(255, 59, 78, .5); border-radius: 4px; transition: background-color var(--t-fast), color var(--t-fast); }
.out-status.is-busy { background: var(--gold); border-color: var(--gold); color: var(--obsidian); }

.pipeline { position: relative; margin-bottom: var(--s5); }
.pipe-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 0 var(--s3); align-items: start; padding-block: .5rem; }
.pipe-node { position: relative; z-index: 1; width: 10px; height: 10px; margin: 6px 0 0 6px; border-radius: 50%; border: 2px solid var(--ember); background: var(--mahogany); box-shadow: 0 0 8px rgba(255, 59, 78, .6); }
.pipe-step.is-sum .pipe-node { width: 14px; height: 14px; margin: 4px 0 0 4px; border-color: var(--gold); background: var(--crimson); box-shadow: 0 0 12px rgba(204, 6, 30, .8); }
/* Connector: a plain block scaled by JS — no SVG dash maths, so it can't stick half-drawn */
.pipe-link { position: absolute; left: 10px; top: 24px; width: 2px; height: calc(100% - 8px); background: linear-gradient(180deg, rgba(255, 59, 78, .8), rgba(255, 59, 78, .25)); transform-origin: top; }
.pipe-step:last-child .pipe-link { display: none; }
.pipe-label { font-size: .875rem; font-weight: 500; line-height: 1.35; min-width: 0; }
.pipe-formula { display: block; margin-top: 2px; font-family: var(--f-mono); font-size: .75rem; font-weight: 400; color: var(--d-muted); overflow-wrap: anywhere; }
.pipe-formula b { font-weight: 500; color: var(--ember); }
.pipe-value { font-family: var(--f-mono); font-size: .875rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.pipe-step.is-sum .pipe-value { color: var(--gold); text-shadow: var(--glow-gold); }
.pipe-step.is-off { opacity: .4; }

.out-result { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--s5); align-items: center; padding-block: var(--s5); border-block: 1px solid var(--d-line); }
.gauge { position: relative; }
.gauge svg { width: 100%; overflow: visible; }
.gauge path { fill: none; stroke-linecap: round; }
.gauge-track { stroke: var(--d-line-2); stroke-width: 8; }
.gauge-high { stroke: var(--crimson); stroke-width: 8; filter: drop-shadow(0 0 4px rgba(204, 6, 30, .8)); }
.gauge-low { stroke: var(--gold); stroke-width: 8; filter: drop-shadow(0 0 4px rgba(242, 184, 75, .8)); }
.gauge-days { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; display: grid; }
.gauge-days span { font-family: var(--f-mono); font-size: 1.375rem; font-weight: 500; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gauge-days small { font-size: .75rem; color: var(--d-muted); margin-top: 4px; }
.out-k { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--d-muted); }
.out-total { font-family: var(--f-mono); font-weight: 600; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; letter-spacing: -.04em; color: var(--gold); text-shadow: var(--glow-gold); font-variant-numeric: tabular-nums; margin-top: var(--s2); overflow-wrap: anywhere; }
.out-sub { font-size: var(--fs-sm); color: var(--d-muted); margin-top: var(--s2); }
.min-badge { display: inline-block; margin-top: var(--s3); font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .5rem; border-radius: 4px; background: var(--crimson); color: var(--obsidian); font-weight: 600; }

.breakdown { width: 100%; border-collapse: collapse; margin-block: var(--s4); font-size: var(--fs-sm); }
.breakdown th, .breakdown td { padding: .5rem 0; border-bottom: 1px solid var(--d-line); vertical-align: top; }
.breakdown th { text-align: left; font-weight: 500; color: var(--d-muted); padding-right: var(--s3); }
.breakdown td { text-align: right; font-family: var(--f-mono); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.breakdown-total th, .breakdown-total td { border-bottom: 0; padding-top: var(--s3); color: var(--d-text); }
.breakdown-total td { color: var(--gold); }
.est-alt { font-size: var(--fs-sm); padding: var(--s2) var(--s3); margin-bottom: var(--s3); border-left: 3px solid var(--ember); background: rgba(255, 59, 78, .08); border-radius: 0 6px 6px 0; }
.est-turnaround { font-size: var(--fs-sm); font-family: var(--f-mono); }
.est-note { font-size: var(--fs-sm); color: var(--d-muted); font-style: italic; margin-block: var(--s2) var(--s5); }

.enquiry { margin-top: var(--s4); padding: var(--s6); }
.enquiry-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s4) var(--s6); align-items: baseline; margin-bottom: var(--s5); }
.enquiry-title { font-family: var(--f-display); font-size: var(--fs-lg); letter-spacing: -.02em; }
.enquiry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.enquiry-grid .field { margin-bottom: 0; }
.field-wide { grid-column: 1 / -1; }
.form-status { margin-top: var(--s3); min-height: 1.5em; font-size: var(--fs-sm); color: var(--ember); }

/* ---------- FAQ (light) ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s8); align-items: start; }
.faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
.faq-list { border-top: 2px solid var(--l-text); }
.faq { border-bottom: 1px solid var(--l-line-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 72px; padding-block: var(--s4); cursor: pointer; list-style: none; font-family: var(--f-display); font-size: 1.3125rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; transition: color var(--t-fast); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background:
  linear-gradient(var(--bone), var(--bone)) center / 10px 2px no-repeat,
  linear-gradient(var(--bone), var(--bone)) center / 2px 10px no-repeat, var(--blood-ink); transition: transform var(--t) var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--blood-ink); }
.faq-a p { color: var(--l-muted); padding-bottom: var(--s5); max-width: 46rem; }
.faq-a a { color: var(--blood-ink); font-weight: 600; }

/* ---------- Contact (terracotta) ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-title { font-size: clamp(2.5rem, 1.3rem + 4vw, 5rem); font-weight: 700; line-height: 1.1; }
.contact-links { font-style: normal; margin-top: var(--s7); border-top: 2px solid var(--bone); }
.contact-links a { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s3); align-items: center; min-height: 56px; border-bottom: 1px solid rgba(247, 239, 225, .3); text-decoration: none; overflow-wrap: anywhere; transition: padding-left var(--t) var(--ease), color var(--t-fast); }
.contact-links a span { font-family: var(--f-mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(247, 239, 225, .82); }
.contact-links a:hover { padding-left: var(--s2); color: var(--gold-2); }
.contact-form { padding: var(--s6); border-radius: var(--r); background: var(--obsidian); color: var(--d-text); box-shadow: 0 0 0 1px var(--d-edge), 0 40px 80px -40px rgba(8, 8, 10, .8); }
.contact-form .btn-ink { background: var(--gold); color: var(--obsidian); }
.contact-form .btn-ink::before { background: var(--ember); }

/* ---------- Footer ---------- */
.site-footer { background: var(--obsidian); }
.footer-inner { display: grid; justify-items: center; gap: var(--s4); text-align: center; padding-block: var(--s7); }
.footer-logo { height: 48px; width: auto; }
.footer-services { font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .08em; color: var(--d-muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s4); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); text-decoration: none; }
.footer-links a:hover { color: var(--ember); }
.footer-copy { font-size: var(--fs-xs); color: var(--d-muted); }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: var(--obsidian); color: var(--d-text); }
.lightbox::backdrop { background: var(--obsidian); }
.lightbox-inner { position: relative; height: 100%; display: grid; place-items: center; padding: 72px clamp(16px, 7vw, 104px); }
.lightbox-figure { display: grid; gap: var(--s3); justify-items: center; }
.lightbox-figure img { max-width: 100%; max-height: calc(100dvh - 170px); width: auto; object-fit: contain; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--d-edge); }
.lightbox-figure figcaption { font-size: var(--fs-sm); color: var(--d-muted); text-align: center; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--obsidian); background: var(--gold); box-shadow: 0 0 18px -4px rgba(242, 184, 75, .8); transition: background-color var(--t), box-shadow var(--t); }
.lb-btn:hover { background: var(--ember); box-shadow: 0 0 18px -2px rgba(255, 59, 78, .8); }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-prev { left: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(8px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lb-close { right: clamp(8px, 2vw, 24px); top: 12px; }
.lb-count { position: absolute; left: clamp(8px, 2vw, 24px); top: 26px; font-family: var(--f-mono); font-size: var(--fs-xs); letter-spacing: .12em; color: var(--ember); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .primary-nav a { padding: 0 var(--s2); }
  .engine { grid-template-columns: 1fr; }
  .engine-out { position: relative; top: 0; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .primary-nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
  .brand-logo { height: 34px; }
  .prop-grid, .record-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: var(--s7); }
  .project, .project-flip { grid-template-columns: 1fr; gap: var(--s6); }
  .project-flip .project-media { order: 0; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: var(--s7); }
  .process-path { display: none; }
  .faq-grid .section-head { position: static; }
  .enquiry-grid { grid-template-columns: 1fr 1fr; }
  .enquiry-head { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section-head { margin-bottom: var(--s7); }
  .hero { align-items: flex-end; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: var(--s3) var(--s4); }
  .metric dd { font-size: clamp(1rem, 4.4vw, 1.25rem); }
  .prop-list li { grid-template-columns: 1fr; gap: var(--s2); }
  .card { padding: var(--s6) var(--s5) var(--s5); }
  .card-icon { margin-bottom: var(--s5); }
  .card-num { top: var(--s6); right: var(--s5); }
  .gallery-thumbs { gap: 4px; }
  .gallery-nav { left: var(--s2); bottom: var(--s2); }
  .gallery-main::after { display: none; }
  .video-launch { grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); padding-right: var(--s3); }
  .vm-inner { padding: var(--s4); }
  .sectors thead { display: none; }
  .sectors table, .sectors tbody, .sectors tr { display: block; }
  .sectors tr { padding: .875rem 1rem; border-bottom: 1px solid var(--l-line); }
  .sectors tbody tr:last-child { border-bottom: 0; }
  .sectors th, .sectors td { display: block; padding: 0; border: 0; }
  .sectors td:nth-child(2) { margin-block: 2px; }
  .timeline-wrap { padding: var(--s5) var(--s4) var(--s5) calc(var(--s4) + var(--s6)); }
  .timeline-line { left: calc(var(--s4) + 6.5px); top: calc(var(--s5) + 12px); bottom: calc(var(--s5) + 12px); }
  .stack { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .est-group, .engine-out, .enquiry, .contact-form { padding: var(--s5) var(--s4); }
  .field-row, .enquiry-grid { grid-template-columns: 1fr; }
  .out-result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .gauge { width: 190px; }
  .pipe-step { grid-template-columns: 22px minmax(0, 1fr); }
  .pipe-value { grid-column: 2; text-align: left; margin-top: 2px; }
  .contact-links a { grid-template-columns: 5rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .loader { display: none; }
}

@media print {
  .scene, .cursor, .loader, .site-header, .mobile-menu, .video-card, .video-modal, .enquiry, .contact-form, .lightbox { display: none !important; }
  body, .tone-dark, .tone-red { background: #fff; color: #000; }
  .metric dd, .out-total, .hero-title em, .step-num { text-shadow: none; }
}
