/* ================= Design tokens ================= */
:root {
  --bg: #0a0e17;
  --surface: #111625;
  --surface-2: #171e35;
  --ink: #eef0fa;
  --ink-soft: #b7bcd6;
  --muted: #8790b3;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Brand palette lifted directly from the TechKonnect Africa logo:
     navy (continent top), gold (continent sweep), green (continent base). */
  --brand-navy: #0b3d6e;
  --brand-gold: #eab308;
  --brand-green: #16a34a;

  --accent: #eab308;
  --accent-2: #22c55e;
  --accent-3: #3b82f6;
  --accent-grad: linear-gradient(120deg, var(--accent-3) 0%, var(--accent) 55%, var(--accent-2) 100%);
  --on-accent: #14210a;

  --success: #22c55e;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);

  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(234, 179, 8, 0.35), 0 0 40px rgba(234, 179, 8, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-fast: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1180px;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f1f8;
  --ink: #12131f;
  --ink-soft: #3a3f58;
  --muted: #666c8a;
  --line: #e7e8f2;
  --line-strong: #d7d9ea;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.06);
  --shadow-md: 0 12px 32px rgba(20, 20, 40, 0.08);
  --shadow-lg: 0 24px 64px rgba(20, 20, 40, 0.12);
  --glow: 0 0 0 1px rgba(11, 61, 110, 0.18), 0 0 40px rgba(11, 61, 110, 0.1);

  --accent: #ca8a04;
  --accent-2: #15803d;
  --accent-3: #0b3d6e;
  --on-accent: #ffffff;
}

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

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid var(--bg); }

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 108px 0; position: relative; }
.section-head { max-width: 640px; margin: 0 0 56px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent-grad); border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ================= Reveal-on-scroll ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { transition-delay: calc(var(--i, 0) * 70ms); }

/* ================= Header ================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 18px 0;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }
.brand-icon { height: 38px; width: auto; display: block; }
.brand span { color: var(--accent-2); }

.site-header nav { display: flex; align-items: center; gap: 30px; }
.site-header nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 6px 0; transition: color 0.2s var(--ease-fast);
}
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent-grad); border-radius: 2px; transition: right 0.28s var(--ease);
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(12deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; border-radius: var(--radius-sm);
}
.nav-toggle span { height: 2px; width: 22px; background: var(--ink); border-radius: 2px; margin: 0 auto; transition: transform 0.25s var(--ease), opacity 0.2s ease; }

.nav-mobile-actions { display: none; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.96rem; cursor: pointer; border: none;
  transition: transform 0.2s var(--ease-fast), box-shadow 0.25s var(--ease-fast), background 0.2s var(--ease-fast), color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent-grad); color: var(--on-accent); box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(234,179,8,.5), 0 20px 40px rgba(234,179,8,.3); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ================= Hero ================= */
.hero {
  padding: 168px 0 120px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: -10% -10% auto -10%; height: 130%;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.32), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(234, 179, 8, 0.28), transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(34, 197, 94, 0.24), transparent 45%);
  filter: blur(10px);
  animation: hero-drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}
.hero .container { position: relative; }
.hero-eyebrow-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.hero-eyebrow-badge .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 8px var(--success); }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.08;
  max-width: 20ch;
  margin: 0 auto 24px;
}
.hero p.lede {
  max-width: 56ch; margin: 0 auto 40px; color: var(--muted); font-size: 1.14rem;
}
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 88px; }

.hero-mockups { position: relative; max-width: 920px; margin: 0 auto; }
.mockup-glow {
  position: absolute; inset: -14% -8%; z-index: 0;
  background: var(--accent-grad); filter: blur(70px); opacity: 0.32;
  border-radius: 50%; animation: glow-pulse 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.26; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.06); }
}
.mockup-frame {
  position: relative; z-index: 1; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transition: transform 0.15s ease-out; will-change: transform;
}
.mockup-bar { display: flex; align-items: center; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mockup-bar span { width: 10px; height: 10px; border-radius: 999px; background: var(--line-strong); flex-shrink: 0; }
.mockup-bar span:nth-child(1) { background: #f87171; }
.mockup-bar span:nth-child(2) { background: #fbbf24; }
.mockup-bar span:nth-child(3) { background: #34d399; }
.mockup-bar-url {
  margin-left: 8px; flex: 1; max-width: 260px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 5px 14px; font-size: 0.72rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.mockup-bar-url .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0;
  box-shadow: 0 0 6px var(--success); animation: live-blink 2s ease-in-out infinite;
}
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.mockup-screen {
  aspect-ratio: 16/9;
  background:
    linear-gradient(160deg, var(--surface-2), var(--surface)),
    repeating-linear-gradient(120deg, rgba(234,179,8,.07) 0 2px, transparent 2px 40px);
  display: grid;
  grid-template-columns: 210px 1fr;
}
.mockup-screen .side { border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 16px; }
.side-item { display: flex; align-items: center; gap: 10px; }
.side-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.side-item i { display: block; height: 9px; border-radius: 5px; background: var(--line-strong); flex: 1; transition: opacity 0.3s ease; }
.side-item.active .side-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.side-item.active i { background: var(--accent-grad); opacity: 0.85; }
.mockup-screen .main { padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.mockup-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mockup-kpis div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.mockup-kpis i { display: block; width: 50%; height: 8px; border-radius: 4px; background: var(--line-strong); margin-bottom: 10px; }
.mockup-kpis b { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-2); }
.mockup-chart { flex: 1; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); position: relative; overflow: hidden; padding: 10px; }
.mockup-chart-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-line {
  stroke-dasharray: 440; stroke-dashoffset: 440;
  transition: stroke-dashoffset 1.7s var(--ease) 0.3s;
}
.reveal.is-visible .chart-line { stroke-dashoffset: 0; }
.chart-area { opacity: 0; transition: opacity 1.1s ease 1s; }
.reveal.is-visible .chart-area { opacity: 1; }
.chart-dot {
  opacity: 0; transform: scale(0.4); transform-origin: center;
  transition: opacity 0.4s ease 1.9s, transform 0.4s var(--ease) 1.9s;
}
.reveal.is-visible .chart-dot { opacity: 1; transform: scale(1); }

.mockup-badge {
  position: absolute; top: -22px; left: -26px; z-index: 2;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
  animation: float-y 5.6s ease-in-out infinite; animation-delay: -2.4s;
}
.mockup-badge-stars { color: #fbbf24; font-size: 0.85rem; letter-spacing: 1px; }
.mockup-badge-text { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; }
.mockup-badge-text strong { color: var(--ink); font-family: var(--font-display); }

.mockup-phone {
  position: absolute; right: -6%; bottom: -14%; width: 190px; z-index: 2;
  border-radius: 32px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg); padding: 10px;
  animation: float-y 5s ease-in-out infinite;
}
.mockup-phone .phone-screen { aspect-ratio: 9/18; border-radius: 22px; background: var(--surface-2); padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.mockup-phone .phone-screen i { display: block; height: 8px; border-radius: 4px; background: var(--line-strong); }
.mockup-phone .phone-screen i:nth-child(1) { width: 40%; background: var(--accent-2); }
.mockup-phone .bubble { margin-top: auto; background: var(--accent-grad); border-radius: 12px; padding: 10px; font-size: 0.6rem; color: var(--on-accent); font-weight: 600; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ================= Social proof ================= */
.proof-strip { padding: 0 0 64px; }
.proof-badges { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center; margin-bottom: 48px; }
.proof-badges span { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.94rem; color: var(--ink-soft); }
.proof-badges svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }
.logo-row {
  display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.logo-row .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--muted); opacity: 0.75; transition: opacity 0.2s ease, color 0.2s ease; }
.logo-row .wordmark:hover { opacity: 1; color: var(--ink); }

/* ================= Before / After ================= */
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.ba-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color .35s;
}
.ba-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.ba-compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 20px; }
.ba-frame { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.ba-frame .tag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; }
.ba-frame.old .tag { background: rgba(248,113,113,.12); color: #f87171; }
.ba-frame.new .tag { background: rgba(52,211,153,.12); color: #34d399; }
.ba-frame .skeleton { height: 96px; background: var(--surface-2); padding: 10px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.ba-frame.old .skeleton i { display: block; height: 7px; border-radius: 4px; background: var(--line-strong); opacity: .7; }
.ba-frame.old .skeleton i:nth-child(1) { width: 70%; } .ba-frame.old .skeleton i:nth-child(2) { width: 90%; } .ba-frame.old .skeleton i:nth-child(3) { width: 50%; }
.ba-frame.new .ba-thumb { display: block; width: 100%; height: 96px; object-fit: cover; object-position: top; }
.ba-arrow { color: var(--accent-2); }
.ba-card h4 { font-size: 1.05rem; margin-bottom: 14px; }
.ba-results { display: flex; flex-direction: column; gap: 10px; }
.ba-results div { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.ba-results b { color: var(--success); font-family: var(--font-display); }

/* ================= Services ================= */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow .35s ease;
}
.service-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s ease;
  background: radial-gradient(circle at 30% 0%, rgba(99,102,241,.18), transparent 60%);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 50px; height: 50px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); margin-bottom: 20px; position: relative;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 1.12rem; margin-bottom: 10px; position: relative; }
.service-card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 6px; position: relative; }
.service-card li::before { content: "—"; color: var(--accent-2); margin-right: 8px; }

/* ================= Pricing calculator ================= */
.calculator {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-md);
}
.calc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.calc-group { margin-bottom: 26px; }
.calc-group:last-child { margin-bottom: 0; }
.calc-group > label { display: block; font-weight: 600; margin-bottom: 12px; font-size: 0.94rem; }
.pill-options { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-option input { position: absolute; opacity: 0; pointer-events: none; }
.pill-option span {
  display: inline-flex; align-items: center; padding: 11px 20px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s var(--ease-fast); color: var(--ink-soft);
}
.pill-option input:checked + span { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: var(--glow); }
.pill-option:hover span { border-color: var(--accent); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row span { font-size: 0.94rem; color: var(--ink-soft); }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--surface-2); border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); transition: background 0.2s ease, border-color .2s ease; cursor: pointer; }
.switch .track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 2px; background: var(--muted); border-radius: 50%; transition: transform 0.25s var(--ease), background .2s; }
.switch input:checked + .track { background: var(--accent-grad); border-color: transparent; }
.switch input:checked + .track::before { transform: translateX(20px); background: #fff; }

.calc-result {
  position: sticky; top: 110px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 30px; text-align: center;
}
.calc-result .label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.calc-result .price { font-family: var(--font-display); font-size: 2.1rem; margin-bottom: 6px; }
.calc-result .price-note { font-size: 0.84rem; color: var(--muted); margin-bottom: 24px; }
.calc-lead-form { display: none; flex-direction: column; gap: 12px; text-align: left; margin-top: 20px; }
.calc-lead-form.is-open { display: flex; }

/* ================= Forms (shared) ================= */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 0.88rem; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink);
  font-family: inherit; font-size: 0.95rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.15);
}
.field textarea { resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: 0.82rem; margin-top: 10px; }
.form-note.ok { color: var(--success); }
.form-note.err { color: var(--danger); }

/* ================= Process timeline ================= */
.timeline { position: relative; max-width: 760px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); }
.timeline-step { position: relative; padding: 0 0 6px 76px; margin-bottom: 6px; cursor: pointer; }
.timeline-step:last-child { margin-bottom: 0; }
.timeline-num {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line-strong); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--muted); transition: all 0.3s var(--ease); z-index: 1;
}
.timeline-step.is-open .timeline-num { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: var(--glow); }
.timeline-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color 0.2s ease; }
.timeline-step.is-open .timeline-head { border-color: var(--line-strong); }
.timeline-head h4 { font-size: 1.02rem; }
.timeline-chevron { transition: transform 0.3s var(--ease); color: var(--muted); flex-shrink: 0; }
.timeline-step.is-open .timeline-chevron, .faq-item.is-open .timeline-chevron { transform: rotate(180deg); color: var(--accent-2); }
.timeline-body { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.timeline-step.is-open .timeline-body { max-height: 200px; }
.faq-item.is-open .timeline-body { max-height: 320px; }

/* ================= FAQ ================= */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { margin-bottom: 12px; }
.faq-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); cursor: pointer; transition: border-color 0.2s ease;
}
.faq-item.is-open .faq-head { border-color: var(--line-strong); }
.faq-head h3 { font-size: 1rem; font-weight: 600; }

/* ================= Blog ================= */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.blog-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.blog-card .blog-meta { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.blog-card h3 { font-size: 1.15rem; }
.blog-card p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.blog-card .read-more { font-weight: 600; font-size: 0.88rem; }

.article-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.article-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 12px 0 16px; }
.article-meta { color: var(--muted); font-size: 0.88rem; }
.article-body { max-width: 720px; margin: 0 auto; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.8; }
.article-body h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); margin: 40px 0 16px; }
.article-body h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin: 28px 0 12px; }
.article-body p { margin: 0 0 20px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); }
.article-cta {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  padding: 24px 28px; margin: 32px 0; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.article-cta p { margin: 0; font-weight: 600; color: var(--ink); }
@media (max-width: 600px) { .article-cta { flex-direction: column; align-items: flex-start; } }
.timeline-body p { padding: 16px 20px 6px; color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ================= Comparison table ================= */
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.compare-table th, .compare-table td { padding: 18px 24px; text-align: left; font-size: 0.94rem; border-bottom: 1px solid var(--line); }
.compare-table th { font-family: var(--font-display); font-size: 1rem; }
.compare-table thead th:nth-child(2) { color: var(--muted); }
.compare-table thead th:nth-child(3) { background: rgba(99,102,241,.08); color: var(--accent-2); }
.compare-table td:nth-child(3) { background: rgba(99,102,241,.05); font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table .no { color: var(--muted); }
.compare-table .yes { color: var(--success); }

/* ================= Case studies ================= */
.case-tabs { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.case-tab {
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--ink-soft); font-weight: 600; cursor: pointer; transition: all 0.2s var(--ease-fast);
}
.case-tab.is-active { background: var(--accent-grad); border-color: transparent; color: var(--on-accent); box-shadow: var(--glow); }
.case-panel { display: none; }
.case-panel.is-active { display: block; animation: content-in 0.4s var(--ease) both; }
@keyframes content-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.case-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; }
.case-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0 26px; }
.case-meta-grid div span { display: block; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.case-meta-grid div strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-2); }
.case-quote { border-left: 3px solid var(--accent); padding-left: 18px; color: var(--ink-soft); font-style: italic; margin-top: 24px; }
.case-quote footer { margin-top: 10px; font-style: normal; font-size: 0.86rem; color: var(--muted); }
.case-mockup {
  width: 100%; display: block; border-radius: var(--radius-md);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg);
}

/* ================= Team / CEO profile ================= */
.ceo-profile {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; margin-bottom: 32px;
}
.ceo-photo-wrap {
  border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md); position: sticky; top: 110px;
}
.ceo-photo { width: 100%; height: auto; display: block; }
.ceo-bio p { color: var(--ink-soft); margin-bottom: 16px; font-size: 0.98rem; }
.ceo-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.ceo-stats div {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px 18px; text-align: center;
}
.ceo-stats span { display: block; font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-2); margin-bottom: 6px; }
.ceo-stats strong { font-weight: 500; font-size: 0.84rem; color: var(--muted); }

.team-open-card {
  background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg);
  padding: 30px 26px; text-align: center; transition: border-color 0.3s ease, transform 0.3s var(--ease);
}
.team-open-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.team-open-icon {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
}
.team-open-icon svg { width: 24px; height: 24px; }
.team-open-card h3 { font-size: 1rem; margin-bottom: 6px; }

@media (max-width: 900px) {
  .ceo-profile { grid-template-columns: 1fr; }
  .ceo-photo-wrap { position: static; max-width: 320px; margin: 0 auto; }
  .ceo-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ================= Testimonials ================= */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; transition: transform 0.3s var(--ease), box-shadow .3s ease; }
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stars { color: #fbbf24; letter-spacing: 2px; margin-bottom: 14px; font-size: 0.95rem; }
.testimonial-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--on-accent); font-size: 0.9rem; flex-shrink: 0;
}
.testimonial-person strong { display: block; font-size: 0.92rem; }
.testimonial-person span { font-size: 0.82rem; color: var(--muted); }

/* ================= Tech stack ================= */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.stack-chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 22px 14px; text-align: center; cursor: default; transition: all 0.3s var(--ease); position: relative;
}
.stack-chip:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.stack-chip strong { display: block; font-family: var(--font-display); margin-bottom: 6px; font-size: 0.94rem; }
.stack-chip small { color: var(--muted); font-size: 0.76rem; display: block; opacity: 0; max-height: 0; transition: opacity 0.25s ease; }
.stack-chip:hover small { opacity: 1; }

/* ================= Contact ================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px;
}
.contact-links { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.contact-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); transition: border-color 0.2s ease, transform 0.2s ease; }
.contact-link:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-link .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; color: var(--on-accent); flex-shrink: 0; }
.contact-link .ico svg { width: 18px; height: 18px; }
.contact-link strong { display: block; font-size: 0.92rem; }
.contact-link span { font-size: 0.82rem; color: var(--muted); }
.office-hours { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }

/* ================= Final CTA ================= */
.final-cta {
  text-align: center; border-radius: var(--radius-lg); padding: 72px 32px; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
}
.final-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.25), transparent 60%); }
.final-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; position: relative; }
.final-cta p { color: var(--muted); margin-bottom: 32px; position: relative; }
.final-cta .hero-ctas { margin-bottom: 0; position: relative; }

/* ================= Footer ================= */
.site-footer { padding: 48px 0 32px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; margin-bottom: 32px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; margin-top: 12px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 10px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }

/* ================= Counters ================= */
.counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; text-align: center; }
.counter-item strong { display: block; font-family: var(--font-display); font-size: 2.4rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.counter-item span { color: var(--muted); font-size: 0.88rem; }

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .calc-grid, .contact-grid, .case-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  section { padding: 76px 0; }
}
/* ================= Floating contact button ================= */
.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 300;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 14px;
}
.fab-main {
  position: relative;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-grad);
  border: none;
  color: var(--on-accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg), var(--glow);
  transition: transform 0.25s var(--ease);
}
.fab-main:hover { transform: scale(1.06); }
.fab-main svg { width: 24px; height: 24px; position: absolute; transition: opacity 0.2s ease, transform 0.3s var(--ease); }
.fab-icon-close { opacity: 0; transform: rotate(-45deg) scale(0.6); }
.fab-icon-open { opacity: 1; transform: rotate(0) scale(1); }
.fab.is-open .fab-icon-open { opacity: 0; transform: rotate(45deg) scale(0.6); }
.fab.is-open .fab-icon-close { opacity: 1; transform: rotate(0) scale(1); }

.fab-ping {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--accent-2);
  animation: fab-ping 2.4s ease-out infinite;
}
.fab.is-open .fab-ping { display: none; }
@keyframes fab-ping {
  0% { transform: scale(0.85); opacity: 0.8; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}

.fab-options { display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; }
.fab-option {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--fab-c, var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px) scale(0.4);
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.25s ease, border-color 0.2s ease;
  transition-delay: 0s;
}
.fab.is-open .fab-option {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: calc(var(--fab-i, 0) * 45ms);
}
.fab-option:hover { border-color: var(--fab-c, var(--accent)); }
.fab-option svg { width: 20px; height: 20px; }
.fab-tip {
  position: absolute; right: 60px; top: 50%; transform: translateY(-50%);
  background: var(--surface); border: 1px solid var(--line-strong);
  padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.fab-option:hover .fab-tip { opacity: 1; }

@media (max-width: 720px) {
  .fab { right: 16px; bottom: 16px; }
  .fab-main { width: 54px; height: 54px; }
  .fab-tip { display: none; }
}

@media (max-width: 720px) {
  .site-header nav {
    position: fixed; top: 68px; left: 16px; right: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    flex-direction: column; align-items: flex-start; padding: 20px 24px; gap: 16px; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform 0.25s var(--ease), opacity 0.2s ease;
  }
  .site-header nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-header nav { max-height: calc(100vh - 100px); overflow-y: auto; }
  .nav-toggle { display: flex; width: 44px; height: 44px; }
  .nav-actions { display: none; }
  .nav-mobile-actions {
    display: flex; flex-direction: column; gap: 12px;
    width: 100%; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line);
  }
  .nav-mobile-actions .theme-toggle {
    width: 100%; height: 44px; border-radius: var(--radius-sm);
    justify-content: flex-start; gap: 10px; padding: 0 14px;
  }
  .nav-mobile-actions .theme-toggle span { font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
  .brand { font-size: 1.02rem; }
  .brand-icon { height: 32px; }
  .hero { padding-top: 140px; }
  .mockup-phone { display: none; }
  .mockup-badge { display: none; }
  .mockup-screen { grid-template-columns: 1fr; }
  .mockup-screen .side { display: none; }
  /* Prevent iOS Safari from auto-zooming when a field is focused (requires >=16px). */
  .field input, .field textarea, .field select { font-size: 16px; }
  .hero-ctas { margin-bottom: 56px; }
}
