/* ==========================================================================
   JKHub — styles.css
   Level 3 design tokens live in :root. Font pairing: Space Grotesk (display)
   + Inter (body) — "Tech Startup" pairing, ui-ux-pro-max-skill data/typography.csv
   row 3, re-hued to the brand navy/electric-blue system. See CREDITS.md.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color — field & surfaces (luminous brand-navy, PLAN.md §8) ---- */
  --bg: #050D1F;
  --bg-alt: #081025;
  --surface: #0E1A3A;
  --surface-2: #142450;
  --border: rgba(150, 170, 255, 0.14);
  --border-strong: rgba(150, 170, 255, 0.30);

  /* ---- Color — text ---- */
  --text: #F3F5FC;
  --text-muted: #AAB6DA;
  --text-faint: #7E8BB8;

  /* ---- Color — accent (electric blue family, PLAN.md §6) ---- */
  --accent: #3B82F6;
  --accent-deep: #1E40AF;
  --accent-cyan: #38BDF8;
  --btn-gradient: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 100%);
  --btn-gradient-hover: linear-gradient(135deg, #2148C4 0%, #2F6BF0 100%);
  --glow-strong: rgba(59, 130, 246, 0.45);
  --glow-soft: rgba(59, 130, 246, 0.18);
  --focus-ring: #8FC1FF;

  /* ---- Status accents (used only inside portfolio-frame chrome) ---- */
  --status-live: #4ADE80;
  --status-building: #FBBF24;

  /* ---- Type scale — base 17px, ratio 1.25 (Level 3 pass bar) ---- */
  --text-xs: 0.8125rem;   /* 13px */
  --text-sm: 0.9375rem;   /* 15px */
  --text-base: 1.0625rem; /* 17px */
  --text-lg: 1.3125rem;   /* 21px */
  --text-xl: 1.6875rem;   /* 27px */
  --text-2xl: 2.0625rem;  /* 33px */
  --text-3xl: 2.625rem;   /* 42px */
  --text-4xl: 3.25rem;    /* 52px */
  --text-5xl: 4.0625rem;  /* 65px */

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Spacing — 4/8px grid, 10 steps (Level 3 pass bar: >= 6) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ---- Radius — rounded-modern (PLAN.md §6) ---- */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* ---- Motion — named durations/easings (Level 3 pass bar) ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 600ms;
  --dur-cascade: 900ms;

  --container: 1200px;
  --container-narrow: 760px;
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
.container--narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-6); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: var(--space-4);
  background: var(--accent-deep); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  z-index: 200; transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------- */
/* Background field — luminous navy + glow blooms                         */
/* ---------------------------------------------------------------------- */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
  pointer-events: none;
}
.glow-field::before,
.glow-field::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.glow-field::before {
  width: 900px; height: 900px;
  top: -320px; right: -220px;
  background: radial-gradient(circle, rgba(59,130,246,0.55) 0%, rgba(59,130,246,0) 70%);
}
.glow-field::after {
  width: 700px; height: 700px;
  bottom: -260px; left: -180px;
  background: radial-gradient(circle, rgba(30,64,175,0.45) 0%, rgba(30,64,175,0) 70%);
}

/* Field drift — PLAN.md §4-REV1.5: the whole fixed field drifts on a very
   slow, small-amplitude loop so the dark field never reads as a flat fill.
   Lives on the parent (.glow-field); the breathe pulse below lives on the
   ::before/::after children, so the two transforms compose independently
   with no property conflict. */
@media (prefers-reduced-motion: no-preference) {
  .glow-field { animation: field-drift 26s ease-in-out infinite alternate; }
}
@keyframes field-drift {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(-14px, 10px, 0); }
  100% { transform: translate3d(10px, -8px, 0); }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  --btn-fill: var(--btn-gradient);
  /* Base fill + a translucent diagonal shimmer band as a second background
     layer (PLAN.md §4-REV1.3). A second layer never spills outside the
     border-box the way an overlay element with `overflow: hidden` would —
     so it needs no `overflow` change, and the button's own hover
     box-shadow bloom below is never at risk of being clipped. */
  background-image: var(--btn-fill), linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.4) 50%, transparent 62%);
  background-size: 100% 100%, 260% 100%;
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, -180% 0;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.25), 0 8px 24px -8px rgba(37,99,235,0.55);
}
.btn--primary:hover, .btn--primary:focus-visible {
  --btn-fill: var(--btn-gradient-hover);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.45), 0 0 32px 4px var(--glow-strong), 0 10px 28px -6px rgba(37,99,235,0.65);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: no-preference) {
  .btn--primary { animation: btn-shimmer-sweep 7s ease-in-out infinite; }
}
/* Most of each cycle the shimmer band sits parked off-canvas, so the
   effect reads as a periodic sweep (~every 7s) rather than a continuous
   shine. */
@keyframes btn-shimmer-sweep {
  0%   { background-position: 0 0, -180% 0; }
  45%  { background-position: 0 0, 180% 0; }
  100% { background-position: 0 0, 180% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .btn--primary {
    background-image: var(--btn-fill);
    background-position: 0 0;
    animation: none;
  }
}

.btn--ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: var(--accent-cyan);
  color: var(--text);
  box-shadow: 0 0 18px -4px var(--glow-soft);
}

.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn--block { width: 100%; }

.btn-arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .btn-arrow, .btn:focus-visible .btn-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn--primary:hover, .btn--primary:focus-visible { transform: none; }
}

/* ---------------------------------------------------------------------- */
/* Nav                                                                     */
/* ---------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 13, 31, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 4px;
  background: #F4F7FF;
  border-radius: 9px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}
.nav-tagline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: var(--space-4);
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.nav-tagline__dot { color: var(--accent); }
@media (max-width: 1020px) {
  .nav-tagline { display: none; }
}

.brand-word-jk { color: #FFFFFF; }
.brand-word-hub {
  background: linear-gradient(120deg, #60A5FA, #3B82F6 55%, #1D4ED8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.nav-links a { transition: color var(--dur-fast) var(--ease-out); }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.mobile-menu a:not(.btn) { font-size: var(--text-base); color: var(--text-muted); }
.mobile-menu.is-open { display: flex; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .btn--primary { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.28);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  margin-bottom: var(--space-5);
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px 2px var(--glow-strong);
}

.hero-title {
  font-size: clamp(2.4rem, 1.4rem + 3.6vw, var(--text-5xl));
  line-height: 1.08;
  margin-bottom: var(--space-5);
}
.hero-title .accent-word {
  background: linear-gradient(120deg, #60A5FA, #3B82F6 55%, #38BDF8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* ---- Hero cascade — layered real-work visual (PLAN.md §7, binding) ---- */
.hero-visual {
  position: relative;
  min-height: 460px;
}

.cascade {
  position: relative;
  width: 100%;
  height: 460px;
}

.browser-frame {
  position: absolute;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.65);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.browser-frame__dots { display: flex; gap: 5px; }
.browser-frame__dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(150,170,255,0.35);
}
.browser-frame__url {
  flex: 1;
  font-size: 0.6875rem;
  color: var(--text-faint);
  background: rgba(5,13,31,0.5);
  border-radius: 999px;
  padding: 3px var(--space-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-frame__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(5,13,31,0.72);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 4px 10px;
}
.browser-frame__badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.browser-frame--live .browser-frame__badge-dot { background: var(--status-live); box-shadow: 0 0 6px 1px rgba(74,222,128,0.7); }
.browser-frame--building .browser-frame__badge-dot { background: var(--status-building); }

/* Status heartbeat — PLAN.md §4-REV1.4. opacity/transform only, no
   box-shadow animation. LIVE pulses gently and a little quicker; BUILDING
   blinks slower and softer (smaller opacity swing, longer period). */
@media (prefers-reduced-motion: no-preference) {
  .browser-frame--live .browser-frame__badge-dot,
  .status-pill--live .status-pill__dot,
  .chat-vignette__label-dot {
    animation: dot-pulse-live 2.2s ease-in-out infinite;
  }
  .browser-frame--building .browser-frame__badge-dot,
  .status-pill--building .status-pill__dot {
    animation: dot-blink-building 3.7s ease-in-out infinite;
  }
}
@keyframes dot-pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.18); }
}
@keyframes dot-blink-building {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.05); }
}

.browser-frame__body { width: 100%; height: calc(100% - 33px); background: #0B1330; }
.browser-frame__body img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.browser-frame__body svg { width: 100%; height: 100%; display: block; }

.cascade-frame-back {
  width: 60%;
  top: 0;
  left: 0;
  height: 260px;
  z-index: 1;
}
.cascade-frame-mid {
  width: 66%;
  top: 90px;
  right: 0;
  height: 280px;
  z-index: 2;
}
.cascade-frame-front {
  width: 78%;
  bottom: 0;
  left: 4%;
  height: 300px;
  z-index: 3;
}

.chat-vignette {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: 240px;
  z-index: 4;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 20px 44px -14px rgba(0,0,0,0.6), 0 0 0 1px rgba(56,189,248,0.12);
  opacity: 0;
  transform: translateY(24px);
}
.chat-vignette__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-3);
}
.chat-vignette__label-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-live); box-shadow: 0 0 6px 1px rgba(74,222,128,0.6); }
.chat-bubble {
  font-size: 0.75rem;
  line-height: 1.45;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  max-width: 92%;
}
.chat-bubble--in { background: rgba(150,170,255,0.10); color: var(--text-muted); }
.chat-bubble--out {
  background: var(--btn-gradient);
  color: #fff;
  margin-left: auto;
}
.chat-bubble:last-child { margin-bottom: 0; }

/* Chat vignette loop — PLAN.md §4-REV1.2. `.chat-typing` does not exist
   in the reduced-motion / no-JS baseline (display:none, zero reserved
   space) so that presentation stays pixel-identical to the previously-
   approved static composition. `script.js` adds `.chat-loop-armed` to
   the container only when JS runs AND the visitor hasn't asked for
   reduced motion (same gating shape as `.reveal`/`.reveal-armed`); only
   then does the typing row take space and the sequence-driven classes
   below do anything. Bubble reveal/fade and the typing dots are
   opacity/transform only. */
.chat-typing {
  display: none;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 7px var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(150,170,255,0.10);
  margin-bottom: var(--space-2);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.chat-vignette.chat-loop-armed .chat-typing { display: flex; }
.chat-typing.is-typing { opacity: 1; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); opacity: 0.5; transform: translateY(0); }
.chat-typing.is-typing span { animation: chat-typing-bounce 1.1s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.chat-vignette.chat-loop-armed .chat-bubble {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.chat-vignette.chat-loop-armed .chat-bubble.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Cascade settle — signature motion moment (PLAN.md §4.1), plus the
   §4-REV1.1 continuous idle float layered on afterward. Each frame gets
   TWO comma-separated animations: the original one-shot `cascade-settle`
   (fill-mode forwards) runs first, then the infinite `float-drift-*`
   loop — later in the animation-name list, so once the one-shot
   animation's held value is reached the loop takes over the `transform`
   property. Delays stagger both the entrance AND the float phase so the
   three frames are never in visible sync. */
@media (prefers-reduced-motion: no-preference) {
  .cascade-frame-back {
    animation: cascade-settle var(--dur-cascade) var(--ease-out) 0ms forwards,
               float-drift-a 7.4s ease-in-out 950ms infinite alternate;
  }
  .cascade-frame-mid {
    animation: cascade-settle var(--dur-cascade) var(--ease-out) 140ms forwards,
               float-drift-b 8.6s ease-in-out 1100ms infinite alternate;
  }
  .cascade-frame-front {
    animation: cascade-settle var(--dur-cascade) var(--ease-out) 280ms forwards,
               float-drift-c 6.6s ease-in-out 1300ms infinite alternate;
  }
  .chat-vignette {
    animation: cascade-settle var(--dur-cascade) var(--ease-out) 480ms forwards,
               float-drift-d 8s ease-in-out 1500ms infinite alternate;
  }
  .glow-field::before {
    animation: glow-brighten var(--dur-cascade) var(--ease-out) 280ms forwards,
               glow-breathe 9.5s ease-in-out 1250ms infinite alternate;
  }
}
@keyframes cascade-settle {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes glow-brighten {
  from { opacity: 0.30; }
  to { opacity: 0.55; }
}
/* Idle float loops — §4-REV1.1. translateY only, peaks in the ±8-14px
   range, independent durations/delays/ranges per frame so motion never
   reads as synchronized. Each starts its own 0% at translateY(0) so the
   handoff from the one-shot cascade-settle (which ends at translateY(0))
   is seamless — no jump at the moment the loop takes over; `alternate`
   then ping-pongs smoothly forever after. */
@keyframes float-drift-a { 0% { transform: translateY(0); } 50% { transform: translateY(-9px); } 100% { transform: translateY(9px); } }
@keyframes float-drift-b { 0% { transform: translateY(0); } 50% { transform: translateY(-13px); } 100% { transform: translateY(11px); } }
@keyframes float-drift-c { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } 100% { transform: translateY(14px); } }
@keyframes float-drift-d { 0% { transform: translateY(0); } 50% { transform: translateY(-11px); } 100% { transform: translateY(10px); } }
/* Glow breathe — §4-REV1.1. Combined scale+opacity pulse on the bloom
   already anchored behind the hero cascade; 0% matches the settled
   glow-brighten end value (opacity 0.55, scale 1) for a seamless handoff. */
@keyframes glow-breathe {
  0%   { opacity: 0.55; transform: scale(1); }
  50%  { opacity: 0.66; transform: scale(1.07); }
  100% { opacity: 0.46; transform: scale(0.97); }
}
@media (prefers-reduced-motion: reduce) {
  .cascade-frame-back, .cascade-frame-mid, .cascade-frame-front, .chat-vignette {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Section shell                                                          */
/* ---------------------------------------------------------------------- */
.section { padding: var(--space-9) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: var(--space-7); }
.section-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: var(--space-3);
}
.section-title { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.section-title .accent-word {
  background: linear-gradient(120deg, #60A5FA, #3B82F6 60%, #38BDF8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-lead { font-size: var(--text-lg); color: var(--text-muted); }

/* Scroll-fade reveals (PLAN.md §4.2). `.reveal` is visible by default —
   real progressive enhancement: content works with zero JS. script.js
   only adds `.reveal-armed` (which CSS then hides pre-intersection) when
   IntersectionObserver is available and the visitor hasn't asked for
   reduced motion; see CREDITS.md. */
.reveal-armed { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal-armed.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-armed { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------- */
/* Portfolio proof strip                                                  */
/* ---------------------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.proof-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.proof-card:hover, .proof-card:focus-within {
  border-color: rgba(56,189,248,0.4);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.15), 0 18px 36px -18px var(--glow-strong);
  transform: translateY(-3px);
}
.proof-card__thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: #0B1330;
}
.proof-card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proof-card__thumb svg { width: 100%; height: 100%; }

.proof-card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.proof-card__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}
.status-pill__dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pill--live { color: #86EFAC; }
.status-pill--live .status-pill__dot { background: var(--status-live); box-shadow: 0 0 6px 1px rgba(74,222,128,0.6); }
.status-pill--building { color: #FDE68A; }
.status-pill--building .status-pill__dot { background: var(--status-building); }

.proof-card__desc { color: var(--text-muted); font-size: var(--text-sm); flex: 1; }
.proof-card__link { font-size: var(--text-sm); font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.proof-card__link:hover, .proof-card__link:focus-visible { color: var(--accent-cyan); }

/* ---------------------------------------------------------------------- */
/* Services grid                                                          */
/* ---------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.service-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(56,189,248,0.08), transparent 55%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.service-card:hover, .service-card:focus-within {
  border-color: rgba(56,189,248,0.38);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.14), 0 20px 40px -20px var(--glow-strong);
  transform: translateY(-3px);
}
.service-card:hover::before, .service-card:focus-within::before { opacity: 1; }

.service-card__icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, rgba(59,130,246,0.22), rgba(30,64,175,0.14));
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--accent-cyan);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}
.service-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); position: relative; z-index: 1; }
.service-card p { color: var(--text-muted); font-size: var(--text-sm); position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .proof-card, .service-card, .service-card::before { transition: none; }
  .proof-card:hover, .service-card:hover { transform: none; }
}

/* ---------------------------------------------------------------------- */
/* Pricing band                                                           */
/* ---------------------------------------------------------------------- */
.pricing-band {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pricing-band::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  top: -220px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(59,130,246,0.28) 0%, rgba(59,130,246,0) 70%);
  filter: blur(20px);
  pointer-events: none;
}
.pricing-band__inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.pricing-band p { color: var(--text-muted); font-size: var(--text-lg); margin: var(--space-5) 0 var(--space-6); }

/* ---------------------------------------------------------------------- */
/* FAQ accordion — native <details>, styling/interaction convention        */
/* adapted from shadcn/ui Accordion (see CREDITS.md)                      */
/* ---------------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); max-width: var(--container-narrow); }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item[open] { border-color: rgba(56,189,248,0.32); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: var(--accent-cyan);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[open] .faq-item__icon { transform: rotate(45deg); }

.faq-item__panel { padding: 0 var(--space-5) var(--space-5); color: var(--text-muted); font-size: var(--text-sm); max-width: 66ch; }

@media (prefers-reduced-motion: reduce) {
  .faq-item__icon { transition: none; }
}

/* ---------------------------------------------------------------------- */
/* Contact                                                                */
/* ---------------------------------------------------------------------- */
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-8);
  align-items: start;
}

.contact-copy p { color: var(--text-muted); margin-top: var(--space-4); max-width: 42ch; }
.contact-fact-list { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.contact-fact {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--text-muted);
}
.contact-fact svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--accent-cyan); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-field { display: flex; flex-direction: column; gap: var(--space-2); }
.form-field label { font-size: var(--text-sm); font-weight: 600; color: var(--text); }
.form-field input, .form-field textarea {
  background: rgba(5,13,31,0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-faint); }
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.20);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: var(--text-xs); color: var(--text-faint); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                 */
/* ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-6);
  background: var(--bg-alt);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--space-3); max-width: 320px; }
.footer-brand .brand { font-size: var(--text-base); }
.footer-tagline { color: var(--text-faint); font-size: var(--text-sm); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-7); }
.footer-nav-group { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-nav-group h3 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); font-family: var(--font-body); font-weight: 600; }
.footer-nav-group a { font-size: var(--text-sm); color: var(--text-muted); }
.footer-nav-group a:hover, .footer-nav-group a:focus-visible { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover, .footer-bottom a:focus-visible { color: var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* 404 page                                                                */
/* ---------------------------------------------------------------------- */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-9) 0;
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  background: linear-gradient(120deg, #60A5FA, #3B82F6 55%, #38BDF8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-4);
}

/* ---------------------------------------------------------------------- */
/* Responsive — 768                                                       */
/* ---------------------------------------------------------------------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: 2; min-height: 380px; margin-top: var(--space-6); }
  .hero-copy { order: 1; }
}

/* ---------------------------------------------------------------------- */
/* Responsive — 375                                                       */
/* ---------------------------------------------------------------------- */
@media (max-width: 640px) {
  .container, .container--narrow { padding: 0 var(--space-4); }
  .section { padding: var(--space-8) 0; }
  .services-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { flex-direction: column; gap: var(--space-6); }
  .footer-nav { gap: var(--space-5); }
  .pricing-band { padding: var(--space-7) var(--space-5); }

  /* Cascade collapses to a static, composed stack — not cropped */
  .cascade {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    padding-bottom: var(--space-8);
  }
  .browser-frame {
    position: relative;
    width: 100% !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    height: 200px;
  }
  .cascade-frame-back { order: 1; }
  .cascade-frame-mid { order: 2; }
  .cascade-frame-front { order: 3; height: 220px; }
  .chat-vignette {
    position: relative;
    right: auto; bottom: auto;
    order: 4;
    width: 100%;
    margin-top: calc(-1 * var(--space-6));
    align-self: flex-end;
    max-width: 260px;
  }
}
