/* ==========================================================================
   M3Stack — Portfolio
   Light: warm paper + amber. Dark: command-center cyan→violet.
   ========================================================================== */

/* ------ self-hosted fonts (latin subsets) — no third-party requests ------ */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/space-grotesk-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/jetbrains-mono-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ------ color: LIGHT theme (default) — warm paper, amber→orange accents ------ */
  color-scheme: light;
  --bg: #f7f5f0;
  --bg-soft: #efece5;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --line: rgba(28, 25, 18, 0.12);
  --text: #23201a;
  --muted: #6d675c;
  --accent: #c2410c;
  --accent-2: #b45309;
  --ok: #047857;
  --bad: #dc2626;
  /* rgb channels — so alpha variants stay wired to the palette */
  --accent-rgb: 194, 65, 12;
  --accent-2-rgb: 180, 83, 9;
  --ok-rgb: 4, 120, 87;
  --bad-rgb: 220, 38, 38;
  --warn-rgb: 202, 138, 4;
  /* trending skill tiles (arsenal section) — amber in light, violet in dark */
  --tile-new: #b45309;
  --tile-new-rgb: 180, 83, 9;
  --grad: linear-gradient(92deg, #f59e0b 0%, #f97316 55%, #ea580c 100%);
  /* panel gradient shared by every case-study visual — always dark, they're screens */
  --panel-grad: linear-gradient(160deg, #3a4149, #2b3138);
  /* theme-dependent chrome */
  --btn-ink: #2b1a07;
  --aurora-3: 202, 138, 4;
  --nav-veil: rgba(247, 245, 240, 0.8);
  --nav-solid: rgba(247, 245, 240, 0.96);
  --menu-bg: rgba(250, 248, 244, 0.97);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --modal-grad: linear-gradient(160deg, #ffffff, #f6f3ec);
  --backdrop: rgba(46, 38, 24, 0.45);
  --opt-bg: #ffffff;
  --field-bg: rgba(28, 25, 18, 0.04);
  --card-grad: linear-gradient(160deg, #ffffff, #f8f5ee);
  --grid-line: rgba(28, 25, 18, 0.055);
  --rail-track: rgba(28, 25, 18, 0.18);
  --star-dim: rgba(28, 25, 18, 0.3);
  --track-bg: rgba(28, 25, 18, 0.1);

  /* ------ type ------ */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --fs-hero: clamp(44px, 8.5vw, 104px);
  --fs-h2: clamp(30px, 4.6vw, 52px);
  --fs-h3: 22px;
  --fs-body: 16px;

  /* ------ radius ------ */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* ------ elevation — warm, light-handed on paper ------ */
  --shadow-lift: 0 24px 80px rgba(28, 25, 18, 0.16);
  --shadow-soft: 0 16px 48px rgba(28, 25, 18, 0.12);
  --shadow-modal: 0 30px 90px rgba(46, 38, 24, 0.25);
  --glow-accent: 0 0 60px rgba(var(--accent-rgb), 0.07);

  /* ------ motion ------ */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ------ DARK theme ("night") — the original command-center palette ------ */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06070b;
  --bg-soft: #0b0d14;
  --surface: #10131c;
  --surface-2: #151927;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8eaf2;
  --muted: #9aa1b5;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --ok: #34d399;
  --bad: #f87171;
  --accent-rgb: 34, 211, 238;
  --accent-2-rgb: 167, 139, 250;
  --ok-rgb: 52, 211, 153;
  --bad-rgb: 248, 113, 113;
  --warn-rgb: 251, 191, 36;
  --tile-new: #c4b5fd;
  --tile-new-rgb: 196, 181, 253;
  --grad: linear-gradient(92deg, #22d3ee 0%, #818cf8 55%, #a78bfa 100%);
  --btn-ink: #04060a;
  --aurora-3: 59, 130, 246;
  --nav-veil: rgba(6, 7, 11, 0.75);
  --nav-solid: rgba(6, 7, 11, 0.94);
  --menu-bg: rgba(9, 11, 17, 0.97);
  --pill-bg: rgba(9, 11, 17, 0.92);
  --modal-grad: linear-gradient(160deg, #11151f, #0a0d15);
  --backdrop: rgba(4, 5, 9, 0.72);
  --opt-bg: #11151f;
  --field-bg: rgba(255, 255, 255, 0.04);
  --card-grad: linear-gradient(160deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  --grid-line: rgba(255, 255, 255, 0.035);
  --rail-track: rgba(255, 255, 255, 0.12);
  --star-dim: rgba(255, 255, 255, 0.45);
  --track-bg: rgba(255, 255, 255, 0.12);
  --shadow-lift: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 30px 90px rgba(0, 0, 0, 0.6);
}

/* Case-study visuals are mock screens — always dark panels with a
   grey + amber instrument palette, in BOTH themes */
.vms, .face-scan, .arch, .dash, .flight, .browser, .lake, .dins {
  --text: #e8eaf2;
  --muted: #9aa1b5;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #9ca3af;
  --accent-2: #f59e0b;
  --accent-rgb: 156, 163, 175;
  --accent-2-rgb: 245, 158, 11;
  --ok: #34d399;
  --bad: #f87171;
  --ok-rgb: 52, 211, 153;
  --bad-rgb: 248, 113, 113;
  --warn-rgb: 251, 191, 36;
  --grad: linear-gradient(92deg, #9ca3af 0%, #d1d5db 45%, #f59e0b 100%);
}

/* Rail gradient follows the theme (the comet itself stays nazar-blue) */
#railGrad stop:first-child { stop-color: #f59e0b; }
#railGrad stop:last-child { stop-color: #ea580c; }
[data-theme="dark"] #railGrad stop:first-child { stop-color: #22d3ee; }
[data-theme="dark"] #railGrad stop:last-child { stop-color: #a78bfa; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(var(--accent-rgb), 0.35); color: var(--text); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Keyboard focus — visible ring on every interactive element, mouse clicks unaffected */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), 0.85);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn:focus-visible,
.rail-star:focus-visible,
.modal-close:focus-visible {
  border-radius: var(--r-pill);
}

/* keyboard users can jump past the nav — visible only while focused */
.skip-link {
  position: fixed;
  top: 14px; left: 14px;
  z-index: 10001;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--grad);
  color: var(--btn-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  transform: translateY(-200%);
}

.skip-link:focus-visible { transform: translateY(0); }

/* ==========================================================================
   Ambient background
   ========================================================================== */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.32;
  pointer-events: none;
  animation: orbDrift 16s ease-in-out infinite alternate;
}

.bg-orb--1 {
  width: 560px; height: 560px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.55), transparent 70%);
}

.bg-orb--2 {
  width: 520px; height: 520px;
  top: 40vh; left: -200px;
  background: radial-gradient(circle, rgba(var(--accent-2-rgb), 0.5), transparent 70%);
  animation-delay: -8s;
}

@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 80px) scale(1.15); }
}

/* ==========================================================================
   Cursor / progress / preloader
   ========================================================================== */

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 7px; height: 7px;
  background: var(--accent);
}

.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}

.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: rgba(var(--accent-2-rgb), 0.8);
}

@media (hover: none), (max-width: 900px) {
  .cursor-dot, .cursor-ring { display: none; }
}

.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--grad);
  z-index: 1000;
}

/* iOS Safari: giant blurs and backdrop-filter repaint on every scrolled frame */
@media (max-width: 1099px) {
  .bg-orb { filter: none; opacity: 0.26; }

  .nav.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--nav-solid);
  }
}

/* ==========================================================================
   Side scroll rail — comet on a constellation path
   ========================================================================== */

.scroll-rail {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  width: 72px;
  height: 520px;
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.scroll-rail.is-ready { opacity: 1; }

.rail-svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.rail-path-bg {
  fill: none;
  stroke: var(--rail-track);
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}

/* gradient trail that draws itself as you scroll */
.rail-path-fill {
  fill: none;
  stroke: url(#railGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.55));
}

/* live % readout drifting beside the comet (never rotates) */
.rail-tag {
  position: absolute;
  transform: translate(-100%, -100%) translate(-14px, -8px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
  pointer-events: none;
  z-index: 3;
}

/* The comet — banks along the path tangent; +x is direction of travel */
.rail-comet {
  position: absolute;
  width: 0; height: 0;
  transition: transform 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

/* burst ring fired on entering a new section */
.rail-comet::before {
  content: "";
  position: absolute;
  left: -15px; top: -15px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-2-rgb), 0.75);
  opacity: 0;
}

.rail-comet.is-pop::before { animation: railPing 0.5s ease-out; }

/* radar ping while parked */
.rail-comet::after {
  content: "";
  position: absolute;
  left: -15px; top: -15px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  opacity: 0;
}

.rail-comet.is-idle::after { animation: railPing 2.4s ease-out infinite 0.4s; }

@keyframes railPing {
  from { transform: scale(0.5); opacity: 1; }
  to   { transform: scale(1.8); opacity: 0; }
}

/* nazar — evil eye: pupil, cyan iris, white ring, deep blue rim */
.comet-head {
  position: absolute;
  left: 0; top: 0;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    #0a1228 0 20%,
    #22d3ee 20% 42%,
    #f2fbfd 42% 60%,
    #1d4ed8 60% 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.9), 0 0 36px rgba(59, 130, 246, 0.5);
  animation: cometPulse 2.6s ease-in-out infinite;
}

@keyframes cometPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.2); }
}

/* sparkle cross flaring off the head */
.comet-head::before,
.comet-head::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.95), transparent);
  animation: sparkleFlare 3s ease-in-out infinite;
}

.comet-head::before { width: 1.5px; height: 32px; }
.comet-head::after  { width: 32px; height: 1.5px; background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95), transparent); }

@keyframes sparkleFlare {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.9; }
}

/* twin light-tails streaming behind the head */
.comet-tail {
  position: absolute;
  right: 5px; top: 0;
  width: 46px; height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: linear-gradient(to left, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-2-rgb), 0.45), transparent);
  opacity: 0.85;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.comet-tail--2 {
  width: 30px; height: 9px;
  filter: blur(4px);
  opacity: 0.5;
}

.rail-comet.is-moving .comet-tail { width: 74px; opacity: 1; }
.rail-comet.is-moving .comet-tail--2 { width: 50px; }
.rail-comet.is-idle .comet-tail { width: 24px; opacity: 0.5; }
.rail-comet.is-idle .comet-tail--2 { width: 16px; }

/* stardust left behind while scrolling */
.rail-spark {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  /* matches the comet, which stays nazar-blue in both themes */
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: sparkFade 0.8s ease-out forwards;
}

@keyframes sparkFade {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -20px))) scale(0.3);
  }
}

/* section markers as twinkling four-point stars */
.rail-star {
  position: absolute;
  width: 18px; height: 18px;
  padding: 0;
  border: none;
  background: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 1;
}

.rail-star b {
  position: absolute;
  inset: 2px;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  background: var(--star-dim);
  transition: background 0.3s ease, transform 0.3s ease;
  animation: starTwinkle 3.2s ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.rail-star.is-passed b { background: var(--accent); }

.rail-star.is-active { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.9)); }

.rail-star.is-active b {
  transform: scale(1.55);
  background: var(--text);
}

.rail-star-label {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  background: var(--pill-bg);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rail-star:hover .rail-star-label,
.rail-star.is-active .rail-star-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.rail-star.is-active .rail-star-label { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.35); }

@media (max-width: 1099px) {
  .scroll-rail { display: none; }
}

/* ==========================================================================
   Mobile comet — weaves behind the tiles on small screens
   ========================================================================== */

.mob-comet {
  position: fixed;
  left: 0; top: 0;
  z-index: -1;
  width: 0; height: 0;
  pointer-events: none;
  display: none;
}

@media (max-width: 1099px) {
  .mob-comet { display: block; }
}

/* nazar head, matching the desktop traveler */
.mob-comet-head {
  position: absolute;
  left: 0; top: 0;
  width: 16px; height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    #0a1228 0 20%,
    #22d3ee 20% 42%,
    #f2fbfd 42% 60%,
    #1d4ed8 60% 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.8), 0 0 30px rgba(59, 130, 246, 0.4);
  animation: cometPulse 2.6s ease-in-out infinite;
}

/* radar ping while parked */
.mob-comet::after {
  content: "";
  position: absolute;
  left: -13px; top: -13px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.5);
  opacity: 0;
}

.mob-comet.is-idle::after { animation: railPing 2.4s ease-out infinite 0.4s; }

/* twin tails — no blur filters here, iOS scrolls this layer */
.mob-comet-tail {
  position: absolute;
  right: 5px; top: 0;
  width: 44px; height: 3px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: linear-gradient(to left, rgba(34, 211, 238, 0.85), rgba(167, 139, 250, 0.4), transparent);
  opacity: 0.8;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.mob-comet-tail--2 {
  width: 28px; height: 9px;
  opacity: 0.3;
}

.mob-comet.is-moving .mob-comet-tail { width: 68px; opacity: 1; }
.mob-comet.is-moving .mob-comet-tail--2 { width: 44px; }
.mob-comet.is-idle .mob-comet-tail { width: 20px; opacity: 0.45; }
.mob-comet.is-idle .mob-comet-tail--2 { width: 14px; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.is-done { opacity: 0; visibility: hidden; }

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: logoIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.preloader-mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 74px; height: 74px;
  border-radius: 18px;
  background: var(--grad);
  color: var(--btn-ink);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
}

.preloader-name {
  font-family: var(--font-display);
  font-size: clamp(34px, 15.5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.preloader-bar {
  width: 200px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--track-bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.preloader-bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
  transition: width 0.25s ease;
}

.preloader-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

@keyframes logoIn {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn--solid {
  background: var(--grad);
  color: var(--btn-ink);
  box-shadow: 0 0 0 rgba(var(--accent-rgb), 0);
  overflow: hidden;
}

/* light sweep across the primary button on hover */
.btn--solid::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -70%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn--solid:hover::after { animation: btnSheen 0.7s var(--ease); }

@keyframes btnSheen {
  from { left: -70%; }
  to   { left: 140%; }
}

.btn--solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.35);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.06);
}

/* press state — the button gives under the click */
.btn--solid:active,
.btn--ghost:active {
  transform: translateY(-1px) scale(0.97);
  transition-duration: 0.08s;
}

.btn--small { padding: 10px 20px; font-size: 13.5px; }
.btn--big { padding: 18px 40px; font-size: 17px; }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: var(--nav-veil);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}

.nav-logo-mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--grad);
  color: var(--btn-ink);
  font-size: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a { position: relative; transition: color 0.25s ease; }
.nav-links a:hover { color: var(--text); }

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0%; height: 2px;
  background: var(--grad);
  transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after { width: 100%; }

.nav-cta-mobile { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* theme toggle — visible on every screen size */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: rotate(18deg);
}

.theme-toggle svg { width: 18px; height: 18px; }

.tt-sun { display: none; }
[data-theme="dark"] .tt-sun { display: block; }
[data-theme="dark"] .tt-moon { display: none; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  /* stays above the slide-in menu panel (z 899) so the X can close it */
  position: relative;
  z-index: 901;
}

.nav-burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 20px 80px;
  position: relative;
}

/* aurora — three soft color fields drifting behind the headline */
.hero::before {
  content: "";
  position: absolute;
  inset: -15% -10%;
  z-index: -1;
  background:
    radial-gradient(38% 45% at 28% 30%, rgba(var(--accent-rgb), 0.13), transparent 70%),
    radial-gradient(40% 48% at 72% 24%, rgba(var(--accent-2-rgb), 0.12), transparent 70%),
    radial-gradient(46% 42% at 50% 80%, rgba(var(--aurora-3), 0.09), transparent 70%);
  filter: blur(44px);
  animation: aurora 20s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(2%, 3%, 0) scale(1.08) rotate(2deg); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.03) rotate(-2deg); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 8px 18px;
  border-radius: var(--r-pill);
  margin-bottom: 34px;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--ok-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

/* slot hugs the current word and glides between widths — line stays centered */
.rotator-wrap {
  display: inline-block;
  text-align: left;
  white-space: nowrap;
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rotator-sizer {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}

.rotator-sizer i { display: inline-block; font-style: normal; }

.rotator {
  display: inline-block;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rotator.is-out { animation: wordOut 0.35s ease forwards; }
.rotator.is-in  { animation: wordIn 0.35s ease forwards; }

@keyframes wordOut {
  to { transform: translateY(-60%) rotateX(80deg); opacity: 0; filter: blur(6px); }
}

@keyframes wordIn {
  from { transform: translateY(60%) rotateX(-80deg); opacity: 0; filter: blur(6px); }
  to   { transform: translateY(0) rotateX(0); opacity: 1; filter: blur(0); }
}

.hero-sub {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.7;
  text-wrap: balance;
  margin-bottom: 42px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.hero-clients { margin-top: 72px; }

.hero-clients-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  opacity: 0.85;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-clients-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* client names as quiet chips — reads as a logo strip, not stray text */
.hero-clients-row span {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero-clients-row span:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}

.hero-clients-row i { display: none; }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  color: var(--muted);
  opacity: 0.85;
}

.hero-scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollHint 1.8s ease-in-out infinite;
}

@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.015);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.marquee-track em { color: var(--accent); font-style: normal; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   Sections — shared
   ========================================================================== */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(90px, 12vw, 150px) clamp(20px, 5vw, 40px) 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.45);
  margin-bottom: 22px;
}

.section-label::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   About / stats
   ========================================================================== */

.about-statement {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 940px;
  margin-bottom: clamp(56px, 8vw, 90px);
}

.forged {
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.forged-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin-bottom: 18px;
}

.forged-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

.forged-marks span {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  opacity: 0.85;
  animation: forgedGlow 8s ease-in-out infinite;
}

/* real employer marks, monochrome via currentColor — the glow tints them */
.forged-logo { display: inline-flex; align-items: center; }

.forged-logo svg {
  display: block;
  height: 100%;
  width: auto;
}

/* per-mark heights so the wordmarks sit at the same optical size */
.forged-logo--ey     { height: clamp(30px, 3.6vw, 42px); }
.forged-logo--brinks { height: clamp(15px, 1.9vw, 21px); }
.forged-logo--mmt    { height: clamp(24px, 3vw, 34px); }
.forged-logo--amex   { height: clamp(30px, 3.6vw, 42px); }
.forged-logo--oracle { height: clamp(13px, 1.7vw, 19px); }

.forged-marks span:nth-of-type(1) { animation-delay: 0s; }
.forged-marks span:nth-of-type(2) { animation-delay: 1.6s; }
.forged-marks span:nth-of-type(3) { animation-delay: 3.2s; }
.forged-marks span:nth-of-type(4) { animation-delay: 4.8s; }
.forged-marks span:nth-of-type(5) { animation-delay: 6.4s; }

@keyframes forgedGlow {
  0%, 100% { color: var(--text); opacity: 0.85; }
  6%, 14% { color: var(--accent); opacity: 1; }
  20% { color: var(--text); opacity: 0.85; }
}

.forged-marks em {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.55;
}

/* ==========================================================================
   Case studies
   ========================================================================== */

.case {
  /* per-case accent — defaults to the site cyan; tint variants override it */
  --case-accent: var(--accent-rgb);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 4vw, 48px);
  margin-bottom: clamp(36px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card-grad);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}

.case:hover {
  border-color: rgba(var(--case-accent), 0.35);
  box-shadow: var(--shadow-lift), 0 0 60px rgba(var(--case-accent), 0.07);
}

/* tint variants */
/* light theme: warm amber instead of green; dark theme keeps the green tint */
.case--tint-green { --case-accent: var(--warn-rgb); }
[data-theme="dark"] .case--tint-green { --case-accent: var(--ok-rgb); }
.case--tint-violet { --case-accent: var(--accent-2-rgb); }
.case--tint-amber { --case-accent: var(--warn-rgb); }

.case:nth-child(even of .case) .case-visual { order: 2; }

.case-visual {
  min-height: 340px;
  /* grid tracks won't shrink below content min-width without this —
     keeps wide visuals from blowing the card out on phones */
  min-width: 0;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  overflow: hidden;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.case-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--case-accent));
  border: 1px solid rgba(var(--case-accent), 0.3);
  background: rgba(var(--case-accent), 0.06);
  padding: 5px 12px;
  border-radius: var(--r-pill);
}

.case-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.case-client {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-2);
  margin-bottom: 16px;
}

.case-desc { color: var(--muted); margin-bottom: 26px; font-size: 15.5px; }

/* --------------------------------------------------------------------------
   Case visual 1 — VMS camera grid
   -------------------------------------------------------------------------- */

.vms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.cam {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    linear-gradient(145deg, #414952, #2b3138 60%, #333a42);
  animation: camFlicker 4s steps(2) infinite;
}

.cam--2 { animation-delay: 1.3s; }
.cam--3 { animation-delay: 2.1s; }
.cam--4 { animation-delay: 0.7s; }

@keyframes camFlicker {
  0%, 92%, 100% { filter: brightness(1); }
  94% { filter: brightness(1.18); }
  96% { filter: brightness(0.92); }
}

.cam-label {
  position: absolute;
  bottom: 8px; left: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(232, 234, 242, 0.75);
  z-index: 2;
}

.cam-rec {
  position: absolute;
  top: 8px; right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #f87171;
  z-index: 2;
}

.cam-rec i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f87171;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.cam-scan {
  position: absolute;
  left: 0; right: 0;
  height: 34%;
  background: linear-gradient(to bottom, transparent, rgba(var(--accent-rgb), 0.09), transparent);
  animation: camScan 3.6s ease-in-out infinite;
}

.cam--2 .cam-scan { animation-duration: 4.4s; animation-delay: 0.8s; }
.cam--3 .cam-scan { animation-duration: 3.1s; animation-delay: 1.6s; }
.cam--4 .cam-scan { animation-duration: 5s; animation-delay: 0.3s; }

@keyframes camScan {
  0%, 100% { top: -34%; }
  50% { top: 100%; }
}

.cam-detect {
  position: absolute;
  top: 22%; left: 26%;
  width: 34%; height: 52%;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  animation: detectDrift 5s ease-in-out infinite alternate;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.25);
}

.cam-detect span {
  position: absolute;
  top: -16px; left: -1.5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #04060a;
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

@keyframes detectDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(26px, 10px); }
}

.cam-plate {
  position: absolute;
  top: 34%; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #04060a;
  background: #fbbf24;
  border: 1px solid rgba(0, 0, 0, 0.4);
  padding: 2px 8px;
  border-radius: 3px;
  animation: plateDrift 6s ease-in-out infinite alternate;
}

@keyframes plateDrift {
  from { transform: translateX(-70%); }
  to   { transform: translateX(-20%); }
}

/* --------------------------------------------------------------------------
   Case visual 2 — Face scan
   -------------------------------------------------------------------------- */

.face-scan {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.fs-frame {
  position: relative;
  width: 210px; height: 250px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fs-corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2.5px solid var(--accent);
  z-index: 3;
}

.fs-corner--tl { top: 12px; left: 12px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.fs-corner--tr { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.fs-corner--bl { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.fs-corner--br { bottom: 12px; right: 12px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }

.fs-head {
  position: absolute;
  top: 52px; left: 50%;
  transform: translateX(-50%);
  width: 78px; height: 92px;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(160deg, rgba(var(--accent-2-rgb), 0.35), rgba(var(--accent-rgb), 0.22));
  border: 1px solid rgba(var(--accent-2-rgb), 0.4);
}

.fs-body {
  position: absolute;
  bottom: -26px; left: 50%;
  transform: translateX(-50%);
  width: 150px; height: 74px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(160deg, rgba(var(--accent-2-rgb), 0.25), rgba(var(--accent-rgb), 0.14));
  border: 1px solid rgba(var(--accent-2-rgb), 0.3);
}

.fs-laser {
  position: absolute;
  left: 8px; right: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.9);
  animation: laser 2.6s ease-in-out infinite;
  z-index: 2;
}

@keyframes laser {
  0%, 100% { top: 14px; }
  50% { top: calc(100% - 17px); }
}

.fs-readout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.fs-line {
  opacity: 0;
  animation: readout 5s ease infinite;
}

.fs-line:nth-child(1) { animation-delay: 0s; }
.fs-line:nth-child(2) { animation-delay: 0.7s; }
.fs-line:nth-child(3) { animation-delay: 1.4s; }
.fs-line:nth-child(4) { animation-delay: 2.1s; }

@keyframes readout {
  0% { opacity: 0; transform: translateX(-8px); }
  14%, 86% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; }
}

.fs-ok { color: var(--ok); font-weight: 700; }

.fs-dots { animation: blink 1s steps(1) infinite; }

/* --------------------------------------------------------------------------
   Case visual — Microservices architecture (Patient Management System)
   -------------------------------------------------------------------------- */

.arch {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  padding: 22px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
}

.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.07);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.12);
}

.arch-node-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text);
}

.arch-node-sub {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Vertical connector: gateway → bus */
.arch-link {
  position: relative;
  width: 1px;
  height: 24px;
  background: rgba(var(--accent-rgb), 0.3);
  overflow: visible;
}

.arch-link i {
  position: absolute;
  left: -2.5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.9);
  animation: archDrop 1.6s ease-in infinite;
}

@keyframes archDrop {
  from { top: -6px; opacity: 1; }
  to   { top: 100%; opacity: 0.25; }
}

/* Kafka event bus with flowing packets */
.arch-bus {
  position: relative;
  width: 100%;
  padding: 8px 14px;
  border-radius: var(--r-xs);
  border: 1px solid rgba(var(--accent-2-rgb), 0.45);
  background: rgba(var(--accent-2-rgb), 0.08);
  overflow: hidden;
  text-align: center;
}

.arch-bus > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.arch-pkt {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 7px; height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(var(--accent-2-rgb), 0.9);
  animation: busFlow 2.8s linear infinite;
  animation-delay: var(--d);
}

@keyframes busFlow {
  to { left: calc(100% + 8px); }
}

/* Connectors: bus → services */
.arch-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 22px;
}

.arch-links i {
  position: relative;
  justify-self: center;
  width: 1px;
  background: rgba(var(--accent-2-rgb), 0.3);
}

.arch-links i::after {
  content: "";
  position: absolute;
  left: -2.5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(var(--accent-2-rgb), 0.8);
  animation: archDrop 1.8s ease-in infinite;
}

.arch-links i:nth-child(2)::after { animation-delay: 0.6s; }
.arch-links i:nth-child(3)::after { animation-delay: 1.2s; }

/* Service nodes */
.arch-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 16px;
}

.arch-svc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px;
  border-radius: var(--r-xs);
  border: 1px solid rgba(var(--ok-rgb), 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.arch-svc b {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  white-space: nowrap;
}

.svc-ok { font-size: 8.5px; color: var(--ok); }

/* Circuit breaker: trips open, then recovers */
.arch-svc--cb { animation: cbBorder 7s infinite; }

@keyframes cbBorder {
  0%, 54%, 92%, 100% { border-color: rgba(var(--ok-rgb), 0.3); }
  58%, 86% { border-color: rgba(var(--bad-rgb), 0.65); box-shadow: 0 0 16px rgba(var(--bad-rgb), 0.18); }
}

.cb-badge {
  position: relative;
  display: inline-block;
  font-size: 8.5px;
  min-height: 12px;
  min-width: 58px;
  text-align: center;
}

.cb-ok, .cb-open {
  position: absolute;
  left: 0; right: 0; top: 0;
  white-space: nowrap;
}

.cb-ok { color: var(--ok); animation: cbOkSwap 7s infinite; }
.cb-open { color: var(--bad); opacity: 0; animation: cbOpenSwap 7s infinite; }

@keyframes cbOkSwap {
  0%, 54%, 92%, 100% { opacity: 1; }
  58%, 86% { opacity: 0; }
}

@keyframes cbOpenSwap {
  0%, 54%, 92%, 100% { opacity: 0; }
  58%, 86% { opacity: 1; }
}

/* Footer chips: cache + monitoring */
.arch-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.arch-chip {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  animation: shimmer 3s ease-in-out infinite;
}

.arch-chip:nth-child(2) { animation-delay: 1.5s; }

/* --------------------------------------------------------------------------
   Case visual — Lakehouse migration (medallion architecture)
   -------------------------------------------------------------------------- */

.lake {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
}

/* eight source connectors feeding the bronze layer */
.lake-sources {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.lake-sources span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  animation: shimmer 3s ease-in-out infinite;
}

/* connector glyphs — inherit the chip's muted grey via currentColor */
.lake-sources svg {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

.lake-sources span:nth-child(2n) { animation-delay: 0.8s; }
.lake-sources span:nth-child(3n) { animation-delay: 1.6s; }

/* packets dropping between pipeline stages */
.lake-flow {
  position: relative;
  width: 1px;
  height: 18px;
  margin: 6px 0;
  background: rgba(var(--accent-2-rgb), 0.3);
}

.lake-flow i {
  position: absolute;
  left: -2.5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(var(--accent-2-rgb), 0.8);
  animation: archDrop 1.6s ease-in infinite;
  animation-delay: var(--d);
}

/* medallion layers — each carries its metal in --lk */
.lake-layer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--lk);
  background: rgba(255, 255, 255, 0.02);
}

.lake-layer b {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--lk);
}

.lake-layer span {
  flex: 1 1 auto;
  /* flex items refuse to shrink below content without this — the mobile overflow fix */
  min-width: 0;
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lake-layer--bronze { --lk: #d08a4e; border-color: rgba(208, 138, 78, 0.5); box-shadow: 0 0 16px rgba(208, 138, 78, 0.12); }
.lake-layer--silver { --lk: #c9d1dc; border-color: rgba(201, 209, 220, 0.45); box-shadow: 0 0 16px rgba(201, 209, 220, 0.1); }
.lake-layer--gold   { --lk: #fbbf24; border-color: rgba(251, 191, 36, 0.5); box-shadow: 0 0 16px rgba(251, 191, 36, 0.14); }

.lake-stream {
  flex-shrink: 0;
  margin-left: auto;
  font-style: normal;
  font-size: 7.5px;
  letter-spacing: 0.08em;
  color: var(--ok);
  border: 1px solid rgba(var(--ok-rgb), 0.35);
  background: rgba(var(--ok-rgb), 0.08);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  animation: shimmer 2.4s ease-in-out infinite;
}

.lake-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.lake-chip {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 12px;
  border-radius: var(--r-pill);
}

/* phones: the streaming badge takes its own line inside the bronze layer,
   so the subtitle keeps room instead of collapsing to an ellipsis */
@media (max-width: 480px) {
  .lake-stream {
    flex-basis: 100%;
    margin-left: 0;
    max-width: fit-content;
  }
}

/* --------------------------------------------------------------------------
   Case visual — AI Data Insights (discovery · recency · lineage)
   -------------------------------------------------------------------------- */

.dins {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 18px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
}

.dins-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px 14px;
}

.dins-name {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
}

/* --- discovery: a lens sweeps a catalog of datasets; one lights up --- */

.dins-tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.dins-tiles i {
  height: 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  animation: dinsTile 4.5s ease-in-out infinite;
}

.dins-tiles i:nth-child(1)  { animation-delay: 0.2s; }
.dins-tiles i:nth-child(2)  { animation-delay: 0.75s; }
.dins-tiles i:nth-child(3)  { animation-delay: 1.3s; }
.dins-tiles i:nth-child(4)  { animation-delay: 1.85s; }
.dins-tiles i:nth-child(5)  { animation-delay: 2.4s; }
.dins-tiles i:nth-child(6)  { animation-delay: 2.95s; }
.dins-tiles i:nth-child(7)  { animation-delay: 0.2s; }
.dins-tiles i:nth-child(8)  { animation-delay: 0.75s; }
.dins-tiles i:nth-child(9)  { animation-delay: 1.3s; }
.dins-tiles i:nth-child(10) { animation-delay: 1.85s; }
.dins-tiles i:nth-child(11) { animation-delay: 2.4s; }
.dins-tiles i:nth-child(12) { animation-delay: 2.95s; }

@keyframes dinsTile {
  0%, 100% { background: rgba(255, 255, 255, 0.1); }
  8% { background: rgba(255, 255, 255, 0.3); }
  16% { background: rgba(255, 255, 255, 0.1); }
}

/* the match: holds its glow after the lens passes */
.dins-tiles i.dins-hit { animation: dinsHit 4.5s ease-in-out infinite; }

@keyframes dinsHit {
  0%, 58% { background: rgba(255, 255, 255, 0.1); box-shadow: none; }
  66%, 92% { background: rgba(125, 211, 252, 0.85); box-shadow: 0 0 12px rgba(125, 211, 252, 0.45); }
  100% { background: rgba(255, 255, 255, 0.1); box-shadow: none; }
}

.dins-lens {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  margin-top: -13px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  animation: dinsLens 4.5s ease-in-out infinite;
}

.dins-lens::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: -4px;
  width: 8px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.75);
  transform: rotate(45deg);
}

@keyframes dinsLens {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  60%, 88% { left: calc(100% - 22px); opacity: 1; }
  100% { left: calc(100% - 22px); opacity: 0; }
}

/* --- recency: heartbeat dots; the last one catches a stale feed refreshing --- */

.dins-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dins-row + .dins-row { margin-top: 9px; }

.dins-bar {
  position: relative;
  width: var(--w);
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.dins-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  animation: dinsSheen 3s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes dinsSheen {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}

.dins-pulse {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: dinsBeat 3s ease-out infinite;
  animation-delay: var(--d);
}

@keyframes dinsBeat {
  0% { box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0.5); }
  45%, 100% { box-shadow: 0 0 0 9px rgba(var(--ok-rgb), 0); }
}

/* stale feed caught and refreshed: amber → green */
.dins-pulse--refresh { animation: dinsRefresh 6s ease-out infinite; }

@keyframes dinsRefresh {
  0%, 38% { background: #fbbf24; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  30% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  46%, 90% { background: var(--ok); box-shadow: 0 0 0 0 rgba(var(--ok-rgb), 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(var(--ok-rgb), 0); }
  100% { background: #fbbf24; }
}

/* --- lineage: a packet travels source → refined → metric --- */

.dins-flow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dins-node {
  flex: none;
  width: 24px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.dins-node--hot { animation: dinsNode 4.5s ease-in-out infinite; }

@keyframes dinsNode {
  0%, 60% { border-color: rgba(255, 255, 255, 0.35); box-shadow: none; background: rgba(255, 255, 255, 0.06); }
  70%, 90% { border-color: rgba(125, 211, 252, 0.8); box-shadow: 0 0 12px rgba(125, 211, 252, 0.3); background: rgba(125, 211, 252, 0.12); }
  100% { border-color: rgba(255, 255, 255, 0.35); box-shadow: none; background: rgba(255, 255, 255, 0.06); }
}

.dins-edge {
  position: relative;
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.dins-edge b {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.8);
  opacity: 0;
  animation: dinsPkt 4.5s ease-in-out infinite;
  animation-delay: var(--d);
}

@keyframes dinsPkt {
  0% { left: 0; opacity: 0; }
  6% { opacity: 1; }
  27% { left: calc(100% - 5px); opacity: 1; }
  33%, 100% { left: calc(100% - 5px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Case visual — Flights booking platform (club platform)
   -------------------------------------------------------------------------- */

.flight {
  width: 100%;
  max-width: 420px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  font-family: var(--font-mono);
}

.fl-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.05);
  border-radius: var(--r-xs);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text);
}

.fl-glass { color: var(--accent); font-size: 13px; }

/* looping typewriter over the mono search text */
.fl-type {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 9ch;
  animation: flType 4.5s steps(9) infinite;
}

@keyframes flType {
  0%, 6%   { width: 0; }
  40%, 90% { width: 9ch; }
  100%     { width: 0; }
}

.fl-caret {
  width: 6px; height: 12px;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.fl-tag {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.fl-suggest {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  margin-top: 6px;
  overflow: hidden;
}

.fl-opt {
  font-size: 10px;
  color: var(--muted);
  padding: 6px 12px;
}

.fl-opt.is-hot {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.1);
  animation: shimmer 2.4s ease-in-out infinite;
}

.fl-route {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 16px 0 14px;
}

.fl-city {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fl-city b { font-size: 13px; letter-spacing: 0.08em; color: var(--text); }
.fl-city span { font-size: 9px; color: var(--muted); }

.fl-arc { flex: 1; display: block; height: auto; min-width: 0; }

.fl-ticket {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--r-xs);
  padding: 8px 12px;
  font-size: 10.5px;
  color: var(--text);
  margin-bottom: 10px;
}

/* PNR status flips PROCESSING → TICKETED */
.fl-status {
  position: relative;
  min-width: 100px;
  min-height: 14px;
}

.fl-status i {
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  white-space: nowrap;
}

.fl-st-proc { color: #fbbf24; animation: flProc 6s steps(1) infinite; }
.fl-st-ok { color: var(--ok); opacity: 0; animation: flOk 6s steps(1) infinite; }

@keyframes flProc {
  0%, 40%  { opacity: 1; }
  41%, 100% { opacity: 0; }
}

@keyframes flOk {
  0%, 40%  { opacity: 0; }
  41%, 100% { opacity: 1; }
}

.fl-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fl-chip {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}

.fl-chip--ok { color: var(--ok); border-color: rgba(var(--ok-rgb), 0.3); }

/* --------------------------------------------------------------------------
   Case visual 3 — Lab productivity dashboard (global AC brand)
   -------------------------------------------------------------------------- */

.dash {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-md);
  background: var(--panel-grad);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.dash-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ok);
  border: 1px solid rgba(var(--ok-rgb), 0.35);
  background: rgba(var(--ok-rgb), 0.08);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

.dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.dash-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(var(--accent-rgb), 0.25), var(--accent));
  animation: barBreathe 2.6s ease-in-out infinite alternate;
  animation-delay: var(--d);
  transform-origin: bottom;
}

@keyframes barBreathe {
  from { transform: scaleY(0.82); opacity: 0.75; }
  to   { transform: scaleY(1); opacity: 1; }
}

.dash-rows { display: flex; flex-direction: column; gap: 9px; }

.dash-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
}

.dash-row b { margin-left: auto; font-weight: 500; }
.dash-row .up { color: var(--ok); }
.dash-row .down { color: var(--bad); }

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.dot--ok { background: var(--ok); box-shadow: 0 0 8px rgba(var(--ok-rgb), 0.7); }
.dot--bad { background: var(--bad); box-shadow: 0 0 8px rgba(var(--bad-rgb), 0.7); animation: blink 1.4s steps(1) infinite; }

/* --------------------------------------------------------------------------
   Case visual 4 — Browser mockup (international school website)
   -------------------------------------------------------------------------- */

.browser {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #31373f;
  animation: browserFloat 6s ease-in-out infinite alternate;
}

@keyframes browserFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-12px); }
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.browser-bar i:nth-child(1) { background: #f87171; }
.browser-bar i:nth-child(2) { background: #fbbf24; }
.browser-bar i:nth-child(3) { background: #34d399; }

.browser-url {
  flex: 1;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 4px 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-body { padding: 18px; }

.sk-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.sk-nav b {
  width: 30px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.sk-nav span {
  width: 34px; height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.sk-nav span:last-child { margin-left: auto; width: 48px; height: 14px; background: rgba(251, 191, 36, 0.35); }

.sk-hero {
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(var(--ok-rgb), 0.12));
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 20px;
  margin-bottom: 14px;
}

.sk-title {
  width: 62%; height: 14px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.35);
  margin-bottom: 10px;
  animation: shimmer 2.4s ease-in-out infinite;
}

.sk-line {
  width: 85%; height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 7px;
}

.sk-line--short { width: 55%; margin-bottom: 14px; }

.sk-btn {
  width: 92px; height: 24px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.sk-cards { display: flex; gap: 10px; }

.sk-cards i {
  flex: 1;
  height: 54px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  animation: shimmer 2.4s ease-in-out infinite;
}

.sk-cards i:nth-child(2) { animation-delay: 0.3s; }
.sk-cards i:nth-child(3) { animation-delay: 0.6s; }

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ==========================================================================
   Capabilities
   ========================================================================== */

.bay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.bay {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  background: var(--card-grad);
  transition: border-color 0.35s var(--ease);
}

.bay:hover { border-color: rgba(var(--accent-rgb), 0.35); }

.bay-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 16px;
}

.bay-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tile {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--field-bg);
  border-radius: 8px;
  padding: 6px 13px;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease,
    box-shadow 0.3s ease, transform 0.3s ease;
}

/* cascade in, tile by tile, when the bay scrolls into view */
.bay:not(.is-visible) .tile { opacity: 0; }

.bay.is-visible .tile {
  animation: tileIn 0.5s var(--ease) both;
  animation-delay: var(--td, 0s);
}

.bay.is-visible .tile:nth-child(1)  { --td: 0.05s; }
.bay.is-visible .tile:nth-child(2)  { --td: 0.1s; }
.bay.is-visible .tile:nth-child(3)  { --td: 0.15s; }
.bay.is-visible .tile:nth-child(4)  { --td: 0.2s; }
.bay.is-visible .tile:nth-child(5)  { --td: 0.25s; }
.bay.is-visible .tile:nth-child(6)  { --td: 0.3s; }
.bay.is-visible .tile:nth-child(7)  { --td: 0.35s; }
.bay.is-visible .tile:nth-child(8)  { --td: 0.4s; }
.bay.is-visible .tile:nth-child(9)  { --td: 0.45s; }
.bay.is-visible .tile:nth-child(10) { --td: 0.5s; }
.bay.is-visible .tile:nth-child(11) { --td: 0.55s; }

@keyframes tileIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.5);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.15);
}

/* trending additions lead each bay in violet */
.tile--new {
  color: var(--tile-new);
  border-color: rgba(var(--tile-new-rgb), 0.45);
  background: rgba(var(--tile-new-rgb), 0.07);
}

.tile--new:hover {
  border-color: rgba(var(--tile-new-rgb), 0.75);
  color: var(--tile-new);
  box-shadow: 0 6px 18px rgba(var(--tile-new-rgb), 0.18);
}

/* roaming sweep — script.js lights one tile at a time, bay by bay */
.tile.is-lit {
  border-color: rgba(var(--accent-rgb), 0.65);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.25);
}

.tile--new.is-lit {
  border-color: rgba(var(--tile-new-rgb), 0.85);
  color: var(--tile-new);
  background: rgba(var(--tile-new-rgb), 0.12);
  box-shadow: 0 0 14px rgba(var(--tile-new-rgb), 0.3);
}

/* ==========================================================================
   Process
   ========================================================================== */

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.step:hover {
  border-top-color: var(--accent);
  transform: translateY(-4px);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.step:hover .step-num {
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.25);
}

.step h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p { color: var(--muted); font-size: 14.5px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  text-align: center;
  padding-bottom: clamp(90px, 12vw, 150px);
}

.contact .section-label { text-align: center; }

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6.5vw, 76px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.contact-sub {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 44px;
}

.contact-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.contact-mail {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-mail:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   Project enquiry modal
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.is-open { visibility: visible; opacity: 1; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  background: var(--modal-grad);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px;
  box-shadow: var(--shadow-modal);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.is-open .modal-card { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.modal-close:hover { color: var(--text); border-color: rgba(var(--accent-rgb), 0.4); }

.modal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 8px;
}

.modal-head h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field--full { grid-column: 1 / -1; margin-top: 14px; }
.form-grid .field--full { margin-top: 0; }

.field span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.field select option { background: var(--opt-bg); }

.field textarea { resize: vertical; min-height: 96px; }

/* --------------------------------------------------------------------------
   Themed dropdown — script.js swaps the native select popup for this,
   so the option list follows the site theme instead of the OS
   -------------------------------------------------------------------------- */

.dd { position: relative; }

.dd-native { display: none; }

.dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  text-align: left;
  padding: 11px 14px;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

/* undo the .field span label styling on the button's inner spans */
.field .dd-value {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
}

.dd.is-open .dd-btn,
.dd-btn:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.05);
  outline: none;
}

.dd-caret {
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}

.dd.is-open .dd-caret { transform: rotate(-135deg) translateY(-2px); }

.dd-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  list-style: none;
  background: var(--opt-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-soft);
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px);
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.dd.is-open .dd-list {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.dd-list li {
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dd-list li:hover {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
}

.dd-list li[aria-selected="true"] {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.05);
}

/* fields signal focus via their border — skip the global ring */
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
}

/* honeypot — invisible to humans, catnip to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

.form-error { color: var(--bad); font-size: 13px; margin-top: 12px; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}

.form-submit[disabled] { opacity: 0.6; cursor: wait; transform: none !important; }

.form-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

.form-note a { color: var(--accent); }

/* the hidden attribute must always win over component display rules */
[hidden] { display: none !important; }

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 26px 0 10px;
}

.success-check {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad);
  color: var(--btn-ink);
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.4);
}

.form-success h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.form-success p { color: var(--muted); font-size: 14.5px; margin-bottom: 8px; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 26px 20px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 56px clamp(20px, 5vw, 64px) 28px;
  font-size: 13.5px;
  color: var(--muted);
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.015));
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.footer-tag { font-size: 13.5px; color: var(--muted); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
}

.footer-nav a { transition: color 0.25s var(--ease); }
.footer-nav a:hover { color: var(--text); }

.footer-mail {
  font-family: var(--font-mono);
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.footer-mail:hover { color: var(--accent); border-color: var(--accent); }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.footer-top { transition: color 0.25s var(--ease); }
.footer-top:hover { color: var(--accent); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .case { grid-template-columns: 1fr; }
  .case:nth-child(even of .case) .case-visual { order: 0; }
  .case-visual { min-height: 280px; }
  .process { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    font-size: 19px;
    background: var(--menu-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 899;
  }

  .nav-links.is-open { transform: translateX(0); }
  .nav-cta-mobile { display: inline-flex; }

  .bay-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .face-scan { gap: 18px; }
  .fs-frame { width: 180px; height: 215px; }
}

@media (max-width: 480px) {
  .forged-marks { gap: 10px 18px; }
  .hero-clients-row { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
