/* ============================================================
   System C — "The Synaptic Circuit" design system
   Dark, neon, brain-meets-IT. Purple = the thinking (neurons),
   blue = the technology (circuit traces). One nervous system.
   ============================================================ */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-latin.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 600;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.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;
}

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --bg: #07040d;
  --bg-2: #0d0718;
  --bg-3: #120a20;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(168, 120, 255, 0.16);
  --border-lit: rgba(194, 59, 232, 0.45);

  /* Brand — print/logo originals */
  --brand-purple: #660066;
  --brand-blue: #0200f9;

  /* Brand — on-screen glow set (the originals vanish on near-black) */
  --neuro: #c23be8;
  --neuro-dim: #8a2ba5;
  --neuro-soft: rgba(194, 59, 232, 0.14);
  --circuit: #5b7cff;
  --circuit-dim: #3a52c9;
  --circuit-soft: rgba(91, 124, 255, 0.14);

  /* Text */
  --text: #ede9f5;
  --muted: #a79fc0;
  --faint: #8a82a6;
  --ink: #08040f; /* dark text used on bright gradient fills */

  /* Type */
  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system,
    'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  /* Shape */
  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --glow-purple: 0 0 42px rgba(194, 59, 232, 0.28);
  --glow-blue: 0 0 42px rgba(91, 124, 255, 0.28);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gradient: linear-gradient(100deg, var(--neuro) 0%, #8b5cf6 45%, var(--circuit) 100%);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Sticky header clearance for in-page anchors */
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  /* Long unbroken words (URLs, compound terms) must never push the page wide */
  overflow-wrap: break-word;
}

h1 { font-size: clamp(30px, 5.6vw, 68px); }
h2 { font-size: clamp(28px, 3.8vw, 46px); }
h3 { font-size: clamp(19px, 1.6vw, 22px); letter-spacing: -0.01em; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 9999;
  padding: 12px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border-lit);
  border-radius: 12px;
}

/* ---------- Layout ---------- */
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.container-wide { width: min(1320px, calc(100% - 40px)); margin: 0 auto; }

.section { position: relative; padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(48px, 6vw, 84px) 0; }

/* Elevated band with a hairline top/bottom */
.band {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 22%, var(--bg-2) 78%, var(--bg) 100%);
  border-top: 1px solid rgba(168, 120, 255, 0.08);
  border-bottom: 1px solid rgba(168, 120, 255, 0.08);
}

/* ---------- Ambient atmosphere ---------- */
/* Fine film grain — stops the large dark areas reading as flat/cheap */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Soft colour blooms placed behind content */
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.aurora-purple { background: radial-gradient(circle, rgba(194, 59, 232, 0.5), transparent 70%); }
.aurora-blue { background: radial-gradient(circle, rgba(91, 124, 255, 0.42), transparent 70%); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 4, 13, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(168, 120, 255, 0.1);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(7, 4, 13, 0.92);
  border-bottom-color: rgba(168, 120, 255, 0.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  /* The source logo is 496x304 — give it a landscape box so the "SYSTEM"
     wordmark and the C swoosh both read, rather than squashing it square. */
  width: 96px;
  height: 40px;
  object-fit: contain;
  /* Brand art is dark purple/blue on transparent, which all but vanishes on
     near-black — lift it hard and add a glow so it sits in the neon palette. */
  filter: brightness(2.4) saturate(1.35) drop-shadow(0 0 12px rgba(194, 59, 232, 0.5));
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 8px; position: relative; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.is-current { color: var(--text); }
.nav-links a.is-current::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: background 0.2s var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.28s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gradient);
  color: var(--ink); /* dark ink on neon reads AA and looks sharper than white */
  box-shadow: 0 8px 30px rgba(194, 59, 232, 0.32);
}
.btn-primary:hover { box-shadow: 0 14px 44px rgba(194, 59, 232, 0.48); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--border-lit);
  background: var(--surface-2);
  box-shadow: var(--glow-purple);
}

.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--neuro);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neuro));
  /* Drawn in by the reveal observer */
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.7s var(--ease) 0.1s;
}
.is-in .eyebrow::before,
.eyebrow.is-in::before { transform: scaleX(1); }

.section-head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); }

.lead {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  max-width: 60ch;
}

/* Gradient headline text */
.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback for the split second before clip applies */
  -webkit-text-fill-color: transparent;
}

/* One-shot light sweep across the hero headline.
   The gradient is built so its left third and right third are the SAME
   purple->blue ramp, with a white band between them. Sliding the 300%
   background from one end to the other therefore passes a highlight
   across the words and lands on exactly the brand ramp it started on. */
.sweep {
  position: relative;
  background-image: linear-gradient(
    100deg,
    #c23be8 0%,
    #8b5cf6 17%,
    #5b7cff 33%,
    #ffffff 45%,
    #ffffff 55%,
    #c23be8 67%,
    #8b5cf6 83%,
    #5b7cff 100%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: sweep 2.2s var(--ease) 0.5s both;
}
@keyframes sweep {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 11vw, 150px) 0 clamp(56px, 8vw, 104px);
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* Fade the field out toward the bottom so text never fights it */
  -webkit-mask-image: radial-gradient(120% 100% at 50% 35%, #000 40%, transparent 100%);
  mask-image: radial-gradient(120% 100% at 50% 35%, #000 40%, transparent 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 860px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: clamp(48px, 6vw, 76px);
  position: relative;
  z-index: 2;
}
.stat {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stat-num {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* "from" lead-in on headline prices. The parent clips a gradient to its text,
   so the child has to re-declare its own fill colour or it renders invisible. */
.amount-from {
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  margin-right: 5px;
}
.price-amount .amount-from { font-size: 0.34em; }

/* Trust strip */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-top: 30px;
  position: relative;
  z-index: 2;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neuro);
  box-shadow: 0 0 10px var(--neuro);
}
.chip-dot.blue { background: var(--circuit); box-shadow: 0 0 10px var(--circuit); }

/* ---------- The neural spine ---------- */
.spine {
  position: fixed;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.spine.is-live { opacity: 1; }
.spine-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(168, 120, 255, 0.14) 12%, rgba(168, 120, 255, 0.14) 88%, transparent);
}
.spine-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--neuro), var(--circuit));
  box-shadow: 0 0 14px rgba(194, 59, 232, 0.7);
}
/* The travelling head of the fill */
.spine-head {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px 3px rgba(194, 59, 232, 0.9);
  top: 0;
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
/* Hover: a bloom rises from the card's own top edge */
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 0%, rgba(194, 59, 232, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-lit);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5), var(--glow-purple);
}
.card:hover::before { opacity: 1; }

.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card ul li {
  position: relative;
  padding-left: 20px;
  margin: 9px 0;
  font-size: 14.5px;
  color: var(--muted);
}
.card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--circuit);
  box-shadow: 0 0 8px var(--circuit);
}

/* Card icon — a small synapse/chip glyph holder */
.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  margin-bottom: 18px;
  background: linear-gradient(140deg, var(--neuro-soft), var(--circuit-soft));
  border: 1px solid var(--border);
  color: var(--neuro);
}
.card-icon svg { width: 22px; height: 22px; }

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--faint);
  margin-bottom: 14px;
}

/* ---------- The two paths (home) ---------- */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.path {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(30px, 3.4vw, 46px);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 340px;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}
.path::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.path-it::after { background: radial-gradient(90% 70% at 20% 0%, rgba(91, 124, 255, 0.2), transparent 65%); }
.path-web::after { background: radial-gradient(90% 70% at 80% 0%, rgba(194, 59, 232, 0.2), transparent 65%); }
.path:hover { transform: translateY(-8px); border-color: var(--border-lit); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); }
.path:hover::after { opacity: 1; }
.path h3 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 12px; position: relative; z-index: 2; }
.path p { color: var(--muted); position: relative; z-index: 2; }
.path .path-list { margin: 18px 0 26px; padding: 0; list-style: none; position: relative; z-index: 2; }
.path .path-list li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  font-size: 15px;
  color: var(--muted);
}
.path .path-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--neuro);
  font-weight: 700;
}
.path-cta { margin-top: auto; position: relative; z-index: 2; }

/* ---------- Fusion band (signature scroll moment) ---------- */
.fusion {
  position: relative;
  min-height: 148vh; /* scroll runway for the scrub */
  background: linear-gradient(180deg, var(--bg), #0a0518 30%, #0a0518 70%, var(--bg));
}
.fusion-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.fusion-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fusion-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 760px;
}
.fusion-phrase {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}
.fusion-phrase.is-active { opacity: 1; pointer-events: auto; }
.fusion-phrase h2 { font-size: clamp(32px, 6vw, 76px); margin-bottom: 16px; }
.fusion-phrase p { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 52ch; margin-inline: auto; }
/* Reserve the height so the sticky box doesn't collapse */
.fusion-spacer { visibility: hidden; }

/* ---------- Portfolio ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border);
  /* --py is the scroll parallax offset set by main.js; the hover lift
     composes with it rather than overwriting it */
  transform: translateY(var(--py, 0px));
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}
.work:hover {
  transform: translateY(calc(var(--py, 0px) - 8px));
  border-color: var(--border-lit);
  box-shadow: 0 28px 66px rgba(0, 0, 0, 0.55), var(--glow-purple);
}
/* Browser chrome */
.work-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
}
.work-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.work-url {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-shot {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b0716;
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.1s var(--ease);
}
.work:hover .work-shot img { transform: scale(1.05); }
.work-body { padding: 20px 22px 24px; }
.work-body h3 { font-size: 19px; margin-bottom: 6px; }
.work-body p { color: var(--muted); font-size: 14px; margin: 0; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.work-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--circuit);
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(91, 124, 255, 0.28);
}

/* ---------- Process (sticky rail) ---------- */
.process { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.process-intro { position: sticky; top: 120px; }
.process-steps { display: grid; gap: 16px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.step:hover { border-color: var(--border-lit); background: var(--surface-2); }
.step-num {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--gradient);
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.price-card {
  position: relative;
  padding: clamp(30px, 3.2vw, 44px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}
.price-card.featured {
  border-color: var(--border-lit);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5), var(--glow-purple);
}
.price-card.featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 50% 0%, rgba(194, 59, 232, 0.16), transparent 62%);
  pointer-events: none;
}
.price-flag {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gradient);
  color: var(--ink);
  font-weight: 600;
}
.price-amount {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 18px 0 6px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  z-index: 2;
}
.price-period { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); position: relative; z-index: 2; }
.price-list { list-style: none; margin: 26px 0 0; padding: 0; position: relative; z-index: 2; }
.price-list li {
  position: relative;
  padding-left: 30px;
  margin: 13px 0;
  font-size: 15px;
  color: var(--muted);
}
.price-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neuro-soft);
  border: 1px solid rgba(194, 59, 232, 0.4);
}
.price-list li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 9px;
  width: 5px;
  height: 8px;
  border-right: 2px solid var(--neuro);
  border-bottom: 2px solid var(--neuro);
  transform: rotate(45deg);
}
.price-note { margin-top: 22px; font-size: 13px; color: var(--faint); position: relative; z-index: 2; }

/* ---------- Comparison ---------- */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.compare-col {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.compare-col.us { border-color: var(--border-lit); background: linear-gradient(170deg, rgba(194, 59, 232, 0.09), rgba(255, 255, 255, 0.02)); }
.compare-col h3 { font-size: 18px; margin-bottom: 18px; }
.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(168, 120, 255, 0.08);
  font-size: 14.5px;
}
.compare-row:last-child { border-bottom: none; }
.compare-row span:first-child { color: var(--faint); }
.compare-row span:last-child { text-align: right; font-weight: 600; }

/* ---------- AI answer mock (websites page) ---------- */
.ai-demo {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(91, 124, 255, 0.08), rgba(255, 255, 255, 0.02));
  font-size: 15px;
  /* The card is shorter than the checklist beside it — pin it so the column
     never reads as a large empty gap while the list scrolls past. */
  position: sticky;
  top: 110px;
}
@media (max-width: 980px) {
  .ai-demo { position: static; }
}
.ai-demo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--circuit);
  margin-bottom: 18px;
}
.ai-q {
  padding: 13px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  margin-bottom: 14px;
  font-size: 14.5px;
}
.ai-a { color: var(--muted); line-height: 1.7; font-size: 14.5px; }
.ai-a mark {
  background: rgba(194, 59, 232, 0.2);
  color: var(--text);
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 600;
}
.ai-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  vertical-align: -2px;
  background: var(--circuit);
  margin-left: 3px;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Rates table ---------- */
.rate-table {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 8px;
}
.rate-row {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.4fr;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(168, 120, 255, 0.08);
  font-size: 14.5px;
  color: var(--muted);
}
.rate-row:last-child { border-bottom: none; }
.rate-row.head {
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.rate-row strong { color: var(--text); font-weight: 700; }

.hours-list { display: grid; gap: 10px; margin-top: 18px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 14.5px;
}
.hours-row span:first-child { color: var(--faint); }
.hours-row.accent { border-color: rgba(91, 124, 255, 0.35); background: var(--circuit-soft); }

/* ---------- FAQ ---------- */
/* Full container width — no max-width on the list (house rule) */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.faq-item[open] { border-color: var(--border-lit); background: var(--surface-2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 18px);
  letter-spacing: -0.01em;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus {
  flex: none;
  width: 26px;
  height: 26px;
  position: relative;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.faq-plus::before,
.faq-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--neuro);
  border-radius: 2px;
  transition: opacity 0.3s var(--ease);
}
.faq-plus::before { width: 11px; height: 1.5px; margin: -0.75px 0 0 -5.5px; }
.faq-plus::after { width: 1.5px; height: 11px; margin: -5.5px 0 0 -0.75px; }
.faq-item[open] .faq-plus { transform: rotate(135deg); border-color: var(--border-lit); }
/* Answers run the full width of the panel — no measure cap. Capping this at
   78ch left a hard ragged edge well short of the box on wide screens. */
.faq-answer { padding: 0 26px 24px; color: var(--muted); font-size: 15px; }
.faq-answer a { color: var(--neuro); text-decoration: underline; text-underline-offset: 3px; }
.faq-answer a:hover { color: var(--text); }

/* ---------- Contact ---------- */
.contact-card {
  padding: clamp(34px, 4vw, 60px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(194, 59, 232, 0.09), rgba(91, 124, 255, 0.06));
  position: relative;
  overflow: hidden;
  text-align: center;
}
.contact-card h2 { margin-bottom: 14px; }
.contact-card .lead { margin: 0 auto 30px; }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 38px; text-align: left; }
.detail {
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}
.detail dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 5px;
}
.detail dd { margin: 0; font-size: 15px; font-weight: 600; }
.detail dd a:hover { color: var(--neuro); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(168, 120, 255, 0.1);
  padding: 56px 0 40px;
  background: #050309;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 86px; height: 36px; object-fit: contain; filter: brightness(2.4) saturate(1.35); }
.footer p { color: var(--faint); font-size: 14px; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 10px 0; }
.footer-col a { color: var(--muted); font-size: 14.5px; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--neuro); }
.footer-base {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgba(168, 120, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Reveal animations ---------- */
/* Scoped to .js so that if the script never runs, nothing is left
   invisible — the page just renders fully with no animation. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Stagger children — index set inline by main.js */
.js .stagger > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 85ms);
}
.js .stagger.is-in > * { opacity: 1; transform: none; }

/* Headline words rise individually */
.word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word > span {
  display: inline-block;
  transform: translateY(105%);
  animation: riseWord 0.95s var(--ease-out) both;
  animation-delay: calc(var(--w, 0) * 70ms);
}
@keyframes riseWord { to { transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .spine { display: none; }
}

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paths, .pricing, .compare { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: 1fr; }
  .process-intro { position: static; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat { padding: 18px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    right: 0;
    top: 56px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 220px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(13, 7, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a.is-current::after { display: none; }
  .brand-tag { display: none; }
}

@media (max-width: 620px) {
  .container, .container-wide { width: calc(100% - 32px); }
  .grid-2, .grid-3, .grid-4, .work-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .card { padding: 24px; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .rate-row { grid-template-columns: 1fr; gap: 4px; }
  .rate-row.head { display: none; }
  .fusion { min-height: 120vh; }
  .footer-base { flex-direction: column; gap: 8px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .stagger > * { opacity: 1; transform: none; }
  .word > span { transform: none; }
  .eyebrow::before { transform: scaleX(1); }
  .sweep {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
  }
  .spine { display: none; }
  .fusion { min-height: auto; }
  .fusion-sticky { position: static; height: auto; padding: 90px 0; }
  .fusion-phrase { position: static; transform: none; opacity: 1; margin-bottom: 40px; }
  .fusion-phrase:last-child { margin-bottom: 0; }
  .fusion-spacer { display: none; }
  .ai-cursor { animation: none; }
}
