/* =======================================================
 * Const Agility — Premium Design System
 * Bespoke, dependency-light CSS (no Bootstrap).
 * Sections: tokens · base · type · layout · buttons · header
 *           hero · logos · services · process · work · stats
 *           testimonials · booking · faq · cta · footer · utils
 * ======================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Theme: default follows the OS (system). Forced via [data-theme] below. */
  color-scheme: light dark;

  /* Surfaces */
  --bg: light-dark(#f6f7fb, #0a0b0f);
  --bg-elev: light-dark(#ffffff, #12141c);
  --bg-elev-2: light-dark(#eef1f7, #1a1d28);
  --bg-soft: light-dark(#eceff5, #0e1016);

  /* Text */
  --text: light-dark(#10131a, #f4f5f7);
  --text-muted: light-dark(#515a69, #a0a6b4);
  --text-faint: light-dark(#5e6675, #6b7180);

  /* Brand */
  --accent: #e03a3c; /* primary brand red */
  --accent-2: #ff6b4a; /* warm secondary (gradients/large) */
  --accent-ink: light-dark(#c12d1a, #ff6b4a); /* accent for small text — contrast-safe */
  --violet: #6d5dfc; /* gradient-only */
  --cyan: light-dark(#0d9488, #2dd4bf);
  --accent-glow: light-dark(rgba(224, 58, 60, 0.2), rgba(224, 58, 60, 0.35));

  /* Lines & glass */
  --border: light-dark(rgba(16, 19, 26, 0.1), rgba(255, 255, 255, 0.08));
  --border-strong: light-dark(rgba(16, 19, 26, 0.18), rgba(255, 255, 255, 0.16));
  --glass: light-dark(rgba(16, 19, 26, 0.03), rgba(255, 255, 255, 0.03));

  /* Theme-dependent surfaces & effects */
  --grid-line: light-dark(rgba(16, 19, 26, 0.05), rgba(255, 255, 255, 0.04));
  --dot: light-dark(rgba(16, 19, 26, 0.06), rgba(255, 255, 255, 0.05));
  --sheen: light-dark(rgba(16, 19, 26, 0.05), rgba(255, 255, 255, 0.14));
  --ghost-hover: light-dark(rgba(16, 19, 26, 0.05), rgba(255, 255, 255, 0.06));
  --header-bg: light-dark(rgba(246, 247, 251, 0.8), rgba(10, 11, 15, 0.72));
  --nav-mobile-bg: light-dark(rgba(246, 247, 251, 0.98), rgba(10, 11, 15, 0.97));
  --logo-filter: light-dark(
    grayscale(1) brightness(0.5) contrast(1.1),
    grayscale(1) brightness(2.2)
  );

  /* Type */
  --font-display: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-900: clamp(2.5rem, 1.6rem + 4.2vw, 4.6rem);
  --fs-800: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --fs-700: clamp(1.6rem, 1.25rem + 1.6vw, 2.3rem);
  --fs-600: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  --fs-500: 1.25rem;
  --fs-400: 1.0625rem;
  --fs-300: 0.9375rem;
  --fs-200: 0.8125rem;

  /* Spacing ramp (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radius */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-1: light-dark(0 1px 2px rgba(16, 19, 26, 0.08), 0 1px 2px rgba(0, 0, 0, 0.4));
  --shadow-2: light-dark(0 12px 30px rgba(16, 19, 26, 0.1), 0 12px 30px rgba(0, 0, 0, 0.45));
  --shadow-3: light-dark(0 24px 55px rgba(16, 19, 26, 0.14), 0 28px 60px rgba(0, 0, 0, 0.55));
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 50px var(--accent-glow);

  /* Layout */
  --container: min(1200px, 92vw);
  --container-narrow: min(760px, 92vw);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 600ms;
}

/* Forced theme overrides (set by the toggle / saved preference) */
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
  padding: 0;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--fs-800);
}
h3 {
  font-size: var(--fs-600);
}
p {
  color: var(--text-muted);
}

.gradient-text {
  background: linear-gradient(100deg, var(--accent-2) 0%, var(--accent) 40%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-200);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ---------- Layout ---------- */
.container {
  width: var(--container);
  margin-inline: auto;
}
.section {
  padding-block: clamp(64px, 8vw, 128px);
  position: relative;
}
.section--tight {
  padding-block: clamp(40px, 5vw, 72px);
}
.section-head {
  max-width: 720px;
  margin-bottom: var(--space-7);
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head p {
  margin-top: var(--space-4);
  font-size: var(--fs-500);
  color: var(--text-muted);
}

.section--alt {
  background: var(--bg-soft);
}
.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* Subtle dot-grid texture for depth */
.dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.section > .container {
  position: relative;
  z-index: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-300);
  border-radius: var(--radius-pill);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
  will-change: transform;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: var(--shadow-glow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 22px 60px var(--accent-glow);
}
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--glass);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--text-faint);
  background: var(--ghost-hover);
}
.btn-lg {
  padding: 17px 34px;
  font-size: var(--fs-400);
}
.btn-block {
  width: 100%;
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--fs-300);
}
.textlink svg {
  width: 15px;
  height: 15px;
  transition: transform var(--dur) var(--ease);
}
.textlink:hover svg {
  transform: translateX(4px);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    backdrop-filter var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.brand span b {
  color: var(--accent-ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}
.nav-links a:not(.btn) {
  font-size: var(--fs-300);
  color: var(--text-muted);
  font-weight: 600;
  transition: color var(--dur) var(--ease);
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn).active {
  color: var(--text);
}
.nav-cta {
  margin-left: var(--space-2);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
}
.nav-toggle .icon-close {
  display: none;
}

/* Theme toggle (dark / light / system) */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--glass);
  transition:
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--ghost-hover);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  display: none;
}
.theme-toggle .i-system {
  display: block;
} /* default before JS assigns a mode */
.theme-toggle[data-mode] .i-system,
.theme-toggle[data-mode] .i-light,
.theme-toggle[data-mode] .i-dark {
  display: none;
}
.theme-toggle[data-mode="system"] .i-system,
.theme-toggle[data-mode="light"] .i-light,
.theme-toggle[data-mode="dark"] .i-dark {
  display: block;
}
/* Pre-JS: reflect the saved forced theme on the icon before app.js sets data-mode */
:root[data-theme="dark"] .theme-toggle:not([data-mode]) .i-system,
:root[data-theme="light"] .theme-toggle:not([data-mode]) .i-system {
  display: none;
}
:root[data-theme="dark"] .theme-toggle:not([data-mode]) .i-dark {
  display: block;
}
:root[data-theme="light"] .theme-toggle:not([data-mode]) .i-light {
  display: block;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-3) 0 var(--space-5);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--dur) var(--ease),
      opacity var(--dur) var(--ease);
  }
  .nav-links a:not(.btn) {
    padding: 14px 4vw;
    font-size: var(--fs-500);
    border-bottom: 1px solid var(--border);
  }
  .nav-links .nav-cta {
    margin: var(--space-4) 4vw 0;
  }
  .nav-links .nav-cta .btn {
    width: 100%;
  }
  .site-header.menu-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-header.menu-open .nav-toggle .icon-open {
    display: none;
  }
  .site-header.menu-open .nav-toggle .icon-close {
    display: block;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 160px;
  padding-bottom: clamp(80px, 10vw, 150px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* Mesh gradient */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(40% 50% at 18% 18%, rgba(224, 58, 60, 0.3), transparent 60%),
    radial-gradient(45% 55% at 82% 12%, rgba(109, 93, 252, 0.26), transparent 60%),
    radial-gradient(50% 50% at 60% 70%, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(40% 40% at 30% 80%, rgba(255, 107, 74, 0.18), transparent 60%);
  filter: blur(10px);
  animation: meshDrift 22s var(--ease) infinite alternate;
}
/* Grain overlay (SVG turbulence) */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 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% 35%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 70%);
}
@keyframes meshDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-3%, 2%, 0) scale(1.08);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
}
.hero h1 {
  font-size: var(--fs-900);
  margin-top: var(--space-5);
}
.hero .lead {
  font-size: var(--fs-500);
  margin-top: var(--space-5);
  max-width: 640px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-7);
  color: var(--text-faint);
  font-size: var(--fs-200);
}
.hero-trust .logos {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.hero-trust img {
  height: 26px;
  width: auto;
  opacity: 0.8;
  filter: var(--logo-filter);
  transition:
    filter var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.hero-trust img:hover {
  filter: none;
  opacity: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  border: 1px solid var(--border-strong);
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}
.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* ---------- Hero two-column + code-editor visual (AI · coding · product) ---------- */
.hero-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
.hero-cols .hero-inner {
  max-width: none;
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Ambient glow merges the visual into the hero (no hard frame) */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 42% at 62% 32%, var(--accent-glow), transparent 70%),
    radial-gradient(40% 40% at 28% 82%, rgba(109, 93, 252, 0.18), transparent 70%);
  filter: blur(14px);
}

/* Code editor */
.hv-code {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  box-shadow: var(--shadow-3);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --c-key: light-dark(#7c3aed, #c4b5fd);
  --c-fn: light-dark(#c2410c, #ffb088);
  --c-prop: light-dark(#0e7490, #5fd0e6);
}
.hv-code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: light-dark(rgba(16, 19, 26, 0.02), rgba(255, 255, 255, 0.02));
}
.hv-code-bar .d {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}
.hv-code-bar .d:nth-child(1) {
  background: #ff5f57;
}
.hv-code-bar .d:nth-child(2) {
  background: #febc2e;
}
.hv-code-bar .d:nth-child(3) {
  background: #28c840;
}
.hv-file {
  margin-left: 8px;
  font-size: var(--fs-200);
  color: var(--text-muted);
}
.hv-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-200);
  font-weight: 700;
  color: var(--accent-ink);
}
.hv-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: hvblink 2s ease-in-out infinite;
}
.hv-code-body {
  margin: 0;
  padding: 24px 26px 28px;
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 2.05;
  color: var(--text-muted);
  white-space: pre;
  overflow: hidden;
}
.hv-code-body .cl {
  display: block;
}
.c-key {
  color: var(--c-key);
  font-weight: 600;
}
.c-fn {
  color: var(--c-fn);
}
.c-prop {
  color: var(--c-prop);
}
.c-com {
  color: var(--text-faint);
  font-style: italic;
}
.hv-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--accent-2);
  animation: hvcaret 1.1s steps(1) infinite;
}
.hv-tip {
  position: absolute;
  z-index: 2;
  bottom: 9%;
  right: -5%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-200);
  font-weight: 700;
  color: var(--text);
  background: var(--bg-elev);
  box-shadow: var(--shadow-2);
  animation: hvfloat 6s var(--ease) infinite;
}
.hv-tip .hv-spark {
  color: var(--accent-2);
}
@keyframes hvcaret {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}
@keyframes hvblink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes hvfloat {
  50% {
    transform: translateY(-8px);
  }
}
@media (max-width: 900px) {
  .hero-cols {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
}

/* ---------- Logos band ---------- */
.logos-band {
  padding-block: var(--space-7);
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
}
.logos-band p {
  text-align: center;
  font-size: var(--fs-200);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-5);
}
.logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
}
.logos-row img {
  height: 38px;
  width: auto;
  opacity: 0.7;
  filter: var(--logo-filter);
  transition:
    filter var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.logos-row img:hover {
  opacity: 1;
  filter: none;
}

/* ---------- Cards (shared) ---------- */
.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--sheen), transparent 40%);
  -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 var(--dur) var(--ease);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-3);
}
.card:hover::before {
  opacity: 1;
}

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

.service-card .ico {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  background: radial-gradient(
    120% 120% at 30% 20%,
    rgba(255, 107, 74, 0.22),
    rgba(109, 93, 252, 0.16)
  );
  border: 1px solid var(--border-strong);
  color: var(--accent-ink);
}
.service-card .ico svg {
  width: 26px;
  height: 26px;
}
.service-card h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--space-3);
}
.service-card p {
  font-size: var(--fs-300);
}
.service-card .textlink {
  margin-top: var(--space-4);
}

/* Featured (full-width) service */
.service-feature {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-6);
}
.service-feature .ico {
  margin-bottom: 0;
}
.service-feature h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--space-2);
}
.service-feature p {
  font-size: var(--fs-300);
  margin: 0;
  max-width: 78ch;
}
.service-feature .btn {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .service-feature {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .service-feature .btn {
    justify-self: start;
  }
}

/* ---------- Why AI-native / Beyond SaaS comparison ---------- */
.compare {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.compare.is-new {
  box-shadow:
    var(--shadow-3),
    0 0 0 1px var(--accent-glow);
}
.compare-title {
  font-size: var(--fs-500);
}
.compare-title.old {
  color: var(--text-muted);
}
.compare-title.new {
  color: var(--accent-ink);
}
.compare-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.compare-list li {
  position: relative;
  padding-left: 30px;
  font-size: var(--fs-300);
  color: var(--text-muted);
}
.compare-list li::before {
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 800;
}
.compare-list.old li::before {
  content: "–";
  color: var(--text-faint);
}
.compare-list.new li {
  color: var(--text);
}
.compare-list.new li::before {
  content: "✓";
  color: var(--accent-ink);
}

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}
.process-step {
  position: relative;
  padding-top: var(--space-6);
}
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--border-strong);
  display: block;
  margin-bottom: var(--space-3);
}
.process-step h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--space-2);
}
.process-step p {
  font-size: var(--fs-300);
}
.process-step::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 64px;
  right: -12px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.process-step:last-child::after {
  display: none;
}

/* ---------- Work / Case studies ---------- */
.work-card {
  display: flex;
  flex-direction: column;
  padding: 0;
}
.work-art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.work-art .mesh {
  position: absolute;
  inset: 0;
}
.work-art .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
}
.work-art .work-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, rgba(10, 11, 15, 0.42), rgba(10, 11, 15, 0.78));
}
.work-art .work-logo {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 2;
  width: auto;
  height: auto;
  max-width: 62%;
  max-height: 44%;
  object-fit: contain;
}
.work-art .work-logo.is-icon {
  width: 82px;
  height: 82px;
  max-width: 82px;
  max-height: 82px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.work-art .work-logo.is-invert {
  filter: brightness(0) invert(1);
}
.work-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.work-body h3 {
  font-size: var(--fs-500);
}
.work-body p {
  font-size: var(--fs-300);
}
/* (work-metric styles removed — work cards use .work-foot) */
.work-card .work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--fs-300);
}
.work-card .work-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur) var(--ease);
}
.work-card .work-link:hover svg {
  transform: translate(3px, -3px);
}
.work-foot {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.work-group {
  margin-top: var(--space-7);
}
.work-group-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.work-group-label h3 {
  font-size: var(--fs-500);
  white-space: nowrap;
}
.work-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-200);
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.work-art .tag-soon {
  left: auto;
  right: 14px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
}
.work-body p strong {
  color: var(--text);
  font-weight: 700;
}

/* Mesh art variants for case cards */
.mesh-a {
  background:
    radial-gradient(70% 90% at 20% 10%, rgba(224, 58, 60, 0.7), transparent 60%),
    radial-gradient(70% 90% at 90% 80%, rgba(109, 93, 252, 0.6), transparent 60%), #14111b;
}
.mesh-b {
  background:
    radial-gradient(70% 90% at 15% 20%, rgba(45, 212, 191, 0.55), transparent 60%),
    radial-gradient(70% 90% at 85% 85%, rgba(109, 93, 252, 0.6), transparent 60%), #0f1320;
}
.mesh-c {
  background:
    radial-gradient(70% 90% at 80% 15%, rgba(255, 107, 74, 0.6), transparent 60%),
    radial-gradient(70% 90% at 10% 90%, rgba(224, 58, 60, 0.55), transparent 60%), #1a1116;
}
.mesh-d {
  background:
    radial-gradient(70% 90% at 25% 80%, rgba(109, 93, 252, 0.6), transparent 60%),
    radial-gradient(70% 90% at 85% 10%, rgba(45, 212, 191, 0.5), transparent 60%), #101522;
}
.mesh-e {
  background:
    radial-gradient(70% 90% at 20% 15%, rgba(109, 93, 252, 0.7), transparent 60%),
    radial-gradient(70% 90% at 90% 85%, rgba(255, 107, 74, 0.5), transparent 60%), #160f1f;
}
.mesh-f {
  background:
    radial-gradient(70% 90% at 80% 20%, rgba(45, 212, 191, 0.6), transparent 60%),
    radial-gradient(70% 90% at 15% 85%, rgba(224, 58, 60, 0.5), transparent 60%), #0f1620;
}
.mesh-g {
  background:
    radial-gradient(70% 90% at 25% 20%, rgba(255, 107, 74, 0.65), transparent 60%),
    radial-gradient(70% 90% at 85% 80%, rgba(45, 212, 191, 0.55), transparent 60%), #1a1411;
}
.mesh-h {
  background:
    radial-gradient(70% 90% at 80% 15%, rgba(109, 93, 252, 0.6), transparent 60%),
    radial-gradient(70% 90% at 20% 90%, rgba(224, 58, 60, 0.5), transparent 60%), #131022;
}

/* ---------- Stats ---------- */
.stats-band {
  position: relative;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-block: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .num .gradient-text {
  display: inline;
}
.stat .lbl {
  margin-top: var(--space-3);
  font-size: var(--fs-300);
  color: var(--text-muted);
}

/* ---------- Booking ---------- */
.booking-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-7);
  align-items: stretch;
}
.founder-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.founder-photo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, var(--bg-elev-2), var(--bg-elev)); /* placeholder bg */
}
.founder-card .role {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--fs-300);
}
.founder-card .bio {
  font-size: var(--fs-400);
}
.founder-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--fs-300);
  color: var(--text-muted);
}
.founder-meta a {
  color: var(--text);
}
.booking-widget {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-7);
  overflow: hidden;
}
.booking-widget .calendly-inline-widget {
  width: 100%;
  min-height: 640px;
}
.booking-fallback .hint {
  font-size: var(--fs-200);
  color: var(--text-faint);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
}
.faq-item[open] {
  border-color: var(--border-strong);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-500);
  color: var(--text);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary .chev {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent-ink);
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary .chev {
  transform: rotate(45deg);
}
.faq-item .answer {
  padding: 0 var(--space-5) var(--space-5);
}
.faq-item .answer p {
  font-size: var(--fs-300);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(50% 70% at 50% 0%, rgba(224, 58, 60, 0.22), transparent 60%),
    radial-gradient(40% 60% at 80% 100%, rgba(109, 93, 252, 0.18), transparent 60%);
}
.cta-band .container {
  position: relative;
  z-index: 1;
}
.cta-band h2 {
  max-width: 720px;
  margin-inline: auto;
}
.cta-band p {
  max-width: 560px;
  margin: var(--space-4) auto 0;
  font-size: var(--fs-500);
}
.cta-band .hero-actions {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding-block: var(--space-8) var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-7);
}
.footer-brand .brand {
  margin-bottom: var(--space-4);
}
.footer-brand p {
  font-size: var(--fs-300);
  max-width: 340px;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-200);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a,
.footer-col li {
  font-size: var(--fs-300);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-200);
  color: var(--text-faint);
}
.social {
  display: flex;
  gap: var(--space-3);
}
.social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.social a:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.social svg {
  width: 18px;
  height: 18px;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
.back-to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-d1 {
  transition-delay: 0.08s;
}
.reveal-d2 {
  transition-delay: 0.16s;
}
.reveal-d3 {
  transition-delay: 0.24s;
}
.reveal-d4 {
  transition-delay: 0.32s;
}

/* ---------- Legal pages (light reskin base) ---------- */
.legal {
  padding-top: 120px;
  padding-bottom: var(--space-9);
}
.legal .container {
  max-width: var(--container-narrow);
}
.legal h1 {
  font-size: var(--fs-800);
  margin-bottom: var(--space-3);
}
.legal h2 {
  font-size: var(--fs-600);
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
}
.legal h3 {
  font-size: var(--fs-500);
  margin-top: var(--space-5);
}
.legal p,
.legal li {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.legal a {
  color: var(--accent-ink);
}
.legal .updated {
  color: var(--text-faint);
  font-size: var(--fs-300);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-step::after {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-7) var(--space-5);
  }
  .booking-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 130px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

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