/* ══════════════════════════════════════════════════════
   STUDIO DEV PIRA v4 — Premium Design System
   Satoshi + IBM Plex Sans · Amber/Graphite · Agency-level
   ══════════════════════════════════════════════════════ */

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* ─── DESIGN TOKENS ──────────────────────────────────── */
:root {
  /* Backgrounds — true black with warm undertone */
  --bg0:  #030303;
  --bg1:  #080808;
  --bg2:  #0D0D0D;
  --bg3:  #131313;
  --bg4:  #1A1A1A;

  /* Warm graphite surfaces */
  --surf:   rgba(255,255,255,0.03);
  --surf2:  rgba(255,255,255,0.055);
  --surf3:  rgba(255,255,255,0.085);

  /* Borders */
  --b1: rgba(255,255,255,0.06);
  --b2: rgba(255,255,255,0.10);
  --b3: rgba(255,255,255,0.16);

  /* Text — bright white */
  --t1: #FFFFFF;        /* primary */
  --t2: #DCDCDC;        /* secondary — bright gray */
  --t3: #A3A3A3;        /* tertiary */
  --t4: #5A5A5A;        /* disabled */

  /* Brand amber — more orange, less yellow, used sparingly */
  --amber:    #E8941A;
  --amber-lt: #F0A832;
  --amber-dk: #C87A10;
  --amber-bg: rgba(232,148,26,0.07);
  --amber-bd: rgba(232,148,26,0.18);

  /* Status */
  --green: #22C55E;
  --red:   #EF4444;

  /* Syntax highlighting */
  --kw: #C792EA;   /* keyword */
  --fn: #82AAFF;   /* function */
  --va: #F78C6C;   /* variable */
  --st: #C3E88D;   /* string */
  --nu: #F78C6C;   /* number */
  --cm: #4A5568;   /* comment */
  --ty: #FFCB6B;   /* type */

  /* Typography */
  --font-head: 'Satoshi', 'Inter', -apple-system, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  /* Container */
  --max: 1160px;
}

/* ─── SYNTAX CLASSES ─────────────────────────────────── */
.c-kw  { color: var(--kw); font-weight: 500; }
.c-fn  { color: var(--fn); }
.c-va  { color: var(--va); }
.c-st  { color: var(--st); }
.c-nu  { color: var(--nu); }
.c-cm  { color: var(--cm); font-style: italic; }
.c-ty  { color: var(--ty); }
.c-g   { color: var(--green); }
.c-b   { color: var(--fn); }
.c-o   { color: var(--amber); }
.c-dim { color: var(--t3); }
.c-blink { animation: blink-caret .9s step-end infinite; }
@keyframes blink-caret { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── BASE ───────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--bg0);
  color: var(--t1);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}

/* ─── PAGE BACKGROUND ENVIRONMENT ───────────────────── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 20%, transparent 80%);
}

.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 0%, transparent 40%, var(--bg0) 100%);
}

/* ─── MOUSE AMBIENT LIGHT ─────────────────────────────── */
.mouse-light {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mx, 50vw) var(--my, 30vh),
    rgba(232,148,26,0.04),
    transparent 40%
  );
  transition: opacity .4s;
}

/* ─── CURSOR ──────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .12s, height .12s, opacity .2s;
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid rgba(232,148,26,0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: border-color .25s, width .3s var(--ease-out), height .3s var(--ease-out);
}

/* ─── SCROLL PROGRESS ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  width: 0%;
  background: var(--amber);
  z-index: 10000;
}

/* ─── LAYOUT ──────────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 7rem 0; position: relative; z-index: 1; }

/* ─── TYPOGRAPHY ──────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.1rem;
}
.h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -.032em;
  margin-bottom: 1rem;
  color: var(--t1);
}
.h3 {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.025em;
  color: var(--t1);
}
.body-copy {
  font-size: .975rem;
  color: var(--t2);
  line-height: 1.82;
  font-weight: 500;
}
.section-lead {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto;
  font-weight: 500;
}
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.mono-text { font-family: var(--font-mono); }
.amber-text { color: var(--amber); }

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.5rem;
  background: var(--amber);
  color: #060606;
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  border-radius: 100px;
  border: none;
  cursor: none;
  transition: background .22s var(--ease-out), transform .22s var(--ease-out), box-shadow .22s;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity .2s;
}
.btn-primary:hover {
  background: var(--amber-lt);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,148,26,0.2);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-primary-lg { padding: .9rem 1.85rem; font-size: .95rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .78rem 1.5rem;
  background: transparent;
  color: var(--t1);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  border-radius: 100px;
  border: 1px solid var(--b2);
  cursor: none;
  transition: border-color .2s, background .2s;
}
.btn-secondary:hover { border-color: var(--b3); background: var(--surf); }

.btn-wpp {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .78rem 1.5rem;
  background: rgba(255,255,255,.06);
  color: var(--t1);
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  border: 1px solid var(--b1);
  cursor: none;
  transition: background .2s, border-color .2s;
}
.btn-wpp:hover { background: rgba(255,255,255,.09); border-color: var(--b2); }

/* ─── NAV ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.1rem 0;
  transition: padding .4s var(--ease-out), background .5s, border-color .5s;
}
.nav.nav-solid {
  background: rgba(3,3,3,.88);
  backdrop-filter: blur(32px) saturate(1.5);
  border-bottom: 1px solid var(--b1);
  padding: .75rem 0;
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — PNG image */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--t1);
  flex-shrink: 0;
}
/* The logo PNG has a black background — we crop it tight and use mix-blend-mode
   so it composites cleanly on both the transparent nav and the solid nav-solid state */
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  /* Crop the black padding — the symbol occupies roughly the center 60% */
  /* Use a tight clip rather than mix-blend-mode so it works in all browsers */
  filter: brightness(1);
  border-radius: 4px;
  /* On transparent bg (hero), the black bg of the logo will blend with dark overlay */
  mix-blend-mode: lighten;
  transition: opacity .2s;
}
.logo-img:hover { opacity: .85; }
.logo-img-footer {
  height: 52px;
  mix-blend-mode: lighten;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .1rem;
  list-style: none;
}
.nav-link {
  font-family: var(--font-body);
  text-decoration: none;
  color: var(--t2);
  font-size: .84rem;
  font-weight: 500;
  padding: .4rem .7rem;
  border-radius: 7px;
  transition: color .15s, background .15s;
  position: relative;
}
.nav-link:hover { color: var(--t1); background: var(--surf); }
.nav-cta {
  font-family: var(--font-head);
  background: transparent;
  color: var(--amber) !important;
  font-weight: 600;
  border: 1px solid var(--amber-bd);
  border-radius: 100px;
  padding: .38rem 1rem;
  margin-left: .5rem;
  transition: background .2s, border-color .2s !important;
}
.nav-cta:hover { background: var(--amber-bg) !important; border-color: rgba(232,148,26,.32) !important; }

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--t2);
  border-radius: 2px;
  transition: all .3s var(--ease-out);
}
.nav-burger.open span:first-child { transform: rotate(45deg) translate(4px, 4px); }
.nav-burger.open span:last-child  { transform: rotate(-45deg) translate(4px,-4px); }

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,3,3,.97);
  backdrop-filter: blur(40px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform .5s var(--ease-out);
}
.mobile-overlay.open { transform: translateY(0); }
.mob-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none; border: none;
  color: var(--t2); font-size: 1.2rem;
  cursor: pointer; padding: .5rem;
  transition: color .15s;
}
.mob-close:hover { color: var(--t1); }
.mobile-overlay ul { list-style: none; text-align: center; }
.mobile-overlay li { margin: .75rem 0; }
.mob-link {
  font-family: var(--font-head);
  text-decoration: none;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--t2);
  transition: color .15s;
}
.mob-link:hover { color: var(--t1); }
.mob-cta { color: var(--amber) !important; }

/* ─── HERO ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  /* height is set dynamically by JS based on video frame count */
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Engineering marks */
.hero-marks { position: absolute; inset: 0; pointer-events: none; }
.mark {
  position: absolute;
  width: 40px; height: 40px;
  opacity: .06;
}
.mark::before, .mark::after {
  content: '';
  position: absolute;
  background: var(--t1);
}
.mark::before { width: 1px; height: 100%; left: 50%; transform: translateX(-50%); }
.mark::after  { width: 100%; height: 1px; top: 50%; transform: translateY(-50%); }
.mark-tl { top: 2rem; left: 2rem; }
.mark-tr { top: 2rem; right: 2rem; }
.mark-br { bottom: 2rem; right: 2rem; }

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: .18;
  z-index: 2;
  pointer-events: none;
}

/* Positioning marks for video hero */
.mark-tl { top: 5rem; left: 2rem; }
.mark-tr { top: 5rem; right: 2rem; }
.mark-br { bottom: 3rem; right: 2rem; }

/* ─── HERO SCROLL CONTAINER ─────────────────────────── */
.hero-scroll-container {
  position: relative;
  height: 500vh; /* overridden by JS once video loads */
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg0);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(3,3,3,.72) 0%, rgba(3,3,3,.32) 55%, rgba(3,3,3,.08) 100%),
    linear-gradient(to bottom, rgba(3,3,3,.5) 0%, transparent 35%, transparent 70%, rgba(3,3,3,.6) 100%);
  pointer-events: none;
}

.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero-vidprog-wrap {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,.06);
  z-index: 5;
}
.hero-vidprog-bar {
  height: 100%;
  width: 0%;
  background: var(--amber);
  border-radius: 0 1px 1px 0;
  transition: width .05s linear;
}

.hero-scroll-nudge {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  opacity: 0;
  animation: sh-appear .8s ease 1.8s forwards;
}
.hero-scroll-nudge span {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--t3);
}
.hero-scroll-nudge .sh-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--b2));
  position: relative;
  overflow: hidden;
}
.hero-scroll-nudge .sh-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--amber));
  animation: sh-fall 1.8s ease-in-out infinite;
}

/* ─── HERO COPY (inside .hero-inner) ─────────────────── */
.hero-copy { display: flex; flex-direction: column; max-width: 560px; }


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  color: var(--green);
  background: rgba(34,197,94,.07);
  border: 1px solid rgba(34,197,94,.18);
  padding: .33rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.85rem;
  width: fit-content;
  backdrop-filter: blur(8px);
}

.live-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--green);
  animation: ld-blink 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
.live-dot-sm { width: 5px; height: 5px; }
.live-dot-amber { background: var(--amber); box-shadow: 0 0 5px var(--amber); }
@keyframes ld-blink { 0%,100%{opacity:1} 50%{opacity:.35} }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.title-line { display: block; }
.title-muted { color: rgba(232,232,230,.55); }

.hero-sub {
  font-size: 1rem;
  color: var(--t2);
  line-height: 1.8;
  max-width: 420px;
  margin-bottom: 2.25rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--b1);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  line-height: 1;
}
.proof-n {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--t1);
}
.proof-suf {
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 600;
  color: var(--amber);
  margin-left: .05rem;
}
.proof-l {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--t3);
  letter-spacing: .02em;
  margin-top: .25rem;
}
.proof-rule { width: 1px; height: 28px; background: var(--b1); flex-shrink: 0; }

/* ─── ARCHITECT WORKSPACE ─────────────────────────────── */
.hero-workspace {
  position: relative;
  height: 580px;
  perspective: 1400px;
  perspective-origin: 60% 50%;
}

.ws-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* Editor */
.ws-editor {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 300px;
  background: #0A0A0C;
  border: 1px solid var(--b2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 32px 80px rgba(0,0,0,.7),
    0 4px 16px rgba(0,0,0,.4);
}

.ws-titlebar {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .6rem 1rem;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid var(--b1);
}
.ws-titlebar-dark {
  background: rgba(0,0,0,.4);
}

.ws-traffic { display: flex; gap: 5px; align-items: center; }
.ws-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ws-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  overflow: hidden;
}
.ws-tab {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--t3);
  background: none;
  border: none;
  border-right: 1px solid var(--b1);
  padding: 0 .875rem;
  cursor: pointer;
  height: 100%;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.ws-tab:hover { color: var(--t2); }
.ws-tab-active {
  color: var(--t1) !important;
  background: rgba(255,255,255,.04) !important;
}

.ws-topright {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}
.ws-lang-badge {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--t3);
  padding: .15rem .4rem;
  border: 1px solid var(--b1);
  border-radius: 4px;
}
.ws-status-badge {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--t3);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.ws-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  animation: ld-blink 2s infinite;
}
.ws-status-ok .ws-status-dot { background: var(--green); }

.ws-editor-body {
  display: flex;
  height: calc(100% - 36px);
  overflow: hidden;
}

.ws-gutter {
  width: 36px;
  padding: .875rem .5rem;
  border-right: 1px solid var(--b1);
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--t4);
  line-height: 1.75;
  text-align: right;
  flex-shrink: 0;
  user-select: none;
}

.ws-code {
  flex: 1;
  padding: .875rem 1rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.75;
  overflow: hidden;
  position: relative;
}
.ws-code-line { white-space: pre; }

/* Bottom row */
.ws-bottom-row {
  position: absolute;
  left: 0; right: 0;
  top: 312px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
  height: 188px;
}

/* Terminal */
.ws-terminal {
  background: #050507;
  border: 1px solid var(--b2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
}
.ws-term-name {
  font-family: var(--font-mono);
  font-size: .63rem;
  color: var(--t3);
}
.ws-live-pill {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--green);
  margin-left: auto;
}
.ws-term-body {
  flex: 1;
  padding: .75rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  line-height: 1.7;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.term-line {
  white-space: nowrap;
  overflow: hidden;
  color: var(--t2);
}
.term-line-success { color: var(--green); }
.term-line-cmd     { color: var(--t1); font-weight: 500; }
.term-line-dim     { color: var(--t3); }
.term-line-amber   { color: var(--amber); }

/* API Monitor */
.ws-api-monitor {
  background: #050507;
  border: 1px solid var(--b2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
}
.ws-api-name {
  font-family: var(--font-mono);
  font-size: .63rem;
  color: var(--t3);
}
.ws-api-body {
  flex: 1;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.api-req {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: .4rem;
  padding: .28rem .4rem;
  border-radius: 5px;
  transition: background .15s;
  font-family: var(--font-mono);
  font-size: .62rem;
}
.api-req:hover { background: var(--surf); }
.api-method {
  font-weight: 600;
  font-size: .58rem;
  padding: .1rem .3rem;
  border-radius: 3px;
  text-align: center;
}
.method-post { background: rgba(130,170,255,.12); color: #82AAFF; }
.method-get  { background: rgba(34,197,94,.1);  color: var(--green); }
.method-put  { background: rgba(232,148,26,.1);  color: var(--amber); }
.method-del  { background: rgba(239,68,68,.1);   color: var(--red); }
.api-path    { color: var(--t2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-ms      { color: var(--t3); text-align: right; }
.api-status  { font-size: .6rem; padding: .1rem .3rem; border-radius: 3px; }
.status-ok   { background: rgba(34,197,94,.1); color: var(--green); }
.status-pend { background: rgba(232,148,26,.1); color: var(--amber); }

/* Pipeline strip */
.ws-pipeline {
  position: absolute;
  bottom: -12px;
  left: 0; right: -20px;
  background: rgba(8,8,12,.92);
  border: 1px solid var(--b2);
  border-radius: 10px;
  backdrop-filter: blur(20px);
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 4;
  overflow: hidden;
}

.pipe-stage {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--t3);
  padding: .22rem .5rem;
  border-radius: 5px;
  transition: all .3s;
}
.pipe-done    { color: var(--green); background: rgba(34,197,94,.08); }
.pipe-running { color: var(--amber); background: rgba(232,148,26,.08); }
.pipe-idle    { color: var(--t3); }

.pipe-icon { font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.pipe-spin { animation: ps-spin 1.1s linear infinite; }
@keyframes ps-spin { to{transform:rotate(360deg)} }

.pipe-arrow { color: var(--t4); font-size: .65rem; font-family: var(--font-mono); margin: 0 -.2rem; }
.pipe-arrow-dim { opacity: .3; }
.pipe-timing { margin-left: auto; font-family: var(--font-mono); font-size: .6rem; color: var(--t3); }

/* Floating chips */
.ws-float-chip {
  position: absolute;
  background: rgba(6,6,10,.93);
  border: 1px solid var(--b2);
  border-radius: 10px;
  backdrop-filter: blur(24px);
  padding: .65rem .875rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 3;
  min-width: 180px;
  transition: border-color .3s, transform .3s var(--ease-out);
}
.ws-float-chip:hover { border-color: var(--amber-bd); }

.ws-chip-deploy {
  top: -20px;
  right: -20px;
  animation: chip-float-a 5s ease-in-out infinite;
}
.ws-chip-ai {
  bottom: 24px;
  left: -18px;
  animation: chip-float-b 6s ease-in-out 1s infinite;
  flex-direction: column;
  align-items: flex-start;
}

@keyframes chip-float-a { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes chip-float-b { 0%,100%{transform:translateY(0)} 50%{transform:translateY(7px)} }

.wfc-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.wfc-dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); animation: ld-blink 2.2s infinite; }
.wfc-dot-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.wfc-body { display: flex; flex-direction: column; gap: .15rem; width: 100%; }
.wfc-label { font-family: var(--font-mono); font-size: .58rem; color: var(--t3); text-transform: uppercase; letter-spacing: .1em; }
.wfc-value { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; color: var(--t1); }
.wfc-sub   { font-family: var(--font-mono); font-size: .6rem; color: var(--t3); }
.wfc-bar   { height: 2px; background: var(--b1); border-radius: 1px; overflow: hidden; width: 100%; margin-top: .4rem; }
.wfc-fill  { height: 100%; background: var(--amber); border-radius: 1px; animation: wfb-pulse 2s ease-in-out infinite; }
@keyframes wfb-pulse { 0%,100%{opacity:1} 50%{opacity:.65} }

/* Hero code fragment */
.hero-code-frag {
  position: absolute;
  background: rgba(6,6,10,.85);
  border: 1px solid var(--b1);
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.hcf-1 {
  bottom: 70px;
  right: -15px;
  animation: chip-float-a 7s ease-in-out .5s infinite;
  min-width: 195px;
}
.hcf-header {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .65rem;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--b1);
}
.hcf-name {
  font-family: var(--font-mono);
  font-size: .58rem;
  color: var(--t3);
  margin-left: .35rem;
}
.hcf-body { padding: .6rem .7rem; }
.hcf-line {
  font-family: var(--font-mono);
  font-size: .65rem;
  line-height: 1.7;
  color: var(--t2);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: sh-appear .8s ease 2.8s forwards;
}
.sh-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--b2));
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.sh-line::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--amber));
  animation: sh-fall 2s ease-in-out infinite;
}
@keyframes sh-appear { from{opacity:0;transform:translateX(-50%) translateY(8px)} to{opacity:.5;transform:translateX(-50%) translateY(0)} }
@keyframes sh-fall   { 0%{top:-100%} 100%{top:200%} }

/* ─── TRUST BAR ──────────────────────────────────────── */
.trust-bar {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--b1);
  border-bottom: 1px solid var(--b1);
  background: rgba(255,255,255,.01);
  padding: .8rem 0;
  overflow: hidden;
}
.trust-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.trust-eyebrow {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t3);
  white-space: nowrap;
  flex-shrink: 0;
}
.trust-track-wrap { overflow: hidden; flex: 1; }
.trust-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: trust-run 32s linear infinite;
}
.trust-track span {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--t3);
}
.trust-track em {
  font-style: normal;
  color: var(--b2);
}
@keyframes trust-run { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ─── ABOUT ──────────────────────────────────────────── */
.about-section { overflow: visible; }
.about-scrim {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--b2), transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-diffs { margin-top: 2.25rem; display: flex; flex-direction: column; }
.adiff {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--b1);
  transition: padding-left .22s var(--ease-out);
}
.adiff:hover { padding-left: .4rem; }
.adiff-rule {
  width: 2px; height: 38px;
  background: var(--b2);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 3px;
  transition: background .25s;
}
.adiff:hover .adiff-rule { background: var(--amber); }
.adiff-rule-amber { background: var(--amber) !important; }
.adiff-body strong {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: .35rem;
}
.adiff-body p {
  font-size: .83rem;
  color: var(--t2);
  line-height: 1.7;
}

/* Architecture card */
.about-right { position: relative; }
.arch-wrap { position: relative; }

.arch-card {
  background: var(--bg2);
  border: 1px solid var(--b2);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translateX(20px);
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.arch-card:hover { box-shadow: 0 32px 80px rgba(0,0,0,.55); }

.arch-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.arch-card-title, .arch-card-ver {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--t3);
}

.arch-layers { display: flex; flex-direction: column; }
.arch-layer {
  background: var(--surf);
  border: 1px solid var(--b1);
  border-radius: 8px;
  padding: .875rem;
}
.arch-layer-name {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--t3);
  display: block;
  margin-bottom: .6rem;
}
.arch-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.arch-chip {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  background: var(--bg0);
  border: 1px solid var(--b1);
  border-radius: 5px;
  padding: .25rem .6rem;
  color: var(--t2);
  transition: border-color .15s, color .15s;
}
.arch-chip:hover { border-color: var(--b2); color: var(--t1); }
.arch-chip-amber { border-color: var(--amber-bd); color: var(--amber); background: var(--amber-bg); }

.arch-connector {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .45rem 1rem;
  position: relative;
}
.arch-conn-line {
  flex: 1;
  height: 1px;
  background: var(--b1);
  position: relative;
  overflow: hidden;
}
.arch-conn-pulse {
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  animation: arch-flow 2.5s ease-in-out infinite;
  opacity: .6;
}
@keyframes arch-flow { 0%{left:-30%} 100%{left:130%} }
.arch-conn-label {
  font-size: .58rem;
  color: var(--t4);
  white-space: nowrap;
}
.arch-footnote {
  font-size: .62rem;
  color: var(--t4);
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* About floating code */
.arch-float-code {
  position: absolute;
  top: -16px;
  right: -24px;
  background: rgba(6,6,10,.92);
  border: 1px solid var(--amber-bd);
  border-radius: 9px;
  padding: .65rem .875rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 36px rgba(0,0,0,.5), 0 0 0 1px rgba(232,148,26,.06);
  z-index: 2;
  animation: chip-float-a 5.5s ease-in-out .8s infinite;
}
.afc-line {
  font-size: .68rem;
  line-height: 1.78;
}

/* ─── SERVICES ───────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--b1);
  border: 1px solid var(--b1);
  border-radius: 14px;
  overflow: visible;
}

.svc-card {
  background: var(--bg1);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  position: relative;
  overflow: hidden;
  transition: background .25s var(--ease-out);
}
.svc-card:first-child { border-radius: 14px 0 0 0; }
.svc-card:nth-child(3) { border-radius: 0 14px 0 0; }
.svc-card:nth-child(4) { border-radius: 0 0 0 14px; }
.svc-card:last-child { border-radius: 0 0 14px 0; }

/* Override on overflow sides */
.svc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.svc-card:hover { background: #0E0E10; }
.svc-card:hover::before { transform: scaleX(1); }
.svc-card:hover .svc-icon-wrap { color: var(--amber); transform: scale(1.06); }
.svc-card:hover .svc-code { opacity: 1; transform: translateY(0); }

/* Slightly shifted card for asymmetry */
.svc-card-shifted { transform: translateY(-6px); }
.svc-card-hl { border-left: 1px solid var(--amber-bd); }

.svc-num {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--t4);
}
.svc-icon-wrap {
  color: var(--t3);
  width: 18px;
  transition: color .25s, transform .25s var(--ease-out);
}
.svc-title {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.svc-desc {
  font-size: .83rem;
  color: var(--t2);
  line-height: 1.72;
  flex: 1;
}
.svc-tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.svc-tags span {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--t3);
  background: var(--surf);
  border: 1px solid var(--b1);
  padding: .15rem .45rem;
  border-radius: 4px;
}
.svc-code {
  font-size: .65rem;
  color: var(--t3);
  background: rgba(0,0,0,.4);
  border: 1px solid var(--b1);
  border-radius: 5px;
  padding: .35rem .6rem;
  margin-top: .25rem;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .3s, transform .3s var(--ease-out);
  white-space: nowrap;
}

/* ─── DIFFERENTIALS ──────────────────────────────────── */
.diff-section { overflow: visible; }
.diff-bg-code {
  position: absolute;
  top: 3rem; right: 2rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s;
}
.diff-bg-code.visible { opacity: 1; }
.dbc-snippet {
  background: rgba(6,6,10,.7);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 9px;
  padding: .875rem 1rem;
  font-size: .7rem;
  line-height: 1.8;
  color: var(--t4);
}

.diff-intro { max-width: 560px; margin-bottom: 3rem; }

.diff-table { display: flex; flex-direction: column; border-top: 1px solid var(--b1); }
.diff-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--b1);
  transition: padding-left .2s var(--ease-out), background .2s;
}
.diff-row:hover {
  padding-left: .75rem;
  background: var(--surf);
  border-radius: 8px;
  padding-right: .75rem;
  margin: 0 -.75rem;
}
.diff-row-hl {
  border-left: 2px solid var(--amber);
  padding-left: 1rem;
}
.diff-row-hl:hover { padding-left: 1.5rem; }

.diff-dash { color: var(--t4); font-size: .9rem; padding-top: .2rem; }
.diff-dash-amber { color: var(--amber); }
.diff-content h4 {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .4rem;
}
.diff-content p {
  font-size: .84rem;
  color: var(--t2);
  line-height: 1.72;
  max-width: 560px;
}

.diff-tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--t3);
  background: var(--surf);
  border: 1px solid var(--b1);
  padding: .2rem .55rem;
  border-radius: 100px;
  white-space: nowrap;
  height: fit-content;
  margin-top: .2rem;
}
.diff-tag-amber { color: var(--amber); border-color: var(--amber-bd); background: var(--amber-bg); }

/* ─── PROCESS ────────────────────────────────────────── */
.process-list { display: flex; flex-direction: column; border-top: 1px solid var(--b1); }
.process-step {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--b1);
  transition: padding-left .2s var(--ease-out), background .2s;
}
.process-step:hover {
  padding-left: .75rem;
  background: var(--surf);
  border-radius: 8px;
  padding-right: .75rem;
  margin: 0 -.75rem;
}
.process-step-hl {
  border-left: 2px solid var(--amber);
  padding-left: 1rem;
}
.process-step-hl:hover { padding-left: 1.5rem; }

.ps-left { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.ps-num {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 600;
  color: var(--t4);
  letter-spacing: .06em;
  transition: color .2s;
}
.process-step:hover .ps-num { color: var(--t2); }
.ps-num-amber { color: var(--amber) !important; }
.ps-line {
  width: 1px;
  flex: 1;
  background: var(--b1);
  border-radius: 1px;
  min-height: 20px;
}
.ps-line-amber { background: var(--amber); opacity: .4; }

.ps-body h4 {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .4rem;
}
.ps-body p { font-size: .84rem; color: var(--t2); line-height: 1.72; max-width: 520px; }

.ps-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  margin-top: .2rem;
}
.ps-dur {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--t3);
  border: 1px solid var(--b1);
  padding: .2rem .55rem;
  border-radius: 100px;
  white-space: nowrap;
}
.ps-dur-amber { color: var(--amber); border-color: var(--amber-bd); background: var(--amber-bg); }
.ps-deliverable {
  font-family: var(--font-mono);
  font-size: .58rem;
  color: var(--t4);
  text-align: right;
}

/* ─── STATS ──────────────────────────────────────────── */
.stats-section {
  background: var(--bg1);
  border-top: 1px solid var(--b1);
  border-bottom: 1px solid var(--b1);
  padding: 4.5rem 0;
  position: relative;
  z-index: 1;
}
.stats-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--b1);
  border: 1px solid var(--b1);
  border-radius: 14px;
  overflow: hidden;
}
.stat-item {
  background: var(--bg2);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
  transition: background .22s;
  position: relative;
  overflow: hidden;
}
.stat-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: transparent;
  transition: background .3s;
}
.stat-item:hover { background: var(--bg3); }
.stat-item:hover::after { background: var(--amber); }

.stat-icon {
  width: 32px; height: 32px;
  background: var(--surf);
  border: 1px solid var(--b1);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t3);
  transition: border-color .2s, color .2s;
}
.stat-item:hover .stat-icon { border-color: var(--b2); color: var(--t2); }
.stat-icon-amber {
  border-color: var(--amber-bd) !important;
  color: var(--amber) !important;
  background: var(--amber-bg) !important;
}

.stat-item strong {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.stat-item p { font-size: .8rem; color: var(--t2); line-height: 1.65; }

/* ─── PORTFOLIO HUB ────────────────────────────────────── */
.portfolio-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3,3,3,0.98);
  backdrop-filter: blur(16px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: all 0.4s var(--ease-out);
  padding: 0 0 5rem;
}
.portfolio-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.po-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(3,3,3,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--b1);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.po-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -.02em;
}
.po-close {
  background: var(--surf);
  border: 1px solid var(--b1);
  color: var(--t2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.po-close:hover {
  background: var(--surf2);
  color: var(--t1);
  transform: rotate(90deg);
}
.proj-hub-filters {
  display: flex;
  gap: .5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.phf-btn {
  background: var(--surf);
  border: 1px solid var(--b1);
  color: var(--t2);
  padding: .4rem .8rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .65rem;
  cursor: pointer;
  transition: all .2s var(--ease-out);
}
.phf-btn:hover {
  background: var(--surf2);
  border-color: var(--b2);
  color: var(--t1);
}
.phf-btn.phf-active {
  background: var(--t1);
  color: var(--bg0);
  border-color: var(--t1);
}

.proj-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.proj-hub-card {
  background: var(--surf);
  border: 1px solid var(--b1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: all .3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.proj-hub-card:not(.proj-hub-placeholder):hover {
  border-color: var(--b2);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.proj-hub-card:not(.proj-hub-placeholder):hover .phc-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.phc-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.phc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid var(--b1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
}
.phc-cat {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--t3);
}
.phc-arrow {
  margin-left: auto;
  color: var(--amber);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all .3s var(--ease-out);
}

.phc-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--t1);
  margin-bottom: .6rem;
}
.phc-desc {
  font-size: .85rem;
  color: var(--t2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.phc-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--b1);
}
.phc-stack span {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--t3);
  background: var(--bg2);
  border: 1px solid var(--b1);
  padding: .2rem .5rem;
  border-radius: 4px;
}

.phc-status {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .65rem;
}
.phc-status-live { color: var(--green); }
.phc-status-wip { color: var(--amber); }

/* Placeholder Card */
.proj-hub-placeholder {
  border-style: dashed;
  background: transparent;
  pointer-events: none;
}
.phc-icon-dim { opacity: .4; }
.phc-cat-dim { opacity: .4; }
.phc-title-dim { color: var(--t3); }
.phc-desc-dim { color: var(--t4); }

.proj-hub-cta {
  margin-top: 3rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--t3);
}

/* ─── TECH ───────────────────────────────────────────── */
.tech-section { overflow: visible; }
.tech-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 2.5rem;
  align-items: start;
}
.tech-sep { width: 1px; background: var(--b1); align-self: stretch; margin-top: 2rem; }
.tc-head {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: .875rem;
}
.tc-list { display: flex; flex-direction: column; gap: .3rem; }
.tc-item {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
  padding: .5rem .825rem;
  background: var(--surf);
  border: 1px solid var(--b1);
  border-radius: 7px;
  color: var(--t2);
  transition: all .18s var(--ease-out);
  cursor: default;
}
.tc-item:hover {
  background: var(--surf2);
  border-color: var(--b2);
  color: var(--t1);
  transform: translateX(4px);
  box-shadow: 0 0 0 1px rgba(232,148,26,.08);
}
.tc-hl {
  border-color: var(--amber-bd);
  color: var(--amber);
  background: var(--amber-bg);
}
.tc-hl:hover { color: var(--amber-lt); }

/* ─── CTA ────────────────────────────────────────────── */
.cta-section {
  background: var(--bg1);
  border-top: 1px solid var(--b1);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
#ctaCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .15; }
.cta-ambient {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(232,148,26,.06), transparent 70%);
  pointer-events: none;
}

.cta-code-float {
  position: absolute;
  top: 2.5rem; right: 4%;
  background: rgba(6,6,10,.88);
  border: 1px solid var(--amber-bd);
  border-radius: 10px;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  overflow: hidden;
  animation: chip-float-a 6.5s ease-in-out infinite;
  z-index: 1;
}
.cta-cf-header {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .75rem;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--b1);
}
.cta-cf-body { padding: .7rem .875rem; }
.cta-cf-line { font-family: var(--font-mono); font-size: .7rem; line-height: 1.78; color: var(--t2); }

.cta-content { position: relative; z-index: 2; max-width: 660px; margin: 0 auto; }
.cta-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.11;
  margin-bottom: 1.5rem;
}
.cta-title em { font-style: normal; color: var(--amber); }
.cta-sub { font-size: .995rem; color: var(--t2); line-height: 1.8; max-width: 490px; margin: 0 auto 2.25rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.75rem; }
.cta-trust { display: flex; align-items: center; justify-content: center; gap: .75rem; font-family: var(--font-mono); font-size: .65rem; color: var(--t3); flex-wrap: wrap; }
.cta-sep { color: var(--b2); }

/* CTA pulse */
@keyframes cta-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(232,148,26,.25)} 50%{box-shadow:0 0 0 10px rgba(232,148,26,0)} }
#ctaBtn { animation: cta-pulse 3s ease-in-out infinite; }
#ctaBtn:hover { animation: none; }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--bg0);
  border-top: 1px solid var(--b1);
  padding: 4.5rem 0 2rem;
  position: relative;
  z-index: 1;
}
.footer-top {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--b1);
}
.footer-tagline {
  font-size: .84rem;
  color: var(--t3);
  padding-left: calc(30px + .7rem);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--b1);
}
.fn-col h5 {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 1.1rem;
}
.fn-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.fn-col a, .fn-col span {
  font-size: .83rem;
  color: var(--t2);
  text-decoration: none;
  transition: color .15s, transform .2s var(--ease-out);
  display: inline-block;
}
.fn-col a:hover { color: var(--t1); transform: translateX(3px); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .74rem;
  color: var(--t4);
}
.footer-version { letter-spacing: .04em; }

/* ─── SCROLL REVEAL ──────────────────────────────────── */
.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal-item.visible { opacity: 1; transform: translateY(0); }

/* GSAP targets — initial state set by GSAP */
.gsap-fade { opacity: 0; }
.gsap-card { opacity: 0; }

/* ─── RESPONSIVE ─────────────────────────────────────── */

/* ── Tablet/small desktop (1100px) ── */
@media (max-width: 1100px) {
  .tech-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .tech-sep { display: none; }
  :root { --max: 960px; }
}

/* ── Medium (960px) ── */
@media (max-width: 960px) {
  /* Nav */
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }

  /* Hero video scroll: on tablet/mobile, disable the scroll-pin experience
     and show a static full-screen video poster instead so the page flows normally */
  .hero-scroll-container {
    height: auto !important;  /* collapse the tall scroll room */
  }
  .hero-sticky {
    position: relative;       /* un-stick it */
    height: 100svh;           /* still full viewport height */
    min-height: 520px;
  }
  /* Video still plays (auto-play loop) on tablet for ambience, just not scroll-driven */
  .hero-video {
    display: block;
  }
  .hero-video-overlay {
    background:
      linear-gradient(to bottom, rgba(3,3,3,.6) 0%, rgba(3,3,3,.3) 40%, rgba(3,3,3,.55) 100%);
  }

  /* Hero copy: full width, centered */
  .hero-inner {
    left: 0;
    transform: none;
    justify-content: center;
    padding: 0 1.5rem;
  }
  .hero-copy {
    max-width: 100%;
    text-align: center;
    align-items: center;
  }
  .hero-proof { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-badge { align-self: center; }

  /* Hide extras */
  .hero-marks { display: none; }
  .cta-code-float { display: none; }
  .diff-bg-code { display: none; }
  .hero-scroll-nudge { display: none; }

  /* Sections */
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .arch-card { transform: none; }
  .arch-float-code { display: none; }
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .svc-card-shifted { transform: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .proj-hub-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .diff-row { grid-template-columns: 18px 1fr; }
  .diff-tag { display: none; }
  .process-step { grid-template-columns: 52px 1fr; }
  .ps-meta { display: none; }
}

/* ── Mobile (640px) ── */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }

  /* Nav height reduce */
  .nav { padding: .9rem 0; }
  .nav-inner { padding: 0 1rem; }
  .logo-img { height: 36px; }

  /* Hero */
  .hero-sticky { height: 100svh; min-height: 500px; }
  .hero-title { font-size: clamp(1.9rem, 7.5vw, 2.6rem); }
  .hero-sub { font-size: .9rem; }
  .hero-actions { flex-direction: column; align-items: center; width: 100%; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary { width: 100%; justify-content: center; }
  .hero-proof { flex-wrap: wrap; gap: 1rem; justify-content: center; }
  .proof-rule { display: none; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }
  .svc-code { display: none; } /* hide code snippets on small screens */

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .proj-hub-grid { grid-template-columns: 1fr; }

  /* Tech */
  .tech-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }

  /* CTA */
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn-primary-lg,
  .cta-actions .btn-wpp { text-align: center; justify-content: center; }
  .cta-title { font-size: clamp(1.65rem, 6.5vw, 2.2rem); }
  .cta-trust { flex-direction: column; gap: .3rem; }
  .cta-sep { display: none; }

  /* Footer */
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: .4rem; text-align: center; }
  .footer-tagline { padding-left: 0; text-align: center; }
  .footer-top { align-items: center; text-align: center; }
  .logo-img-footer { height: 42px; }

  /* Trust bar */
  .trust-eyebrow { display: none; }

  /* About */
  .about-grid { gap: 2rem; }
  .adiff { padding: 1rem 0; }

  /* Diff table */
  .diff-row { gap: 1rem; }

  /* Process */
  .process-step { gap: 1.25rem; }
}

/* ── Very small (400px) ── */
@media (max-width: 400px) {
  .hero-title { font-size: clamp(1.7rem, 8vw, 2.1rem); }
  .btn-primary, .btn-secondary { font-size: .8rem; padding: .7rem 1.2rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
}

/* ── Tablet portrait video autoplay helper ── */
@media (max-width: 960px) {
  /* On tablet/mobile the scroll driver is disabled; let video loop for ambience */
  .hero-video {
    pointer-events: none;
  }
}

/* ── Safe area (iPhone notch/home bar) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  .cta-section { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
}

