/* ============================================================
   Lighthouse — shared design language
   neuform DNA (huge light serif, wide-tracked mono micro-labels,
   full-bleed, sharp corners, ambient field, restrained motion)
   on the locked Lighthouse brand (true-black, marigold sacred,
   periwinkle voice, brand type system: Cinzel wordmark · Rajdhani display ·
   IBM Plex Sans body · JetBrains Mono data).
   ============================================================ */

:root {
  --canvas: #141416;
  --canvas-2: #161618;
  --surface: #1a1a1c;
  --surface-2: #202023;
  --text-primary: #ffffff;
  --text-secondary: #c4c4c5;
  --text-tertiary: #8a8a8b;
  --text-dim: #5a5a5d;
  --marigold: #caa90b;
  --marigold-hover: #e6cf04;
  --marigold-soft: #e7d27a; /* intermediate golds for the beacon/hero scan animation */
  --marigold-deep: #a98c08;
  --periwinkle: #889ce7;
  --flag: #e2504b; /* risk/critical red — sitewide so Company diagrams resolve it */
  --status-ok: #2fb87d;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.16);
  /* Brand type system (v1.4): Rajdhani = display/headings · IBM Plex Sans = body/UI/prose ·
     JetBrains Mono = data/identifiers/micro-labels. (The firm wordmark ships as the SVG lockup.) */
  --font-display: 'Rajdhani', sans-serif;
  --font-ui: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1280px;
  /* D154 — the spacing + subtext system. Every page's inline <style> resolves these
     because base.css is linked first everywhere. Values are the measured MODE of what
     was already in use, so the dominant look is unchanged and only outliers converge. */
  --wrap-pad: 48px;                        /* .wrap side inset (mirrored by the Home hero bleed calc) */
  --section-y: clamp(96px, 10vw, 150px);   /* section vertical padding, top = bottom */
  --close-y: 72px;                         /* close bands (D139b uniform closes) */
  --hero-y-top: 150px;                     /* page-hero top inset */
  --head-gap: 48px;                        /* section head block -> its body */
  --eyebrow-gap: 22px;                     /* eyebrow -> headline */
  --dek-gap: 24px;                         /* headline -> dek */
  --fs-dek: clamp(16px, 1.35vw, 19px);     /* the one section-dek step */
  --fs-lead: clamp(18px, 1.5vw, 22px);     /* the one hero-lead step */
  --marigold-core: #fff3c8;                /* beam/wipe hot core (was two undeclared creams) */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* mobile platform hygiene: no iOS blue tap flash (state layers carry feedback),
   no double-tap zoom delay on controls, anchors clear the fixed header */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; color-scheme: dark; }
a, button { touch-action: manipulation; }
section[id], header[id], [id="solution"], [id="apps"], [id="footprint"], [id="work"], [id="close"], [id="problem"], [id="contact"] { scroll-margin-top: 84px; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(202, 169, 11, 0.22); color: #fff; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--wrap-pad); position: relative; }
/* D18 — mobile safe zone: one standard 20px inset; only full-bleed visuals break it */
@media (max-width: 760px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .tbar { padding-left: 20px; padding-right: 20px; }
}
/* ---------- screen-reader-only utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ---------- skip link: hidden until focused (WCAG 2.4.1 Bypass Blocks) ---------- */
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 10px 16px; background: var(--marigold); color: #141416;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  transform: translateY(calc(-100% - 16px)); transition: transform 160ms var(--ease-out-quint);
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--marigold-hover); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }

/* ---------- micro-label (wide-tracked mono) ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--periwinkle);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.kicker .tick { width: 18px; height: 1px; background: var(--marigold); }
.kicker .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }

/* (legacy .nav/.brand/.navlinks header + .display removed in handoff cleanup —
   the live header is .tbar / .lho / .sh-lockup) */

/* ============================================================
   Top tab bar (terminal chrome) — ported from Lighthouse v1
   ============================================================ */
.tbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(13,13,15,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair-strong);
  display: flex; align-items: stretch; padding: 0 16px;
  /* iPhone notch: the bar extends under the status area, content stays below it */
  padding-top: env(safe-area-inset-top);
  height: calc(62px + env(safe-area-inset-top));
  z-index: 100;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
}
.tbar .lho {
  display: inline-flex; align-items: center; gap: 11px;
  padding-right: 18px; border-right: 1px solid var(--hair);
  color: var(--text-primary);
}
.tbar .lho .sh-lockup { height: 26px; width: auto; display: block; }
.tbar .tabs { display: flex; align-items: stretch; margin-left: 4px; position: relative; }
.tbar .tab {
  padding: 0 18px; display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-tertiary); border-right: 1px solid var(--hair);
  cursor: pointer; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  transition: color 140ms, background 140ms; position: relative;
}
.tbar .tab:first-child { border-left: 1px solid var(--hair); }
.tbar .tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.02); }
.tbar .tab.active { color: var(--text-primary); background: rgba(202,169,11,0.04); }
/* M19 - the lamp is a real element (pseudo-elements cannot carry a view-transition-name):
   during page transitions the one marigold element in the chrome glides to the new tab slot */
.tbar .tab .tab-lamp { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--marigold); view-transition-name: tab-lamp; }
/* M21 switch acknowledge - destination confirms before the lamp travels; instant, no motion */
.tbar .tab:active { color: var(--text-primary); background: rgba(255,255,255,0.05); transition-duration: 0ms; }
.tbar .right { margin-left: auto; display: inline-flex; align-items: center; gap: 16px; }
.tbar .right .btn { padding: 8px 14px; font-size: 12px; }
/* (the old ≤900px tab-padding squeeze was removed with the 1040px collapse:
   tabs are display:none everywhere at or below the collapse point, so the
   rule could never render — dead under the old boundary too) */
/* tablet/touch: header CTA meets the 44px hit-area floor */
@media (max-width: 1080px) {
  .tbar .right .btn { padding: 12px 16px; min-height: 44px; }
}

/* ============================================================
   M18 - fade-through-dark page transitions (cross-document MPA).
   Outgoing content fades to the shared #141416 canvas (~140ms), a beat,
   the incoming page fades up (~240ms) - opacity only, nothing moves.
   Scoped >1040px (1040.02 epsilon): the mnav overlay must never be snapshotted
   mid-flight, and this must not overlap the sibling max-width:1040px collapse
   block (which keeps exactly-1040px in the hamburger tier) — collapse and
   transitions share the one boundary (X6, amends D128). Phones and tablets
   keep today's hard cut. No-support engines (Firefox) skip the at-rule
   entirely and get the same hard cut - the designed fallback.
   ============================================================ */
@media (min-width: 1040.02px) {
  @view-transition { navigation: auto; }
}
@keyframes vtFadeOut { to { opacity: 0; } }
@keyframes vtFadeIn { from { opacity: 0; } }
::view-transition-old(root) { animation: 140ms var(--ease-m3-accel) both vtFadeOut; }
::view-transition-new(root) { animation: 240ms var(--ease-out-quint) 90ms both vtFadeIn; }
/* the header is instrumentation: lifted out of the root fade under its own
   name so the chrome reads physically continuous across pages */
.tbar { view-transition-name: tbar; }
/* M19 - the lamp travels: clamp the browser's default group morph so the
   active-tab indicator glides between slots on the sanctioned curve */
::view-transition-group(tab-lamp) { animation-duration: 320ms; animation-timing-function: var(--ease-out-expo); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--marigold-hover, #e6cf04); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #141416; background: var(--marigold);
  padding: 12px 20px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background 140ms, transform 70ms var(--ease-m3-accel); white-space: nowrap;
}
.btn:hover { background: var(--marigold-hover); }
/* M21 switch acknowledge - press = commitment: gold deepens and the switch
   throws 1px in ~70ms, releasing on pointer-up into the hover state */
.btn:active { background: var(--marigold-deep); transform: translateY(1px); }
.btn .arr { transition: transform 200ms var(--ease-out-quint); }
.btn:hover .arr { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--hair-strong); }
.btn.ghost:hover { background: transparent; border-color: var(--marigold); color: var(--marigold); }
.btn.ghost:active { background: transparent; border-color: var(--marigold-deep); color: var(--marigold-deep); }

/* ---------- signature: gold-corner box ----------
   Four marigold corner brackets. On scroll-in, the corners draw
   then the frame + fill expand from them. Use .gcbox + .in.       */
.gcbox { position: relative; background: var(--surface); }
.gcbox > .edge {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border: 1px solid var(--hair-strong);
  clip-path: inset(0 0 0 0);
  opacity: 0;
  transition: opacity 420ms ease 220ms;
}
.gcbox.in > .edge { opacity: 1; }
.gcbox > .corner {
  position: absolute; width: 14px; height: 14px; z-index: 3;
  border: 1.5px solid var(--marigold);
  opacity: 0; transform: scale(0.4);
  transition: opacity 300ms ease, transform 460ms var(--ease-out-expo);
}
.gcbox > .corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.gcbox > .corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.gcbox > .corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.gcbox > .corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.gcbox.in > .corner { opacity: 1; transform: scale(1); }
.gcbox > .gcinner {
  position: relative; z-index: 1;
  opacity: 0; transform: scale(0.985);
  transition: opacity 560ms var(--ease-out-quint) 320ms, transform 640ms var(--ease-out-expo) 320ms;
}
.gcbox.in > .gcinner { opacity: 1; transform: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 820ms var(--ease-out-quint), transform 820ms var(--ease-out-quint); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gcbox > .edge, .gcbox > .corner, .gcbox > .gcinner { opacity: 1; transform: none; transition: none; }
  /* M21 press feedback stays as a color step; the 1px depress is motion */
  .btn:active { transform: none; }
}

/* tabs centered in the bar */
.tbar .tabs { position: absolute; left: 50%; transform: translateX(-50%); }

/* header tabs run edge-to-edge of the bar */
.tbar .tabs { top: 0; height: 100%; display: flex; align-items: stretch; }
.tbar .tab { height: 100%; display: flex; align-items: center; box-sizing: border-box; }

/* web bleed guard */
html, body { overflow-x: clip; }

/* ============================================================
   Mobile navigation — single-row header: wordmark + hamburger.
   Page links + demo CTA live in a full-screen overlay.
   M3 framework: 48dp targets, state layers, emphasized motion —
   rendered in Lighthouse skin (zero radius, hairlines, brand type).
   ============================================================ */
:root {
  --ease-m3-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-m3-accel: cubic-bezier(0.3, 0, 0.8, 0.15);
}
.mburger {
  display: none; appearance: none; background: transparent; border: 0; cursor: pointer;
  min-width: 48px; height: 48px; margin-right: -10px; position: relative; z-index: 130;
  align-self: center; align-items: center; justify-content: center; flex-direction: column; padding: 0 2px;
}
.mburger .mb-i { display: flex; flex-direction: column; gap: 5px; }
.mburger .mb-i span { display: block; width: 22px; height: 1.5px; background: var(--text-primary); transition: transform 200ms var(--ease-m3-decel), opacity 150ms; }
.mburger.open .mb-i span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mburger.open .mb-i span:nth-child(2) { opacity: 0; }
.mburger.open .mb-i span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* .tbar's own stacking context (z 100) caps the burger's z 130 under the
   overlay (z 120) - lift the whole header only while the menu is open so the
   wordmark and the burger-to-X close control stay visible and tappable */
body.mnav-open .tbar { z-index: 121; }
.mnav {
  position: fixed; inset: 0; z-index: 120; background: var(--canvas);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h, 62px) + 30px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}
.mnav .mnav-util { display: block; margin: 18px 0 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-tertiary); padding: 12px 0; }
.mnav .mnav-util:hover { color: var(--text-primary); }
.mnav::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 0.5px, transparent 0.5px);
  background-size: 6px 6px;
}
.mnav[hidden] { display: none; }
.mnav .mnav-links { display: flex; flex-direction: column; position: relative; }
.mnav .mnav-links a {
  position: relative; font-family: 'Rajdhani', sans-serif; font-weight: 600; text-transform: uppercase;
  font-size: clamp(34px, 9.5vw, 44px); line-height: 1.1; color: var(--text-secondary);
  padding: 16px 4px; border-bottom: 1px solid var(--hair); min-height: 48px;
}
.mnav .mnav-links a:first-child { border-top: 1px solid var(--hair); }
.mnav .mnav-links a[aria-current="page"] { color: var(--text-primary); }
.mnav .mnav-links a[aria-current="page"]::before { content: ''; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--marigold); }
/* M3 state layer (hover .06 / pressed .10) */
.mnav .mnav-links a::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity 150ms; pointer-events: none; }
.mnav .mnav-links a:hover::after { opacity: 0.06; }
.mnav .mnav-links a:active::after { opacity: 0.10; }
.mnav .mnav-cta { width: 100%; min-height: 52px; font-size: 13px; position: relative; }
.mnav .mnav-ctas { display: flex; flex-direction: column; gap: 12px; }
.mnav.in { animation: mnavIn 280ms var(--ease-m3-decel) both; }
.mnav.out { animation: mnavOut 180ms var(--ease-m3-accel) both; }
@keyframes mnavIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mnavOut { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mnav.in, .mnav.out { animation: none; }
  .mburger span { transition: none; }
}
body.mnav-open { overflow: hidden; }

/* collapse the centered tabs to the hamburger ≤1040 before they can overlap the
   lockup/CTA: five primary destinations need the wider collapse point (X6) */
@media (max-width: 1040px) {
  .tbar .tabs, .tbar .right { display: none; }
  .mburger { display: inline-flex; margin-left: auto; }
}

@media (max-width: 760px) {
  /* the single hero eyebrow per page now shows on mobile too, matching desktop
     (the per-section eyebrows were removed, so there's nothing to retire here) */
  /* h2.seclabel (if any) stays visually removed but in the a11y tree (sr-only box recipe) */
  h2.seclabel { display: block !important; position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
  .tbar .lho { border-right: 0; position: relative; z-index: 130; }
  .btn { min-height: 44px; }
  /* M21 - press deepens on touch too (was --marigold-hover, which inverted
     the acknowledge direction versus desktop) */
  .btn:active { background: var(--marigold-deep); }
}
