/* ==========================================================================
   Pythonbd IT Solution: landing page styles
   Sections: tokens · base · layout · components · sections · floating UI · motion
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #fafafb;
  --bg-elev: #ffffff;
  --surface: #f2f3f8;
  --surface-2: #e9ebf3;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0b0d14;
  --text-2: #2a2e3d;
  --muted: #5b6072;
  --primary: #5b5bf0;
  --primary-hover: #4a4ae0;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --green: #10b981;
  --wa: #25d366;
  --on-primary: #ffffff;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(30, 27, 75, 0.25);
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 45%, #06b6d4 100%);
  --grad-soft: linear-gradient(120deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.12));
  --grid-line: rgba(15, 23, 42, 0.06);
  --orb-opacity: 0.35;
  --node-rgb: 91, 91, 240;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Hind Siliguri", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07080d;
    --bg-elev: #0d0f17;
    --surface: #12141f;
    --surface-2: #1a1d2b;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #eef0f7;
    --text-2: #cfd3e1;
    --muted: #9298ad;
    --primary: #7174ff;
    --primary-hover: #8487ff;
    --glass: rgba(18, 20, 31, 0.6);
    --glass-border: rgba(255, 255, 255, 0.09);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    --grad-soft: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.14));
    --grid-line: rgba(255, 255, 255, 0.05);
    --orb-opacity: 0.45;
    --node-rgb: 140, 145, 255;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #07080d;
  --bg-elev: #0d0f17;
  --surface: #12141f;
  --surface-2: #1a1d2b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f7;
  --text-2: #cfd3e1;
  --muted: #9298ad;
  --primary: #7174ff;
  --primary-hover: #8487ff;
  --glass: rgba(18, 20, 31, 0.6);
  --glass-border: rgba(255, 255, 255, 0.09);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --grad-soft: linear-gradient(120deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.14));
  --grid-line: rgba(255, 255, 255, 0.05);
  --orb-opacity: 0.45;
  --node-rgb: 140, 145, 255;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

body.no-scroll { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
p a, .section-sub a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

::selection { background: rgba(99, 102, 241, 0.3); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--primary); color: var(--on-primary); font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px) { .container { padding-inline: 24px; } }

.text-gradient {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: grad-shift 6s ease-in-out infinite alternate;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}

.mono-sm { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.hide-mobile { display: none !important; }
@media (min-width: 900px) { .hide-mobile { display: inline-flex !important; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: var(--grad);
  background-size: 150% auto;
  box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background-position: right center;
  box-shadow: 0 14px 30px -10px rgba(99, 102, 241, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  color: var(--text);
  background: var(--bg-elev);
  border-color: var(--border-strong);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--border);
}
/* backdrop-filter makes the header the containing block for the fixed mobile menu
   (shrinking it to header height), so drop it while the menu is open */
.site-header.menu-open { background: var(--bg); border-bottom-color: var(--border); -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand-logo { display: block; height: calc(var(--header-h) - 12px); width: auto; }
.site-footer .brand-logo { height: 80px; }
@media (max-width: 480px) { .site-header .brand-logo { height: calc(var(--header-h) - 18px); } }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { display: none; gap: 4px; }
.nav a {
  position: relative; padding: 8px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface); }
@media (min-width: 1024px) { .nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  font-family: "Hind Siliguri", var(--font);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
@media (min-width: 640px) { .lang-switch { display: inline-flex; } }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.menu-toggle { display: inline-grid; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: var(--bg);
  padding: 24px 16px 40px;
  overflow-y: auto;
  animation: menu-in 0.3s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu nav a:not(.btn) {
  padding: 16px 8px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 1024px) {
  .hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-bottom: 96px; }
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
#neural-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: var(--orb-opacity);
  animation: orb-float 18s ease-in-out infinite alternate;
}
.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -160px; left: -120px; }
.orb-2 { width: 420px; height: 420px; background: #06b6d4; top: 20%; right: -140px; animation-delay: -6s; }
.orb-3 { width: 360px; height: 360px; background: #8b5cf6; bottom: -160px; left: 35%; animation-delay: -12s; }

.hero-inner { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: 48px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--glass); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pulse-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}
.pulse-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--green); animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.3rem, 6vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.lead { margin-top: 22px; max-width: 580px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); }

.terminal-line {
  margin-top: 22px;
  display: inline-flex; align-items: center; flex-wrap: wrap;
  padding: 10px 16px; border-radius: 12px;
  font-family: var(--mono); font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  max-width: 100%;
}
.terminal-line .prompt { color: var(--green); margin-right: 8px; }
.terminal-line .typed { color: var(--primary); margin-left: 6px; font-weight: 500; }
.caret {
  display: inline-block; width: 8px; height: 16px; margin-left: 2px;
  background: var(--primary); animation: blink 1s steps(1) infinite;
}

.hero-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-trust { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.hero-trust .icon { width: 17px; height: 17px; color: var(--primary); }

/* Hero chat visual */
.hero-visual { position: relative; max-width: 480px; width: 100%; margin-inline: auto; }

.chat-card {
  position: relative;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.6; pointer-events: none;
}

.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.chat-head strong { display: block; font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
.chat-chip {
  margin-left: auto; padding: 3px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  color: #ef4444; background: rgba(239, 68, 68, 0.12);
  animation: blink-soft 2s ease-in-out infinite;
}

.bot-avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  color: #fff; background: var(--grad);
  box-shadow: 0 6px 20px -6px rgba(99, 102, 241, 0.7);
}
.bot-avatar .icon { width: 22px; height: 22px; }

.chat-body {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px; min-height: 230px;
}
.msg {
  max-width: 85%;
  padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5;
  animation: msg-in 0.4s var(--ease) both;
}
.msg.user { align-self: flex-end; color: #fff; background: var(--primary); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--surface); color: var(--text-2); border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.msg.bot b { color: var(--green); font-weight: 600; }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.run-steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 14px 18px 18px; border-top: 1px dashed var(--border);
}
.run-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
  opacity: 0.45; transition: opacity 0.4s, color 0.4s;
}
.run-ico {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.run-ico .icon { width: 13px; height: 13px; }
.run-step.done { opacity: 1; color: var(--text-2); }
.run-step.done .run-ico { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: var(--green); }

.float-card {
  position: absolute; display: none; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: bob 6s ease-in-out infinite;
}
.float-card .icon { width: 18px; height: 18px; color: var(--primary); }
.float-card strong { display: block; font-size: 13px; }
.float-card span { color: var(--muted); font-size: 12px; }
.fc-1 { top: -58px; right: -20px; }
.fc-2 { bottom: -66px; left: -32px; animation-delay: -3s; }
.fc-2 .icon { color: var(--cyan); }
@media (min-width: 640px) { .float-card { display: flex; } .hero-visual { margin-top: 40px; margin-bottom: 56px; } }
@media (min-width: 1024px) { .hero-visual { margin-block: 0 40px; } }
@media (min-width: 1024px) and (max-width: 1180px) { .fc-2 { left: -16px; } .fc-1 { right: -8px; } }

/* ---------- Trusted by (marquee) ---------- */
.trusted { padding: 32px 0 24px; border-block: 1px solid var(--border); background: var(--bg-elev); }
.trusted-title { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 20px; }

.marquee {
  display: flex; overflow: hidden; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; flex-shrink: 0; align-items: center; gap: 56px;
  padding-right: 56px;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img {
  height: 34px; width: auto;
  filter: grayscale(1); opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s;
}
.marquee-track img:hover { filter: none; opacity: 1; }
:root[data-theme="dark"] .marquee-track img { filter: grayscale(1) brightness(1.6); }
:root[data-theme="dark"] .marquee-track img:hover { filter: brightness(1.15); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .marquee-track img { filter: grayscale(1) brightness(1.6); }
  :root:not([data-theme="light"]) .marquee-track img:hover { filter: brightness(1.15); }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; position: relative; }
@media (min-width: 1024px) { .section { padding: 120px 0; } }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.row {
  max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px;
}
.kicker {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--primary); margin-bottom: 14px;
}
.section-head h2, .automation-copy h2, .contact-copy h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -0.035em;
}
.section-sub { margin-top: 16px; font-size: 1.075rem; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
/* mouse-follow spotlight (position set by JS) */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.12), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}

/* Services */
.services-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.service-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.service-card h3 { font-size: 1.25rem; font-weight: 700; }
.service-card p { color: var(--muted); font-size: 15px; flex-grow: 1; }
.service-card.featured { background: linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.service-card.cta-card { background: var(--grad-soft); border-style: dashed; border-color: var(--border-strong); }
.service-card.cta-card .btn { align-self: flex-start; }

.card-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  color: var(--primary);
  background: var(--grad-soft);
  border: 1px solid var(--border);
}
.card-icon .icon { width: 24px; height: 24px; }
.featured .card-icon { color: #fff; background: var(--grad); border: 0; box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.7); }

.card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-weight: 600; font-size: 14.5px; color: var(--primary);
}
.card-link .icon { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.card-link:hover .icon { transform: translateX(4px); }

/* ---------- Automation ---------- */
.automation { background: var(--bg-elev); border-block: 1px solid var(--border); overflow: hidden; }
.automation::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 85% 50%, rgba(99, 102, 241, 0.12), transparent 70%);
}
.automation-inner { position: relative; display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .automation-inner { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } }

.check-list { margin: 28px 0 32px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; color: var(--muted); }
.check-list strong { color: var(--text); font-weight: 600; }
.check-list .icon {
  width: 22px; height: 22px; padding: 4px; margin-top: 1px; border-radius: 50%;
  color: var(--green); background: rgba(16, 185, 129, 0.14); stroke-width: 3;
}

/* Flow diagram */
.flow {
  display: grid; align-items: center; gap: 0;
  grid-template-columns: 1fr;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--bg); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.flow-col { display: flex; flex-direction: column; gap: 10px; }
.flow-node {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.flow-node .icon { width: 18px; height: 18px; color: var(--primary); }
.flow-node.out .icon { color: var(--green); }

.flow-core { align-items: center; text-align: center; gap: 6px; padding: 8px 0; }
.flow-core strong { font-size: 15px; margin-top: 8px; }

.agent-core { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.agent-face {
  position: relative; z-index: 2;
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px;
  color: #fff; background: var(--grad);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.55);
}
.agent-face .icon { width: 30px; height: 30px; }
.ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.45);
  animation: ring 3s ease-out infinite;
}
.ring.r2 { animation-delay: 1s; }
.ring.r3 { animation-delay: 2s; }

.flow-lines { display: none; width: 100%; height: 100%; min-height: 220px; }
.flow-lines path { fill: none; stroke: var(--border-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.flow-lines .flow-dash {
  stroke: var(--primary); stroke-width: 2;
  stroke-dasharray: 6 14; animation: dash 1.2s linear infinite;
}
.flow-lines-out .flow-dash { stroke: var(--green); }

.flow-v { position: relative; height: 44px; width: 2px; margin: 6px auto; background: var(--border-strong); overflow: hidden; border-radius: 2px; }
.flow-v span {
  position: absolute; left: 0; width: 2px; height: 14px; border-radius: 2px;
  background: var(--primary); box-shadow: 0 0 8px var(--primary);
  animation: drop 1.3s linear infinite;
}

@media (min-width: 640px) {
  .flow { grid-template-columns: 1fr 56px auto 56px 1fr; padding: 32px 24px; }
  .flow-lines { display: block; }
  .flow-v { display: none; }
  .flow-inputs, .flow-outputs { height: 100%; justify-content: space-between; gap: 16px; }
  .flow-node { font-size: 13px; padding: 12px; }
}
@media (min-width: 1200px) { .flow { grid-template-columns: 1fr 72px auto 72px 1fr; } .flow-node { font-size: 14px; } }

/* ---------- Work ---------- */
.work-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.work-card { overflow: hidden; display: flex; flex-direction: column; }
.work-media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.05); }
.work-body { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex-grow: 1; }
.work-body h3 { font-size: 1.15rem; font-weight: 700; }
.work-body h3 a:hover { color: var(--primary); }
.work-body p { color: var(--muted); font-size: 14.5px; flex-grow: 1; }
.metric { display: flex; align-items: baseline; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.metric-num { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric-label { font-size: 13.5px; color: var(--muted); }

/* ---------- Stats ---------- */
.stats { padding: 56px 0; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.stats::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.5;
}
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 16px; text-align: center; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num { display: block; font-size: clamp(2.2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 8px; font-size: 14.5px; opacity: 0.85; }

/* ---------- Why us ---------- */
.why-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.why-item {
  padding: 26px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-elev);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.why-item:hover { border-color: var(--primary); transform: translateY(-3px); }
.why-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  color: var(--primary); background: var(--grad-soft);
}
.why-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.why-item p { color: var(--muted); font-size: 15px; }

/* ---------- Process ---------- */
.process-section { background: var(--bg-elev); border-block: 1px solid var(--border); }
.process { position: relative; display: grid; gap: 28px; counter-reset: step; }
.process::before {
  content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px;
  background: var(--border-strong);
}
.process::after {
  content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px;
  background: var(--grad); transform-origin: top; transform: scaleY(0);
  transition: transform 1.6s var(--ease) 0.2s;
}
.process.is-visible::after { transform: scaleY(1); }

.step { position: relative; padding-left: 68px; }
.step-num {
  position: absolute; left: 0; top: -4px; z-index: 1;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: var(--primary); background: var(--bg); border: 2px solid var(--border-strong);
  transition: border-color 0.4s, color 0.4s, background-color 0.4s, box-shadow 0.4s;
}
.process.is-visible .step-num { border-color: var(--primary); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.1); }
.process.is-visible .step:nth-child(1) .step-num { transition-delay: 0.2s; }
.process.is-visible .step:nth-child(2) .step-num { transition-delay: 0.5s; }
.process.is-visible .step:nth-child(3) .step-num { transition-delay: 0.8s; }
.process.is-visible .step:nth-child(4) .step-num { transition-delay: 1.1s; }
.process.is-visible .step:nth-child(5) .step-num { transition-delay: 1.4s; }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

@media (min-width: 900px) {
  .process { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  /* line runs from the first to the last step circle */
  .process::before, .process::after { left: 24px; right: calc((100% - 96px) / 5 - 24px); top: 23px; bottom: auto; width: auto; height: 2px; }
  .process::after { transform: scaleX(0); transform-origin: left; }
  .process.is-visible::after { transform: scaleX(1); }
  .step { padding-left: 0; padding-top: 72px; }
  .step-num { top: 0; }
}

/* ---------- Tech ---------- */
.tech-groups { display: grid; gap: 16px; }
@media (min-width: 768px) { .tech-groups { grid-template-columns: repeat(2, 1fr); } }
.tech-group { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev); }
.tech-group h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 8px 14px; border-radius: 10px;
  font-family: var(--mono); font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.chips li:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ---------- Testimonials carousel ---------- */
.carousel-controls { display: flex; gap: 8px; }
.carousel {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: 4px 2px 12px;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .carousel { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (min-width: 1100px) { .carousel { grid-auto-columns: calc((100% - 32px) / 3); } }

.quote-card { scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; margin: 0; padding: 28px; }
.quote-card blockquote { margin: 0; font-size: 1.05rem; line-height: 1.65; color: var(--text-2); }
.quote-card blockquote::before {
  content: "\201C"; display: block; height: 36px;
  font-size: 64px; line-height: 1; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.quote-card figcaption { display: flex; align-items: center; gap: 12px; }
.quote-card figcaption strong { display: block; font-size: 15px; }
.quote-card figcaption span span { display: block; font-size: 13px; color: var(--muted); }
.avatar {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--grad);
}
.center-link { margin-top: 32px; display: flex; justify-content: center; }

/* ---------- FAQ ---------- */
.faq-inner { display: grid; gap: 8px; }
@media (min-width: 1024px) { .faq-inner { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } .faq-inner .section-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.faq-list { display: grid; gap: 12px; }
.faq-list details {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev);
  transition: border-color 0.3s;
}
.faq-list details[open] { border-color: var(--primary); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.02rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .icon { width: 18px; height: 18px; color: var(--primary); transition: transform 0.3s var(--ease); }
.faq-list details[open] summary .icon { transform: rotate(45deg); }
.faq-list details p { padding: 0 22px 22px; color: var(--muted); animation: fade-in 0.35s var(--ease); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 120px; }
.contact-panel {
  position: relative; display: grid; gap: 40px;
  padding: 28px 20px; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.contact-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(500px 300px at 0% 0%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, rgba(6, 182, 212, 0.16), transparent 70%);
}
@media (min-width: 640px) { .contact-panel { padding: 40px; } }
@media (min-width: 1024px) { .contact-panel { grid-template-columns: 0.9fr 1.1fr; gap: 56px; padding: 56px; } }

.contact-methods { margin-top: 32px; display: grid; gap: 10px; }
.contact-methods a, .contact-methods div {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: 14px;
  border: 1px solid transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.contact-methods a:hover { background: var(--bg-elev); border-color: var(--border); }
.contact-methods strong { display: block; font-size: 15px; }
.contact-methods span span { display: block; font-size: 14px; color: var(--muted); }
.cm-icon {
  display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  color: var(--primary); background: var(--bg-elev); border: 1px solid var(--border);
}
.cm-icon.wa { color: #fff; background: var(--wa); border: 0; }

.lead-form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.lead-form label, .lead-form legend, .budget-row > label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 4px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.lead-form label > input, .lead-form label > textarea { flex-basis: 100%; }
.lead-form label > span[aria-hidden] { color: #ef4444; }
.lead-form input[type="text"], .lead-form input[type="email"], .lead-form input[type="tel"], .lead-form select, .lead-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  font-size: 15px; font-weight: 400;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lead-form textarea { resize: vertical; min-height: 110px; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.lead-form .invalid { border-color: #ef4444 !important; }
.lead-form fieldset { border: 0; padding: 0; margin: 0; }
.lead-form legend { margin-bottom: 8px; }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex !important; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  transition: all 0.2s;
}
.pill:hover span { border-color: var(--primary); }
.pill input:checked + span { color: #fff; background: var(--primary); border-color: var(--primary); }
.pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

.budget-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: -8px; }
.currency-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.currency-toggle button { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all 0.2s; }
.currency-toggle button.active { color: #fff; background: var(--primary); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { min-height: 1.4em; font-size: 14px; color: var(--muted); text-align: center; }
.form-note.success { color: var(--green); }
.form-note.error { color: #ef4444; }

/* ---------- Footer ---------- */
.site-footer { padding: 20px 0 28px; border-top: 1px solid var(--border); background: var(--bg-elev); }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand p { margin-top: 16px; max-width: 340px; color: var(--muted); font-size: 15px; }
.site-footer h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 16px; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer ul a, .footer-contact span { color: var(--text-2); font-size: 15px; transition: color 0.2s; }
.site-footer ul a:hover { color: var(--primary); }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 17px; height: 17px; color: var(--muted); }
.socials { margin-top: 20px; display: flex; gap: 8px; }
.socials a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); color: var(--text-2); transition: all 0.2s;
}
.socials a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.socials .icon { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 14px; color: var(--muted);
}
.footer-bottom a:hover { color: var(--primary); }
.footer-bottom.text-center { justify-content: center; text-align: center; }

/* ---------- Floating actions ---------- */
.fab-stack {
  position: fixed; right: 16px; bottom: 84px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 768px) { .fab-stack { right: 24px; bottom: 24px; } }

.fab {
  position: relative; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  color: #fff; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease);
}
.fab:hover { transform: scale(1.08); }
.fab .icon { width: 26px; height: 26px; }
.fab-wa { display: none; background: var(--wa); }
@media (min-width: 768px) { .fab-wa { display: grid; } }
.fab-wa::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--wa); z-index: -1; animation: ping 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.fab-ai { background: var(--grad); }
.fab-ai .icon-close { display: none; }
.fab-ai[aria-expanded="true"] .icon-open { display: none; }
.fab-ai[aria-expanded="true"] .icon-close { display: block; }

.back-to-top {
  position: fixed; left: 24px; bottom: 24px; z-index: 80;
  display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--text-2); background: var(--bg-elev); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease), color 0.2s;
}
.back-to-top:hover { color: var(--primary); }
.back-to-top.show { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 768px) { .back-to-top { display: grid; } }

/* AI chat panel */
.ai-chat {
  position: fixed; z-index: 95;
  right: 12px; left: 12px; bottom: 150px;
  display: flex; flex-direction: column;
  max-height: min(560px, calc(100svh - 230px));
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-elev);
  animation: chat-in 0.35s var(--ease);
}
.ai-chat[hidden] { display: none; }
@media (min-width: 768px) {
  .ai-chat { left: auto; right: 24px; bottom: 154px; width: 380px; max-height: min(560px, calc(100vh - 190px)); }
}
.ai-chat-head { display: flex; align-items: center; gap: 12px; padding: 16px; color: #fff; background: var(--grad); }
.ai-chat-head .bot-avatar { background: rgba(255, 255, 255, 0.2); box-shadow: none; }
.ai-chat-head strong { display: block; }
.ai-chat-head .status { color: rgba(255, 255, 255, 0.85); }
.ai-chat-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 160px; }
.ai-chat-body .msg a { color: var(--primary); text-decoration: underline; }
.ai-chat-body .msg.user a { color: #fff; }
.ai-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ai-quick button {
  padding: 6px 12px; border-radius: 999px; font-size: 13px;
  color: var(--primary); border: 1px solid var(--primary); background: transparent;
  transition: all 0.2s;
}
.ai-quick button:hover { color: #fff; background: var(--primary); }
.ai-chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.ai-chat-input input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 14px;
}
.ai-chat-input input:focus { outline: none; border-color: var(--primary); }
.ai-chat-input button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: var(--grad); }
.ai-chat-input .icon { width: 18px; height: 18px; }

/* Mobile sticky bar */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.mobile-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.mobile-bar a:first-child .icon { color: var(--wa); }
.mobile-bar .mb-primary { color: #fff; background: var(--grad); }
@media (min-width: 768px) { .mobile-bar { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 72px; } }

/* ---------- Scroll reveal (only when JS is running) ----------
   Uses keyframes on opacity/translate/scale/filter (not `transform`/`transition`),
   so cards keep their own hover lift and hover timing after they appear.
   Variants: data-reveal="left" | "right" | "zoom" (default: up).
   --rd = stagger delay, set by main.js for siblings in the same grid. */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-visible { animation: reveal-up 0.9s var(--ease) var(--rd, 0s) both; }
.js [data-reveal="left"].is-visible { animation-name: reveal-left; }
.js [data-reveal="right"].is-visible { animation-name: reveal-right; }
.js [data-reveal="zoom"].is-visible { animation-name: reveal-zoom; }

/* children of lists inside a revealed block pop in one by one (--i set by main.js) */
.js [data-reveal] .stagger-item { opacity: 0; }
.js .is-visible .stagger-item { animation: pop-in 0.6s var(--ease) both; animation-delay: calc(var(--rd, 0s) + 0.15s + var(--i, 0) * 70ms); }

/* kicker ("// what we do") types itself out, then a caret blinks */
.js [data-reveal] .kicker { clip-path: inset(0 100% 0 0); }
.js .is-visible .kicker { animation: type-in 0.9s steps(18, end) calc(var(--rd, 0s) + 0.1s) both; }
.js .is-visible .kicker::after {
  content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 4px; vertical-align: -2px;
  background: currentColor; animation: blink 1s steps(1) infinite;
}

/* ---------- Home: neural canvas behind each section (added by main.js) ---------- */
.has-canvas { position: relative; }
.section-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.75; }
.has-canvas > :not(.section-canvas) { position: relative; z-index: 1; }

/* ---------- Home: ambient motion below the hero ---------- */
/* service + why icons float gently, out of phase */
.home .service-card .card-icon, .home .why-icon { animation: float-y 5s ease-in-out infinite; }
.home .services-grid > :nth-child(2n) .card-icon, .home .why-grid > :nth-child(2n) .why-icon { animation-delay: -1.6s; }
.home .services-grid > :nth-child(3n) .card-icon, .home .why-grid > :nth-child(3n) .why-icon { animation-delay: -3.2s; }
.home .why-item:hover .why-icon { animation: wiggle 0.6s var(--ease); }

/* featured service card: flowing gradient border */
.home .service-card.featured { background-size: 100% 100%, 300% 300%; animation: grad-shift 5s ease-in-out infinite alternate; }
.js .home .service-card.featured[data-reveal] { animation: none; }
.js .home .service-card.featured[data-reveal].is-visible { animation: reveal-zoom 0.9s var(--ease) var(--rd, 0s) both, grad-shift 5s ease-in-out infinite alternate; }

/* automation: drifting aurora + nodes light up in sequence like data flowing through */
.home .automation::before { animation: aurora 14s ease-in-out infinite alternate; }
.home .flow-node { animation: node-glow 3.6s ease-in-out infinite; }
.home .flow-col > .flow-node:nth-child(2) { animation-delay: 1.2s; }
.home .flow-col > .flow-node:nth-child(3) { animation-delay: 2.4s; }
.home .flow-outputs .flow-node { animation-name: node-glow-out; }
.home .flow-outputs .flow-node:nth-child(1) { animation-delay: 0.6s; }
.home .flow-outputs .flow-node:nth-child(2) { animation-delay: 1.8s; }
.home .flow-outputs .flow-node:nth-child(3) { animation-delay: 3s; }

/* work: light sweep across the image when the card appears, shimmering metric */
.home .work-media { position: relative; }
.home .work-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
}
.home .work-card.is-visible .work-media::after { animation: sweep 1.4s var(--ease) calc(var(--rd, 0s) + 0.4s) both; }
.home .metric-num { background-size: 200% 200%; animation: grad-shift 4s ease-in-out infinite alternate; }

/* stats band: moving gradient + drifting dot grid */
.home .stats { background-size: 200% 200%; animation: grad-shift 10s ease-in-out infinite alternate; }
.home .stats::before { animation: dots-drift 8s linear infinite; }
.home .stat.is-visible .stat-num { animation: count-pop 0.5s var(--ease) calc(var(--rd, 0s) + 1.5s) both; }

/* process: each step circle keeps a soft pulse once the line has drawn */
.home .process.is-visible .step-num::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--primary);
  animation: step-ping 2.8s ease-out infinite; pointer-events: none;
}
.home .process.is-visible .step:nth-child(2) .step-num::after { animation-delay: 0.3s; }
.home .process.is-visible .step:nth-child(3) .step-num::after { animation-delay: 0.6s; }
.home .process.is-visible .step:nth-child(4) .step-num::after { animation-delay: 0.9s; }
.home .process.is-visible .step:nth-child(5) .step-num::after { animation-delay: 1.2s; }

/* tech groups: border lights up on hover */
.home .tech-group { transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.home .tech-group:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }

/* testimonials: avatar halo */
.home .quote-card .avatar { animation: halo 3s ease-in-out infinite; }

/* contact panel: slowly moving colour glow, icons nudge on hover */
.home .contact-panel::before { inset: -25%; animation: aurora 16s ease-in-out infinite alternate; }
.home .contact-methods a:hover .cm-icon { animation: wiggle 0.6s var(--ease); }

/* ---------- Keyframes ---------- */
@keyframes grad-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes orb-float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.1); } 100% { transform: translate(-40px, 20px) scale(0.95); } }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes blink-soft { 50% { opacity: 0.5; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes ring { from { transform: scale(0.7); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: -40; } }
@keyframes drop { from { top: -14px; } to { top: 100%; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes chat-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes reveal-up { from { opacity: 0; translate: 0 40px; filter: blur(6px); } to { opacity: 1; translate: none; filter: none; } }
@keyframes reveal-left { from { opacity: 0; translate: -56px 0; filter: blur(6px); } to { opacity: 1; translate: none; filter: none; } }
@keyframes reveal-right { from { opacity: 0; translate: 56px 0; filter: blur(6px); } to { opacity: 1; translate: none; filter: none; } }
@keyframes reveal-zoom { from { opacity: 0; scale: 0.9; translate: 0 24px; filter: blur(6px); } to { opacity: 1; scale: none; translate: none; filter: none; } }
@keyframes pop-in { from { opacity: 0; translate: 0 14px; scale: 0.94; } to { opacity: 1; translate: none; scale: none; } }
@keyframes type-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes float-y { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -10deg; } 50% { rotate: 8deg; } 75% { rotate: -4deg; } }
@keyframes aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6%, 4%) scale(1.08); } 100% { transform: translate(5%, -3%) scale(1.04); } }
@keyframes node-glow { 0%, 45%, 100% { border-color: var(--border); box-shadow: var(--shadow-sm); } 15% { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 0 24px rgba(99, 102, 241, 0.25); } }
@keyframes node-glow-out { 0%, 45%, 100% { border-color: var(--border); box-shadow: var(--shadow-sm); } 15% { border-color: var(--green); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 0 24px rgba(16, 185, 129, 0.25); } }
@keyframes sweep { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes dots-drift { to { background-position: 22px 22px; } }
@keyframes count-pop { 0%, 100% { scale: 1; } 50% { scale: 1.12; } }
@keyframes step-ping { 0% { scale: 1; opacity: 0.7; } 80%, 100% { scale: 1.45; opacity: 0; } }
@keyframes halo { 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45); } 50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js [data-reveal], .js [data-reveal] .stagger-item { opacity: 1; transform: none; }
  .js [data-reveal] .kicker { clip-path: none; }
  .js .is-visible .kicker::after { display: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ==========================================================================
   Subpages (services, work, clients, blog, about, careers, contact, legal)
   ========================================================================== */
.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; }

/* Page hero */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 40px) 0 64px;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .page-hero { padding: calc(var(--header-h) + 64px) 0 88px; } }
.page-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.page-hero-bg .orb-1 { width: 460px; height: 460px; top: -220px; left: -160px; }
.page-hero-bg .orb-2 { width: 380px; height: 380px; top: -120px; right: -140px; }
.page-hero h1 { max-width: 900px; font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.08; }
.page-hero .lead { max-width: 760px; }
.page-hero .breadcrumb + h1 { margin-top: 32px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb [aria-current] { color: var(--text-2); font-weight: 500; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-sep { opacity: 0.5; }

.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-checks { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-checks li { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.hero-checks .icon { width: 18px; height: 18px; padding: 3px; border-radius: 50%; color: var(--green); background: rgba(16, 185, 129, 0.14); stroke-width: 3; }
.hero-tags { margin-top: 22px; }
.hero-stats { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats li { display: flex; align-items: baseline; gap: 8px; padding: 10px 18px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border); }
.hero-stats strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats span { color: var(--muted); font-size: 14px; }

/* Section helpers */
.section.alt { background: var(--bg-elev); border-block: 1px solid var(--border); }
.container.narrow { max-width: 880px; }
.container.narrow-wide { max-width: 1040px; }
.small-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 1024px) { .split { grid-template-columns: 0.85fr 1.15fr; gap: 64px; } .split > .section-head { position: sticky; top: calc(var(--header-h) + 32px); } }
.split .section-head .btn { margin-top: 24px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--primary);
  background: var(--grad-soft); border: 1px solid var(--border);
}
.badge .icon { width: 13px; height: 13px; }

.mini-checks { display: grid; gap: 10px; }
.mini-checks li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 15px; }
.mini-checks .icon { width: 18px; height: 18px; margin-top: 2px; padding: 3px; border-radius: 50%; color: var(--green); background: rgba(16, 185, 129, 0.14); stroke-width: 3; }
.two-col-list { grid-template-columns: 1fr; }
@media (min-width: 640px) { .two-col-list { grid-template-columns: 1fr 1fr; } }
.big-checks li { font-size: 1.02rem; padding: 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }

.chips-lg li { padding: 10px 18px; font-family: var(--font); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.chips-lg .icon { width: 16px; height: 16px; color: var(--primary); }

/* Make a whole card clickable via its heading link */
.stretched::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

/* Feature cards / engagement / use cases */
.feature-grid, .engage-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .engage-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.feature-card, .engage-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.feature-card h3, .engage-card h3 { font-size: 1.15rem; font-weight: 700; }
.feature-card p { color: var(--muted); font-size: 15px; }
.engage-best { color: var(--muted); font-size: 14px; }
.engage-card .mini-checks { margin-top: 6px; }

@media (min-width: 1024px) { .why-grid.four { grid-template-columns: repeat(4, 1fr); } }

.usecases { display: grid; gap: 14px; }
.usecase {
  display: flex; gap: 18px; padding: 22px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.usecase:hover { border-color: var(--primary); transform: translateX(4px); }
.usecase-num { font-family: var(--mono); font-size: 14px; color: var(--primary); padding-top: 3px; }
.usecase h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 4px; }
.usecase p { color: var(--muted); font-size: 15px; }

.tech-inline { margin-top: 56px; }
.tech-inline h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }

@media (min-width: 1024px) { .work-grid.two { grid-template-columns: repeat(2, 1fr); } }

.other-services-section { padding-block: 56px; }
.other-services { display: grid; gap: 12px; }
@media (min-width: 640px) { .other-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .other-services { grid-template-columns: repeat(4, 1fr); } }
.other-service {
  display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-elev); font-weight: 600;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.other-service .icon:first-child { color: var(--primary); }
.other-service .icon:last-child { margin-left: auto; width: 16px; height: 16px; color: var(--muted); transition: transform 0.2s var(--ease); }
.other-service:hover { border-color: var(--primary); transform: translateY(-2px); }
.other-service:hover .icon:last-child { transform: translateX(4px); color: var(--primary); }

/* CTA band */
.cta-section { padding-block: 72px 104px; }
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; gap: 28px; align-items: center;
  padding: 36px 24px; border-radius: 28px; box-shadow: var(--shadow-lg);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(500px 260px at 0% 0%, rgba(99, 102, 241, 0.2), transparent 70%), radial-gradient(500px 260px at 100% 100%, rgba(6, 182, 212, 0.18), transparent 70%);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.035em; }
.cta-band p { margin-top: 10px; color: var(--muted); max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; padding: 48px 56px; } }

/* Filters */
.filter-row { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 28px; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label { margin-right: 4px; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.filter-btn {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text-2); background: var(--bg-elev); border: 1px solid var(--border-strong);
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); }
[data-filter-item].is-hidden { display: none; }
.empty-state { padding: 40px 0; text-align: center; color: var(--muted); }

/* Case study */
.case-hero h1 { max-width: 820px; }
.case-cover { margin-top: -32px; position: relative; z-index: 2; }
.case-image { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); }
.case-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.results-grid { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) { .results-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.result { padding: 22px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.result-num { display: block; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-label { color: var(--muted); font-size: 14.5px; }

.two-col { display: grid; gap: 40px; }
@media (min-width: 1024px) { .two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; } }
.sticky { position: sticky; top: calc(var(--header-h) + 24px); }
.facts-card { padding: 24px; display: grid; gap: 12px; }
.facts-card h3 { font-size: 1.05rem; font-weight: 700; }
.facts { display: grid; margin: 0 0 8px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.facts dd a { color: var(--primary); }

.big-quote { margin: 40px 0 0; padding: 32px; border-radius: var(--radius-lg); background: var(--grad-soft); border: 1px solid var(--border); }
.big-quote blockquote { margin: 0 0 20px; padding: 0; border: 0; font-size: 1.2rem; line-height: 1.6; font-weight: 500; color: var(--text); }
.big-quote blockquote::before { content: "\201C"; display: block; height: 40px; font-size: 64px; line-height: 1; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.big-quote figcaption strong { display: block; }
.big-quote figcaption span span { display: block; font-size: 13.5px; color: var(--muted); }

.pager { display: grid; gap: 12px; margin-bottom: 64px; }
@media (min-width: 768px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager-link {
  display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border); font-weight: 600;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.pager-link small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.pager-link.next { justify-content: flex-end; text-align: right; }
.pager-link .icon { color: var(--primary); }
.pager-link:hover { border-color: var(--primary); transform: translateY(-2px); }

/* Prose (blog, legal, case study text) */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--text-2); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.4rem, 2.6vw, 1.75rem); font-weight: 800; letter-spacing: -0.03em; color: var(--text); scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; font-weight: 700; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul:not(.chips):not(.mini-checks), .prose ol { padding-left: 1.3em; display: grid; gap: 0.5em; }
.prose ul:not(.chips):not(.mini-checks) { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--primary); }
.prose .mini-checks li { font-size: 1rem; }
.prose > blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--primary); color: var(--text); }
.prose > .big-quote { margin-top: 40px; }
.legal-note { padding: 12px 16px; border-radius: 12px; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); }

/* Blog */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-grid.featured-row { grid-template-columns: 1fr; margin-bottom: 48px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.post-media { display: block; overflow: hidden; aspect-ratio: 1200 / 630; background: var(--surface); border-bottom: 1px solid var(--border); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex-grow: 1; }
.post-body h3 { font-size: 1.18rem; font-weight: 700; line-height: 1.3; }
.post-body h3 a:hover { color: var(--primary); }
.post-body p { color: var(--muted); font-size: 15px; flex-grow: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13.5px; color: var(--muted); }
@media (min-width: 900px) {
  .post-featured { display: grid; grid-template-columns: 1.2fr 1fr; }
  .post-featured .post-media { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--border); }
  .post-featured .post-body { padding: 40px; justify-content: center; }
  .post-featured h3 { font-size: 1.8rem; letter-spacing: -0.03em; }
  .post-featured .post-body p { flex-grow: 0; }
}

.post-hero h1 { max-width: 900px; }
.hero-post-meta { margin-top: 24px; }
.author-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text-2); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 16px; }
.post-cover-wrap { margin-top: -28px; position: relative; z-index: 2; }
.post-cover { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.post-cover img { width: 100%; }
.post-section { padding-top: 56px; }
.post-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) { .post-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; } }
.post-aside { display: none; }
@media (min-width: 1024px) { .post-aside { display: block; } }
.post-aside .sticky { display: grid; gap: 20px; }
.toc h2 { font-size: 13px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.toc ol { display: grid; gap: 2px; border-left: 2px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.toc a:hover, .toc a.active { color: var(--primary); border-left-color: var(--primary); }
.share { display: flex; align-items: center; gap: 8px; }
.share span { font-size: 13px; color: var(--muted); margin-right: 4px; }
.share a, .share button {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--text-2); transition: all 0.2s;
}
.share a:hover, .share button:hover { color: var(--primary); border-color: var(--primary); }
.share .icon { width: 16px; height: 16px; }
.share .copied { color: var(--green); border-color: var(--green); }
.aside-cta { padding: 20px; display: grid; gap: 8px; background: var(--grad-soft); }
.aside-cta h3 { font-size: 1rem; font-weight: 700; }
.aside-cta p { font-size: 14px; color: var(--muted); }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin-top: 48px !important; padding: 24px; }
.author-box p { margin-top: 4px; font-size: 15px; color: var(--muted); }

.newsletter {
  position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center;
  padding: 32px 24px; border-radius: 24px;
}
.newsletter h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.newsletter p { color: var(--muted); margin-top: 6px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter-form input {
  flex: 1 1 220px; padding: 13px 16px; border-radius: 999px; font-size: 15px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); }
.newsletter-form .form-note { flex-basis: 100%; text-align: left; margin: 0; }
@media (min-width: 900px) { .newsletter { grid-template-columns: 1fr 1fr; padding: 48px; } }

/* Clients */
.client-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .client-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.client-card { display: flex; flex-direction: column; overflow: hidden; }
.client-logo {
  display: grid; place-items: center; height: 120px; padding: 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.client-logo img { height: 38px; width: auto; filter: grayscale(1); opacity: 0.75; transition: filter 0.3s, opacity 0.3s; }
.client-card:hover .client-logo img { filter: none; opacity: 1; }
:root[data-theme="dark"] .client-logo img, :root[data-theme="dark"] .featured-client img { filter: grayscale(1) brightness(1.6); }
:root[data-theme="dark"] .client-card:hover .client-logo img, :root[data-theme="dark"] .featured-client:hover img { filter: brightness(1.15); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .client-logo img, :root:not([data-theme="light"]) .featured-client img { filter: grayscale(1) brightness(1.6); }
  :root:not([data-theme="light"]) .client-card:hover .client-logo img, :root:not([data-theme="light"]) .featured-client:hover img { filter: brightness(1.15); }
}
.nda-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 500; color: var(--muted); }
.client-info { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex-grow: 1; }
.client-info h3 { font-size: 1.1rem; font-weight: 700; }
.client-info > p:not(.client-meta) { color: var(--muted); font-size: 14.5px; flex-grow: 1; }
.client-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.cc { padding: 2px 6px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--primary); background: var(--grad-soft); border: 1px solid var(--border); }

.featured-clients { display: grid; gap: 20px; }
@media (min-width: 768px) { .featured-clients { grid-template-columns: repeat(2, 1fr); } }
.featured-client { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.featured-client img { height: 34px; width: auto; align-self: flex-start; }
.featured-client p { color: var(--muted); }
.quote-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .quote-grid { grid-template-columns: repeat(2, 1fr); } }

/* Products */
.product-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.product-card h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }
.product-card > p:not(.product-tagline) { color: var(--muted); font-size: 15px; }
.product-card .mini-checks { flex-grow: 1; }
.product-tagline { font-weight: 600; color: var(--primary); }
.product-top { display: flex; align-items: center; justify-content: space-between; }
.status-badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-family: var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.status-badge.beta { color: var(--green); background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }

/* About */
.about-story { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .about-story { grid-template-columns: 1.2fr 0.8fr; gap: 64px; } }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat-tile { padding: 24px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.stat-tile .stat-num { font-size: 2.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-tile > span:last-child { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.mv-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .mv-grid { grid-template-columns: 1fr 1fr; } }
.mv-card { padding: 32px; display: grid; gap: 14px; }
.mv-card h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.mv-card p { color: var(--muted); font-size: 1.05rem; }
.team-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.team-card { padding: 28px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.team-avatar {
  display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 10px; border-radius: 50%;
  font-size: 24px; font-weight: 800; color: #fff; background: var(--grad);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.7);
}
.team-card h3 { font-size: 1.1rem; font-weight: 700; }
.team-role { color: var(--primary); font-weight: 600; font-size: 14px; }
.team-card p:last-child { color: var(--muted); font-size: 14.5px; }

/* Process timeline (detailed) */
.timeline { position: relative; display: grid; gap: 24px; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--primary), var(--cyan)); opacity: 0.4; }
.tl-item { position: relative; padding-left: 72px; }
.tl-num {
  position: absolute; left: 0; top: 18px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  font-family: var(--mono); font-size: 14px; color: #fff; background: var(--grad); box-shadow: 0 0 0 6px var(--bg);
}
.tl-card { padding: 26px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tl-head h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tl-card > p { color: var(--muted); }
.tl-card h4 { margin: 18px 0 10px; font-size: 13px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

@media (min-width: 900px) {
  .process.four { grid-template-columns: repeat(4, 1fr); }
  .process.four::before, .process.four::after { right: calc((100% - 72px) / 4 - 24px); }
}

/* Careers */
.job-list { display: grid; gap: 14px; }
.job { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); transition: border-color 0.3s; }
.job[open] { border-color: var(--primary); }
.job summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 16px; padding: 22px; cursor: pointer; list-style: none; }
.job summary::-webkit-details-marker { display: none; }
.job-title { font-size: 1.15rem; font-weight: 700; }
.job-meta { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.job summary > .icon { grid-column: 2; grid-row: 1; width: 18px; height: 18px; color: var(--primary); transition: transform 0.3s var(--ease); }
.job[open] summary > .icon { transform: rotate(45deg); }
.job-body { padding: 0 22px 24px; display: grid; gap: 18px; animation: fade-in 0.35s var(--ease); }
.job-body > p { color: var(--muted); }
.job-cols { display: grid; gap: 20px; }
@media (min-width: 640px) { .job-cols { grid-template-columns: 1fr 1fr; } }
.job-cols h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.job-cols ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 4px; color: var(--text-2); font-size: 15px; }
.job-body .btn { justify-self: start; }

/* Contact page */
.contact-page { padding-top: 64px; }
.contact-page .contact-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.office-grid { display: grid; gap: 20px; }
@media (min-width: 1024px) { .office-grid { grid-template-columns: 0.8fr 1.2fr; } }
.office-card { padding: 28px; }
.office-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 18px; }
.office-list { display: grid; gap: 18px; }
.office-list li { display: flex; gap: 14px; color: var(--muted); font-size: 15px; }
.office-list strong { color: var(--text); }
.office-list .icon { margin-top: 3px; color: var(--primary); }
.map-embed { min-height: 320px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.map-embed iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

/* 404 */
.page-404 { min-height: 80vh; display: flex; align-items: center; text-align: center; border-bottom: 0; }
.page-404 .container { display: grid; justify-items: center; }
.page-404 h1, .page-404 .lead { margin-inline: auto; }
.err-code { font-family: var(--mono); font-size: clamp(5rem, 18vw, 10rem); font-weight: 500; line-height: 1; letter-spacing: -0.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-404 .hero-actions { justify-content: center; }
.quick-links { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.quick-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.quick-links a:hover { color: var(--primary); }

/* Django flash messages (contact form without JavaScript) */
.flash-messages {
  position: fixed; z-index: 120; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); padding: 0; display: grid; gap: 8px;
  animation: menu-in 0.4s var(--ease);
}
.flash { padding: 14px 18px; border-radius: 14px; font-size: 15px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-elev); box-shadow: var(--shadow-lg); }
.flash-success { color: var(--green); border-color: rgba(16, 185, 129, 0.4); }
.flash-error { color: #ef4444; border-color: rgba(239, 68, 68, 0.4); }
