:root {
  /* DARK PALETTE — unifies the middle with the cinematic hero + film strip */
  --bg: #04060f;
  --surface: #0c1124;
  --surface-2: #141a32;
  --ink: #f4f7ff;
  --ink-soft: #a8aec5; /* AA contrast fix: was #8c93ad (4.43:1) — now 5.4:1 on --bg #04060f */
  --line: #1c2240;
  --line-soft: #11162b;
  --night: #04060f; --night-soft: #0a0e1f;
  /* FASTER AI brand: pure electric cobalt — no purples, no pinks */
  --blue: #1E5FFF;
  --blue-dark: #0040D0;
  --blue-deep: #001E7A;
  --cyan: #00DCFF;
  --violet: #1E5FFF;
  --magenta: #00DCFF;
  --grad: linear-gradient(135deg, #00DCFF 0%, #1E5FFF 50%, #001E7A 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,220,255,0.10) 0%, rgba(30,95,255,0.10) 50%, rgba(0,30,122,0.05) 100%);
  --grad-blue: linear-gradient(135deg, #001E7A 0%, #1E5FFF 50%, #00DCFF 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* Global scale-down: 1rem = 14.5px instead of 16px (~91% of default), tightens everything proportionally */
html { scroll-behavior: smooth; background: var(--bg); font-size: 14.5px; overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, canvas, svg { max-width: 100%; }
@media (max-width: 720px) { html { font-size: 15px; } } /* slightly larger on phones for legibility */
body { background: var(--bg); color: var(--ink); font-family: 'Switzer', 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; position: relative; }
/* Subtle 56px grid texture across the whole site — cinematic operator-console feel */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,220,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,220,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
::selection { background: var(--cyan); color: #04060f; }

/* ============= ACCESSIBILITY GLOBALS (added 2026-04-30) ============= */
/* Visible focus ring for keyboard users — required by WCAG 2.4.7 + 2.4.11 */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Stronger ring on primary CTAs */
.btn-primary:focus-visible,
.btn-primary-hero:focus-visible,
.beat-cta:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px rgba(0,220,255,0.45);
}
/* Inputs get inset cyan ring instead of offset outline */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
/* Skip-link — appears only when focused */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: #04060f;
  padding: 0.85rem 1.4rem; border-radius: 6px;
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.78rem; z-index: 9999;
  font-family: 'JetBrains Mono', monospace;
}
.skip-link:focus { left: 1rem; top: 1rem; outline: 2px solid #fff; outline-offset: 2px; }
h1, h2, h3, .display { font-family: 'Clash Display', 'Switzer', sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.fig-label, .url-bar, code, pre, .mono { font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Nav — operator-console: black bar, mono links, neon cyan accents */
nav.top { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 2rem; backdrop-filter: blur(20px); background: rgba(4,6,15,0.85); border-bottom: 1px solid rgba(0,220,255,0.10); color: #fff; }
nav.top .logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 900; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; font-family: 'Clash Display', sans-serif; }
nav.top .logo img { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(0, 220, 255, 0.6)); }
nav.top .logo:hover img { animation: logo-zap 0.6s ease-in-out; }
@keyframes logo-zap {
  0%, 100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 10px rgba(0, 220, 255, 0.6)); }
  40% { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 18px rgba(0, 220, 255, 1)); }
  70% { transform: scale(1.06) rotate(4deg); filter: drop-shadow(0 0 22px rgba(30, 95, 255, 0.9)); }
}
nav.top .links { display: flex; gap: 1.85rem; align-items: center; font-size: 0.78rem; font-weight: 600; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em; text-transform: uppercase; }
nav.top .links a { opacity: 0.65; transition: opacity 0.15s, color 0.15s; color: #fff; }
nav.top .links a:hover, nav.top .links a.active { opacity: 1; color: var(--cyan); }
nav.top .cta { background: var(--cyan); color: var(--ink); padding: 0.6rem 1.15rem; border-radius: 4px; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; transition: all 0.18s; opacity: 1 !important; box-shadow: 0 0 0 1px rgba(0,220,255,0.4), 0 0 18px rgba(0,220,255,0.35); }
nav.top .cta:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 0 0 1px rgba(0,220,255,0.6), 0 0 28px rgba(0,220,255,0.6); }
@media (max-width: 720px) { nav.top .links a:not(.cta) { display: none; } nav.top { padding: 0.85rem 1rem; } }

.container { max-width: 1200px; margin: 0 auto; }
section { padding: 4.5rem 2rem; position: relative; }
@media (max-width: 720px) {
  section { padding: 3.5rem 1.1rem; }
  .container { padding: 0; }
  /* Page-hero on subpages — tighter top padding so nav doesn't eat the title */
  .page-hero { padding: 6rem 1.1rem 3rem; }
  .page-hero h1 { font-size: clamp(1.9rem, 8vw, 3rem); }
  .page-hero p { font-size: 0.95rem; }
  /* Service detail rows on /services — visuals shouldn't crush */
  .service-detail { padding: 2rem 0 !important; gap: 1.25rem !important; }
  .service-detail h3 { font-size: clamp(1.45rem, 6vw, 1.9rem) !important; }
  .service-detail .visual { aspect-ratio: 16/10; }
  /* Pricing cards — single column with tighter padding */
  .pricing-card { padding: 1.75rem 1.4rem; }
  .pricing-card .amount { font-size: 2.4rem; }
  /* Case rows on /work */
  .case-row { padding: 2.5rem 0 !important; gap: 1.5rem !important; }
  .case-row h3 { font-size: clamp(1.5rem, 6vw, 2rem) !important; }
  .case-row .visual { aspect-ratio: 16/10; }
}
/* Subtle cyan rule between basic dark sections (skipped on cinematic interrupts which have their own bg/overlay) */
section:not(.cinematic-interrupt):not(.hero):not(.try-bot):not(.about-section):not(.final-cta):not(.stats-strip)::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 80%; max-width: 800px; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,220,255,0.18) 50%, transparent 100%);
  pointer-events: none;
}

/* Page hero (subpages) */
.page-hero { padding: 9rem 2rem 5rem; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 500px; background: var(--grad); opacity: 0.08; filter: blur(120px); pointer-events: none; }
.page-hero .pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border-radius: 4px; background: rgba(0,220,255,0.06); border: 1px solid rgba(0,220,255,0.25); font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; font-weight: 700; color: var(--cyan); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.4rem; }
.page-hero .pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.page-hero h1 { font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 1.25rem; position: relative; }
.page-hero h1 .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-hero p { color: var(--ink-soft); font-size: 1.1rem; line-height: 1.55; max-width: 620px; margin: 0 auto; position: relative; }

/* Buttons — tightened, sharper edges, mono labels */
.btn-primary { background: var(--cyan); color: #04060f; padding: 0.95rem 1.7rem; border-radius: 6px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--cyan); cursor: pointer; font-family: inherit; transition: all 0.18s; display: inline-flex; align-items: center; gap: 0.5rem; box-shadow: 0 0 0 1px rgba(0,220,255,0.4), 0 0 22px rgba(0,220,255,0.32); }
.btn-primary:hover { transform: translateY(-2px); background: #fff; border-color: #fff; box-shadow: 0 0 0 1px var(--cyan), 0 0 36px rgba(0,220,255,0.55); }
.btn-secondary { background: transparent; color: var(--ink); padding: 0.95rem 1.7rem; border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; font-family: inherit; transition: all 0.18s; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-secondary:hover { background: rgba(0,220,255,0.08); border-color: var(--cyan); color: var(--cyan); }

/* Footer */
footer { background: var(--night); color: rgba(255,255,255,0.6); padding: 3rem 2rem 2.5rem; font-size: 0.85rem; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
footer a { color: rgba(255,255,255,0.85); }
footer a:hover { color: var(--cyan); }
footer .brand { display: flex; gap: 0.5rem; align-items: center; color: #fff; font-weight: 800; }
footer .brand img { width: 28px; height: 28px; }
footer .links { display: flex; gap: 2rem; }

.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.85s cubic-bezier(.2,.85,.25,1), transform 0.85s cubic-bezier(.2,.85,.25,1); }
.reveal.show { opacity: 1; transform: translateY(0) translateX(0); }
.reveal-left { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal-scale { transform: scale(0.92); }
.reveal-scale.show { transform: scale(1); }

/* Stagger child reveals (eyebrow, h2, p) inside .section-head */
.section-head .eyebrow { transition: opacity 0.7s 0s cubic-bezier(.2,.85,.25,1), transform 0.7s 0s cubic-bezier(.2,.85,.25,1); }
.section-head h2 { transition: opacity 0.85s 0.12s cubic-bezier(.2,.85,.25,1), transform 0.85s 0.12s cubic-bezier(.2,.85,.25,1); }
.section-head p { transition: opacity 0.85s 0.22s cubic-bezier(.2,.85,.25,1), transform 0.85s 0.22s cubic-bezier(.2,.85,.25,1); }
.section-head.reveal .eyebrow,
.section-head.reveal h2,
.section-head.reveal p { opacity: 0; transform: translateY(28px); }
.section-head.reveal.show .eyebrow,
.section-head.reveal.show h2,
.section-head.reveal.show p { opacity: 1; transform: translateY(0); }

/* Nav scroll-morph */
nav.top { transition: background 0.3s, transform 0.4s cubic-bezier(.2,.85,.25,1), opacity 0.3s; }
nav.top.nav-hidden { transform: translateY(-110%); opacity: 0; pointer-events: none; }

/* Mono technical figure labels (Linear-style) */
.fig-label {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 0.85rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.fig-label::before {
  content: ''; display: inline-block; width: 24px; height: 1px; background: currentColor; opacity: 0.5;
}
.tile.dark .fig-label, [data-theme="dark"] .fig-label { color: rgba(255,255,255,0.55); }

/* Curved SVG section dividers */
.divider-curve { display: block; width: 100%; height: 80px; margin-top: -1px; }
.divider-curve path { fill: var(--bg); }
.divider-curve.flip { transform: scaleY(-1); }
.divider-curve.to-night path { fill: var(--night); }
.divider-curve.to-bg path { fill: var(--bg); }

/* Nav scroll morph — STAYS DARK on scroll */
nav.top.scrolled {
  background: rgba(4,6,15,0.96);
  border-bottom: 1px solid rgba(0,220,255,0.18);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 24px rgba(0,220,255,0.06);
}

/* Live system pulse pill (hero marker) */
.live-pulse {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 600;
}
.live-pulse .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0,220,255,0.7);
  animation: live-ping 1.7s infinite;
}
@keyframes live-ping {
  0% { box-shadow: 0 0 0 0 rgba(0,220,255,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0,220,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,220,255,0); }
}

/* Hero browser showcase (Awwwards: Atomic / Voxr AI move) */
.hero-showcase {
  background: var(--night); padding: 0 2rem 6rem; margin-top: -1px;
  position: relative; overflow: hidden;
}
.hero-showcase::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px; background: var(--grad); opacity: 0.16; filter: blur(120px); pointer-events: none;
}
.hero-showcase .container { max-width: 1180px; margin: 0 auto; position: relative; }
.showcase-caption {
  text-align: center; margin: 0 auto 2.25rem; max-width: 640px;
}
.showcase-caption .label {
  font-family: 'SF Mono', 'Consolas', monospace; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 0.75rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.showcase-caption .label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); animation: live-ping 1.7s infinite;
}
.showcase-caption h3 {
  color: #fff; font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 0.6rem;
}
.showcase-caption h3 em { font-style: italic; font-weight: 700; color: var(--cyan); }
.showcase-caption p { color: rgba(255,255,255,0.65); font-size: 0.95rem; line-height: 1.55; }

.browser-frame {
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  background: #0c0f1f;
}
.browser-frame .bar {
  background: #15151f; padding: 0.85rem 1.2rem;
  display: flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.browser-frame .bar .dots { display: flex; gap: 0.4rem; }
.browser-frame .bar .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.browser-frame .bar .url-bar {
  flex: 1; background: rgba(255,255,255,0.05); padding: 0.42rem 1rem;
  border-radius: 100px; font-family: 'SF Mono', 'Consolas', monospace; font-size: 0.74rem;
  color: rgba(255,255,255,0.6); margin-left: 0.85rem; display: flex; align-items: center; gap: 0.5rem;
}
.browser-frame .bar .url-bar svg { width: 11px; height: 11px; opacity: 0.5; }
.browser-frame .bar .live-tag {
  background: rgba(0,220,255,0.15); color: var(--cyan); padding: 0.28rem 0.7rem;
  border-radius: 100px; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 0.4rem;
}
.browser-frame .bar .live-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); animation: live-ping 1.7s infinite;
}
.browser-frame iframe { width: 100%; height: 660px; border: 0; display: block; background: var(--bg); }
@media (max-width: 720px) {
  .browser-frame iframe { height: 480px; }
  .browser-frame .bar .url-bar { font-size: 0.65rem; }
}

/* Editorial italic accent — single-word emphasis on headings */
.italic-accent { font-style: italic; font-weight: 700; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Custom SVG icons — replace emoji */
.icon-svg {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-soft); margin-bottom: 0.5rem;
  border: 1px solid rgba(30,95,255,0.15);
  position: relative;
}
.icon-svg svg {
  width: 24px; height: 24px;
  stroke: url(#fai-grad);
  stroke-width: 1.6; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.tile.dark .icon-svg, .demo-card .icon-svg.dark {
  background: rgba(255,255,255,0.06);
  border-color: rgba(0,220,255,0.18);
}
.tile.dark .icon-svg svg, .demo-card.dark .icon-svg svg {
  stroke: url(#fai-grad-light);
}
/* When the icon is the simple-square version (next to h3 in a row) */
.bento .tile .icon-svg { box-shadow: 0 4px 14px rgba(30,95,255,0.08); }


/* Final CTA */
.final-cta { background: var(--bg); text-align: center; padding: 7rem 2rem; position: relative; overflow: hidden; border-top: 1px solid rgba(0,220,255,0.08); }
.final-cta::before { content: ''; position: absolute; bottom: -200px; left: 50%; transform: translateX(-50%); width: 900px; height: 520px; background: var(--grad); opacity: 0.22; filter: blur(140px); pointer-events: none; }
.final-cta::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(0,220,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(0,220,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at bottom, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at bottom, #000 30%, transparent 75%); }
.final-cta .container { position: relative; }
.final-cta h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1; margin-bottom: 1.5rem; }
.final-cta h2 .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.final-cta p { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 2.5rem; max-width: 540px; margin-left: auto; margin-right: auto; }

/* Section heads */
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border-radius: 4px; border: 1px solid rgba(0,220,255,0.25); background: rgba(0,220,255,0.06); font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.section-head .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 1rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; max-width: 580px; margin: 0 auto; }

/* Service detail card */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; padding: 4rem 0; align-items: center; border-bottom: 1px solid var(--line-soft); }
.service-detail:nth-child(even) > div:first-child { order: 2; }
.service-detail h3 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 1rem; }
.service-detail .lead { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; margin-bottom: 1.5rem; }
.service-detail ul { list-style: none; padding: 0; }
.service-detail li { padding: 0.5rem 0; padding-left: 1.5rem; position: relative; color: var(--ink); font-size: 0.95rem; }
.service-detail li::before { content: '⚡'; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.service-detail .price-tag { display: inline-block; margin-top: 1.5rem; padding: 0.6rem 1.2rem; background: var(--grad-soft); border: 1px solid rgba(30,95,255,0.15); color: var(--blue); border-radius: 100px; font-weight: 700; font-size: 0.95rem; }
.service-detail .visual {
  background: var(--night); border-radius: 16px; aspect-ratio: 1.4;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  border: 1px solid rgba(0,220,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,220,255,0.04);
  isolation: isolate;
  transition: transform 0.4s, box-shadow 0.4s;
}
.service-detail .visual:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(0,220,255,0.18), 0 0 0 1px rgba(0,220,255,0.25); }
.service-detail .visual img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.4s cubic-bezier(.2,.8,.3,1);
}
.service-detail .visual:hover img { transform: scale(1.06); }
.service-detail .visual::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(4,6,15,0.45) 100%);
}
.service-detail .visual .icon { font-size: 6rem; position: relative; z-index: 2; filter: drop-shadow(0 8px 30px rgba(0,220,255,0.5)); }
@media (max-width: 760px) {
  .service-detail { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-detail:nth-child(even) > div:first-child { order: 0; }
}

/* Pricing tiers */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 2.5rem 2rem; position: relative; transition: all 0.2s; }
.pricing-card:hover { border-color: var(--blue); box-shadow: 0 12px 36px rgba(30,95,255,0.1); transform: translateY(-3px); }
.pricing-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; }
/* Animated rotating cyan ring on featured tier — adds premium movement without being noisy */
.pricing-card.featured::before {
  content: ''; position: absolute; inset: -2px; border-radius: 24px; z-index: 0;
  background: conic-gradient(from var(--ring-angle, 0deg), var(--cyan) 0%, var(--blue) 25%, transparent 50%, transparent 75%, var(--cyan) 100%);
  filter: blur(0.5px); opacity: 0.55;
  animation: ring-rotate 8s linear infinite;
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
}
.pricing-card.featured > * { position: relative; z-index: 1; }
@property --ring-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes ring-rotate { to { --ring-angle: 360deg; } }
/* Fallback for browsers without @property — use a simple opacity pulse */
@supports not (background: conic-gradient(from var(--ring-angle), red, blue)) {
  .pricing-card.featured::before { animation: ring-pulse 4s ease-in-out infinite; background: var(--grad); }
  @keyframes ring-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }
}
/* Featured tier subtle 3D float on hover */
.pricing-card.featured { transform-style: preserve-3d; }
.pricing-card.featured:hover { transform: perspective(1200px) translateY(-6px) scale(1.015); box-shadow: 0 20px 60px rgba(0,220,255,0.15), 0 8px 24px rgba(30,95,255,0.20); }
.pricing-card.featured::after { content: 'Most popular'; position: absolute; top: -12px; right: 1.5rem; background: var(--grad); color: #fff; padding: 0.3rem 0.85rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 100px; z-index: 2; box-shadow: 0 8px 24px rgba(0,220,255,0.35); }
@media (prefers-reduced-motion: reduce) {
  .pricing-card.featured::before { animation: none !important; }
  .pricing-card.featured:hover { transform: none !important; }
}

/* Animated checkmarks — SVG icons rolling in on scroll-in */
.pricing-card .features li {
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.45s cubic-bezier(.16,1,.3,1), transform 0.45s cubic-bezier(.16,1,.3,1);
}
.pricing-card.show .features li { opacity: 1; transform: translateX(0); }
.pricing-card.show .features li:nth-child(1) { transition-delay: 0.05s; }
.pricing-card.show .features li:nth-child(2) { transition-delay: 0.13s; }
.pricing-card.show .features li:nth-child(3) { transition-delay: 0.21s; }
.pricing-card.show .features li:nth-child(4) { transition-delay: 0.29s; }
.pricing-card.show .features li:nth-child(5) { transition-delay: 0.37s; }
.pricing-card.show .features li:nth-child(6) { transition-delay: 0.45s; }
.pricing-card.show .features li:nth-child(7) { transition-delay: 0.53s; }
@media (prefers-reduced-motion: reduce) {
  .pricing-card .features li { opacity: 1 !important; transform: none !important; transition: none !important; }
}
.pricing-card .name { font-size: 1.05rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.5rem; }
.pricing-card .amount { font-size: 3rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.4rem; color: var(--ink); }
.pricing-card .freq { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 1.5rem; }
.pricing-card .features { list-style: none; padding: 0; margin-bottom: 2rem; }
.pricing-card .features li { padding: 0.55rem 0; padding-left: 1.5rem; position: relative; font-size: 0.9rem; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.pricing-card .features li:last-child { border-bottom: 0; }
.pricing-card .features li::before { content: '⚡'; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.pricing-card .btn-primary, .pricing-card .btn-secondary { width: 100%; justify-content: center; }

/* Work case-study row */
.case-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; padding: 5rem 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.case-row:nth-child(even) > div:first-child { order: 2; }
.case-row h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 0.75rem; }
.case-row .tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.85rem; display: block; }
.case-row p { color: var(--ink-soft); line-height: 1.55; font-size: 0.98rem; margin-bottom: 0.75rem; }
.case-row .stats { display: flex; gap: 1.5rem; margin: 1.25rem 0 1.5rem; flex-wrap: wrap; }
.case-row .stat-mini { font-size: 1.2rem; font-weight: 800; }
.case-row .stat-mini .lbl { display: block; font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }
.case-row .stat-mini .num { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.case-row .links a { display: inline-block; margin-right: 0.6rem; }
.case-row .visual { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; aspect-ratio: 1.5; overflow: hidden; position: relative; }
.case-row .visual iframe { width: 200%; height: 200%; transform: scale(0.5); transform-origin: 0 0; border: 0; pointer-events: none; }
@media (max-width: 760px) {
  .case-row { grid-template-columns: 1fr; gap: 1.5rem; padding: 3rem 0; }
  .case-row:nth-child(even) > div:first-child { order: 0; }
}

/* About */
.story { max-width: 760px; margin: 0 auto; }
.story p { font-size: 1.15rem; line-height: 1.7; color: var(--ink); margin-bottom: 1.4rem; }
.story p .grad { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.story h3 { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em; margin: 3rem 0 1rem; }

/* CHATBOT WIDGET */
.fai-chat-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--grad); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(30, 95, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  color: #fff;
}
.fai-chat-fab::before { content:''; position:absolute; inset:-3px; border-radius:50%; background: var(--grad); filter: blur(14px); opacity:0.55; z-index:-1; }
.fai-chat-fab:hover { transform: scale(1.07); box-shadow: 0 14px 40px rgba(124,58,237,0.55), inset 0 1px 0 rgba(255,255,255,0.3); }
.fai-chat-fab svg { width: 28px; height: 28px; }
.fai-chat-panel {
  position: fixed; bottom: 5.5rem; right: 1.5rem; z-index: 1000;
  width: 400px; max-width: calc(100vw - 2rem); height: 580px; max-height: calc(100vh - 8rem);
  background: var(--surface); border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 36px 90px rgba(10, 14, 31, 0.22), 0 4px 20px rgba(30,95,255,0.15);
  display: none; flex-direction: column; overflow: hidden;
}
.fai-chat-panel.open { display: flex; animation: faiPanelIn 0.32s cubic-bezier(.2,.85,.25,1); }
@keyframes faiPanelIn { 0% { opacity: 0; transform: translateY(14px) scale(0.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.fai-chat-head {
  padding: 1.1rem 1.25rem; background: #0A0E1F; color: #fff;
  display: flex; gap: 0.85rem; align-items: center; position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.fai-chat-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 200% at 0% 0%, rgba(0,220,255,0.35), transparent 55%), radial-gradient(120% 200% at 100% 100%, rgba(124,58,237,0.45), transparent 55%); pointer-events: none; }
.fai-chat-head .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12), 0 4px 16px rgba(30,95,255,0.45);
}
.fai-chat-head .avatar svg { width: 100%; height: 100%; display: block; }
.fai-chat-head .avatar::after { content:''; position:absolute; inset:-4px; border-radius:50%; background: var(--grad); filter: blur(10px); opacity: 0.45; z-index:-1; animation: faiAvatarPulse 2.6s ease-in-out infinite; }
@keyframes faiAvatarPulse { 0%,100% { opacity: 0.35; } 50% { opacity: 0.7; } }
.fai-chat-head .info { position: relative; z-index: 2; line-height: 1.2; }
.fai-chat-head .name { font-family: 'Clash Display', system-ui, sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: -0.015em; }
.fai-chat-head .status { font-size: 0.72rem; opacity: 0.7; display: flex; align-items: center; gap: 0.4rem; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.fai-chat-head .status .dot { width: 7px; height: 7px; border-radius: 50%; background: #2ed573; box-shadow: 0 0 8px #2ed573; animation: faiDotPulse 1.6s infinite; }
@keyframes faiDotPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.65; } }
.fai-chat-head .close { margin-left: auto; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: #fff; font-size: 1.1rem; cursor: pointer; opacity: 0.7; position: relative; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display:flex; align-items:center; justify-content:center; transition: all 0.15s; }
.fai-chat-head .close:hover { opacity: 1; background: rgba(255,255,255,0.14); transform: rotate(90deg); }
.fai-chat-body { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.8rem; background: var(--bg); }
.fai-bubble { padding: 0.75rem 1rem; border-radius: 18px; font-size: 0.92rem; line-height: 1.45; max-width: 88%; word-wrap: break-word; white-space: pre-wrap; }
.fai-bubble.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.fai-bubble.user { background: var(--grad); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.fai-bubble.bot a { color: var(--blue); font-weight: 600; }
.fai-typing { align-self: flex-start; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; display: flex; gap: 4px; }
.fai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); opacity: 0.4; animation: typing 1.2s infinite; }
.fai-typing span:nth-child(2) { animation-delay: 0.2s; }
.fai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.fai-chat-input { display: flex; align-items: center; padding: 0.85rem; gap: 0.55rem; border-top: 1px solid var(--line); background: var(--surface); }
.fai-chat-input input { flex: 1; padding: 0.8rem 1.1rem; border: 1px solid var(--line); border-radius: 100px; font-family: inherit; font-size: 0.9rem; outline: none; background: var(--bg); transition: border-color 0.15s, box-shadow 0.15s; }
.fai-chat-input input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,95,255,0.12); }
.fai-chat-input button { background: var(--grad); border: 0; color: #fff; padding: 0; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-family: inherit; font-weight: 700; flex-shrink:0; display:flex; align-items:center; justify-content:center; box-shadow: 0 4px 14px rgba(30,95,255,0.35); transition: transform 0.15s, box-shadow 0.15s; }
.fai-chat-input button:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 6px 20px rgba(124,58,237,0.5); }
.fai-chat-input button svg { width: 18px; height: 18px; }
.fai-chat-input button:disabled { opacity: 0.4; cursor: not-allowed; }
.fai-chat-suggestions { display: flex; gap: 0.4rem; flex-wrap: wrap; padding: 0 1.25rem 1rem; background: var(--bg); }
.fai-chat-suggestions button { background: var(--surface); border: 1px solid var(--line); padding: 0.45rem 0.85rem; border-radius: 100px; font-family: inherit; font-size: 0.75rem; cursor: pointer; color: var(--ink); transition: all 0.15s; }
.fai-chat-suggestions button:hover { border-color: var(--blue); color: var(--blue); }
@media (max-width: 480px) {
  .fai-chat-panel { right: 1rem; left: 1rem; width: auto; bottom: 5rem; }
  .fai-chat-fab { right: 1rem; }
}

/* ============= STATS COUNTER — digit-rise effect ============= */
/* Counter renders each character in a span via fx.js; .roll class triggers when the digit *changes* */
/* DO NOT change display on .num — the gradient text via background-clip is fragile and breaks if parent layout changes */
.counter-char {
  display: inline-block; will-change: transform, opacity;
}
.counter-char.roll {
  animation: char-rise 0.32s cubic-bezier(.16, 1, .3, 1);
}
@keyframes char-rise {
  0%   { transform: translateY(8px); opacity: 0.2; filter: blur(2px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}
/* When counter completes — subtle glow pulse to "land" the number */
.stat-block .num.counter-lit {
  animation: counter-land 0.55s cubic-bezier(.16, 1, .3, 1);
}
@keyframes counter-land {
  0%   { filter: drop-shadow(0 0 0 rgba(0,220,255,0)); }
  50%  { filter: drop-shadow(0 0 18px rgba(0,220,255,0.55)); }
  100% { filter: drop-shadow(0 0 0 rgba(0,220,255,0)); }
}
@media (prefers-reduced-motion: reduce) {
  .counter-char.roll, .stat-block .num.counter-lit { animation: none !important; }
}

/* ============= REDUCED MOTION (WCAG 2.3.3 / 2.2.2) ============= */
/* Users who set prefers-reduced-motion get static state across the entire site. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Kill the never-pausing ticker outright */
  .ticker .track { animation: none !important; transform: none !important; }
  /* Kill heavy WebGL/canvas hero ornaments */
  #hero-net, #hero-shader, #constellation-overlay { display: none !important; }
  /* Make hero word-stagger immediately visible (no fade-up) */
  .hero h1 .word { opacity: 1 !important; transform: none !important; }
  /* Disable bento 3D tilt */
  .bento .tile, .pricing-card { transform: none !important; }
  /* Stat counter — skip animation, render final value */
  [data-target] { transition: none !important; }
}
/* Pause-on-hover for the marquee ticker (gives mouse users an escape) */
.ticker:hover .track { animation-play-state: paused; }

/* ============= PRE-HERO BRAND INTRO (FASTER AI cinematic reveal) ============= */
/* Full-bleed black panel + hero logo image. Plays once per session, ~2.4s total.
   role="presentation" + aria-hidden + inert so AT users never see it (decorative only).
   Skipped entirely on prefers-reduced-motion. */
.brand-intro {
  position: fixed; inset: 0; z-index: 9000;
  background: #04060f;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: brand-intro-cycle 2400ms cubic-bezier(.16, 1, .3, 1) forwards;
}
.brand-intro-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(0,220,255,0.10) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(4,6,15,0) 0%, rgba(4,6,15,0.6) 100%);
}
.brand-intro-logo {
  position: relative;
  max-width: 92vw; max-height: 70vh;
  width: auto; height: auto;
  object-fit: contain;
  /* Subtle entrance — pop slightly into focus */
  transform: scale(0.98);
  animation: brand-intro-logo-rise 2400ms cubic-bezier(.16, 1, .3, 1) forwards;
  filter: drop-shadow(0 0 60px rgba(0,220,255,0.35));
}
@keyframes brand-intro-cycle {
  0%   { opacity: 0; }
  10%  { opacity: 1; }    /* ~240ms fade-in */
  75%  { opacity: 1; }    /* hold ~1560ms */
  100% { opacity: 0; }    /* fade-out ~600ms */
}
@keyframes brand-intro-logo-rise {
  0%   { transform: scale(0.98); filter: drop-shadow(0 0 0 rgba(0,220,255,0)); }
  20%  { transform: scale(1); filter: drop-shadow(0 0 60px rgba(0,220,255,0.45)); }
  100% { transform: scale(1.02); filter: drop-shadow(0 0 80px rgba(0,220,255,0.30)); }
}
/* After animation completes, JS adds .done to fully hide + remove from layer */
.brand-intro.done {
  display: none;
}
/* Skip class set when sessionStorage flag exists OR reduced-motion is on */
.brand-intro.skip {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .brand-intro { display: none !important; }
}

/* ============= HERO UPGRADE LAYER (added 2026-05-11) ============= */

/* Three.js path removed 2026-05-11 — back to the original 2D constellation web (fx.js #hero-net) with the new HiggsField backdrop */

/* Hero content scroll-parallax — driven by hero-fx.js via CSS custom properties */
.hero .content {
  transform: translateY(var(--hero-scroll-lift, 0px)) scale(var(--hero-scroll-scale, 1));
  opacity: var(--hero-scroll-opacity, 1);
  /* Override the earlier .hero .content { transition: opacity 0.1s linear } so smoothness is preserved */
  transition: opacity 0.06s linear, transform 0.06s linear;
  will-change: transform, opacity;
}

/* ============= HERO LIGHTNING ENGRAVING OVERLAY ============= */
/* SVG animates via stroke-dashoffset; class .engrave-go triggers the cascade.
   Sequence: lightning strike (0-600ms) → bolt outline draws (600-1800ms) → fill fades in (1800-2400ms) → afterglow (2400-3000ms) → overlay fades (3000-3500ms) */

.hero-engraving {
  position: absolute; inset: 0;
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  background: radial-gradient(circle at 50% 50%, rgba(4,6,15,0.55) 0%, rgba(4,6,15,0) 60%);
}
.engraving-svg {
  width: 480px; height: 480px;
  max-width: 70vw; max-height: 70vh;
  filter: drop-shadow(0 0 40px rgba(0,220,255,0.0));
  transition: filter 0.6s ease-out;
}
.engraving-strike { stroke-dasharray: 600; stroke-dashoffset: 600; opacity: 0; }
.engraving-stroke { stroke-dasharray: 900; stroke-dashoffset: 900; opacity: 0; }
.engraving-fill { opacity: 0; }

/* Skip the engraving entirely when sessionStorage flag set (subsequent loads) OR for reduced motion */
.hero-engraving.engrave-skip { display: none; }

/* Trigger sequence */
.hero-engraving.engrave-go .engraving-strike {
  animation: strike-down 0.55s cubic-bezier(.4,.02,.32,1) 0.1s forwards;
}
.hero-engraving.engrave-go .engraving-stroke {
  animation: bolt-trace 1.0s cubic-bezier(.65,.05,.36,1) 0.55s forwards;
}
.hero-engraving.engrave-go .engraving-fill {
  animation: bolt-fill-in 0.55s cubic-bezier(.16,1,.3,1) 1.55s forwards;
}
.hero-engraving.engrave-go .engraving-svg {
  filter: drop-shadow(0 0 60px rgba(0,220,255,0.55));
}

@keyframes strike-down {
  0%   { stroke-dashoffset: 600; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes bolt-trace {
  0%   { stroke-dashoffset: 900; opacity: 0; }
  10%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes bolt-fill-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* After 3.2s, fade the overlay so it doesn't block interaction and the existing hero takes the stage */
.hero-engraving.engrave-done {
  opacity: 0;
  pointer-events: none;
  /* Also hide from tab order after fade — defense-in-depth, was already aria-hidden */
}

/* Reduced motion: skip engraving entirely */
@media (prefers-reduced-motion: reduce) {
  .hero-engraving { display: none; }
  .hero .content {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Mobile: smaller engraving, same brand-mark moment */
@media (max-width: 720px) {
  .engraving-svg { width: 280px; height: 280px; }
  .hero-engraving { background: radial-gradient(circle at 50% 50%, rgba(4,6,15,0.65) 0%, rgba(4,6,15,0) 65%); }
}
