/* ============================================================
   AI Automation Agency — elevated "Trust & Authority" system
   2026 AI / automation aesthetic. Plain CSS, tweak-driven tokens.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --navy: #0b1120;
  --navy-2: #131c30;
  --ink: #020617;
  --heading: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --border: #e7ecf3;
  --border-strong: #d6deea;

  /* Accent — violet (matches TWEAK_DEFAULTS, no flash) */
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-light: #ede9fe;
  --accent-glow: rgba(124, 58, 237, 0.18);
  --accent-ink: #ffffff;

  --font-display: "Lexend", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --section-pad: clamp(72px, 9vw, 132px);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 6px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-density="compact"] {
  --section-pad: clamp(52px, 6vw, 88px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--heading);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

button, a, [role="button"] { cursor: pointer; touch-action: manipulation; }

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

img { max-width: 100%; display: block; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }
.section--alt { background: var(--surface); }
.section--tint { background: var(--surface-alt); }
.section--dark { background: var(--navy); color: #cdd7e6; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
}
.section--dark .eyebrow { color: #7dd3fc; }
.section--dark .eyebrow::before { background: #38bdf8; }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
  margin-top: 18px;
}
.section-sub {
  margin-top: 18px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 60ch;
}
.section-head.center .section-sub { margin-inline: auto; }
.section--dark .section-sub { color: #93a4bd; }

/* dotted automation grid backdrop */
.gridbg::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, rgba(15,23,42,0.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 35%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
.gridbg > * { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(124,58,237,0.3), 0 10px 24px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--accent-glow);
}
.btn--ghost {
  background: var(--surface);
  color: var(--heading);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }
.btn--light {
  background: #fff;
  color: var(--navy);
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.25); }
.btn--outline-light {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.btn--outline-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.5); }
.btn--lg { padding: 17px 30px; font-size: 17px; }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

:root[data-motion="off"] [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
:root[data-motion="off"] .pulse-dot,
:root[data-motion="off"] .flow-pulse,
:root[data-motion="off"] .video__play::after,
:root[data-motion="off"] .pulse-dot::after,
:root[data-motion="off"] .marquee__track { animation: none !important; }

/* Subtle motion: keep reveals + hover + marquee, drop ambient loops */
:root[data-motion="moderate"] .flow-pulse,
:root[data-motion="moderate"] .pulse-dot::after,
:root[data-motion="moderate"] .video__play::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* pulsing live dot */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #22c55e;
  animation: pulsering 2s ease-out infinite;
}
@keyframes pulsering {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248, 250, 252, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(15,23,42,0.02), 0 8px 30px rgba(15,23,42,0.05);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: -0.02em; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #0c4a6e);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
  position: relative; overflow: hidden;
}
.brand__mark svg { width: 19px; height: 19px; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  font-family: var(--font-display);
  font-weight: 500; font-size: 15px; color: var(--body);
  padding: 9px 14px; border-radius: 9px; transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--accent-strong); background: var(--accent-light); }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; background: none; border: 0; padding: 8px; color: var(--ink); }
.nav__burger svg { width: 26px; height: 26px; }

.mobilemenu {
  position: fixed; inset: 70px 0 auto 0; z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px var(--gutter) 24px;
  display: none; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow);
}
.mobilemenu.open { display: flex; }
.mobilemenu a { font-family: var(--font-display); font-weight: 500; padding: 13px 12px; border-radius: 10px; color: var(--heading); }
.mobilemenu a:hover { background: var(--surface-alt); }
.mobilemenu .btn { margin-top: 10px; justify-content: center; }

@media (max-width: 880px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__burger { display: block; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 150px; padding-bottom: clamp(70px, 9vw, 120px); overflow: hidden; }
.hero__glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 620px; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%);
  filter: blur(20px);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 14px 7px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--body);
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 600;
  margin-top: 22px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), #06b6d4 60%, #0e7490);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { margin-top: 24px; font-size: clamp(18px, 1.8vw, 20px); color: var(--muted); max-width: 52ch; }
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__proof { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__avatars { display: flex; }
.hero__avatars span {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--bg);
  margin-left: -10px; background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
  font-family: var(--font-display);
}
.hero__avatars span:first-child { margin-left: 0; }
.hero__proof-txt { font-size: 14.5px; color: var(--muted); }
.hero__proof-txt b { color: var(--heading); }
.stars { color: #f59e0b; letter-spacing: 2px; font-size: 14px; }

/* Hero visual: automation pipeline card */
.pipeline {
  position: relative;
  background: linear-gradient(160deg, #ffffff, #f1f6fb);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.pipeline__bar { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; }
.pipeline__bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e8f0; display: inline-block; }
.pipeline__bar i:nth-child(1){ background:#fca5a5;} .pipeline__bar i:nth-child(2){ background:#fcd34d;} .pipeline__bar i:nth-child(3){ background:#86efac;}
.pipeline__bar span { margin-left: auto; font-family: var(--font-display); font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 7px; }
.flow { display: flex; flex-direction: column; gap: 0; }
.flow__node {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 13px; padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative; z-index: 2;
}
.flow__node .ico {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
}
.flow__node .ico svg { width: 20px; height: 20px; }
.flow__node h4 { font-size: 15px; font-weight: 600; }
.flow__node p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.flow__node .tag { margin-left: auto; font-family: var(--font-display); font-size: 11px; font-weight: 600; color: var(--accent-strong); background: var(--accent-light); padding: 4px 9px; border-radius: 999px; }
.flow__link { height: 26px; width: 2px; background: var(--border-strong); margin-left: 36px; position: relative; z-index: 1; }
.flow__link .flow-pulse {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  animation: flowmove 2.4s var(--ease) infinite;
}
@keyframes flowmove { 0%{ top:-2px; opacity:0;} 25%{opacity:1;} 75%{opacity:1;} 100%{ top: 24px; opacity:0;} }
.pipeline__stat {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; border-radius: 13px; padding: 14px 18px;
}
.pipeline__stat b { font-family: var(--font-display); font-size: 26px; font-weight: 700; display: block; line-height: 1; }
.pipeline__stat small { font-size: 12px; color: #93a4bd; }
.pipeline__stat .badge-save { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #4ade80; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 124px; }
  .pipeline { order: 2; }
}

/* ============================================================
   VIDEO
   ============================================================ */
.video__frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9; background: var(--navy);
}
.video__poster {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #0f1d33, #0b1120);
  display: grid; place-items: center;
}
.video__play {
  width: 92px; height: 92px; border-radius: 50%;
  background: rgba(255,255,255,0.95); border: 0;
  display: grid; place-items: center; color: var(--accent-strong);
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  transition: transform 0.25s var(--ease);
}
.video__play svg { width: 30px; height: 30px; margin-left: 4px; }
.video__play:hover { transform: scale(1.08); }
.video__play::after { content:""; position:absolute; inset:-12px; border-radius:50%; border:2px solid rgba(255,255,255,0.4); animation: pulsering 2.4s ease-out infinite; }
.video__label { position: absolute; left: 20px; bottom: 18px; color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 14px; display:flex; align-items:center; gap:9px; }
.video__dur { position:absolute; right:18px; bottom:18px; background:rgba(0,0,0,0.55); color:#fff; font-size:12px; padding:5px 10px; border-radius:7px; font-variant-numeric:tabular-nums; }

/* ============================================================
   PAIN POINTS
   ============================================================ */
.pain__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pain__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.pain__card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.pain__ico {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: #fef2f2; color: #ef4444;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.pain__ico svg { width: 25px; height: 25px; }
.pain__card:hover .pain__ico { background: var(--accent-light); color: var(--accent-strong); transform: scale(1.06) rotate(-4deg); }
.pain__card h3 { font-size: 20px; margin-top: 20px; font-weight: 600; }
.pain__problem { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.pain__arrow { display:flex; align-items:center; gap:8px; margin-top:16px; font-family:var(--font-display); font-size:13px; font-weight:600; color:var(--accent-strong); }
.pain__arrow svg { width:16px; height:16px; }
.pain__sol { margin-top: 6px; color: var(--body); font-size: 15.5px; font-weight: 500; }

@media (max-width: 820px) { .pain__grid { grid-template-columns: 1fr; } }

/* ============================================================
   SERVICES (bento)
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; grid-auto-rows: 1fr; }
.svc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.svc:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.svc--wide { grid-column: span 2; }
.svc--feature { grid-column: span 2; grid-row: span 2; background: linear-gradient(165deg, var(--navy), var(--navy-2)); color: #cdd7e6; border-color: transparent; }
.svc--feature h3, .svc--feature .svc__num { color: #fff; }
.svc__num { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--faint); letter-spacing: 0.05em; }
.svc__ico {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-light); color: var(--accent-strong); margin-bottom: 18px;
}
.svc__ico svg { width: 24px; height: 24px; }
.svc--feature .svc__ico { background: rgba(56,189,248,0.16); color: #7dd3fc; }
.svc h3 { font-size: 21px; font-weight: 600; margin-bottom: 9px; }
.svc--feature h3 { font-size: 27px; }
.svc p { color: var(--muted); font-size: 15.5px; flex: 1; }
.svc--feature p { color: #93a4bd; font-size: 17px; }
.svc__list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.svc__list li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #cdd7e6; }
.svc__list svg { width: 17px; height: 17px; color: #4ade80; flex-shrink: 0; }
.badge-pop { position: absolute; top: 20px; right: 20px; font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 5px 11px; border-radius: 999px; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .svc--feature, .svc--wide { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .svc--feature, .svc--wide { grid-column: auto; } }

/* ============================================================
   STATS
   ============================================================ */
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after { content:""; position:absolute; right:-14px; top:14%; height:72%; width:1px; background:rgba(255,255,255,0.1); }
.stat__num { font-family: var(--font-display); font-size: clamp(40px, 5vw, 58px); font-weight: 700; color: #fff; line-height: 1; letter-spacing: -0.03em; }
.stat__num .suffix { color: #38bdf8; }
.stat__label { margin-top: 12px; font-size: 15px; color: #93a4bd; }
@media (max-width: 760px) { .stats__grid { grid-template-columns: 1fr 1fr; gap: 40px 20px; } .stat:nth-child(2)::after { display:none; } }

/* ============================================================
   CASE STUDIES
   ============================================================ */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 64px); margin-bottom: clamp(48px, 6vw, 72px); }
.logos__lbl { width: 100%; text-align: center; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--body); margin-bottom: 8px; font-family: var(--font-display); }
.logo-ph { height: 30px; min-width: 110px; border-radius: 7px; background: linear-gradient(90deg, #e2e8f0, #eef2f7); display:grid; place-items:center; font-family:var(--font-display); font-weight:700; color:#475569; font-size:15px; opacity:0.9; transition: opacity 0.2s; }
.logo-ph:hover { opacity: 1; }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  display: flex; flex-direction: column;
}
.case:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.case__img { aspect-ratio: 16/10; position: relative; background:
  repeating-linear-gradient(45deg, #eef2f7 0 12px, #e6ebf2 12px 24px); overflow: hidden; }
.case__img::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(175deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.30) 100%);
  transition: opacity 0.3s;
}
.case__tag { position:absolute; left:14px; top:14px; z-index: 2; background:var(--surface); color:var(--accent-strong); font-family:var(--font-display); font-size:12px; font-weight:600; padding:5px 11px; border-radius:999px; box-shadow:var(--shadow-sm); }
.case__ph-label { position:absolute; inset:0; display:grid; place-items:center; font-family:ui-monospace,monospace; font-size:12px; color:#94a3b8; }
.case__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.case__body h3 { font-size: 19px; font-weight: 600; }
.case__body p { margin-top: 10px; color: var(--muted); font-size: 15px; flex: 1; }
.case__metrics { display: flex; gap: 22px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.case__metric b { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--accent-strong); display: block; line-height: 1; }
.case__metric small { font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) { .cases { grid-template-columns: 1fr; max-width: 460px; margin-inline:auto;} }

/* ============================================================
   ABOUT
   ============================================================ */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.about__media { position: relative; }
.about__photo {
  aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden;
  background: repeating-linear-gradient(45deg, #e6ebf2 0 16px, #eef2f7 16px 32px);
  border: 1px solid var(--border);
  display:grid; place-items:center;
}
.about__photo span { font-family:ui-monospace,monospace; font-size:13px; color:#94a3b8; }
.about__badge {
  position: absolute; bottom: -22px; left: -22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 14px;
}
.about__badge .dotwrap { display:flex; align-items:center; gap:9px; }
.about__badge b { font-family: var(--font-display); font-size: 15px; color: var(--heading); display:block; }
.about__badge small { font-size: 13px; color: var(--muted); }
.about__content h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 600; margin-top: 16px; }
.about__content > p { margin-top: 18px; color: var(--muted); font-size: 17px; }
.about__list { list-style:none; margin: 26px 0 0; padding: 0; display: grid; gap: 16px; }
.about__list li { display: flex; gap: 14px; align-items: flex-start; }
.about__list .chk { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-light); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.about__list .chk svg { width: 15px; height: 15px; }
.about__list b { font-family: var(--font-display); color: var(--heading); font-weight: 600; }
.about__list p { color: var(--muted); font-size: 15px; margin-top: 2px; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } .about__media { max-width: 360px; } .about__badge { left: auto; right: -10px; } }

/* ============================================================
   TECH STACK (marquee)
   ============================================================ */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee + .marquee { margin-top: 18px; }
.marquee__track { display: flex; gap: 16px; width: max-content; animation: scroll-l 38s linear infinite; }
.marquee--rev .marquee__track { animation-name: scroll-r; animation-duration: 46s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll-l { to { transform: translateX(-50%); } }
@keyframes scroll-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.tool {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px;
  padding: 15px 22px; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--heading);
  box-shadow: var(--shadow-sm);
}
.tool__logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; display: block; }
[data-theme="dark"] .tool__logo { filter: brightness(1.25) saturate(1.05); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.tst__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tst {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
.tst:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.tst .stars { font-size: 17px; }
.tst__quote { margin-top: 18px; font-size: 16.5px; color: var(--body); line-height: 1.62; flex: 1; }
.tst__quote::before { content: "“"; font-family: var(--font-display); }
.tst__who { display: flex; align-items: center; gap: 13px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.tst__av { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #cbd5e1, #94a3b8); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; flex-shrink: 0; }
.tst__who b { font-family: var(--font-display); color: var(--heading); font-weight: 600; display: block; font-size: 15.5px; }
.tst__who small { color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) { .tst__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline:auto; } }

/* ============================================================
   BOOKING CTA
   ============================================================ */
.booking { position: relative; overflow: hidden; }
.booking__glow { position:absolute; inset:0; background: radial-gradient(60% 80% at 80% 10%, rgba(56,189,248,0.18), transparent 60%), radial-gradient(50% 60% at 10% 90%, rgba(2,132,199,0.18), transparent 60%); pointer-events:none; }
.booking .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 0.92fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.booking h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 600; }
.booking__sub { margin-top: 20px; font-size: 18px; color: #93a4bd; max-width: 46ch; }
.booking__trust { margin-top: 30px; display: grid; gap: 14px; }
.booking__trust li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #cdd7e6; }
.booking__trust .chk { width: 24px; height: 24px; border-radius: 7px; background: rgba(56,189,248,0.16); color: #7dd3fc; display: grid; place-items: center; flex-shrink: 0; }
.booking__trust svg { width: 14px; height: 14px; }
.calendly {
  background: var(--surface); border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow-lg);
}
.calendly__head { display: flex; align-items: center; gap: 13px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.calendly__head .ava { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #0c4a6e); display:grid; place-items:center; color:#fff; font-family:var(--font-display); font-weight:700; font-size:18px; }
.calendly__head b { font-family: var(--font-display); color: var(--heading); display: block; font-size: 17px; }
.calendly__head small { color: var(--muted); font-size: 14px; }
.calendly__opt { display: grid; gap: 10px; margin: 22px 0; }
.slot {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); border-radius: 12px; padding: 15px 18px;
  font-family: var(--font-display); font-weight: 500; color: var(--heading);
  background: var(--surface); transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.slot:hover, .slot.sel { border-color: var(--accent); background: var(--accent-light); transform: translateX(3px); }
.slot small { color: var(--muted); font-weight: 400; font-size: 13.5px; }
.slot .when { display:flex; align-items:center; gap:11px; }
.slot .when svg { width:18px; height:18px; color: var(--accent-strong); }
.calendly .btn { width: 100%; justify-content: center; }
.calendly__note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 880px) { .booking .wrap { grid-template-columns: 1fr; } }

/* ============================================================
   CONTACT FORM (replaces Calendly widget)
   ============================================================ */
.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

/* Header — reuses .ava + .cform__head from booking */
.cform__head {
  display: flex; align-items: center; gap: 13px;
  padding-bottom: 22px; border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.cform__head .ava {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0c4a6e);
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.cform__head b { font-family: var(--font-display); color: var(--heading); display: block; font-size: 17px; }
.cform__head small { color: var(--muted); font-size: 14px; }

/* Fields */
.cform__body { display: grid; gap: 16px; }
.cform__row { display: grid; gap: 14px; }
.cform__row--2 { grid-template-columns: 1fr 1fr; }

.cform__field { display: flex; flex-direction: column; gap: 7px; }
.cform__field label {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.cform__field input,
.cform__field textarea,
.cform__field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--heading);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 12px 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.cform__field input::placeholder,
.cform__field textarea::placeholder {
  color: var(--faint);
}

.cform__field input:focus,
.cform__field textarea:focus,
.cform__field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--surface);
}

.cform__field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

/* Custom select wrapper */
.cform__select-wrap {
  position: relative;
}
.cform__select-wrap select {
  padding-right: 38px;
  cursor: pointer;
}
.cform__chevron {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
}
.cform__select-wrap:focus-within .cform__chevron { color: var(--accent); }

/* Submit */
.cform__submit {
  width: 100%; justify-content: center; margin-top: 4px;
}

/* Success state */
.cform__success {
  display: none; flex-direction: column; align-items: center;
  text-align: center; gap: 10px; padding: 24px 0 12px;
}
.cform__success[aria-hidden="false"] { display: flex; }
.cform__success-ico {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(34,197,94,0.12); color: #22c55e;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.cform__success-ico svg { width: 26px; height: 26px; }
.cform__success b { font-family: var(--font-display); font-size: 18px; color: var(--heading); }
.cform__success p { font-size: 15px; color: var(--muted); }

/* Note */
.cform__note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 560px) { .cform__row--2 { grid-template-columns: 1fr; } }

/* Dark mode overrides */
[data-theme="dark"] .contact-form {
  background: #0b1424;
  border: 1px solid rgba(148,163,184,0.1);
}
[data-theme="dark"] .cform__head { border-bottom-color: rgba(148,163,184,0.1); }
[data-theme="dark"] .cform__head b { color: #f0f6ff; }
[data-theme="dark"] .cform__head small { color: #5a6b7e; }
[data-theme="dark"] .cform__field label { color: #5a6b7e; }
[data-theme="dark"] .cform__field input,
[data-theme="dark"] .cform__field textarea,
[data-theme="dark"] .cform__field select {
  background: #07101e;
  border-color: rgba(148,163,184,0.13);
  color: #e2eaf5;
}
[data-theme="dark"] .cform__field input::placeholder,
[data-theme="dark"] .cform__field textarea::placeholder { color: #354155; }
[data-theme="dark"] .cform__field input:focus,
[data-theme="dark"] .cform__field textarea:focus,
[data-theme="dark"] .cform__field select:focus {
  background: #0d1829;
  border-color: var(--accent);
}
[data-theme="dark"] .cform__chevron { color: #354155; }
[data-theme="dark"] .cform__note { color: #5a6b7e; }
[data-theme="dark"] .cform__success b { color: #f0f6ff; }
[data-theme="dark"] .cform__success p { color: #5a6b7e; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #060b16; color: #93a4bd; padding-block: clamp(56px, 7vw, 84px) 32px; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand .brand { color: #fff; }
.footer__brand p { margin-top: 18px; font-size: 15px; max-width: 32ch; color: #6b7c95; }
.footer__social { display: flex; gap: 10px; margin-top: 22px; }
.footer__social a { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,0.06); display: grid; place-items: center; color: #cdd7e6; transition: background 0.2s, color 0.2s; }
.footer__social a:hover { background: var(--accent); color: #fff; }
.footer__social svg { width: 18px; height: 18px; }
.footer__col h4 { font-family: var(--font-display); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.footer__col a { display: block; padding: 6px 0; font-size: 15px; color: #93a4bd; transition: color 0.2s; }
.footer__col a:hover { color: #fff; }
.footer__bottom { margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #6b7c95; }
@media (max-width: 820px) { .footer__top { grid-template-columns: 1fr 1fr; gap: 36px; } .footer__brand { grid-column: span 2; } }

/* Reveal stagger utility set by JS via --reveal-delay */

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  color: var(--muted); transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.theme-toggle svg { width: 17px; height: 17px; pointer-events: none; }

.mobile-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  color: var(--heading);
}

/* ============================================================
   SMOOTH THEME TRANSITION (applied briefly on toggle)
   ============================================================ */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.25s ease,
    box-shadow 0.3s ease !important;
}

/* ============================================================
   DARK MODE TOKENS
   ============================================================ */
:root[data-theme="dark"] {
  --bg: #070c18;
  --surface: #0f1829;
  --surface-alt: #111d30;
  --border: rgba(148, 163, 184, 0.09);
  --border-strong: rgba(148, 163, 184, 0.16);
  --ink: #f8fafc;
  --heading: #f0f6ff;
  --body: #8899ae;
  --muted: #5a6b7e;
  --faint: #354155;
  --navy: #030710;
  --navy-2: #050c1c;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 6px rgba(0,0,0,0.4), 0 12px 28px rgba(0,0,0,0.55);
  --shadow-lg: 0 18px 50px rgba(0,0,0,0.7);
  /* accent-light fallback — violet dark variant */
  --accent-light: rgba(124, 58, 237, 0.13);
  --accent-glow: rgba(124, 58, 237, 0.28);
}

/* ============================================================
   DARK MODE COMPONENT OVERRIDES
   ============================================================ */

/* Nav */
[data-theme="dark"] .nav {
  background: rgba(7, 12, 24, 0.8);
}
[data-theme="dark"] .nav.scrolled {
  background: rgba(7, 12, 24, 0.96);
  border-bottom-color: rgba(148, 163, 184, 0.1);
  box-shadow: 0 1px 0 rgba(0,0,0,0.5), 0 8px 30px rgba(0,0,0,0.45);
}
[data-theme="dark"] .nav__links a { color: #8899ae; }
[data-theme="dark"] .nav__links a:hover { color: #7dd3fc; background: rgba(2,132,199,0.10); }
[data-theme="dark"] .mobilemenu {
  background: #09101e;
  border-bottom-color: rgba(148,163,184,0.1);
}
[data-theme="dark"] .mobilemenu a { color: #c4d0de; }
[data-theme="dark"] .mobilemenu a:hover { background: var(--surface-alt); color: #f0f6ff; }

/* Brand mark glow in dark */
[data-theme="dark"] .brand__mark {
  box-shadow: 0 4px 18px rgba(2,132,199,0.45);
}

/* Hero */
[data-theme="dark"] .hero__glow {
  opacity: 0.9;
  filter: blur(28px);
}
[data-theme="dark"] .hero__badge {
  background: #0f1829;
  border-color: rgba(148,163,184,0.14);
  color: #8899ae;
}
[data-theme="dark"] .hero__proof-txt { color: #8899ae; }
[data-theme="dark"] .hero__proof-txt b { color: #c4d0de; }

/* Pipeline card */
[data-theme="dark"] .pipeline {
  background: linear-gradient(155deg, #0d1e38 0%, #091424 100%);
  border-color: rgba(148,163,184,0.12);
}
[data-theme="dark"] .pipeline__bar span { color: #5a6b7e; }
[data-theme="dark"] .flow__node {
  background: #0b1525;
  border-color: rgba(148,163,184,0.1);
}
[data-theme="dark"] .flow__node h4 { color: #f0f6ff; }
[data-theme="dark"] .flow__node p { color: #5a6b7e; }
[data-theme="dark"] .flow__link { background: rgba(148,163,184,0.14); }
[data-theme="dark"] .pipeline__stat {
  background: #030a18;
  border: 1px solid rgba(148,163,184,0.08);
}

/* Dotted grid backdrop */
[data-theme="dark"] .gridbg::before {
  background-image: radial-gradient(circle at center, rgba(148,163,184,0.07) 1px, transparent 1.4px);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 35%, transparent 78%);
}

/* Buttons */
[data-theme="dark"] .btn--ghost {
  background: #0f1829;
  border-color: rgba(148,163,184,0.18);
  color: #c4d0de;
}
[data-theme="dark"] .btn--ghost:hover { border-color: var(--accent); color: #7dd3fc; }

/* Pain points */
[data-theme="dark"] .pain__ico {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
[data-theme="dark"] .pain__card:hover .pain__ico {
  background: rgba(2, 132, 199, 0.14);
  color: #7dd3fc;
}
[data-theme="dark"] .pain__arrow { color: #7dd3fc; }

/* Services bento */
[data-theme="dark"] .svc--feature {
  background: linear-gradient(165deg, #030710 0%, #060e20 100%);
  border-color: rgba(148,163,184,0.08);
}

/* Stats — even deeper to stand apart */
[data-theme="dark"] .section--dark {
  background: linear-gradient(180deg, #030710 0%, #04091c 100%);
}

/* Booking CTA dark section — slightly different from stats */
[data-theme="dark"] .section--dark.booking {
  background: linear-gradient(160deg, #040c1e 0%, #030a18 100%);
}

/* Case studies */
[data-theme="dark"] .case__img {
  background: repeating-linear-gradient(45deg, #0c1728 0 12px, #0a1420 12px 24px);
}
[data-theme="dark"] .case__img::after {
  background: linear-gradient(175deg, rgba(4,6,22,0.18) 0%, rgba(4,6,22,0.58) 100%);
}
[data-theme="dark"] .case__tag {
  background: #0f1829;
  color: #7dd3fc;
}
[data-theme="dark"] .logo-ph {
  background: linear-gradient(90deg, #0f1829, #131e33);
  color: #8899ae;
  border: 1px solid rgba(148,163,184,0.08);
}

/* About */
[data-theme="dark"] .about__photo {
  background: repeating-linear-gradient(45deg, #0c1728 0 16px, #0a1420 16px 32px);
}
[data-theme="dark"] .about__badge {
  background: #0f1829;
  border-color: rgba(148,163,184,0.12);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
[data-theme="dark"] .about__badge b { color: #f0f6ff; }
[data-theme="dark"] .about__badge small { color: #5a6b7e; }

/* Tech stack marquee */
[data-theme="dark"] .tool {
  background: #0f1829;
  border-color: rgba(148,163,184,0.09);
  color: #c4d0de;
}

/* Testimonials */
[data-theme="dark"] .tst__quote { color: #8899ae; }
[data-theme="dark"] .tst__who b { color: #f0f6ff; }

/* Calendly card (inside dark booking section) */
[data-theme="dark"] .calendly {
  background: #0b1424;
  border: 1px solid rgba(148,163,184,0.1);
}
[data-theme="dark"] .calendly__head { border-bottom-color: rgba(148,163,184,0.1); }
[data-theme="dark"] .calendly__head b { color: #f0f6ff; }
[data-theme="dark"] .calendly__head small { color: #5a6b7e; }
[data-theme="dark"] .slot {
  background: #0d1829;
  border-color: rgba(148,163,184,0.1);
  color: #c4d0de;
}
[data-theme="dark"] .slot small { color: #5a6b7e; }
[data-theme="dark"] .slot:hover,
[data-theme="dark"] .slot.sel {
  background: rgba(2, 132, 199, 0.12);
  border-color: var(--accent);
  color: #f0f6ff;
}
[data-theme="dark"] .calendly__note { color: #5a6b7e; }

/* Footer */
[data-theme="dark"] .footer {
  background: #020610;
}
[data-theme="dark"] .footer__bottom {
  border-top-color: rgba(255,255,255,0.06);
}

/* Eyebrow in non-dark sections in dark mode */
[data-theme="dark"] .eyebrow { color: #7dd3fc; }
[data-theme="dark"] .eyebrow::before { background: #38bdf8; }
/* Keep dark-section eyebrow same as before */
[data-theme="dark"] .section--dark .eyebrow { color: #7dd3fc; }

/* Section heads */
[data-theme="dark"] .section-sub { color: #5a6b7e; }

/* Video section */
[data-theme="dark"] .section--alt .video__frame {
  border-color: rgba(148,163,184,0.1);
}

/* Card hover glow in dark */
[data-theme="dark"] .pain__card:hover,
[data-theme="dark"] .svc:hover,
[data-theme="dark"] .case:hover,
[data-theme="dark"] .tst:hover {
  border-color: rgba(2,132,199,0.45);
  box-shadow: 0 18px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(2,132,199,0.15);
}

