/* ==========================================================
   Codify Beta — global stylesheet
   Soft light UI, floating nav, live product mockups.
   ========================================================== */

:root {
  --blue: #2f6bff;
  --blue-600: #1f56e0;
  --blue-soft: #e8efff;
  --cyan: #38c6ff;
  --amber: #ff9d4d;
  --green: #22c55e;
  --navy: #0c1b33;
  --navy-2: #102446;

  /* light (default) */
  --bg: #f2f3f7;
  --bg-2: #eceef4;
  --surface: #ffffff;
  --surface-2: #f6f7fa;
  --line: rgba(13, 20, 38, 0.07);
  --text: #4b546d;
  --muted: #747d95;
  --heading: #0d1426;
  --ink: #0d1426;
  --ink-text: #ffffff;
  --dark: #0c1b33;
  --dark-text: #b7c2da;
  --shadow-sm: 0 1px 2px rgba(13, 20, 38, 0.04), 0 6px 16px -8px rgba(13, 20, 38, 0.12);
  --shadow: 0 2px 4px rgba(13, 20, 38, 0.03), 0 24px 48px -24px rgba(13, 20, 38, 0.22);
  --shadow-lg: 0 40px 80px -30px rgba(13, 20, 38, 0.35);
  --header-bg: rgba(255, 255, 255, 0.82);

  --r-sm: 14px;
  --r: 24px;
  --r-lg: 32px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --f-head: "Outfit", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070f20;
  --bg-2: #0a1428;
  --surface: #0f1c36;
  --surface-2: #132341;
  --line: rgba(255, 255, 255, 0.08);
  --text: #b4bfd8;
  --muted: #8592b0;
  --heading: #f3f6fd;
  --ink: #2f6bff;
  --ink-text: #ffffff;
  --dark: #0b1830;
  --blue-soft: rgba(47, 107, 255, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 18px -10px rgba(0, 0, 0, 0.6);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(15, 28, 54, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-head);
  color: var(--heading);
  line-height: 1.05;
  margin: 0 0 0.45em;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0 0 1em; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.text-grad { color: var(--blue); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--f-mono); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 18px;
}
.eyebrow .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 12px; }
.eyebrow .dot::after { content: ""; position: absolute; left: 13px; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse { 50% { transform: scale(0.55); opacity: 0.6; } }

.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center, .section-head:not(.left) { margin-inline: auto; text-align: center; }
.section-head.left { text-align: left; margin-inline: 0; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 10px 10px 26px; min-height: 58px; border-radius: 999px; border: 0;
  font-weight: 600; font-size: 1rem; white-space: nowrap;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.btn:not(:has(svg)) { padding: 10px 26px; }
.btn svg {
  width: 38px; height: 38px; padding: 10px; border-radius: 50%;
  background: var(--blue); color: #fff; transition: transform 0.35s var(--ease);
}
.btn:hover svg { transform: rotate(-45deg); }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--ink-text); box-shadow: 0 16px 30px -14px rgba(13, 20, 38, 0.6); }
[data-theme="dark"] .btn-primary svg { background: rgba(255, 255, 255, 0.2); }
.btn-ghost { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.btn-ghost svg { background: var(--blue-soft); color: var(--blue); }
.btn-sm { min-height: 46px; padding: 6px 6px 6px 18px; font-size: 0.93rem; gap: 10px; }
.btn-sm:not(:has(svg)) { padding: 8px 20px; }
.btn-sm svg { width: 34px; height: 34px; padding: 9px; }

.pill-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.9rem; color: var(--text);
}
.pill-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 14px 0 auto 0; z-index: 100; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), padding 0.3s var(--ease);
}
.site-header.hidden .nav { transform: translateY(-140%); }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--f-head); font-weight: 800; font-size: 1.32rem; color: var(--heading); letter-spacing: -0.03em; }
.brand-mark { width: auto; height: 38px; transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.mark-light { display: none; }
[data-theme="dark"] .site-header .mark-dark { display: none; }
[data-theme="dark"] .site-header .mark-light { display: block; }
.brand-name { display: inline-flex; align-items: center; gap: 7px; }
.beta-badge {
  display: inline-flex; align-items: center; padding: 3px 8px 3px; border-radius: 7px;
  font-family: var(--f-mono); font-weight: 500; font-size: 0.6em; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.25;
  color: var(--blue); background: var(--blue-soft); border: 1.5px solid rgba(47, 107, 255, 0.45);
  transform: translateY(-1px);
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 9px 16px; border-radius: 999px; font-weight: 500; font-size: 0.97rem; color: var(--text); transition: color 0.25s, background 0.25s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--heading); background: var(--surface-2); }
.nav-links a[aria-current="page"] { font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .menu-toggle {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 0;
  background: var(--surface-2); color: var(--heading); transition: transform 0.35s var(--ease), background 0.3s;
}
.theme-toggle:hover { transform: rotate(25deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; background: var(--ink); color: #fff; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: 0.3s; border-radius: 2px; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; transition: 0.3s; border-radius: 2px; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 170px 0 110px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- particle morph graphic ---------- */
.morph-wrap { position: relative; display: grid; justify-items: center; }
canvas.morph { display: block; width: 100%; max-width: 560px; aspect-ratio: 1; cursor: pointer; touch-action: pan-y; }
.morph-caption {
  display: inline-flex; align-items: center; gap: 12px; margin-top: -10px; padding: 9px 12px 9px 10px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 0.92rem; color: var(--heading);
}
.mc-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); position: relative; flex: none; }
.mc-dot::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.mc-label { font-family: var(--f-head); font-weight: 700; min-width: 11ch; white-space: nowrap; }
.mc-steps { display: flex; gap: 5px; }
.mc-steps button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line); transition: width 0.4s var(--ease), background 0.4s; }
[data-theme="dark"] .mc-steps button { background: rgba(255, 255, 255, 0.18); }
.mc-steps button.on { width: 26px; background: var(--blue); }
.page-morph { position: absolute; right: max(16px, calc((100% - var(--container)) / 2 - 20px)); top: 110px; width: min(40vw, 440px); z-index: 0; }
.page-morph canvas.morph { max-width: none; }
.page-morph .morph-caption { margin-top: -18px; }
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 26px; }
.hero h1 .typed { color: var(--blue); }
/* the typed word gets its own line so changing words never reflow the headline */
.hero h1 .typed-line { display: block; white-space: nowrap; min-height: 1.05em; }
.hero h1 .caret { display: inline-block; width: 5px; height: 0.82em; background: var(--blue); margin-left: 6px; vertical-align: -0.04em; border-radius: 3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 540px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

/* ---------- mockups (shared) ---------- */
.ui {
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  border: 1px solid var(--line); font-size: 0.86rem; color: var(--text);
}
.ui-dash { display: grid; grid-template-columns: 58px 1fr; min-height: 380px; }
.ui-side { background: var(--navy); padding: 18px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ui-side img { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 10px; }
.ui-side i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); }
.ui-side i.on { background: var(--blue); }
.ui-main { padding: 20px; display: grid; gap: 14px; align-content: start; }
.ui-top { display: flex; align-items: center; justify-content: space-between; }
.ui-top strong { font-family: var(--f-head); font-size: 1.05rem; color: var(--heading); }
.live-tag { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--blue); background: var(--blue-soft); padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: dotPulse 1.4s infinite; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.kpi small { display: block; font-size: 0.72rem; color: var(--muted); }
.kpi b { font-family: var(--f-head); font-size: 1.35rem; color: var(--heading); letter-spacing: -0.02em; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.bars span { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--blue), rgba(47, 107, 255, 0.35)); height: var(--h); animation: barLive 4s var(--ease) infinite; animation-delay: var(--d, 0s); transform-origin: bottom; }
@keyframes barLive { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.72); } }
.rows { display: grid; gap: 6px; }
.row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 0.8rem; }
.row code { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.row span { flex: 1; color: var(--heading); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status { font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
.status.run { background: rgba(255, 157, 77, 0.16); color: #e07a1f; }
.status.new { background: var(--blue-soft); color: var(--blue); }

.hero-visual { position: relative; }
.hero-visual .ui-dash { transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform 0.7s var(--ease); }
.hero-visual:hover .ui-dash { transform: none; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: 0.85rem; color: var(--heading); z-index: 2;
  animation: bob 6s ease-in-out infinite;
}
.float-card .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.float-card .ico svg { width: 20px; height: 20px; }
.float-card strong { display: block; font-family: var(--f-head); font-size: 0.98rem; line-height: 1.2; }
.float-card small { color: var(--muted); }
.float-card.f1 { left: -40px; bottom: 40px; }
.float-card.f2 { right: -24px; top: -28px; animation-delay: -3s; }
.float-card.f2 .ico { background: rgba(34, 197, 94, 0.14); color: #16a34a; }
@keyframes bob { 50% { transform: translateY(-12px); } }

/* ---------- who we serve ---------- */
.serve { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: start; }
.serve-tabs { display: grid; gap: 12px; }
.serve-tab {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 2px solid transparent;
  box-shadow: var(--shadow-sm); font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; color: var(--heading);
  overflow: hidden; transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.serve-tab:hover { transform: translateX(4px); }
.serve-tab .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; transition: 0.3s; }
.serve-tab .ico svg { width: 20px; height: 20px; }
.serve-tab .bar { position: absolute; left: 18px; right: 18px; bottom: 8px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; opacity: 0; }
.serve-tab .bar i { display: block; height: 100%; width: 0; background: var(--blue); }
.serve-tab.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.serve-tab.active .ico { background: var(--blue); color: #fff; }
.serve-tab.active .bar { opacity: 1; }
.serve-tab.active .bar i { animation: fill var(--dur, 6s) linear forwards; }
.serve.paused .serve-tab.active .bar i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }

.serve-stage {
  position: relative; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); padding: clamp(24px, 3vw, 36px);
  background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 18px 18px; min-height: 460px;
}
.serve-panel { display: none; }
.serve-panel.active { display: block; animation: fadeUp 0.6s var(--ease); }
.serve-panel > h3 { margin-bottom: 6px; }
.serve-panel > p { color: var(--muted); margin-bottom: 22px; }
.result { margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow-step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; box-shadow: var(--shadow-sm); opacity: 0.45; transform: scale(0.96); }
.serve-panel.active .flow-step { animation: stepOn 0.5s var(--ease) forwards; }
.serve-panel.active .flow-step:nth-child(2) { animation-delay: 0.7s; }
.serve-panel.active .flow-step:nth-child(3) { animation-delay: 1.4s; }
.serve-panel.active .flow-step:nth-child(4) { animation-delay: 2.1s; }
@keyframes stepOn { to { opacity: 1; transform: none; border-color: var(--blue); } }
.flow-step b { display: block; font-family: var(--f-head); color: var(--heading); font-size: 0.98rem; }
.flow-step small { color: var(--muted); font-size: 0.75rem; }
.flow-step .n { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-family: var(--f-mono); font-size: 0.78rem; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.app-chips span { padding: 8px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 0.85rem; color: var(--heading); font-weight: 600; }
.app-chips span small { display: block; font-weight: 400; color: var(--muted); font-size: 0.72rem; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare > div { border-radius: 16px; padding: 16px; background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.compare h4 { font-size: 0.78rem; font-family: var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.bubble { padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); font-size: 0.82rem; margin-bottom: 8px; max-width: 90%; }
.bubble.me { margin-left: auto; border-radius: 14px 14px 4px 14px; background: #fff3e8; color: #9a5214; }
[data-theme="dark"] .bubble.me { background: rgba(255, 157, 77, 0.15); color: #ffb57a; }
.mini-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mini-kpi div { background: var(--surface-2); border-radius: 10px; padding: 8px; }
.mini-kpi small { display: block; font-size: 0.68rem; color: var(--muted); }
.mini-kpi b { font-family: var(--f-head); color: var(--heading); font-size: 1.1rem; }

.feed { display: grid; gap: 8px; }
.feed .row { background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.serve-panel.active .feed .row { animation: slideIn 0.5s var(--ease) both; }
.serve-panel.active .feed .row:nth-child(2) { animation-delay: 0.35s; }
.serve-panel.active .feed .row:nth-child(3) { animation-delay: 0.7s; }
.serve-panel.active .feed .row:nth-child(4) { animation-delay: 1.05s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.chat { display: grid; gap: 10px; }
.chat .msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 0.86rem; box-shadow: var(--shadow-sm); }
.chat .msg.user { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat .msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--heading); }
.chat .msg.bot b { color: var(--blue); }
.serve-panel.active .chat .msg { animation: fadeUp 0.5s var(--ease) both; }
.serve-panel.active .chat .msg:nth-child(2) { animation-delay: 0.8s; }
.serve-panel.active .chat .msg:nth-child(3) { animation-delay: 1.6s; }
.serve-panel.active .chat .msg:nth-child(4) { animation-delay: 2.4s; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dotPulse 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

/* ---------- services (stacked cards) ---------- */
.svc-stack { display: grid; gap: 28px; }
.svc {
  position: sticky; top: 110px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 4.5vw, 56px); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden; min-height: 470px;
}
.svc.dark { background: var(--dark); color: var(--dark-text); border-color: rgba(255, 255, 255, 0.06); }
.svc.dark h3, .svc.dark h2 { color: #fff; }
.svc .count { font-family: var(--f-mono); font-size: 0.82rem; color: var(--blue); letter-spacing: 0.1em; display: block; margin-bottom: 14px; }
.svc.dark .count { color: #7aa2ff; }
.svc h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.svc .lead { font-size: 1.1rem; margin-bottom: 18px; }
.svc .check-list { margin: 0 0 28px; }
.svc.dark .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: none; }
.svc.dark .btn-ghost svg { background: var(--blue); color: #fff; }

.browser { border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b6b; }
.browser-bar i:nth-child(2) { background: #ffc24b; }
.browser-bar i:nth-child(3) { background: #3ccf6e; }
.browser-bar span { margin-left: 10px; flex: 1; background: var(--surface); border-radius: 999px; padding: 4px 12px; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.browser-body { padding: 22px; }
.serp { display: grid; gap: 14px; }
.serp .q { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 0.86rem; color: var(--heading); }
.serp .q::after { content: ""; width: 2px; height: 16px; background: var(--blue); animation: blink 1s steps(1) infinite; }
.serp .res { padding: 14px; border-radius: 14px; }
.serp .res.top { background: var(--blue-soft); outline: 2px solid var(--blue); }
.serp .res small { color: #16a34a; font-size: 0.75rem; }
.serp .res b { display: block; color: #3b5bdb; font-size: 1rem; font-family: var(--f-head); margin: 2px 0; }
[data-theme="dark"] .serp .res b { color: #8fb0ff; }
.serp .res p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.serp .res .badge { float: right; font-family: var(--f-mono); font-size: 0.68rem; background: var(--blue); color: #fff; padding: 2px 8px; border-radius: 999px; }
.serp .ghost-line { height: 10px; border-radius: 6px; background: var(--surface-2); margin: 6px 0; }

.phone {
  width: 250px; margin-inline: auto; border-radius: 38px; padding: 10px; background: #0d1426; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a3550;
}
.phone-screen { border-radius: 30px; background: var(--bg); overflow: hidden; padding: 16px 14px 18px; min-height: 440px; position: relative; }
.phone-notch { width: 90px; height: 22px; background: #0d1426; border-radius: 0 0 14px 14px; margin: -16px auto 12px; }
.phone small { color: var(--muted); font-size: 0.72rem; }
.phone h5 { font-family: var(--f-head); font-size: 1.2rem; color: var(--heading); margin: 0 0 10px; letter-spacing: -0.02em; }
.member { border-radius: 18px; padding: 14px; color: #fff; background: linear-gradient(135deg, var(--blue), #6a5cff); margin-bottom: 12px; }
.member small { color: rgba(255, 255, 255, 0.75); }
.member b { display: block; font-family: var(--f-head); font-size: 1.4rem; }
.ph-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 8px; font-size: 0.78rem; color: var(--heading); }
.ph-item em { font-style: normal; color: var(--muted); display: block; font-size: 0.7rem; }
.ph-item button { border: 0; padding: 5px 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.72rem; font-weight: 600; }
.ph-toast {
  position: absolute; left: 10px; right: 10px; bottom: 14px; padding: 10px 12px; border-radius: 16px; background: var(--ink); color: #fff;
  font-size: 0.76rem; display: flex; gap: 10px; align-items: center; animation: toast 6s var(--ease) infinite;
}
.ph-toast::before { content: ""; width: 28px; height: 28px; border-radius: 9px; background: var(--blue) url("../img/logo.png") center/cover; flex: none; }
@keyframes toast { 0%, 12% { transform: translateY(140%); opacity: 0; } 20%, 80% { transform: none; opacity: 1; } 90%, 100% { transform: translateY(140%); opacity: 0; } }

.svc-mini { margin-top: 28px; }

/* ---------- generic cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; padding: 32px; border-radius: var(--r); background: var(--surface);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.icon-box {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--blue-soft); color: var(--blue); transition: transform 0.4s var(--ease), background 0.3s, color 0.3s;
}
.card:hover .icon-box { background: var(--blue); color: #fff; transform: rotate(-6deg); }
.icon-box svg { width: 25px; height: 25px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); font-size: 0.95rem; }
.card-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.card:hover .card-link svg { transform: translateX(5px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tags li { font-size: 0.78rem; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-family: var(--f-mono); }

.check-list { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: ""; flex: 0 0 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.tab-btn { padding: 10px 20px; border-radius: 999px; border: 0; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); font-weight: 600; transition: 0.3s var(--ease); }
.tab-btn.active, .tab-btn:hover { background: var(--ink); color: var(--ink-text); }
.project { padding: 0; overflow: hidden; }
.project-thumb { aspect-ratio: 16 / 11; position: relative; overflow: hidden; display: grid; place-items: center; }
.project-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px); background-size: 14px 14px; }
.project-thumb .label { position: absolute; top: 16px; left: 16px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #0d1426; font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.project-thumb .label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.project-thumb .mock {
  position: relative; z-index: 1; width: 76%; height: 72%; border-radius: 12px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.5);
  transform: translateY(16%); transition: transform 0.6s var(--ease); padding: 10px; display: grid; grid-template-rows: 10px 1fr; gap: 8px;
}
.project:hover .mock { transform: translateY(8%) scale(1.03); }
.mock .bar { display: flex; gap: 4px; }
.mock .bar i { width: 7px; height: 7px; border-radius: 50%; background: #d4d9e6; }
.mock .body { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.mock .body div { border-radius: 6px; background: #e8edf8; }
.mock .body div:last-child { background: linear-gradient(135deg, #dfe7ff, #f0f4ff); }
.project-info { padding: 24px 28px 30px; }
.project-info small { color: var(--blue); font-family: var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; }
.project-info h3 { margin-top: 8px; }
.project.hide { display: none; }

/* ---------- dark band (why us) ---------- */
.dark-band { background: var(--dark); color: var(--dark-text); position: relative; overflow: hidden; }
.dark-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.dark-band .container { position: relative; }
.dark-band h2, .dark-band h3 { color: #fff; }
.dark-band .section-head p { color: var(--dark-text); }
.dark-band .eyebrow { color: #7aa2ff; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.why-item .num-ring {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 800; font-size: 1.7rem; color: #fff; position: relative;
  background: rgba(255, 255, 255, 0.04); border: 10px solid rgba(255, 255, 255, 0.06);
}
.why-item .num-ring::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--blue); animation: spin 4s linear infinite; }
.why-item p { max-width: 320px; margin-inline: auto; }

/* ---------- industries ---------- */
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ind {
  display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm);
  border: 2px solid transparent; transition: border-color 0.4s, transform 0.4s var(--ease), box-shadow 0.4s;
}
.ind .ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--heading); transition: 0.4s; }
.ind .ico svg { width: 24px; height: 24px; }
.ind > div:last-child { flex: 1; min-width: 0; }
.ind h3 { font-size: 1.05rem; margin-bottom: 4px; }
.ind .state { display: grid; overflow: hidden; font-size: 0.88rem; line-height: 1.4; }
.ind .state span { grid-area: 1 / 1; display: flex; align-items: baseline; gap: 8px; transition: transform 0.5s var(--ease), opacity 0.5s; }
.ind .state span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.ind .before { color: var(--muted); }
.ind .before::before { background: var(--amber); }
.ind .after { color: var(--blue); font-weight: 600; transform: translateY(100%); opacity: 0; }
.ind .after::before { background: var(--blue); }
.ind.on, .ind:hover { border-color: var(--blue); transform: translateY(-4px); box-shadow: var(--shadow); }
.ind.on .ico, .ind:hover .ico { background: var(--blue); color: #fff; }
.ind.on .before, .ind:hover .before { transform: translateY(-100%); opacity: 0; }
.ind.on .after, .ind:hover .after { transform: none; opacity: 1; }

/* ---------- marquee ---------- */
.marquee { padding: 34px 0; overflow: hidden; }
.marquee-track { display: flex; gap: 56px; width: max-content; animation: scroll 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.6rem); color: var(--heading); display: flex; align-items: center; gap: 56px; letter-spacing: -0.03em; white-space: nowrap; }
.marquee-track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }
.marquee-track span::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px 26px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: "0" counter(step); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: #fff; font-family: var(--f-mono); font-size: 0.85rem; margin-bottom: 18px; }
.step::after { content: ""; position: absolute; top: 52px; left: 84px; right: -22px; height: 2px; background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 12px); opacity: 0.4; }
.step:last-child::after { display: none; }
.step p { color: var(--muted); margin: 0; }
.process .card .line { display: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { padding: 30px 24px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat .num { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1; margin-bottom: 8px; letter-spacing: -0.04em; color: var(--heading); }
.stat .num.text-grad { color: var(--blue); }
.stat p { margin: 0; color: var(--muted); }

/* ---------- split / orbit (about) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.visual-stack { position: relative; aspect-ratio: 1 / 1; max-width: 500px; margin-inline: auto; width: 100%; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(47, 107, 255, 0.28); animation: spin 40s linear infinite; }
.orbit.o2 { inset: 14%; animation-duration: 28s; animation-direction: reverse; }
.orbit.o3 { inset: 28%; animation-duration: 20s; }
.orbit .planet { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); color: var(--blue); font-size: 0.75rem; font-weight: 700; font-family: var(--f-mono); }
.orbit .planet.bottom { top: auto; bottom: -22px; }
.orbit-core { position: absolute; inset: 37%; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(47, 107, 255, 0.6); }
.orbit-core img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- faq ---------- */
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 50px; align-items: start; }
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; width: 100%; }
.faq details { background: var(--surface); border-radius: 20px; padding: 0 26px; box-shadow: var(--shadow-sm); border: 2px solid transparent; transition: border-color 0.3s; }
.faq details[open] { border-color: var(--blue); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; color: var(--heading); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 1.3rem; color: var(--blue); transition: transform 0.3s var(--ease), background 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--blue); color: #fff; }
.faq details p { color: var(--muted); padding-bottom: 22px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(40px, 7vw, 84px);
  background: var(--dark); color: var(--dark-text); text-align: left;
}
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.cta-band::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -200px; background: radial-gradient(circle, rgba(47, 107, 255, 0.55), transparent 65%); animation: bob 8s ease-in-out infinite; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; max-width: 760px; }
.cta-band p { color: var(--dark-text); max-width: 600px; margin: 0 0 30px; font-size: 1.1rem; }
.cta-band .eyebrow { color: #7aa2ff; }
.cta-band .btn-primary { background: #fff; color: #0d1426; }
.cta-band .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: none; }
.cta-band .hero-cta { justify-content: flex-start !important; }
.cta-meta { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 34px; font-family: var(--f-mono); font-size: 0.85rem; color: var(--dark-text); }
.cta-meta a:hover { color: #fff; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; padding: 180px 0 80px; overflow: hidden; }
.page-hero { min-height: 560px; }
.page-hero .container { position: relative; z-index: 1; pointer-events: none; }
.page-hero .container a, .page-hero .container button { pointer-events: auto; }
.page-hero h1 { max-width: 680px; font-size: clamp(2.5rem, 6vw, 4.6rem); }
.page-hero p { color: var(--muted); max-width: 580px; font-size: 1.15rem; margin: 0; }
.breadcrumb { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; font-size: 0.85rem; font-family: var(--f-mono); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.breadcrumb a:hover { color: var(--blue); }

/* ==========================================================
   Page transitions (Services & Projects: body.page-anim)
   ========================================================== */
.page-anim .page-hero { min-height: 0; padding-bottom: 100px; }
.page-anim .page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, black 10%, transparent 70%);
  animation: gridIn 1.6s var(--ease) both, gridDrift 24s linear infinite;
}
.page-anim .page-hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: 6%; top: -120px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(47, 107, 255, 0.28), transparent 65%);
  animation: blobIn 1.4s var(--ease) both, blobDrift 14s ease-in-out infinite 1.4s;
}
@keyframes gridIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes gridDrift { to { background-position: 56px 56px, 56px 56px; } }
@keyframes blobIn { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes blobDrift { 50% { transform: translate(-60px, 50px) scale(1.12); } }

.hero-word {
  position: absolute; right: -2%; bottom: 10px; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--f-head); font-weight: 800; letter-spacing: -0.05em; line-height: 0.8;
  font-size: clamp(5rem, 16vw, 15rem); color: transparent; -webkit-text-stroke: 1.5px rgba(47, 107, 255, 0.22);
  animation: wordSlide 1.6s var(--ease) 0.3s both;
}
@keyframes wordSlide { from { opacity: 0; transform: translateX(18%); } to { opacity: 1; transform: none; } }

/* headline: words rise one by one */
.page-anim .page-hero h1.reveal { opacity: 1; transform: none; }
.page-anim .page-hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.page-anim .page-hero h1 .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; animation: wordUp 1s var(--ease) both; animation-delay: calc(var(--i) * 85ms + 200ms); }
@keyframes wordUp { to { transform: none; } }

/* staggered children */
.page-anim .stagger > *, .page-anim .stagger li { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 250ms); }
.page-anim .in .stagger > *, .page-anim .in .stagger li, .page-anim .stagger.in > *, .page-anim .stagger.in li { opacity: 1; transform: none; }

/* service blocks: card wipes open, content follows */
.page-anim .service-detail.reveal { opacity: 1; transform: none; clip-path: inset(14% 5% 14% 5% round 32px); transition: clip-path 1.3s var(--ease); }
.page-anim .service-detail.reveal.in { clip-path: inset(0 0 0 0 round 32px); }
.page-anim .service-detail > .reveal { opacity: 1; transform: none; }
.page-anim .service-detail .sd-visual { background-position: 0 calc(var(--p, 0) * 40px), center; }
.page-anim .service-detail .big-icon { scale: 0.3; rotate: -30deg; opacity: 0; translate: 0 calc(var(--p, 0) * -34px); transition: scale 1s var(--ease) 0.5s, rotate 1s var(--ease) 0.5s, opacity 0.6s 0.5s; }
.page-anim .service-detail.in .big-icon { scale: 1; rotate: 0deg; opacity: 1; }
.page-anim .service-detail .chip { opacity: 0; transition: translate 0.9s var(--ease), opacity 0.6s; }
.page-anim .service-detail .chip:nth-of-type(1) { translate: -70px -30px; transition-delay: 0.75s; }
.page-anim .service-detail .chip:nth-of-type(2) { translate: -70px 40px; transition-delay: 0.85s; }
.page-anim .service-detail .chip:nth-of-type(3) { translate: 70px -30px; transition-delay: 0.95s; }
.page-anim .service-detail.in .chip { opacity: 1; translate: 0 0; }

/* cards flip up into place */
.page-anim .grid > .card.reveal:not(.in), .page-anim .stats > .reveal:not(.in) { transform: perspective(900px) rotateX(24deg) translateY(60px) scale(0.95); transform-origin: 50% 100%; }
.page-anim .filters .tab-btn { animation: fadeUp 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 300ms); }

/* project cards: 3D tilt + glare on hover */
.page-anim .project.in { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease), opacity 0.4s var(--ease); }
.page-anim .project.in:hover { --ty: -8px; transition: transform 0.12s linear, box-shadow 0.4s var(--ease); }
.page-anim .project::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.28), transparent 45%);
}
.page-anim .project:hover::after { opacity: 1; }
.project.leaving { opacity: 0 !important; transform: scale(0.9) !important; transition: opacity 0.3s, transform 0.3s var(--ease) !important; }
.project.entering { animation: projIn 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes projIn { from { opacity: 0; transform: translateY(30px) scale(0.94); } to { opacity: 1; transform: none; } }

/* ---------- service detail ---------- */
.service-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: clamp(28px, 4vw, 52px);
  margin-bottom: 26px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); scroll-margin-top: 110px;
}
.service-detail:nth-child(even) { background: var(--dark); color: var(--dark-text); }
.service-detail:nth-child(even) h2 { color: #fff; }
.service-detail:nth-child(even) .muted { color: var(--dark-text); }
.service-detail:nth-child(even) .eyebrow { color: #7aa2ff; }
.service-detail:nth-child(even) .sd-visual { order: -1; background-color: rgba(255, 255, 255, 0.04); }
.service-detail:nth-child(even) .btn-primary { background: #fff; color: #0d1426; }
.service-detail h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.sd-visual {
  aspect-ratio: 4 / 3; border-radius: var(--r); position: relative; overflow: hidden; display: grid; place-items: center;
  background-color: var(--surface-2);
  background-image: radial-gradient(rgba(47, 107, 255, 0.18) 1.2px, transparent 1.2px), radial-gradient(circle at 50% 50%, rgba(47, 107, 255, 0.18), transparent 60%);
  background-size: 18px 18px, 100% 100%;
}
.sd-visual .big-icon { width: 120px; height: 120px; border-radius: 34px; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 30px 60px -20px rgba(47, 107, 255, 0.8); animation: bob 6s ease-in-out infinite; }
.sd-visual .big-icon svg { width: 54px; height: 54px; }
.sd-visual .chip { position: absolute; padding: 8px 14px; border-radius: 999px; background: var(--surface); font-size: 0.8rem; font-weight: 600; color: var(--heading); box-shadow: var(--shadow); font-family: var(--f-mono); animation: bob 7s ease-in-out infinite; }
.sd-visual .chip:nth-of-type(1) { top: 16%; left: 9%; }
.sd-visual .chip:nth-of-type(2) { bottom: 16%; left: 14%; animation-delay: -2s; }
.sd-visual .chip:nth-of-type(3) { top: 26%; right: 8%; animation-delay: -4s; }

/* ---------- mission & vision ---------- */
.mv-card { padding: clamp(28px, 4vw, 44px); }
.mv-card h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; }
.mv-label { display: block; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.mv-card .mv-lead { font-size: 1.12rem; color: var(--heading); font-weight: 500; }
.mv-card .check-list { margin-bottom: 0; }
.mv-card.dark { background: var(--dark); color: var(--dark-text); border-color: rgba(255, 255, 255, 0.06); }
.mv-card.dark h3 { color: #fff; }
.mv-card.dark p, .mv-card.dark .mv-lead { color: var(--dark-text); }
.mv-card.dark .mv-lead { color: #fff; }
.mv-card.dark .mv-label { color: #7aa2ff; }
.mv-card.dark .icon-box { background: rgba(255, 255, 255, 0.08); color: #7aa2ff; }
.mv-card.dark strong { color: #fff; }
.mv-card strong { color: var(--heading); }
.mv-pillars { margin-top: 22px; }

/* ---------- founders ---------- */
.founder-card { text-align: center; padding: 30px 28px 32px; overflow: hidden; }
.founder-photo {
  width: 100%; aspect-ratio: 1; border-radius: 22px; margin-bottom: 22px; object-fit: cover; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.25), transparent 50%), linear-gradient(135deg, var(--blue), #0c1b33);
  transition: transform 0.6s var(--ease);
}
img.founder-photo { height: auto; display: block; }
.founder-photo span { font-family: var(--f-head); font-weight: 800; font-size: 3.4rem; color: rgba(255, 255, 255, 0.92); letter-spacing: -0.04em; }
.founder-card:hover .founder-photo { transform: scale(1.03); }
.founder-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.founder-role { display: block; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.founder-links { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.founder-links a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--heading); transition: 0.3s var(--ease); }
.founder-links a:hover { background: var(--blue); color: #fff; transform: translateY(-3px); }
.founder-links svg { width: 17px; height: 17px; }

/* ---------- two-box CTA ---------- */
.cta-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cta-split .cta-band { display: flex; flex-direction: column; align-items: flex-start; }
.cta-split .cta-band h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta-split .cta-band p { margin-bottom: 26px; }
.cta-split .cta-band .btn { margin-top: auto; }
.cta-band.alt { background: var(--blue); }
.cta-band.alt::after { background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%); }
.cta-band.alt p { color: rgba(255, 255, 255, 0.85); }
.cta-band.alt .eyebrow { color: #fff; }
.cta-band.alt .eyebrow .dot { background: #fff; }
.cta-band.alt .btn-primary svg { background: var(--ink); }

/* ---------- popups ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(680px, calc(100% - 24px)); width: 100%; max-height: calc(100% - 24px); overflow: visible; color: var(--text); }
.modal::backdrop { background: rgba(7, 15, 32, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: modalIn 0.45s var(--ease); }
.modal[open]::backdrop { animation: fadeIn 0.3s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-lg); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.modal-box h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 6px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--heading); transition: 0.3s var(--ease); z-index: 2; }
.modal-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }
.modal-close svg { width: 18px; height: 18px; }
.modal .form-success .btn { margin-top: 8px; }
html.modal-open { overflow: hidden; }

.field-label { font-weight: 600; font-size: 0.92rem; color: var(--heading); }
.file-drop {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; cursor: pointer;
  border: 2px dashed rgba(47, 107, 255, 0.35); background: var(--blue-soft); color: var(--blue); transition: border-color 0.25s, background 0.25s;
}
.file-drop:hover, .file-drop.drag { border-color: var(--blue); background: rgba(47, 107, 255, 0.16); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop svg { width: 30px; height: 30px; flex: none; }
.file-text { color: var(--heading); font-size: 0.95rem; line-height: 1.4; }
.file-text b { color: var(--blue); }
.file-text small { display: block; color: var(--muted); font-size: 0.8rem; }
.file-drop.has-file { border-style: solid; }
.field.invalid .file-drop { border-color: #e5484d; background: rgba(229, 72, 77, 0.08); }

/* ---------- team / timeline ---------- */
.team-card { text-align: center; }
.team-avatar { width: 92px; height: 92px; border-radius: 28px; margin: 0 auto 18px; display: grid; place-items: center; font-family: var(--f-head); font-size: 1.7rem; font-weight: 800; color: #fff; background: var(--ink); }
.team-card:hover .team-avatar { background: var(--blue); }
.team-card small { color: var(--blue); font-family: var(--f-mono); font-size: 0.78rem; }
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px; background: repeating-linear-gradient(180deg, var(--blue) 0 6px, transparent 6px 12px); opacity: 0.5; }
.tl-item { position: relative; padding: 22px 26px; margin-bottom: 18px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.tl-item::before { content: ""; position: absolute; left: -38px; top: 28px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 6px var(--blue-soft); }
.tl-item span { font-family: var(--f-mono); color: var(--blue); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.tl-item p { margin: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 30px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.info-item { display: flex; gap: 16px; align-items: center; padding: 20px; }
.info-item .icon-box { margin: 0; flex: 0 0 52px; }
.info-item small { display: block; color: var(--muted); font-size: 0.8rem; font-family: var(--f-mono); }
.info-item a, .info-item strong { color: var(--heading); font-weight: 700; font-family: var(--f-head); font-size: 1.1rem; word-break: break-word; }
.info-item a:hover { color: var(--blue); }
.form { padding: clamp(26px, 4vw, 44px); }
.form:hover { transform: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--heading); }
.field input, .field select, .field textarea {
  width: 100%; padding: 15px 18px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2);
  color: var(--heading); font: inherit; transition: border-color 0.25s, background 0.25s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: var(--surface); }
.field .err { color: #e5484d; font-size: 0.82rem; display: none; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #e5484d; }
.field.invalid .err { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--surface-2); font-size: 0.88rem; font-weight: 500; color: var(--text); transition: 0.25s var(--ease); border: 2px solid transparent; }
.chips span:hover { border-color: var(--blue); }
.chips input:checked + span { background: var(--blue); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.form-error { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; background: rgba(229, 72, 77, 0.1); color: #c9353a; font-size: 0.9rem; }
.form-error a { font-weight: 600; text-decoration: underline; }
.hp-field { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.btn:disabled { opacity: 0.65; cursor: progress; transform: none; }
.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.show { display: block; animation: fadeUp 0.5s var(--ease); }
.form-success .icon-box { margin: 0 auto 18px; width: 72px; height: 72px; border-radius: 50%; background: var(--blue); color: #fff; }

/* ---------- footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--dark); color: var(--dark-text); padding: 90px 0 30px; margin-top: 0; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1.2px, transparent 1.2px); background-size: 22px 22px; pointer-events: none; }
.site-footer .container { position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 56px; }
.site-footer h4 { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7f8cab; font-weight: 500; margin-bottom: 20px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.site-footer ul a { color: #e6ecf8; transition: color 0.2s; }
.site-footer ul a:hover { color: #7aa2ff; }
.site-footer .brand { color: #fff; margin-bottom: 18px; }
.site-footer .beta-badge { color: #9db9ff; background: rgba(47, 107, 255, 0.18); border-color: rgba(122, 162, 255, 0.5); }
.site-footer .muted { color: var(--dark-text); max-width: 340px; }
.footer-big { font-family: var(--f-head); font-weight: 800; letter-spacing: -0.05em; font-size: clamp(3.4rem, 13vw, 11rem); line-height: 0.85; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.14); text-align: center; margin: 10px 0 30px; user-select: none; white-space: nowrap; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.88rem; color: #7f8cab; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); color: #e6ecf8; transition: 0.3s var(--ease); }
.socials a:hover { background: var(--blue); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }
.newsletter { display: flex; gap: 8px; margin-top: 16px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.newsletter input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; background: transparent; color: #fff; font: inherit; }
.newsletter input::placeholder { color: #7f8cab; }
.newsletter input:focus { outline: none; }
.newsletter .btn { min-height: 42px; background: var(--blue); }

/* ---------- floating bits ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--blue); z-index: 200; }
.float-mail {
  position: fixed; right: 22px; bottom: 22px; width: 60px; height: 60px; border-radius: 50%; z-index: 90;
  display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 18px 36px -12px rgba(47, 107, 255, 0.8);
  transition: transform 0.3s var(--ease);
}
.float-mail::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.6); opacity: 0; } }
.float-mail:hover { transform: scale(1.08); }
.float-mail svg { width: 24px; height: 24px; }
.float-wa {
  position: fixed; right: 22px; bottom: 94px; width: 60px; height: 60px; border-radius: 50%; z-index: 90;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 18px 36px -12px rgba(37, 211, 102, 0.75);
  transition: transform 0.3s var(--ease);
}
.float-wa:hover { transform: scale(1.08); }
.float-wa svg { width: 30px; height: 30px; }
.back-top {
  position: fixed; right: 30px; bottom: 168px; width: 44px; height: 44px; border-radius: 50%; border: 0; z-index: 90;
  background: var(--surface); color: var(--heading); display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: 0.35s var(--ease);
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top svg { width: 18px; height: 18px; }

main, .site-footer { position: relative; z-index: 1; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid-4, .stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .float-card.f1 { left: -10px; }
  .float-card.f2 { right: -6px; }
}
@media (max-width: 1080px) {
  .page-morph { display: none; }
  .page-hero { min-height: 0; }
}
@media (max-width: 920px) {
  .menu-toggle { display: grid; }
  canvas.morph { max-width: 440px; }
  .nav-links {
    position: fixed; top: 92px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    opacity: 0; transform: translateY(-12px) scale(0.98); pointer-events: none; transition: 0.35s var(--ease);
  }
  .nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 18px; border-radius: 14px; font-size: 1.1rem; font-family: var(--f-head); font-weight: 700; color: var(--heading); }
  .nav-actions .btn { display: none; }
  .hero-grid, .split, .service-detail, .contact-grid, .serve, .svc, .faq-wrap, .cta-split { grid-template-columns: 1fr; gap: 40px; }
  .cta-split { gap: 18px; }
  .service-detail:nth-child(even) .sd-visual { order: 0; }
  .svc { position: relative; top: 0; min-height: 0; }
  .grid-3, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 140px; }
  .hero-visual .ui-dash { transform: none; }
  .serve-stage { min-height: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .grid-4, .form-row, .why-grid, .ind-grid, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 26px; }
  .nav { padding: 8px 8px 8px 14px; }
  .brand { font-size: 1.15rem; }
  .brand-mark { height: 33px; }
  .theme-toggle, .menu-toggle { width: 42px; height: 42px; }
  .float-card { display: none; }
  .ui-dash { grid-template-columns: 44px 1fr; min-height: 0; }
  .ui-main { padding: 14px; }
  .kpi b { font-size: 1.05rem; }
  .flow { grid-template-columns: 1fr 1fr; }
  .compare { grid-template-columns: 1fr; }
  .btn { min-height: 54px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .float-mail { width: 54px; height: 54px; right: 16px; bottom: 16px; }
  .float-wa { width: 54px; height: 54px; right: 16px; bottom: 80px; }
  .float-wa svg { width: 27px; height: 27px; }
  .back-top { right: 21px; bottom: 146px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .ind .state span { grid-area: auto; }
  .ind .after { opacity: 1; transform: none; }
  .serve-tab.active .bar i { width: 100%; }
  .page-anim .page-hero h1 .w > span, .page-anim .stagger > *, .page-anim .stagger li { transform: none; opacity: 1; }
  .page-anim .service-detail .big-icon, .page-anim .service-detail .chip { scale: 1; rotate: 0deg; translate: 0 0; opacity: 1; }
  .page-anim .service-detail.reveal { clip-path: none; }
}

/* ---------- cookie consent ---------- */
.cookie-banner {
  position: fixed; left: 22px; bottom: 22px; z-index: 150; max-width: 420px; padding: 20px 22px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px); transition: 0.4s var(--ease);
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-banner p { margin: 0 0 14px; font-size: 0.93rem; color: var(--text); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-link:hover { color: #7aa2ff; }
@media (max-width: 640px) {
  .cookie-banner { left: 16px; right: 86px; bottom: 16px; max-width: none; padding: 16px; }
  .cookie-actions .btn { flex: 1; min-height: 44px; }
}
