/* =========================================================
   Appflare, Design System
   A modern, dark, premium consultancy theme.
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Core surfaces */
  --bg: #0a0a10;
  --bg-soft: #0e0e17;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #ECECF3;
  --text-dim: #B6B6C6;
  --muted: #8C8CA1;

  /* Flare brand gradient */
  --flare-1: #FF7A18;
  --flare-2: #FF2E63;
  --flare-3: #8A2BE2;
  --flare: linear-gradient(135deg, #FF7A18 0%, #FF2E63 52%, #8A2BE2 100%);
  --flare-soft: linear-gradient(135deg, rgba(255,122,24,0.18), rgba(255,46,99,0.16), rgba(138,43,226,0.18));

  /* Ember / crimson ambient (cinematic glow accents) */
  --ember: #FF3B2F;
  --crimson: #E11D48;
  --ember-soft: radial-gradient(closest-side, rgba(255,59,47,0.22), rgba(225,29,72,0.10) 65%, transparent);
  --ember-glow: rgba(255,46,40,0.22);

  /* Accent for links / focus */
  --accent: #FF5A36;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing / shape */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1200px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 18px 60px -20px rgba(255, 46, 99, 0.45);

  --header-h: 74px;
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

/* Ambient background flares */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 620px;
  height: 620px;
  top: -200px;
  right: -160px;
  background: radial-gradient(circle, rgba(255, 46, 99, 0.5), transparent 65%);
}
body::after {
  width: 560px;
  height: 560px;
  bottom: -220px;
  left: -180px;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.45), transparent 65%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(255, 46, 99, 0.35); color: #fff; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--text-dim); }

.gradient-text {
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-sm { padding-block: clamp(48px, 6vw, 80px); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-680 { max-width: 680px; }
.maxw-760 { max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--flare);
  box-shadow: 0 0 12px var(--flare-2);
}

.section-head { max-width: 720px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: 18px; }
.section-head p { margin-top: 16px; font-size: 1.075rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.97rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--flare);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 70px -18px rgba(255, 46, 99, 0.65); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text);
  transition: gap 0.2s ease, color 0.2s ease;
}
.link-arrow svg { width: 17px; height: 17px; transition: transform 0.2s ease; }
.link-arrow:hover { color: var(--flare-2); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 10, 16, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}
.brand .logo-mark { width: 32px; height: 32px; flex: none; }
.brand b { font-weight: 800; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Cinematic slideshow hero ---------- */
.hero-cinematic {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  opacity: 0;
  transform: scale(1.06);
  /* Transition transform too, so a slide easing out drifts gently instead of
     snapping back when its Ken Burns animation is removed. */
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1), transform 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.hero-slide.is-active {
  opacity: 1;
  /* Ken Burns drift gives the still photo a subtle "video" motion */
  animation: kenburns 9.5s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.1) translate(1.4%, 0.8%); }
  to   { transform: scale(1.0) translate(0, 0); }
}
/* If you drop in real <video> backgrounds, this keeps them covering the area */
.hero-slide video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,10,16,0.92) 0%, rgba(10,10,16,0.72) 38%, rgba(10,10,16,0.25) 70%, rgba(10,10,16,0.35) 100%),
    linear-gradient(0deg, rgba(10,10,16,0.85) 0%, rgba(10,10,16,0) 45%);
}
.hero-cinematic-inner {
  position: relative;
  width: 100%;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 48px;
}
.hero-content { max-width: 680px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}
/* Stack all slides in one grid cell so the container holds the tallest one
   (no layout jump) and slides crossfade smoothly instead of snapping. */
.hero-text-stack { display: grid; }
.hero-text {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.85s;
  pointer-events: none;
  will-change: opacity, transform;
}
.hero-text.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.25s,
    visibility 0s;
}
.hero-text h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
}
.hero-text p {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 560px;
  color: var(--text-dim);
}
.hero-cinematic .hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Slide indicator dots */
.hero-dots {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
}
.hero-dot {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.4s ease, transform 0.4s ease, width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.42); }
.hero-dot.is-active {
  width: 30px;
  border-radius: 5px;
  background: var(--flare);
}

@media (max-width: 720px) {
  .hero-cinematic { align-items: center; }
  .hero-dots { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active { animation: none; }
  .hero-slide { transition: opacity 0.6s ease; }
  .hero-text { transition: opacity 0.3s ease; }
  .hero-dot { transition: background 0.2s ease; }
}

/* ---------- Section contrast bands ---------- */
/* Alternating elevated bands break the page into clear, high-contrast blocks
   instead of one continuous dark scroll. */
.band {
  position: relative;
  background: linear-gradient(180deg, #14141f 0%, #0f0f18 100%);
  border-top: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.band + .band {
  border-top: none;
  box-shadow: none;
}
.band.band-end { border-bottom: 1px solid var(--border-strong); }

/* ---------- Brand spark manifesto ---------- */
.spark-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #14110f 0%, #0f0d14 100%);
}
.spark-band .spark-amb {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(38% 60% at 22% 50%, var(--ember-glow), transparent 70%),
    radial-gradient(46% 70% at 82% 42%, rgba(138, 43, 226, 0.13), transparent 72%);
}
.spark-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.spark-copy h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  letter-spacing: -0.02em; line-height: 1.1; margin-top: 16px;
}
.spark-copy p {
  margin-top: 18px; color: var(--text-dim);
  font-size: 1.08rem; line-height: 1.65; max-width: 58ch;
}
.spark-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.spark-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 15px; background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.spark-tag:hover { border-color: var(--flare-2); color: #fff; transform: translateY(-2px); }
.spark-tag svg { width: 15px; height: 15px; color: var(--flare-2); }

/* Visual: glowing ember core, pulsing rings, rising sparks */
.spark-visual {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  max-width: 340px; margin-inline: auto; display: grid; place-items: center;
}
.spark-core {
  position: relative; z-index: 2; width: 88px; height: 88px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #fff 0%, #FFD08A 18%, var(--flare-1) 44%, var(--flare-2) 72%, var(--flare-3) 100%);
  box-shadow: 0 0 48px 6px var(--ember-glow), 0 0 120px 26px rgba(255, 46, 99, 0.16);
  animation: sparkFlicker 3.6s ease-in-out infinite;
}
.spark-ring {
  position: absolute; top: 50%; left: 50%; width: 88px; height: 88px;
  margin: -44px 0 0 -44px; border-radius: 50%;
  border: 1px solid rgba(255, 122, 24, 0.5);
  animation: sparkPulse 3.6s ease-out infinite;
}
.spark-ring.r2 { animation-delay: 1.2s; }
.spark-ring.r3 { animation-delay: 2.4s; }
.spark-ember {
  position: absolute; bottom: 46%; left: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--flare-1); box-shadow: 0 0 8px var(--flare-2);
  opacity: 0; animation: sparkRise 3.2s ease-in infinite;
}
.spark-ember.e1 { left: 44%; animation-delay: 0s; }
.spark-ember.e2 { left: 53%; width: 4px; height: 4px; animation-delay: 0.8s; }
.spark-ember.e3 { left: 48%; animation-delay: 1.5s; }
.spark-ember.e4 { left: 57%; width: 5px; height: 5px; animation-delay: 2.1s; }
.spark-ember.e5 { left: 40%; width: 3px; height: 3px; animation-delay: 1.1s; }

@keyframes sparkFlicker {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.16); }
}
@keyframes sparkPulse {
  0% { transform: scale(1); opacity: 0.7; border-color: rgba(255, 122, 24, 0.55); }
  100% { transform: scale(3.7); opacity: 0; border-color: rgba(138, 43, 226, 0.08); }
}
@keyframes sparkRise {
  0% { transform: translate(-50%, 0) scale(1); opacity: 0; }
  16% { opacity: 1; }
  100% { transform: translate(-50%, -160px) scale(0.25); opacity: 0; }
}

@media (max-width: 860px) {
  .spark-inner { grid-template-columns: 1fr; text-align: center; }
  .spark-copy p { margin-inline: auto; }
  .spark-tags { justify-content: center; }
  .spark-visual { max-width: 240px; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .spark-core { animation: none; }
  .spark-ring { animation: none; opacity: 0.35; }
  .spark-ring.r2 { transform: scale(2); opacity: 0.2; }
  .spark-ring.r3 { transform: scale(3); opacity: 0.1; }
  .spark-ember { display: none; }
}

/* ---------- Hero (legacy inner pages) ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 70px);
  padding-bottom: 90px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-top: 22px; }
.hero h1 .gradient-text { display: inline; }
.hero-lead {
  margin-top: 22px;
  font-size: 1.18rem;
  max-width: 560px;
  color: var(--text-dim);
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-trust {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}
.hero-trust span { font-size: 0.84rem; color: var(--muted); letter-spacing: 0.04em; }
.trust-logos { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.trust-logos b { font-weight: 700; color: var(--text-dim); opacity: 0.75; font-size: 1.02rem; }

/* Hero visual */
.hero-visual {
  position: relative;
  perspective: 1200px;
}
.code-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20,20,30,0.9), rgba(13,13,20,0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.5s ease;
}
.hero-visual:hover .code-card { transform: rotateY(0deg) rotateX(0deg); }
.code-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--flare-soft);
  opacity: 0.35;
  pointer-events: none;
}
.code-top {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.code-top .dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.code-top .dot:nth-child(1) { background: #ff5f57; }
.code-top .dot:nth-child(2) { background: #febc2e; }
.code-top .dot:nth-child(3) { background: #28c840; }
.code-top span { margin-left: auto; font-size: 0.78rem; color: var(--muted); font-family: ui-monospace, monospace; }
.code-body {
  padding: 20px 22px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.9;
  position: relative;
}
.code-body .ln { color: var(--muted); }
.code-body .k { color: #ff8a5b; }
.code-body .s { color: #9fe6a0; }
.code-body .f { color: #c79bff; }
.code-body .c { color: var(--muted); font-style: italic; }

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(14, 14, 22, 0.86);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
}
.floating-badge .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--flare); color: #fff;
}
.floating-badge .ico svg { width: 18px; height: 18px; }
.floating-badge small { display: block; color: var(--muted); font-weight: 500; font-size: 0.74rem; }
.badge-a { top: -22px; left: -28px; animation: float 6s ease-in-out infinite; }
.badge-b { bottom: -26px; right: -22px; animation: float 7s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Marquee / logos strip ---------- */
.logos-strip {
  border-block: 1px solid var(--border);
  padding-block: 28px;
  background: var(--bg-soft);
}
.logos-strip .container { display: flex; flex-direction: column; align-items: center; }
.logos-strip p { width: 100%; text-align: center; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 18px; }
.logos-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; justify-content: center; }
.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  opacity: 0.82;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition), transform var(--transition), border-color var(--transition), background var(--transition);
}
.logo-chip img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}
.logo-chip:hover,
.logo-chip:focus-visible {
  color: var(--text);
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--border-strong, var(--text-dim));
  background: var(--bg-soft);
}

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--flare);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); }
.card:hover::after { opacity: 0.8; }

.card-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--flare-soft);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  color: var(--flare-2);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.97rem; }
.card .card-list { margin-top: 16px; display: grid; gap: 8px; }
.card .card-list li { display: flex; gap: 9px; font-size: 0.9rem; color: var(--text-dim); }
.card .card-list svg { width: 16px; height: 16px; color: var(--flare-2); flex: none; margin-top: 4px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.stat {
  text-align: center;
  padding: 30px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stat .num {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat .label { margin-top: 10px; color: var(--text-dim); font-size: 0.95rem; }

/* Process steps */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.step {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.step .step-no {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--flare-2);
  letter-spacing: 0.1em;
}
.step h3 { margin: 14px 0 8px; font-size: 1.2rem; }
.step p { font-size: 0.93rem; }

/* Split feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.feature-list { margin-top: 26px; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; }
.feature-list .fi {
  width: 42px; height: 42px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--flare-soft);
  border: 1px solid var(--border);
  color: var(--flare-2);
}
.feature-list .fi svg { width: 20px; height: 20px; }
.feature-list h4 { font-size: 1.04rem; margin-bottom: 3px; }
.feature-list p { font-size: 0.93rem; }

.media-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(20,20,30,0.7), rgba(12,12,19,0.8));
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.media-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--flare-soft);
  opacity: 0.25;
}

/* ---------- Testimonials ---------- */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.quote-card .stars { color: #FFB23E; letter-spacing: 2px; }
.quote-card blockquote { font-size: 1.06rem; color: var(--text); line-height: 1.6; }
.quote-author { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: #fff;
  background: var(--flare);
  flex: none;
}
.quote-author b { display: block; font-size: 0.96rem; }
.quote-author small { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20,20,30,0.6), rgba(12,12,19,0.7));
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,46,99,0.28), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { max-width: 560px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 24px;
  text-align: center;
}
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero p { max-width: 640px; margin: 18px auto 0; font-size: 1.1rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.post-card:hover { transform: translateY(-6px); border-color: var(--border-strong); }
.post-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.post-thumb .tag {
  position: absolute; top: 14px; left: 14px;
  font-size: 0.72rem; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(10,10,16,0.7); border: 1px solid var(--border-strong);
  backdrop-filter: blur(6px);
}
.post-thumb svg { width: 56px; height: 56px; opacity: 0.85; color: #fff; }
.post-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-meta { font-size: 0.8rem; color: var(--muted); display: flex; gap: 12px; }
.post-body h3 { font-size: 1.18rem; line-height: 1.3; }
.post-body h3 a:hover { color: var(--flare-2); }
.post-body p { font-size: 0.94rem; }
.post-body .link-arrow { margin-top: auto; font-size: 0.9rem; }

.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s ease;
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active { background: var(--flare); color: #fff; border-color: transparent; }

/* Article (single post) */
.article { max-width: 760px; margin-inline: auto; }
.article-hero { padding-top: calc(var(--header-h) + 56px); }
.article-cover {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-lg);
  margin: 32px 0;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  overflow: hidden;
}
.article-cover svg { width: 80px; height: 80px; opacity: 0.85; color: #fff; }
.prose { font-size: 1.07rem; color: var(--text-dim); }
.prose > * + * { margin-top: 22px; }
.prose h2 { font-size: 1.7rem; margin-top: 44px; color: var(--text); }
.prose h3 { font-size: 1.3rem; margin-top: 34px; color: var(--text); }
.prose p { line-height: 1.8; }
.prose ul { display: grid; gap: 10px; padding-left: 4px; }
.prose ul li { display: flex; gap: 11px; }
.prose ul li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flare); margin-top: 11px; flex: none; }
.prose a { color: var(--flare-2); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 3px solid var(--flare-2);
  padding-left: 22px;
  font-size: 1.2rem;
  color: var(--text);
  font-style: italic;
}
.prose code {
  font-family: ui-monospace, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 6px;
  font-size: 0.9em;
}
.prose pre {
  background: #0c0c14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  overflow-x: auto;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  line-height: 1.7;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose figure {
  margin-top: 34px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.prose figure img,
.prose figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.prose figcaption {
  padding: 14px 18px 16px;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.prose .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.prose .compare-table th,
.prose .compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.prose .compare-table th { color: var(--text); font-weight: 600; }
.prose .compare-table tr:last-child td { border-bottom: none; }
.prose .compare-table td:first-child { color: var(--text); font-weight: 500; width: 34%; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info { display: grid; gap: 22px; }
.contact-item { display: flex; gap: 16px; }
.contact-item .ci {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--flare-soft); border: 1px solid var(--border);
  color: var(--flare-2);
}
.contact-item .ci svg { width: 21px; height: 21px; }
.contact-item h4 { font-size: 1rem; margin-bottom: 2px; }
.contact-item p, .contact-item a { color: var(--text-dim); font-size: 0.96rem; }
.contact-item a:hover { color: var(--flare-2); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text-dim); }
.field label .req { color: var(--flare-2); }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--flare-2);
  box-shadow: 0 0 0 3px rgba(255,46,99,0.16);
}
.field select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238C8CA1' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.field .error-msg { color: #ff6b6b; font-size: 0.8rem; display: none; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #ff6b6b; }
.field.invalid .error-msg { display: block; }

.form-note { font-size: 0.83rem; color: var(--muted); margin-top: 6px; }
.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--flare); display: grid; place-items: center;
  margin: 0 auto 18px; color: #fff;
}
.form-success .check svg { width: 32px; height: 32px; }
.form-success h3 { margin-bottom: 8px; }

/* ---------- FAQ / Accordion ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px;
  background: none; border: none; color: var(--text);
  font-size: 1.05rem; font-weight: 600; text-align: left;
}
.faq-q .pm { flex: none; transition: transform 0.3s ease; color: var(--flare-2); font-size: 1.4rem; line-height: 1; }
.faq-item.open .faq-q .pm { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a p { padding: 0 24px 22px; font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-block: 64px 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { margin-top: 16px; max-width: 320px; font-size: 0.95rem; }
.footer-social { display: flex; gap: 12px; margin-top: 22px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.footer-social a:hover { color: #fff; border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a { color: var(--text-dim); font-size: 0.94rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--flare-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center;
  padding-top: 26px;
  font-size: 0.86rem; color: var(--muted);
}
.footer-bottom a:hover { color: var(--text); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 14px; }
.mt-md { margin-top: 30px; }
.mt-lg { margin-top: 56px; }
.hidden { display: none !important; }
.text-dim { color: var(--text-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 460px; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse .split-media { order: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .nav.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10, 10, 16, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px 26px;
  }
  .nav.mobile-open .nav-links a { padding: 13px 16px; border-radius: 12px; font-size: 1rem; }
  .nav.mobile-open .nav-links .btn { margin-top: 8px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }
  .floating-badge { display: none; }
  .code-card { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Who we help / Problems ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.audience-card {
  padding: 26px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.audience-card .ac-icon {
  width: 48px; height: 48px; margin: 0 auto 14px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--flare-soft);
  border: 1px solid var(--border);
  color: var(--flare-2);
}
.audience-card .ac-icon svg { width: 24px; height: 24px; }
.audience-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.audience-card p { font-size: 0.9rem; }

.problems-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.problem-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.problem-item .pi-num {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem; font-weight: 700;
  color: var(--flare-2);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: none;
}
.problem-item h4 { font-size: 1.02rem; margin-bottom: 4px; }
.problem-item p { font-size: 0.92rem; }

.audit-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255,122,24,0.12), rgba(255,46,99,0.1), rgba(138,43,226,0.12));
}
.audit-banner h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); max-width: 520px; }
.audit-banner p { margin-top: 8px; font-size: 0.98rem; max-width: 480px; }

/* ---------- SEO landing page extras ---------- */
.seo-benefits { display: grid; gap: 14px; margin-top: 24px; }
.seo-benefits li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.95rem; color: var(--text-dim);
}
.seo-benefits li svg { width: 18px; height: 18px; color: var(--flare-2); flex: none; margin-top: 3px; }

.case-detail { max-width: 820px; margin-inline: auto; }
.case-detail .case-meta {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  margin: 24px 0 32px;
  font-size: 0.88rem; color: var(--muted);
}
.case-detail .case-block { margin-bottom: 36px; }
.case-detail .case-block h2 { font-size: 1.5rem; margin-bottom: 12px; }
.case-detail .case-block p { font-size: 1.02rem; line-height: 1.75; }
.case-detail .case-results {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 20px;
}
.case-lead { font-size: 1.2rem; line-height: 1.7; color: var(--text); margin-bottom: 14px; }
.case-figure { margin: 0 0 36px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.case-figure img { display: block; width: 100%; height: auto; }
.case-figure figcaption { padding: 13px 18px 15px; font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--border); }
.case-list { display: grid; gap: 11px; margin-top: 16px; padding: 0; list-style: none; }
.case-list li { position: relative; padding-left: 22px; font-size: 1.02rem; line-height: 1.7; color: var(--text-dim); }
.case-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--flare); }
.case-list strong { color: var(--text); font-weight: 600; }
.case-phases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.case-phase { display: flex; gap: 14px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.case-phase .cp-no { font-weight: 800; font-size: 0.95rem; color: var(--flare-2); flex: none; }
.case-phase b { display: block; color: var(--text); margin-bottom: 4px; }
.case-phase p { font-size: 0.92rem !important; color: var(--muted); line-height: 1.6 !important; margin: 0; }
.case-quote { border-left: 3px solid var(--flare-2); padding: 4px 0 4px 22px; margin-top: 24px; font-size: 1.15rem; font-style: italic; color: var(--text); }
.case-quote cite { display: block; margin-top: 12px; font-size: 0.85rem; font-style: normal; color: var(--muted); }
.case-cta { margin-top: 48px; padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft); text-align: center; }
.case-cta h2 { font-size: 1.6rem; margin-bottom: 10px; }
.case-cta > p { color: var(--text-dim); max-width: 560px; margin: 0 auto 22px; }
.case-cta .cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.case-related { margin-top: 24px; font-size: 0.9rem; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-list span {
  font-size: 0.78rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
}

@media (max-width: 980px) {
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .audience-grid { grid-template-columns: 1fr; }
  .problems-grid { grid-template-columns: 1fr; }
  .case-detail .case-results { grid-template-columns: 1fr; }
  .case-phases { grid-template-columns: 1fr; }
  .case-cta { padding: 28px 20px; }
  .audit-banner { text-align: center; justify-content: center; }
}

/* ---------- Site chatbot ---------- */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: var(--font);
}
.chat-toggle {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: var(--flare);
  box-shadow: 0 8px 32px rgba(255, 77, 109, 0.35), 0 2px 8px rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.chat-toggle:hover { transform: translateY(-2px) scale(1.04); }
.chat-toggle svg { width: 24px; height: 24px; }
.chat-toggle-close { display: none; }
.chat-widget.is-open .chat-toggle-open { display: none; }
.chat-widget.is-open .chat-toggle-close { display: block; }

.chat-panel[hidden] { display: none; }
.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100svh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #14141f 0%, #0c0c14 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  transform-origin: bottom right;
  animation: chatPanelIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes chatPanelIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.chat-header-text strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 2px;
}
.chat-header-text span {
  font-size: 0.78rem;
  color: var(--muted);
}
.chat-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chat-close:hover { border-color: var(--border-strong); color: var(--text); }
.chat-close svg { width: 16px; height: 16px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.chat-msg p { margin: 0; }
.chat-msg-user {
  align-self: flex-end;
  background: var(--flare);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-bottom-left-radius: 4px;
}
.chat-msg-bot.typing {
  padding: 14px 18px;
}
.chat-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--flare-2);
  text-decoration: none;
}
.chat-link:hover { text-decoration: underline; }

.chat-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: chatDot 1.2s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatDot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}
.chat-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chat-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s ease;
}
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus { border-color: var(--border-strong); }
.chat-form button[type="submit"] {
  flex: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  background: var(--flare);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.chat-form button[type="submit"]:hover { transform: translateY(-1px); }
.chat-form button[type="submit"] svg { width: 18px; height: 18px; }

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

@media (max-width: 720px) {
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-panel {
    width: calc(100vw - 32px);
    height: min(480px, calc(100svh - 100px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-panel { animation: none; }
  .chat-typing i { animation: none; opacity: 0.7; }
}

/* =========================================================
   Services page | scroll FX + AI build showcase
   ========================================================= */

/* ---- Scroll-in effects (one-shot) ---- */
[data-fx] {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-fx="zoom"]   { transform: scale(0.9); }
[data-fx="rise"]   { transform: translateY(42px); }
[data-fx="left"]   { transform: translateX(-46px); }
[data-fx="right"]  { transform: translateX(46px); }
[data-fx="blur"]   { transform: scale(1.04); filter: blur(8px); }
[data-fx].fx-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Scrub elements start scaled; JS interpolates. Static fallback = full size. */
[data-scrub] { will-change: transform; }

/* ---- Cinematic services hero ---- */
.svc-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 96px) 0 96px;
  text-align: center;
  isolation: isolate;
}
.svc-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: -2;
  background:
    radial-gradient(closest-side, rgba(255,46,40,0.20), transparent 70%) 50% 30%/70% 70% no-repeat,
    radial-gradient(closest-side, rgba(225,29,72,0.16), transparent 70%) 20% 18%/55% 55% no-repeat,
    radial-gradient(closest-side, rgba(138,43,226,0.10), transparent 70%) 84% 26%/50% 50% no-repeat;
  filter: blur(8px);
}
.svc-hero .breadcrumb { justify-content: center; }
.svc-hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.04;
  margin: 18px auto 0;
  max-width: 14ch;
}
.svc-hero p {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-dim);
}
.svc-hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- AI build showcase ---- */
.ai-build-section {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
  background: linear-gradient(180deg, #14141f 0%, #0d0d16 100%);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.ai-build {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.ai-build-copy .eyebrow { margin-bottom: 18px; }
.ai-build-copy h2 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1.08;
}
.ai-build-copy > p {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 48ch;
}
.ai-build-points {
  margin-top: 26px;
  display: grid;
  gap: 14px;
}
.ai-build-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.98rem;
  color: var(--text-dim);
}
.ai-build-point svg {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 7px;
  color: #fff;
  background: var(--flare);
}

/* ---- Phone stage ---- */
.ai-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}
.ai-stage::before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: var(--ember-soft);
  filter: blur(70px);
  opacity: 0.85;
  z-index: 0;
}

/* iPhone device frame */
.ai-phone {
  position: relative;
  z-index: 1;
  width: 290px;
  height: 590px;
  border-radius: 54px;
  padding: 13px;
  background: linear-gradient(160deg, #2a2a36 0%, #15151d 48%, #2a2a36 100%);
  box-shadow:
    0 40px 80px -24px rgba(0, 0, 0, 0.75),
    0 0 0 2px rgba(255, 255, 255, 0.04) inset,
    0 1px 0 rgba(255, 255, 255, 0.12);
}
.ai-phone::after {
  /* side buttons hint */
  content: "";
  position: absolute;
  left: -2px;
  top: 150px;
  width: 3px;
  height: 64px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 86px 0 rgba(255, 255, 255, 0.12), 0 -44px 0 rgba(255, 255, 255, 0.12);
}
.ai-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #1c1c2a 0%, #0c0c14 60%);
  display: flex;
  flex-direction: column;
}
.ai-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  border-radius: 14px;
  background: #000;
  z-index: 5;
}
.ai-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
}
.ai-statusbar .dots { display: flex; gap: 4px; }
.ai-statusbar .dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-dim);
}

/* App UI being assembled */
.ai-app {
  flex: 1;
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.app-el {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.app-el.in { opacity: 1; transform: none; }

.app-header { display: flex; align-items: center; gap: 10px; }
.app-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--flare);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 6px 16px -4px rgba(255, 46, 99, 0.6);
}
.app-title b { display: block; font-size: 0.98rem; }
.app-title span { font-size: 0.72rem; color: var(--muted); }

.app-hero-card {
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,122,24,0.22), rgba(138,43,226,0.22));
  border: 1px solid var(--border);
}
.app-hero-card .label { font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.app-hero-card .big { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.app-hero-card .sub { font-size: 0.74rem; color: var(--text-dim); margin-top: 2px; }

.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-stat {
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.app-stat b { display: block; font-size: 0.95rem; }
.app-stat span { font-size: 0.6rem; color: var(--muted); }

.app-chart {
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.app-chart .ttl { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 8px; }
.app-bars { display: flex; align-items: flex-end; gap: 6px; height: 56px; }
.app-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: var(--flare);
  opacity: 0.85;
}
.app-cta {
  margin-top: auto;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  padding: 12px;
  border-radius: 14px;
  background: var(--flare);
  box-shadow: 0 8px 20px -6px rgba(255, 46, 99, 0.6);
}

/* AI agent overlay panel (the checklist) */
.ai-tasklist {
  position: absolute;
  z-index: 3;
  left: -52px;
  bottom: 54px;
  width: 256px;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(16, 16, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.7);
}
.ai-tasklist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ai-spark {
  width: 22px; height: 22px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--flare);
  color: #fff;
}
.ai-spark svg { width: 13px; height: 13px; }
.ai-tasklist-head b { font-size: 0.84rem; }
.ai-status-text {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.ai-task {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.3s ease;
}
.ai-check {
  flex: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.ai-check svg {
  width: 10px; height: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ai-task.active { color: var(--text-dim); }
.ai-task.active .ai-check {
  border-color: var(--flare-2);
  box-shadow: 0 0 0 4px rgba(255, 46, 99, 0.14);
}
.ai-task.active .ai-check::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--flare-2);
  border-top-color: transparent;
  animation: aiSpin 0.7s linear infinite;
}
.ai-task.done { color: var(--text); }
.ai-task.done .ai-check {
  background: var(--flare);
  border-color: transparent;
}
.ai-task.done .ai-check::before { display: none; }
.ai-task.done .ai-check svg { opacity: 1; transform: none; }
@keyframes aiSpin { to { transform: rotate(360deg); } }

.ai-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.ai-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: var(--flare);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.ai-progress-pct {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: var(--text-dim);
  min-width: 34px;
  text-align: right;
}

/* Floating "shipped" badge on completion */
.ai-shipped {
  position: absolute;
  z-index: 4;
  top: 64px;
  right: -38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1db954, #149e46);
  box-shadow: 0 16px 30px -10px rgba(29, 185, 84, 0.6);
  opacity: 0;
  transform: translateY(-8px) scale(0.9);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.ai-shipped svg { width: 15px; height: 15px; }
.ai-stage.is-complete .ai-shipped {
  opacity: 1;
  transform: none;
}

/* ---- Service sections contrast bands ---- */
.svc-section { padding: 86px 0; }
.svc-section.alt {
  background: linear-gradient(180deg, #13131d 0%, #0e0e17 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.svc-section .media-panel {
  transition: box-shadow 0.5s ease;
}

@media (max-width: 980px) {
  .ai-build { grid-template-columns: 1fr; gap: 64px; }
  .ai-stage { min-height: 520px; }
  .ai-tasklist { left: 50%; transform: translateX(-50%); width: 280px; bottom: 30px; }
  .ai-shipped { right: 10px; }
}
@media (max-width: 520px) {
  .ai-phone { width: 248px; height: 504px; }
  .ai-tasklist { width: calc(100% - 24px); }
  .svc-hero { padding-top: calc(var(--header-h) + 64px); }
}

@media (prefers-reduced-motion: reduce) {
  [data-fx] { opacity: 1; transform: none; filter: none; transition: none; }
  .app-el { opacity: 1; transform: none; transition: none; }
  .ai-task.active .ai-check::before { animation: none; }
}

/* ---- Pipeline flow (AI coding pipelines) ---- */
.pipe { position: relative; padding: 10px 6px 10px 8px; }
.pipe-track {
  position: absolute;
  left: 24px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.pipe-track-fill {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 0%;
  background: var(--flare);
  border-radius: 2px;
  transition: height 0.5s linear;
}
.pipe-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
}
.pipe-node {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: #15151f;
  color: var(--muted);
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.pipe-node svg { width: 16px; height: 16px; }
.pipe-label b { display: block; font-size: 0.92rem; color: var(--text-dim); transition: color 0.35s ease; }
.pipe-label span { font-size: 0.74rem; color: var(--muted); }
.pipe-step.active .pipe-node {
  border-color: transparent;
  background: var(--flare);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(255, 46, 99, 0.16);
}
.pipe-step.active .pipe-label b,
.pipe-step.done .pipe-label b { color: var(--text); }
.pipe-step.done .pipe-node {
  border-color: transparent;
  background: var(--flare);
  color: #fff;
}

/* ---- Impact bars (AI automation) ---- */
.impact { padding: 8px 4px; }
.impact-cap {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 14px;
}
.impact-row { margin-bottom: 16px; }
.impact-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.impact-val { font-weight: 700; color: var(--flare-2); font-family: ui-monospace, monospace; }
.impact-bar { height: 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.impact-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 9px;
  background: var(--flare);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.impact-sum {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dim);
}
.impact-sum-num {
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--flare);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- QA & analytics dashboard ---- */
.qa-section {
  background: radial-gradient(120% 80% at 50% 0%, #15151f 0%, #0b0b12 60%);
}
.qa-grid { grid-template-columns: 1fr 1fr; }
.qa-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 540px;
}
.qa-stage::before {
  content: "";
  position: absolute;
  width: 78%; height: 78%;
  border-radius: 44%;
  background: var(--ember-soft);
  filter: blur(72px);
  opacity: 0.75;
  z-index: 0;
}
.qa-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(22, 22, 32, 0.96), rgba(12, 12, 20, 0.96));
  border: 1px solid var(--border-strong);
  box-shadow: 0 36px 70px -24px rgba(0, 0, 0, 0.7);
}
.qa-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.qa-head-l { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; }
.qa-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: #1db954;
  animation: qaPulse 2s infinite;
}
@keyframes qaPulse {
  0% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(29, 185, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(29, 185, 84, 0); }
}
.qa-head-r { font-size: 0.72rem; color: var(--muted); }
.qa-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 16px 0 10px;
}
.qa-funnel { display: flex; flex-direction: column; gap: 11px; }
.qa-step { position: relative; }
.qa-lab { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 5px; }
.qa-num { font-weight: 700; color: var(--text); font-family: ui-monospace, monospace; }
.qa-track {
  height: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.4s ease;
}
.qa-bar {
  height: 100%;
  width: 0%;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 122, 24, 0.55), rgba(255, 46, 99, 0.5));
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.qa-step.is-drop .qa-bar { background: linear-gradient(90deg, rgba(255, 90, 80, 0.6), rgba(255, 46, 99, 0.55)); }
.qa-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ff6b6b;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.qa-step.flagged .qa-flag { opacity: 1; transform: none; }
.qa-step.flagged .qa-track { box-shadow: 0 0 0 1px rgba(255, 80, 80, 0.45); }

.qa-ab-wrap { margin-top: 4px; }
.qa-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qa-variant {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  background: var(--surface-2);
  text-align: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.qa-v { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.qa-pct { font-size: 1.5rem; font-weight: 800; transition: color 0.4s ease; }
.qa-variant.won { border-color: rgba(29, 185, 84, 0.55); box-shadow: inset 0 0 0 1px rgba(29, 185, 84, 0.35), 0 12px 26px -12px rgba(29, 185, 84, 0.5); }
.qa-variant.won .qa-pct { color: #34d36b; }
.qa-badge {
  position: absolute;
  top: -10px; right: -8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1db954, #149e46);
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 8px 18px -6px rgba(29, 185, 84, 0.6);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.qa-badge svg { width: 11px; height: 11px; }
.qa-variant.won .qa-badge { opacity: 1; transform: none; }

.qa-action {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -20px;
  transform: translate(-50%, 12px);
  width: min(380px, 92%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(14, 14, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.qa-stage.acted .qa-action { opacity: 1; transform: translate(-50%, 0); }
.qa-action-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--flare); color: #fff; }
.qa-action-ic svg { width: 16px; height: 16px; }
.qa-action b { display: block; font-size: 0.82rem; }
.qa-action span { font-size: 0.72rem; color: var(--text-dim); }

@media (max-width: 980px) {
  .qa-grid { grid-template-columns: 1fr; gap: 60px; }
  .qa-copy { order: -1; }
  .qa-stage { min-height: auto; flex-direction: column; }
  .qa-action { position: relative; left: auto; bottom: auto; transform: translateY(12px); width: min(420px, 100%); margin-top: 18px; }
  .qa-stage.acted .qa-action { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .impact-bar i, .qa-bar, .pipe-track-fill { transition: none; }
  .qa-live { animation: none; }
}

/* =========================================================
   Pointer effects + Tome-inspired crimson portal
   ========================================================= */

/* Cursor spotlight (crimson) on any [data-spotlight] surface */
.hero-spot {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 38%),
    rgba(255, 59, 47, 0.20),
    rgba(225, 29, 72, 0.07) 45%,
    transparent 65%
  );
  transition: background 0.18s ease-out;
}

/* Concentric "pulse portal" emanating rounded squares */
.hero-portal {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 560px;
  height: 560px;
  max-width: 90vw;
  z-index: -1;
  pointer-events: none;
}
.hero-portal span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 150px;
  height: 150px;
  border-radius: 34px;
  background: radial-gradient(closest-side, rgba(255, 59, 47, 0.42), rgba(225, 29, 72, 0.12) 68%, transparent 80%);
  box-shadow: 0 0 60px rgba(255, 46, 40, 0.25);
  opacity: 0;
  transform: scale(0.4);
  animation: portalPulse 5.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.hero-portal span:nth-child(2) { animation-delay: 1.1s; }
.hero-portal span:nth-child(3) { animation-delay: 2.2s; }
.hero-portal span:nth-child(4) { animation-delay: 3.3s; }
.hero-portal span:nth-child(5) { animation-delay: 4.4s; }
@keyframes portalPulse {
  0%   { transform: scale(0.4); opacity: 0; }
  18%  { opacity: 0.7; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* Hero headline gradient shimmer (scoped to the services hero) */
.svc-hero h1 .gradient-text {
  background: linear-gradient(100deg, #FF7A18 0%, #FF2E63 38%, #E11D48 60%, #FF2E63 82%, #FF7A18 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: heroShimmer 7s linear infinite;
}
@keyframes heroShimmer {
  to { background-position: 220% 0; }
}

/* 3D tilt cards with a crimson sheen that tracks the cursor */
[data-tilt] {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  will-change: transform;
}
[data-tilt]:hover {
  box-shadow: 0 26px 60px -28px rgba(255, 46, 40, 0.45), var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
  .hero-portal span, .svc-hero h1 .gradient-text { animation: none; }
  .hero-portal { opacity: 0.35; }
  [data-tilt] { transition: none; }
}

/* =========================================================
   Scroll-scrubbed "video folds into iPhone" showcase
   ========================================================= */
.reveal-stage-track {
  position: relative;
  height: 320vh;            /* scroll runway while the stage is pinned */
}
.reveal-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, #14070b 0%, #08080d 60%, #07070b 100%);
}
.reveal-amb {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background:
    radial-gradient(58% 55% at 50% 42%, rgba(255, 59, 47, 0.26), transparent 70%),
    radial-gradient(46% 46% at 82% 84%, rgba(225, 29, 72, 0.18), transparent 70%);
  will-change: opacity;
}
.reveal-copy {
  position: absolute;
  top: clamp(24px, 5vh, 60px);
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 88vw);
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.reveal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(8, 8, 13, 0.5);
  backdrop-filter: blur(6px);
}
.reveal-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember-glow);
}
.reveal-head {
  position: relative;
  margin: 12px 0 10px;
  min-height: 2.4em;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  line-height: 1.1;
}
.reveal-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.reveal-line.is-on { opacity: 1; }
.reveal-line[data-cap="1"] .reveal-grad,
.reveal-line[data-cap="1"] { color: #fff; }
.reveal-sub {
  color: #C7C7D6;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.5;
  max-width: 30em;
  margin: 0 auto;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
}

.reveal-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
.reveal-device {
  position: absolute;
  left: 50%;
  top: 55%;
  width: clamp(238px, 26vw, 300px);
  aspect-ratio: 320 / 680;
  transform: translate(-50%, -50%) scale(1);
  will-change: transform;
}
.reveal-screen {
  position: absolute;
  inset: 0;
  border-radius: 42px;
  overflow: hidden;
  background: #120a0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.reveal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(158deg, #16070b 0%, #0c0509 100%);
}
.reveal-screen-grade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 78% at 50% -8%, rgba(255, 255, 255, 0.08), transparent 52%),
    linear-gradient(180deg, transparent 58%, rgba(7, 7, 11, 0.6) 100%);
}
.reveal-screen-grade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(74deg, transparent 42%, rgba(255, 255, 255, 0.1) 50%, transparent 58%);
  transform: translateX(-65%);
  animation: revealSheen 7.5s ease-in-out infinite;
}
@keyframes revealSheen {
  0%, 58% { transform: translateX(-65%); }
  100% { transform: translateX(130%); }
}

/* iPhone shell that assembles around the screen as it shrinks */
.reveal-frame {
  position: absolute;
  inset: -13px;
  border-radius: 54px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 0 0 13px #0c0c12,
    inset 0 0 0 14px rgba(255, 255, 255, 0.1),
    0 50px 90px -34px rgba(0, 0, 0, 0.85);
  will-change: opacity;
}
.reveal-frame::before,
.reveal-frame::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 3px;
  background: #1a1a22;
}
.reveal-frame::before { left: -3px; top: 26%; height: 56px; }
.reveal-frame::after { right: -3px; top: 22%; height: 34px; box-shadow: 0 52px 0 #1a1a22; }
.reveal-notch {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 24px;
  background: #07070b;
  border-radius: 0 0 16px 16px;
}

.reveal-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  z-index: 3;
}
.reveal-hint-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.7);
  animation: revealScroll 1.8s ease-in-out infinite;
}
@keyframes revealScroll {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* Static fallback: phone shown finished, no pinning */
.reveal-static .reveal-stage { position: relative; height: auto; padding: 72px 0 84px; }
.reveal-static .reveal-viewport { position: relative; height: 74vh; min-height: 460px; }
.reveal-static .reveal-frame { opacity: 1; }
.reveal-static .reveal-amb { opacity: 1; }
.reveal-static .reveal-hint { display: none; }
.reveal-static .reveal-copy { position: static; transform: none; margin: 0 auto 8px; }
.reveal-static .reveal-head { position: relative; }
.reveal-static .reveal-line { position: relative; }
.reveal-static .reveal-line[data-cap="0"] { display: none; }
.reveal-static .reveal-line[data-cap="1"] { opacity: 1; }
.reveal-static .reveal-sub { display: none; }

@media (max-width: 820px) {
  .reveal-stage-track { height: auto; }
  .reveal-stage { position: relative; height: auto; padding: 64px 0 76px; }
  .reveal-viewport { position: relative; height: 72vh; min-height: 440px; }
  .reveal-device { transform: translate(-50%, -50%) scale(1) !important; }
  .reveal-frame { opacity: 1 !important; }
  .reveal-amb { opacity: 1 !important; }
  .reveal-hint { display: none; }
  .reveal-copy { position: static; transform: none; margin: 0 auto 22px; padding: 0 18px; }
  .reveal-line { position: relative; }
  .reveal-line[data-cap="0"] { display: none; }
  .reveal-line[data-cap="1"] { opacity: 1 !important; }
  .reveal-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-screen-grade::after, .reveal-hint-dot { animation: none; }
}
