/* ============================================================
   DerNexus Website UI Kit — styles
   Faithful recreation of the dernexus.ca visual system,
   refined for a more immersive V2. Dark, red, Barlow + DM Sans.
   Fonts self-hosted from fonts/ (no CDN dependency).

   V2.1 additions: Alt-4 "Combined" button system (cursor bloom +
   ring glow), constellation portal labels, SphereGallery overlay,
   Proof + FAQ sections, mobile menu, and the audit fixes:
   hover states gated behind (hover:hover), :active press feedback,
   :focus-visible everywhere, charcoal-surface contrast tokens,
   reduced-motion coverage incl. smooth scroll.
   ============================================================ */

/* Barlow Condensed — self-hosted display face */
@font-face { font-family:'Barlow Condensed'; font-weight:100; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Thin.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:200; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-ExtraLight.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:300; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Light.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:400; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Regular.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:400; font-style:italic; font-display:swap; src:url('fonts/BarlowCondensed-Italic.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:500; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Medium.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:600; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-SemiBold.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:700; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Bold.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:800; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-ExtraBold.ttf') format('truetype'); }
@font-face { font-family:'Barlow Condensed'; font-weight:900; font-style:normal; font-display:swap; src:url('fonts/BarlowCondensed-Black.ttf') format('truetype'); }

/* DM Sans — self-hosted variable body face */
@font-face { font-family:'DM Sans'; font-weight:100 1000; font-style:normal; font-display:swap; src:url('fonts/DMSans-VariableFont_opsz_wght.ttf') format('truetype-variations'); }
@font-face { font-family:'DM Sans'; font-weight:100 1000; font-style:italic; font-display:swap; src:url('fonts/DMSans-Italic-VariableFont_opsz_wght.ttf') format('truetype-variations'); }

:root {
  --red: #E8192C; --accent: #E8192C; --black: #0D0D0D; --charcoal: #2A2A2A;
  --white: #FAFAFA; --mid-gray: #888888;
  --mid-gray-2: #9C9C9C;            /* muted text on charcoal surfaces (AA) */
  --red-hover: #FF2A3D;             /* lighter red — AA at small sizes on black */
  --border: rgba(250,250,250,0.08);
  --border-strong: rgba(250,250,250,0.15);
  --fg2: rgba(250,250,250,0.62);
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --maxw: 1180px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--black); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background: transparent; color: var(--white);
  font-family: var(--font-body); font-weight: 400; line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--red); color: #fff; }

/* ---- keyboard focus (global) ---- */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

/* ---- skip link (first tab stop) ---- */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 9500;
  background: var(--red); color: #fff; padding: 0.6rem 1rem; border-radius: 2px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.skip-link:focus-visible { transform: none; }

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

h1,h2,h3,h4 { font-family: var(--font-display); letter-spacing: -0.01em; line-height: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- shared atoms ---- */
.eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mid-gray);
  display: inline-flex; align-items: center; gap: 0.9rem;
}
.eyebrow::before { content:''; width: 2rem; height: 1px; background: var(--red); }
.eyebrow.center { justify-content: center; }
.eyebrow.center::after { content:''; width: 2rem; height: 1px; background: var(--red); }
.bg-charcoal .eyebrow { color: var(--mid-gray-2); }   /* AA on charcoal */

/* ---- buttons ----
   Primary = "Alt 2 Cursor Bloom" (fill only, no outer glow — user decision
   2026-06-12): red blooms from the exact cursor entry point (--bx/--by/--bsize
   set by the delegated listener in Primitives.jsx). Leaving collapses fast.
   Ghost = underline grows left to right + soft text glow (echoes hex bloom). */
.btn {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; border: 0; cursor: pointer;
  border-radius: 2px; display: inline-flex; align-items: center; gap: 0.6rem;
  transition: background .2s cubic-bezier(.22,1,.36,1), color .2s cubic-bezier(.22,1,.36,1), transform .15s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1), opacity .2s cubic-bezier(.22,1,.36,1);
}
.btn-primary, .nav-cta, .form-submit {
  --bx: 50%; --by: 50%; --bsize: 800px;
  background: transparent; color: #fff;
  border: 1px solid rgba(232,25,44,0.55);
  position: relative; overflow: hidden; isolation: isolate;
  /* leave-state transitions: fast collapse */
  transition: border-color .3s, color .2s cubic-bezier(.22,1,.36,1),
              transform .15s cubic-bezier(.22,1,.36,1);
}
.btn-primary { padding: 0.95rem 2.1rem; }
.btn-primary::before, .nav-cta::before, .form-submit::before {
  content: ''; position: absolute;
  top: var(--by); left: var(--bx);
  width: var(--bsize); height: var(--bsize); border-radius: 50%;
  background: var(--red);
  transform: translate(-50%,-50%) scale(0);
  opacity: 0;
  transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .3s .05s;
  z-index: -1;
}
.btn:active, .nav-cta:active, .form-submit:active { transform: translateY(0) scale(0.97); }
.btn .arrow { transition: transform .2s cubic-bezier(.22,1,.36,1); }
.btn .arrow svg { width: 16px; height: 16px; display: block; }

.btn-ghost {
  color: #fff; opacity: 0.6; font-weight: 500; letter-spacing: 0.05em;
  text-transform: none; padding: 0.5rem 0; position: relative;
}
.btn-ghost::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--red);
  box-shadow: 0 0 8px rgba(232,25,44,0.7);
  transition: width .4s cubic-bezier(.22,1,.36,1);
}

/* ---- nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2.5rem; display: flex; align-items: center; justify-content: space-between;
  background: rgba(13,13,13,0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); transition: padding .3s cubic-bezier(.22,1,.36,1), background .3s;
}
.nav.scrolled { padding: 0.8rem 2.5rem; background: rgba(13,13,13,0.9); }
.nav-logo img { height: 48px; width: auto; }
.nav-links { display: flex; gap: 2.4rem; align-items: center; list-style: none; }
.nav-links a { color: var(--mid-gray); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; transition: color .2s; white-space: nowrap; position: relative; }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { content:''; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: var(--red); }
/* inline-flex (not bare inline) so the bloom ::before clips correctly;
   .nav-links a.nav-cta specificity replaces the old !important override */
.nav-links a.nav-cta { color: #fff; display: inline-flex; align-items: center; padding: 0.5rem 1.25rem; border-radius: 2px; font-weight: 600; }

/* burger (≤860px) */
.nav-burger {
  display: none; width: 44px; height: 44px; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 0; cursor: pointer;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--white);
  transition: transform .25s cubic-bezier(.22,1,.36,1), opacity .2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 860px){
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav { padding: 1rem 1.4rem; }
  .nav.scrolled { padding: 0.7rem 1.4rem; }
}

/* mobile menu overlay (under the fixed nav so logo + burger stay on top) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(13,13,13,0.96);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 2.5rem 3rem;
  opacity: 0; visibility: hidden;
  transition: opacity .3s cubic-bezier(.22,1,.36,1), visibility 0s .3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transition: opacity .3s cubic-bezier(.22,1,.36,1); }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; }
.mobile-menu li { opacity: 0; transform: translateY(14px); transition: opacity .35s cubic-bezier(.22,1,.36,1), transform .35s cubic-bezier(.22,1,.36,1); }
.mobile-menu.open li { opacity: 1; transform: none; }
.mobile-menu a { font-family: var(--font-display); font-size: 2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--white); }
.mobile-menu-cta { color: var(--red) !important; }
.mobile-menu-tel { position: absolute; bottom: 2rem; left: 2.5rem; color: var(--mid-gray); font-size: 0.85rem; letter-spacing: 0.08em; }
@media (min-width: 861px){ .mobile-menu { display: none; } }

/* ---- layout ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 7rem 2.5rem; }
.section-full { padding: 7rem 0; }
.section-full .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 2.5rem; }
.bg-charcoal {
  background: rgba(42,42,42,0.82);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 80px, #000 calc(100% - 80px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 80px, #000 calc(100% - 80px), transparent);
}
.section-head { margin-bottom: 3.5rem; }
.section-title { font-size: clamp(2rem,4.5vw,3.6rem); font-weight: 700; text-transform: uppercase; line-height: 1.04; margin-top: 0.9rem; }

/* ---- hero ---- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 7rem 2.5rem 3.5rem; position: relative; overflow: hidden; }
.hero-bar { position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--red); }
.hero-glow { position: absolute; top: 24%; left: 46%; width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(232,25,44,0.14), transparent 62%); filter: blur(30px); pointer-events: none; animation: drift 14s cubic-bezier(.22,1,.36,1) infinite alternate; }
@keyframes drift { to { transform: translate(8%, -10%) scale(1.15); } }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 2rem; }
.hero-copy { position: relative; z-index: 3; }
.hero-logo-full { width: clamp(280px, 34vw, 440px); height: auto; margin-bottom: 2.2rem; }
.hero-eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mid-gray); line-height: 1.6;
  margin-bottom: 1.8rem;
  display: flex; gap: 0.8rem; align-items: flex-start;
  text-wrap: balance;
}
.hero-eyebrow::before {
  content: ''; flex-shrink: 0; width: 2rem; height: 1px;
  background: var(--red); margin-top: 0.58em;
}
.hero-headline { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 5.6rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 1.6rem; }
.hero-headline .muted { color: var(--mid-gray); font-weight: 300; }
.hero-headline .dot { color: var(--red); }
.hero-sub { font-size: 1.02rem; color: var(--fg2); max-width: 440px; line-height: 1.7; font-weight: 400; margin-bottom: 2.2rem; }
.hero-actions { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.hero-visual { position: relative; z-index: 2; align-self: stretch; min-height: 60svh; }
.nexus-field { position: absolute; inset: -6% -2% -6% -8%; }
.nexus-field canvas { width: 100%; height: 100%; display: block; }
body.no-nexus .hero-visual { display: none; }
body.no-nexus .hero-inner { grid-template-columns: 1fr; max-width: 820px; }

/* constellation portal labels — track their satellite via transform */
.nexus-portal {
  position: absolute; top: 0; left: 0;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(250,250,250,0.72);
  background: rgba(13,13,13,0.55);
  border: 1px solid var(--border-strong); border-radius: 2px;
  padding: 0.34rem 0.65rem 0.3rem 0.55rem;
  cursor: pointer; white-space: nowrap; will-change: transform;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: color .2s, border-color .2s, background .2s;
}
.nexus-portal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(232,25,44,0.6); }
.nexus-portal:focus-visible { color: #fff; border-color: rgba(232,25,44,0.6); }
@media (max-width: 880px){ .nexus-portal { display: none; } }

.scroll-cue { position: absolute; bottom: 2.2rem; right: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mid-gray-2); opacity: 0.7; z-index: 3; }
.scroll-cue .line { width: 1px; height: 2.6rem; background: rgba(250,250,250,0.2); position: relative; overflow: hidden; }
.scroll-cue .line::after { content:''; position:absolute; left:0; top:0; width:100%; height:100%; background: var(--red); transform: translateY(-100%); animation: cue 2s cubic-bezier(.22,1,.36,1) infinite; }
@keyframes cue { to { transform: translateY(100%); } }
@media (max-width: 880px){
  .hero { justify-content: flex-end; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { position: absolute; inset: 0; z-index: 1; opacity: 0.4; min-height: 0; }
  .nexus-field { inset: 0; }
  .hero-copy { z-index: 3; }
  .scroll-cue { display: none; }
}

/* ---- stat bar ---- */
.statbar { display: flex; gap: 2rem; justify-content: space-around; flex-wrap: wrap; padding: 2.2rem 2.5rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; line-height: 1; }
.stat .num span { color: var(--red); }
.stat .lbl { font-size: 0.72rem; color: var(--mid-gray); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; margin-top: 0.3rem; }

/* ---- marquee ---- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--border); padding: 1.1rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: scrollx 26s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mid-gray); display: inline-flex; align-items: center; gap: 3rem; }
.marquee-track span::after { content:''; width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---- problem split ---- */
.problem { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.problem-statement { font-family: var(--font-display); font-size: clamp(1.7rem,3vw,2.7rem); font-weight: 600; line-height: 1.18; color: rgba(250,250,250,0.92); }
.problem-statement em { font-style: normal; color: var(--red); }
.problem-points { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; }
.problem-points li { display: flex; gap: 1rem; align-items: flex-start; font-size: 0.95rem; color: var(--fg2); line-height: 1.6; }
.problem-points li::before { content:''; min-width: 18px; height: 18px; border: 1px solid var(--red); border-radius: 2px; margin-top: 3px; background: rgba(232,25,44,0.1); }
@media (max-width: 820px){ .problem { grid-template-columns: 1fr; gap: 2.4rem; } }

/* ---- services grid ---- */
.services-intro { font-size: 1rem; color: var(--fg2); line-height: 1.7; max-width: 540px; margin-top: 1.1rem; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: var(--border); border: 1px solid var(--border); }
.service { background: var(--black); padding: 2.6rem 2.1rem; position: relative; overflow: hidden; transition: background .25s; cursor: default; }
.service::before { content:''; position: absolute; top:0; left:0; width:100%; height:2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.22,1,.36,1); }
.service .ic { width: 30px; height: 30px; margin-bottom: 1.3rem; color: var(--red); }
.service .ic svg { width:100%; height:100%; fill:none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.7rem; }
.service p { font-size: 0.9rem; color: rgba(250,250,250,0.55); line-height: 1.7; transition: color .25s; }
.service .tag { display: inline-block; margin-top: 1.2rem; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-hover); font-weight: 600; transition: color .25s; }
@media (max-width: 980px){ .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px){ .services { grid-template-columns: 1fr; } }

/* ---- process steps ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 3.5rem; position: relative; }
.steps::before { content:''; position: absolute; top: 1.5rem; left: 3rem; right: 3rem; height: 1px; background: var(--border); }
.step { padding: 0 1.8rem; position: relative; }
.step .num { width: 3rem; height: 3rem; border-radius: 50%; background: var(--black); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--mid-gray); margin-bottom: 1.4rem; position: relative; z-index: 1; transition: border-color .3s, color .3s, transform .3s cubic-bezier(.22,1,.36,1); }
.step h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45rem; }
.step p { font-size: 0.83rem; color: rgba(250,250,250,0.58); line-height: 1.6; }
@media (max-width: 820px){ .steps { grid-template-columns: 1fr 1fr; gap: 2rem; } .steps::before { display:none; } .step { padding: 0; } }

/* ---- proof / cases ---- */
/* auto-fit so the grid fits exactly the number of case cards (2 today, up to 3)
   with no empty/phantom track; mobile drops to a single column below. */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 1rem; }
.proof {
  background: var(--black); padding: 2.4rem; transition: background .25s;
  /* it's a real <button> now — reset chrome, keep the card look */
  border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: block; width: 100%;
}
.proof .lbl { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-hover); font-weight: 600; margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.7rem; }
.proof .lbl::after { content:''; flex:1; height:1px; background: var(--border); }
.proof h3 { font-size: 1.55rem; font-weight: 800; text-transform: uppercase; line-height: 1.05; margin-bottom: 0.55rem; min-height: 2.1em; }
.proof .ind { font-size: 0.72rem; color: var(--mid-gray); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.1rem; }
.proof p { font-size: 0.86rem; color: rgba(250,250,250,0.6); line-height: 1.65; }
.proof .res { margin-top: 1.3rem; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: rgba(250,250,250,0.88); }
.proof .res span { color: var(--red); }
.proof-cta { margin-top: 2.5rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.proof-cta-note { font-size: 0.78rem; color: var(--mid-gray); max-width: 34ch; line-height: 1.5; }
@media (max-width: 820px){ .proof-grid { grid-template-columns: 1fr; } }

/* ---- faq accordion ---- */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q { margin: 0; }
.faq-q button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  padding: 1.25rem 0.2rem;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--white);
  transition: color .2s;
}
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--mid-gray); transition: transform .3s cubic-bezier(.22,1,.36,1), color .2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--red); }
.faq-a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.22,1,.36,1);
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; min-height: 0; }
.faq-a-inner p { font-size: 0.95rem; color: var(--fg2); line-height: 1.75; max-width: 64ch; padding: 0 0.2rem 1.4rem; }

/* ---- contact / cta ---- */
.cta { text-align: center; position: relative; }
.cta::before { content:''; position:absolute; top:0; left:50%; transform: translateX(-50%); width: 3px; height: 4rem; background: var(--red); }
.cta h2 { font-size: clamp(2.4rem,7vw,5.4rem); font-weight: 900; text-transform: uppercase; line-height: 0.95; margin: 1.6rem 0 2.4rem; padding-bottom: 0.1em; }
.cta h2 span { color: var(--red); }
.cta p { font-size: 1rem; color: var(--fg2); line-height: 1.7; max-width: 520px; margin: 0 auto 2.4rem; }
.contact-hero { margin-bottom: 2.6rem; padding-top: 4.8rem; }
.form-intro { font-size: 0.85rem; color: var(--fg2); line-height: 1.6; margin-bottom: 1.5rem; text-align: center; }
.opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--mid-gray-2); }
.form { max-width: 540px; margin: 0 auto; text-align: left; background: var(--charcoal); border: 1px solid var(--border); border-radius: 4px; padding: 2rem; }
.form h3 { font-size: 1.4rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1.5rem; text-align: center; }
.fg { margin-bottom: 1.1rem; }
.fg label { display: block; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid-gray-2); margin-bottom: 0.4rem; }
.fg input, .fg select, .fg textarea { width: 100%; background: var(--black); border: 1px solid var(--border-strong); border-radius: 2px; color: #fff; font-family: var(--font-body); font-size: 0.9rem; padding: 0.7rem 0.9rem; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232,25,44,0.25); }
.fg input::placeholder, .fg textarea::placeholder { color: rgba(250,250,250,0.45); }
.fg textarea { resize: vertical; min-height: 92px; }
.fg select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.2rem; cursor: pointer; }
.fg select option { background: var(--charcoal); }
.form-submit { width: 100%; border-radius: 2px; font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.9rem 1.5rem; cursor: pointer; margin-top: 0.4rem; }
.form-note { font-size: 0.72rem; color: var(--mid-gray-2); margin-top: 0.8rem; text-align: center; }
.form-success { background: var(--red); border-radius: 2px; padding: 1.6rem; text-align: center; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.form-success-in { animation: successIn .35s cubic-bezier(.22,1,.36,1); }
@keyframes successIn { from { opacity: 0; transform: translateY(12px); } }
.form-error { margin-top: 0.9rem; padding: 0.7rem 0.95rem; border-left: 3px solid var(--red); background: rgba(232,25,44,0.1); color: #f3c7cc; font-size: 0.85rem; line-height: 1.5; border-radius: 0 2px 2px 0; }
.form-submit:disabled { opacity: 0.6; cursor: progress; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center; }
.about-text .section-title { margin-bottom: 1.6rem; }
.about-text p { font-size: 0.98rem; color: var(--fg2); line-height: 1.75; margin-bottom: 1.1rem; max-width: 46ch; }
.about-card { background: var(--charcoal); border: 1px solid var(--border); border-radius: 4px; padding: 2rem 2.1rem; position: relative; overflow: hidden; }
.about-card::before { content:''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--red); }
.about-card-header { font-family: var(--font-display); font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.7rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@media (prefers-reduced-motion: no-preference){ .live-dot { animation: livePulse 2.2s infinite; } }
@keyframes livePulse { 0%{ box-shadow: 0 0 0 0 rgba(232,25,44,0.5);} 70%{ box-shadow: 0 0 0 8px rgba(232,25,44,0);} 100%{ box-shadow: 0 0 0 0 rgba(232,25,44,0);} }
.capability-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.capability-list li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.92rem; color: var(--fg2); }
.capability-list li::before { content:'\2192'; color: var(--red); font-weight: 700; }
@media (max-width: 820px){ .about-grid { grid-template-columns: 1fr; gap: 2.4rem; } }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--border); padding: 3rem 2.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.footer img { width: 180px; opacity: 0.85; }
.footer-links { display: flex; gap: 1.4rem; list-style: none; align-items: center; flex-wrap: wrap; }
.footer-links a { font-size: 0.74rem; color: var(--mid-gray); letter-spacing: 0.05em; text-transform: uppercase; transition: color .2s; }
.footer-divider { width: 1px; height: 16px; background: var(--border-strong); }
.social-link { color: var(--mid-gray); display: flex; transition: color .2s; }
.social-link svg { width: 18px; height: 18px; }
.copyright { text-align: center; font-size: 0.7rem; color: var(--mid-gray); padding: 1rem; border-top: 1px solid var(--border); }
@media (max-width: 720px){ .footer { flex-direction: column; align-items: flex-start; } .section, .section-full .inner, .hero { padding-left: 1.4rem; padding-right: 1.4rem; } }

/* ---- scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- responsive hexagon texture (behind all content) ---- */
.hex-field { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* ---- floating section scroll nav ---- */
.scrollnav { position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 8500; display: flex; flex-direction: column; gap: 0.6rem; }
.scrollnav-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: rgba(13,13,13,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s cubic-bezier(.22,1,.36,1), border-color .2s cubic-bezier(.22,1,.36,1), transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1), opacity .25s cubic-bezier(.22,1,.36,1), visibility 0s;
}
.scrollnav-btn svg { width: 22px; height: 22px; }
.scrollnav-btn:active { transform: scale(0.94); }
.scrollnav-btn.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(0.6); transition-delay: 0s, 0s, 0s, 0s, 0s, .25s; }
@media (max-width: 720px){ .scrollnav { right: 1rem; bottom: 1rem; } }

/* ============================================================
   SphereGallery — full-screen 3D gallery overlay
   ============================================================ */
.sg-overlay {
  position: fixed; inset: 0; z-index: 8800; background: var(--black);
  /* reveal blooms from the trigger point; an animation with fill-mode
     (not a class-gated transition) so a hidden tab can never strand it */
  animation: sgReveal .65s cubic-bezier(.22,1,.36,1) both;
}
@keyframes sgReveal {
  from { clip-path: circle(0px at var(--ox, 50%) var(--oy, 50%)); }
  to { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); }
}
.sg-overlay.sg-reduce { animation: none; clip-path: none; }
.sg-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(232,25,44,0.05), transparent 70%),
    radial-gradient(ellipse 120% 100% at 50% 120%, rgba(0,0,0,0.6), transparent 60%);
}
.sg-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.3rem 2rem;
  background: linear-gradient(to bottom, rgba(13,13,13,0.85), transparent);
}
.sg-title { display: flex; align-items: center; gap: 0.9rem; }
.sg-title h2 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
@media (prefers-reduced-motion: no-preference){ .sg-dot { animation: livePulse 2.2s infinite; } }
.sg-count { font-size: 0.72rem; color: var(--mid-gray); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.sg-controls { display: flex; gap: 0.8rem; align-items: center; }
.sg-viewtoggle { display: flex; border: 1px solid var(--border-strong); border-radius: 2px; overflow: hidden; }
.sg-viewtoggle button {
  background: transparent; border: 0; color: var(--mid-gray-2);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.45rem 0.9rem;
  cursor: pointer; transition: background .2s, color .2s;
}
.sg-viewtoggle button[aria-pressed="true"] { background: var(--red); color: #fff; }
.sg-viewtoggle button:disabled { opacity: 0.35; cursor: not-allowed; }
.sg-filter { display: flex; border: 1px solid var(--border-strong); border-radius: 2px; overflow: hidden; }
.sg-filter button {
  background: transparent; border: 0; color: var(--mid-gray-2);
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.45rem 0.9rem;
  cursor: pointer; transition: background .2s, color .2s; white-space: nowrap;
}
.sg-filter button[aria-pressed="true"] { background: var(--red); color: #fff; }
.sg-close {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: rgba(13,13,13,0.7); color: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s cubic-bezier(.22,1,.36,1);
}
.sg-close svg { width: 20px; height: 20px; }
.sg-close:active { transform: scale(0.94); }
.sg-stage { position: absolute; inset: 0; }
.sg-stage canvas { display: block; }
.sg-loading {
  position: absolute; inset: 0; display: flex; gap: 0.7rem; align-items: center; justify-content: center;
  color: var(--mid-gray); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.sg-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: sgPulse 1.1s cubic-bezier(.22,1,.36,1) infinite alternate; }
@keyframes sgPulse { from { transform: scale(0.6); opacity: 0.5; } to { transform: scale(1.15); opacity: 1; } }
.sg-caption {
  position: absolute; left: 2rem; bottom: 2rem; z-index: 5;
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--white);
  opacity: 0; transform: translateY(8px);
  transition: opacity .25s cubic-bezier(.22,1,.36,1), transform .25s cubic-bezier(.22,1,.36,1);
  pointer-events: none; max-width: 60vw;
}
.sg-caption.on { opacity: 1; transform: none; }
.sg-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: var(--mid-gray-2); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  pointer-events: none; transition: opacity .5s; white-space: nowrap;
}
.sg-hint.out { opacity: 0; }
.sg-index {
  position: absolute; inset: 0; padding: 6rem 2rem 2.5rem; overflow: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5px; align-content: start;
}
.sg-card {
  background: #141414; border: 1px solid var(--border); padding: 0 0 1.4rem;
  text-align: left; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: background .25s, border-color .25s;
}
.sg-card-img { display: block; aspect-ratio: 16/10; overflow: hidden; margin-bottom: 0.9rem; }
.sg-card-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(0.9); transition: filter .45s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.sg-card-img-empty, .sg-panel-media-empty { position: relative; background: #1A1A1A; }
.sg-card-img-empty::after, .sg-panel-media-empty::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 16px rgba(232,25,44,0.7); }
.sg-card-kicker { padding: 0 1.2rem; font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red-hover); font-weight: 600; }
.sg-card-title { padding: 0 1.2rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; text-transform: uppercase; line-height: 1.1; color: var(--white); }
.sg-card-meta { padding: 0 1.2rem; font-size: 0.72rem; color: var(--mid-gray); text-transform: uppercase; letter-spacing: 0.08em; }
.sg-empty { color: var(--mid-gray); padding: 2rem; grid-column: 1 / -1; }
.sg-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(960px, calc(100% - 3rem)); height: min(600px, calc(100% - 7rem));
  display: flex; overflow: hidden;
  background: #161616; border: 1px solid var(--border-strong); z-index: 7;
  animation: sgPanelIn .45s cubic-bezier(.22,1,.36,1);
}
@keyframes sgPanelIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)); } }
/* A definite panel height keeps every entry the same size regardless of the
   cover's aspect ratio: the media column fills it (object-fit:cover crops any
   portrait/landscape image cleanly instead of stretching a wide cover into a
   tall sliver), and the body column scrolls on its own for long write-ups.
   The close X stays pinned to the panel corner. */
.sg-panel-grid { display: grid; grid-template-columns: 1fr 1.1fr; width: 100%; height: 100%; }
.sg-panel-close {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(13,13,13,0.72);
  color: var(--white); display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s cubic-bezier(.22,1,.36,1);
}
.sg-panel-close svg { width: 18px; height: 18px; }
.sg-panel-close:active { transform: scale(0.94); }
/* Covers are 1200x750 title-cards (BG #121212) whose post title runs along the
   bottom; object-fit:cover would slice that title in the narrow media column.
   contain shows the whole card, and the #121212 backdrop matches the cover's own
   background so the letterbox is seamless — the card reads as part of the panel,
   never cropped. (Photos like the printer cover sit in a neutral dark frame.) */
.sg-panel-media { min-height: 0; height: 100%; background: #121212; }
.sg-panel-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sg-panel-body { padding: 2.2rem 2.2rem 1.8rem; height: 100%; overflow-y: auto; }
.sg-panel-kicker { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-hover); font-weight: 600; margin-bottom: 0.8rem; }
.sg-panel-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; text-transform: uppercase; line-height: 1; margin-bottom: 0.5rem; }
.sg-panel-meta { font-size: 0.72rem; color: var(--mid-gray); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1.2rem; }
.sg-panel-body p { font-size: 0.92rem; color: var(--fg2); line-height: 1.7; margin-bottom: 0.9rem; }
.sg-panel-result { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--red-hover); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.2rem; }
.sg-panel-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.6rem; }
.sg-back { background: transparent; border: 0; color: var(--mid-gray-2); font-family: var(--font-body); font-size: 0.85rem; cursor: pointer; padding: 0.5rem 0; transition: color .2s; }
.sg-panel-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--white); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  text-decoration: none; border-bottom: 1px solid var(--red); padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.sg-pager { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; color: var(--mid-gray); font-size: 0.78rem; }
.sg-pager button { width: 36px; height: 36px; border: 1px solid var(--border-strong); background: transparent; color: var(--white); font-size: 1.1rem; cursor: pointer; border-radius: 2px; transition: border-color .2s, background .2s; }
@media (max-width: 760px){
  .sg-panel-grid { grid-template-columns: 1fr; grid-template-rows: 200px minmax(0, 1fr); }
  .sg-panel-media { height: 200px; min-height: 0; overflow: hidden; }
  .sg-head { padding: 1rem 1.2rem; }
  .sg-title h2 { font-size: 1.2rem; }
  .sg-caption { left: 1.2rem; bottom: 4.6rem; }
  .sg-index { padding: 5.5rem 1rem 2rem; }
}

/* ============================================================
   Hover states — gated so touch devices never get sticky hovers.
   :active press feedback above stays available to every input type.
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover, .nav-links a.nav-cta:hover, .form-submit:hover {
    border-color: var(--red); color: #fff;
  }
  .btn-primary:hover::before, .nav-cta:hover::before, .form-submit:hover::before {
    transform: translate(-50%,-50%) scale(1); opacity: 1;
    transition: transform .52s cubic-bezier(.22,1,.36,1), opacity .2s;
  }
  .btn-primary:hover { transform: translateY(-2px); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn-ghost:hover { opacity: 1; text-shadow: 0 0 16px rgba(232,25,44,0.35); }
  .btn-ghost:hover::after { width: 100%; }
  .nav-links a:hover { color: var(--white); }
  .service:hover { background: var(--charcoal); }
  .service:hover::before { transform: scaleX(1); }
  .service:hover .tag { color: #FF5A6B; }                      /* AA on charcoal */
  .service:hover p { color: rgba(250,250,250,0.66); }          /* AA on charcoal */
  .step:hover .num { border-color: var(--red); color: #fff; transform: translateY(-3px); }
  .proof:hover { background: var(--charcoal); }
  .footer-links a:hover { color: #fff; }
  .social-link:hover { color: #fff; }
  .scrollnav-btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,25,44,0.3); }
  .nexus-portal:hover { color: #fff; border-color: rgba(232,25,44,0.6); background: rgba(13,13,13,0.8); }
  .faq-q button:hover { color: var(--red-hover); }
  .faq-q button:hover svg { color: var(--red); }
  .mobile-menu a:hover { color: var(--red-hover); }
  .sg-viewtoggle button:hover:not(:disabled):not([aria-pressed="true"]) { color: var(--white); }
  .sg-filter button:hover:not([aria-pressed="true"]) { color: var(--white); }
  .sg-close:hover, .sg-panel-close:hover { background: var(--red); border-color: var(--red); }
  .sg-card:hover { background: #1d1d1d; border-color: var(--border-strong); }
  .sg-card:hover .sg-card-img img { filter: none; transform: scale(1.05); }
  .sg-back:hover { color: var(--white); }
  .sg-panel-link:hover { color: var(--red); border-color: var(--white); }
  .sg-pager button:hover { border-color: var(--red); background: rgba(232,25,44,0.12); }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce){
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-glow, .marquee-track, .scroll-cue .line::after, .sg-pulse { animation: none; }
  .btn-primary::before, .nav-cta::before, .form-submit::before { transition: none; }
  .btn-primary, .nav-cta, .form-submit, .btn { transition: none; }
  .btn-ghost::after { transition: none; }
  .mobile-menu, .mobile-menu li { transition: none; }
  .faq-a { transition: none; }
  .sg-card-img img, .sg-caption, .sg-hint { transition: none; }
  .sg-panel { animation: none; }
  .form-success-in { animation: none; }
  .skip-link { transition: none; }
}
