/* ==========================================================================
   Talpin Group — futuristic design system
   Deep-space navy base, cyan/blue signal colours from the logo, glass panels,
   animated data-flow infographics.
   ========================================================================== */

:root {
  /* brand (identical in both themes) */
  --navy:      #0b1b6b;
  --blue:      #1a5fe0;
  --cyan:      #00b4f0;
  --grad:      linear-gradient(100deg, #1a5fe0 0%, #00b4f0 100%);
  --grad-soft: linear-gradient(100deg, rgba(26,95,224,.16), rgba(0,180,240,.16));

  /* geometry / misc (identical in both themes) */
  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 26px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* ---------- LIGHT (default theme) ---------- */
  --void:      #eef2fb;
  --deep:      #f4f7fd;
  --panel:     #ffffff;
  --panel-2:   #ffffff;

  --ink:       #0b1636;
  --body:      #4a5578;
  --muted:     #6b7aa8;
  --line:      rgba(11, 27, 107, .1);
  --line-soft: rgba(11, 27, 107, .05);

  --glass:     rgba(255, 255, 255, .7);
  --glass-2:   rgba(255, 255, 255, .9);

  --glow-cyan: 0 0 34px rgba(0, 180, 240, .18);
  --glow-blue: 0 0 34px rgba(26, 95, 224, .18);

  --shadow:    0 16px 40px rgba(11, 27, 107, .1);
  --shadow-lg: 0 30px 70px rgba(11, 27, 107, .16);

  --page-bg:    var(--void);
  --grid-line:  rgba(26, 95, 224, .06);
  --aurora-1:   rgba(26, 95, 224, .1);
  --aurora-2:   rgba(0, 180, 240, .09);
  --header-bg:  rgba(247, 249, 253, .72);
  --header-bg-scrolled: rgba(247, 249, 253, .92);
  --drawer-bg:  rgba(255, 255, 255, .98);
  --footer-bg:  rgba(240, 244, 251, .8);
  --panel-grad: linear-gradient(160deg, #ffffff, #f4f7fd);
  --tint-bg:    linear-gradient(180deg, rgba(232, 238, 250, 0) 0%, rgba(232, 238, 250, .8) 12%, rgba(232, 238, 250, .8) 88%, rgba(232, 238, 250, 0) 100%);
  --stat-num:   linear-gradient(180deg, #1a5fe0, #00b4f0);
  --net-node:   rgba(26, 95, 224, .5);
  --net-link:   26, 95, 224;      /* rgb triplet, alpha added in JS */
  --hero-canvas-opacity: .5;

  /* logo (recoloured via attribute selectors below) */
  --logo-g1:    #0b1b6b;
  --logo-g3:    #1a5fe0;
  --logo-ink:   #1a5fe0;
  --logo-group: #0b1b6b;

  /* infographic tokens (recoloured via attribute selectors below) */
  --fig-text:        #33436e;
  --fig-strong:      #0b1636;
  --fig-accent:      #0a7fb0;
  --fig-muted:       #7b86a6;
  --fig-tangle:      #97a2c6;
  --fig-node:        rgba(11, 27, 107, .04);
  --fig-node-stroke: rgba(26, 95, 224, .3);
  --fig-track:       rgba(11, 27, 107, .12);
}

/* ---------- DARK THEME (opt-in override) ---------- */
:root[data-theme="dark"] {
  --void:      #04081f;
  --deep:      #060d2a;
  --panel:     #0a1338;
  --panel-2:   #0d1842;

  --ink:       #f2f6ff;
  --body:      #9aa8cf;
  --line:      rgba(122, 152, 255, .14);
  --line-soft: rgba(122, 152, 255, .08);

  --glass:     rgba(255, 255, 255, .035);
  --glass-2:   rgba(255, 255, 255, .06);

  --glow-cyan: 0 0 40px rgba(0, 180, 240, .28);
  --glow-blue: 0 0 40px rgba(26, 95, 224, .3);

  --shadow:    0 18px 50px rgba(0, 0, 0, .45);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, .6);

  --grid-line:  rgba(122, 152, 255, .055);
  --aurora-1:   rgba(26, 95, 224, .22);
  --aurora-2:   rgba(0, 180, 240, .16);
  --header-bg:  rgba(4, 8, 31, .6);
  --header-bg-scrolled: rgba(4, 8, 31, .88);
  --drawer-bg:  rgba(6, 13, 42, .98);
  --footer-bg:  rgba(6, 13, 42, .6);
  --panel-grad: linear-gradient(160deg, rgba(13, 24, 66, .8), rgba(6, 13, 42, .55));
  --tint-bg:    linear-gradient(180deg, rgba(10, 19, 56, 0) 0%, rgba(10, 19, 56, .75) 12%, rgba(10, 19, 56, .75) 88%, rgba(10, 19, 56, 0) 100%);
  --stat-num:   linear-gradient(180deg, #fff, #6ec8ff);
  --net-node:   rgba(120, 200, 255, .55);
  --net-link:   0, 180, 240;
  --hero-canvas-opacity: .75;

  --logo-g1:    #4d7fff;
  --logo-g3:    #5b8cff;
  --logo-ink:   #8ab4ff;
  --logo-group: #cfe0ff;

  --fig-text:        #dbe6ff;
  --fig-strong:      #ffffff;
  --fig-accent:      #7fd4ff;
  --fig-muted:       #6b7aa8;
  --fig-tangle:      #8b97c6;
  --fig-node:        rgba(255, 255, 255, .05);
  --fig-node-stroke: rgba(122, 152, 255, .3);
  --fig-track:       rgba(122, 152, 255, .16);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* recolour infographic SVGs by their authored attribute values — no markup edits */
.figure svg [fill="#dbe6ff"] { fill: var(--fig-text); }
.figure svg [fill="#ffffff"] { fill: var(--fig-strong); }
.figure svg [fill="#7fd4ff"] { fill: var(--fig-accent); }
.figure svg [fill="#6b7aa8"] { fill: var(--fig-muted); }
.figure svg [fill="#8b97c6"],
.figure svg [fill="#8090c0"],
.figure svg [fill="#7a86b4"] { fill: var(--fig-tangle); }
.figure svg [stroke="#7a86b4"] { stroke: var(--fig-tangle); }
.figure svg [fill="rgba(255,255,255,.05)"] { fill: var(--fig-node); }
.figure svg [stroke="rgba(122,152,255,.3)"] { stroke: var(--fig-node-stroke); }
.figure svg [stroke="rgba(122,152,255,.12)"],
.figure svg [stroke="rgba(122,152,255,.14)"],
.figure svg [stroke="rgba(122,152,255,.16)"],
.figure svg [stroke="rgba(122,152,255,.18)"] { stroke: var(--fig-track); }

/* recolour the logo the same way */
.logo svg [stop-color="#4d7fff"] { stop-color: var(--logo-g1); }
.logo svg [stop-color="#5b8cff"] { stop-color: var(--logo-g3); }
.logo svg [fill="#8ab4ff"] { fill: var(--logo-ink); }
.logo svg [fill="#cfe0ff"] { fill: var(--logo-group); }

/* ---------- theme toggle button ---------- */
.theme-toggle {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--glass); color: var(--ink); cursor: pointer;
  transition: border-color .25s, box-shadow .25s, color .25s;
}
.theme-toggle:hover { border-color: rgba(0, 180, 240, .5); color: var(--cyan); box-shadow: 0 0 22px rgba(0, 180, 240, .16); }
.theme-toggle svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: block; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--page-bg); }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--body);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

/* ---------- ambient background: grid + aurora ---------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 20%, transparent 75%);
}

body::after {
  content: '';
  position: fixed;
  top: -30vh; left: 50%;
  width: 130vw; height: 110vh;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 45% at 22% 30%, var(--aurora-1), transparent 70%),
    radial-gradient(45% 42% at 78% 20%, var(--aurora-2), transparent 70%);
  animation: aurora 22s var(--ease) infinite alternate;
}

@keyframes aurora {
  0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: .9; }
  100% { transform: translateX(-46%) translateY(40px) scale(1.12); opacity: 1; }
}

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

/* ---------- type ---------- */

h1, h2, h3, h4 { color: var(--ink); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); letter-spacing: -.042em; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); letter-spacing: -.036em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--cyan); text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
section { padding: clamp(70px, 8.5vw, 130px) 0; position: relative; }

.lead { font-size: clamp(1.06rem, 1.6vw, 1.26rem); color: var(--body); max-width: 62ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 20px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px; background: var(--grad);
  box-shadow: var(--glow-cyan);
}
.center .eyebrow::before { display: none; }

.grad-text {
  background: linear-gradient(100deg, #7cc7ff 0%, #00b4f0 45%, #6aa5ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 740px; margin-bottom: clamp(44px, 5vw, 70px); }
.section-head.center { margin-left: auto; margin-right: auto; }

/* panel sections */
.tint { background: var(--tint-bg); }
.tint::before, .tint::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 152, 255, .3), transparent);
}
.tint::before { top: 0; }
.tint::after { bottom: 0; }

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 30px;
  border: 0; border-radius: 100px;
  font: inherit; font-size: .96rem; font-weight: 600; letter-spacing: -.01em;
  cursor: pointer; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.35) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(26, 95, 224, .4), var(--glow-cyan); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(26, 95, 224, .5), 0 0 60px rgba(0, 180, 240, .4); }

.btn-ghost { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(10px); }
.btn-ghost:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(0, 180, 240, .6), 0 0 30px rgba(0, 180, 240, .18); color: #fff; }

.btn-light { background: #fff; color: #071033; }
.btn-light:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(255, 255, 255, .2); }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.btn-outline-light:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.center .btn-row, .btn-row.center { justify-content: center; }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cyan); }
.arrow-link span { transition: transform .3s var(--ease); }
.arrow-link:hover span { transform: translateX(5px); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s;
}
.site-header.scrolled { background: var(--header-bg-scrolled); border-bottom-color: var(--line); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { display: flex; align-items: center; }
.logo svg { display: block; height: 40px; width: auto; filter: drop-shadow(0 0 14px rgba(0, 180, 240, .45)); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative; padding: 9px 15px; border-radius: 9px;
  font-size: .92rem; font-weight: 500; color: var(--body);
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); background: var(--glass); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--grad); box-shadow: var(--glow-cyan);
}

.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 12px 22px; font-size: .89rem; }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--glass); cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span { display: block; position: relative; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero { padding: clamp(72px, 9vw, 130px) 0 clamp(70px, 8vw, 116px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(40px, 5vw, 76px); align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero .lead { font-size: clamp(1.08rem, 1.7vw, 1.3rem); }

.hero-note {
  display: inline-flex; align-items: center; gap: 11px; margin-top: 32px;
  font-family: var(--mono); font-size: .82rem; color: var(--muted);
  padding: 9px 16px 9px 12px; border: 1px solid var(--line); border-radius: 100px; background: var(--glass);
}
.hero-note .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); flex: none;
  box-shadow: 0 0 0 0 rgba(0, 180, 240, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 180, 240, .55); }
  70%  { box-shadow: 0 0 0 11px rgba(0, 180, 240, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 240, 0); }
}

.page-hero { padding: clamp(60px, 7vw, 104px) 0 clamp(24px, 3vw, 44px); }
.page-hero h1 { max-width: 17ch; }

/* ---------- glass card ---------- */

.card, .flow-card, .step, .pill, .topic-card, .form-card, .stat, .node-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}

/* cursor-tracking sheen — driven by --mx/--my from anim.js */
.card::before, .step::before, .topic-card::before, .pill::before, .stat::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 180, 240, .13), transparent 65%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.card:hover::before, .step:hover::before, .topic-card:hover::before, .pill:hover::before, .stat:hover::before { opacity: 1; }

.card { padding: 34px; }
.card:hover, .step:hover, .topic-card:hover, .pill:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 180, 240, .45);
  box-shadow: var(--shadow), 0 0 40px rgba(0, 180, 240, .12);
}
.card h3 { margin-bottom: .5em; }
.card p { font-size: .96rem; margin: 0; }

.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); }

.icon {
  position: relative; z-index: 1;
  width: 50px; height: 50px; border-radius: 15px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  color: var(--cyan);
  display: grid; place-items: center; margin-bottom: 24px;
  transition: background .4s, color .4s, box-shadow .4s;
}
.icon svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .icon, .pill:hover .icon { background: var(--grad); color: #fff; box-shadow: var(--glow-cyan); }

.card > *:not(::before) { position: relative; z-index: 1; }

/* ---------- hero workflow card ---------- */

.flow-card { padding: 26px; box-shadow: var(--shadow-lg); }
.flow-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.flow-card-head strong { color: var(--ink); font-size: .95rem; }
.flow-badge {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--cyan); background: rgba(0, 180, 240, .12); border: 1px solid rgba(0, 180, 240, .3);
  padding: 5px 11px; border-radius: 100px;
}
.flow-step {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 15px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-soft);
  margin-bottom: 9px; font-size: .92rem; color: var(--ink); font-weight: 500;
}
.flow-step:last-of-type { margin-bottom: 0; }
.flow-step i {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-soft); border: 1px solid var(--line);
  color: var(--cyan); display: grid; place-items: center;
  font-family: var(--mono); font-style: normal; font-size: .74rem; font-weight: 600;
}
.flow-step em {
  margin-left: auto; font-family: var(--mono); font-style: normal; font-size: .68rem;
  color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 100px;
}
.flow-step.is-auto i { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow-cyan); }
.flow-step.is-auto em { color: var(--cyan); border-color: rgba(0, 180, 240, .35); background: rgba(0, 180, 240, .08); }

/* ---------- stats band ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 30px 26px; text-align: center; }
.stat .num {
  display: block; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; line-height: 1;
  letter-spacing: -.04em; margin-bottom: 10px;
  background: var(--stat-num);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label { font-size: .88rem; color: var(--muted); line-height: 1.5; position: relative; z-index: 1; }

/* ---------- infographic shell ---------- */

.figure {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-grad);
  backdrop-filter: blur(16px);
  padding: clamp(22px, 3vw, 38px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.figure::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(0, 180, 240, .07) 50%, transparent 70%);
}
.figure-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.figure-title { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.figure-live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.figure-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse 2s infinite; }
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }

/* animated svg primitives */
.flow-path { stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }

.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.in .draw { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.node-pulse { transform-box: fill-box; transform-origin: center; animation: nodePulse 3s ease-in-out infinite; }
@keyframes nodePulse { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }

.orbit { transform-box: fill-box; transform-origin: center; animation: spin 26s linear infinite; }
.orbit-rev { transform-box: fill-box; transform-origin: center; animation: spin 34s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.packet { offset-rotate: 0deg; animation: travel 3.4s linear infinite; }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- problem / fragmentation ---------- */

.problem-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(34px, 5vw, 72px); align-items: center; }
.problem-quote {
  font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.32; font-weight: 600;
  letter-spacing: -.03em; color: var(--ink); max-width: 20ch;
}
.fragment-list { list-style: none; margin: 0; padding: 0; }
.fragment-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); font-size: .98rem; }
.fragment-list li:last-child { border-bottom: 1px solid var(--line); }
.fragment-list strong { color: var(--ink); display: block; margin-bottom: 2px; }
.fragment-list .num { flex: none; font-family: var(--mono); font-size: .78rem; color: var(--cyan); padding-top: 3px; min-width: 28px; }

/* ---------- process timeline ---------- */

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { padding: 30px 26px; }
.step .step-n {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan);
  font-family: var(--mono); font-size: .82rem; font-weight: 600; margin-bottom: 20px;
  position: relative; z-index: 1;
  transition: background .4s, color .4s, box-shadow .4s;
}
.step:hover .step-n { background: var(--grad); color: #fff; box-shadow: var(--glow-cyan); }
.step h3 { font-size: 1.06rem; margin-bottom: .35em; position: relative; z-index: 1; }
.step p { font-size: .91rem; margin: 0; position: relative; z-index: 1; }

/* horizontal connector rail */
.rail { position: relative; height: 1px; margin: 0 0 30px; background: var(--line); overflow: hidden; }
.rail i { position: absolute; top: 0; left: 0; height: 100%; width: 18%; background: var(--grad); box-shadow: var(--glow-cyan); animation: rail 4.5s var(--ease) infinite; }
@keyframes rail { 0% { left: -20%; } 100% { left: 105%; } }

/* phases (How We Work) */
.phase { display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px, 4vw, 60px); padding: clamp(30px, 4vw, 48px) 0; border-top: 1px solid var(--line); align-items: start; }
.phase:last-child { border-bottom: 1px solid var(--line); }
.phase-label { display: flex; align-items: center; gap: 13px; }
.phase-label .n {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid var(--line); color: var(--cyan);
  font-family: var(--mono); font-weight: 600; font-size: .95rem; flex: none;
  transition: background .4s, color .4s, box-shadow .4s;
}
.phase:hover .phase-label .n { background: var(--grad); color: #fff; box-shadow: var(--glow-cyan); }
.phase-label span { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.phase h3 { font-size: clamp(1.28rem, 2.1vw, 1.62rem); }
.phase p { max-width: 62ch; margin: 0; }

.tick-list { list-style: none; margin: 16px 0 0; padding: 0; }
.tick-list li { position: relative; padding-left: 26px; font-size: .93rem; margin-bottom: 8px; }
.tick-list li::before {
  content: ''; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(0, 180, 240, .8);
}

/* ---------- services / pills / topics ---------- */

.service-card { display: flex; flex-direction: column; height: 100%; }
.service-card .tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; position: relative; z-index: 1; }
.service-card ul { list-style: none; margin: 18px 0 0; padding: 0; position: relative; z-index: 1; }
.service-card ul li { position: relative; padding-left: 24px; font-size: .92rem; margin-bottom: 9px; }
.service-card ul li::before {
  content: ''; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(0, 180, 240, .9);
}

.pill { display: flex; align-items: center; gap: 15px; padding: 24px 26px; font-weight: 600; color: var(--ink); }
.pill .icon { width: 42px; height: 42px; margin: 0; border-radius: 13px; flex: none; }
.pill .icon svg { width: 19px; height: 19px; }
.pill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.topic-card { display: block; padding: 32px; }
.topic-card .kicker { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block; position: relative; z-index: 1; }
.topic-card h3 { font-size: 1.14rem; margin-bottom: .4em; position: relative; z-index: 1; }
.topic-card p { font-size: .93rem; margin: 0 0 18px; position: relative; z-index: 1; }
.topic-card .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); position: relative; z-index: 1; }

/* ---------- value list ---------- */

.value-list { list-style: none; margin: 0; padding: 0; }
.value-list li { display: flex; gap: 17px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.value-list li:first-child { border-top: 1px solid var(--line); }
.value-list .check {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0, 180, 240, .12); border: 1px solid rgba(0, 180, 240, .35);
  color: var(--cyan); display: grid; place-items: center; margin-top: 2px;
  box-shadow: 0 0 18px rgba(0, 180, 240, .2);
}
.value-list .check svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.value-list strong { display: block; color: var(--ink); font-size: 1.03rem; margin-bottom: 4px; }
.value-list p { font-size: .94rem; margin: 0; }

/* ---------- CTA band ---------- */

/* ---------- client logo marquee (infinite running strip) ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  /* fade the strip in and out at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 20px;
  animation: marquee 46s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
/* the track holds two identical sets; shifting by half its width loops seamlessly */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 10px)); }  /* -10px = half the 20px gap */
}

.logo-chip {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 210px;
  height: 108px;
  margin: 0;
  padding: 20px 24px;
  background: #ffffff;                 /* white chip so multicolour logos read on any theme */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.logo-chip:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 0 30px rgba(0, 180, 240, .16);
}
.logo-chip img {
  max-height: 60px;
  max-width: 100%;
  width: auto;
  object-fit: contain;                 /* full colour — no greyscale */
}
.logo-chip figcaption {
  display: none;
  font-weight: 600;
  font-size: .92rem;
  color: #0b1636;
  text-align: center;
  line-height: 1.3;
}
/* graceful fallback if a logo file is missing */
.logo-chip.noimg img { display: none; }
.logo-chip.noimg figcaption { display: block; }

@media (max-width: 680px) {
  .logo-chip { width: 168px; height: 92px; padding: 16px 18px; }
  .logo-chip img { max-height: 48px; }
  .marquee-track { animation-duration: 32s; }
}

/* respect reduced-motion: stop the animation, let people scroll it instead */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
}

/* ---------- client reviews (testimonial masonry) ---------- */

.reviews-masonry {
  columns: 3 330px;      /* auto-responsive masonry, min 330px per column */
  column-gap: 22px;
}
.review-card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 22px;
  padding: 30px 30px 26px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.review-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 180, 240, .4);
  box-shadow: var(--shadow), 0 0 34px rgba(0, 180, 240, .12);
}
.review-card::before {          /* oversized decorative quote mark */
  content: '\201C';
  position: absolute; top: 6px; right: 22px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 84px; line-height: 1;
  color: var(--cyan); opacity: .13;
  pointer-events: none;
}
.review-stars {
  display: flex; gap: 3px;
  color: #f5b301; font-size: 15px; letter-spacing: 1px;
  margin-bottom: 15px;
}
.review-quote {
  position: relative; z-index: 1;
  margin: 0 0 22px;
  font-size: 1rem; line-height: 1.62; color: var(--ink);
}
.review-meta { display: flex; align-items: center; gap: 13px; }
.review-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-family: Georgia, serif; font-size: 26px; line-height: 1; padding-top: 8px;
  box-shadow: var(--glow-cyan);
}
.review-who { display: flex; flex-direction: column; }
.review-who strong { font-size: .92rem; color: var(--ink); }
.review-who span { font-size: .8rem; color: var(--muted); }
.review-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.review-tag {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan); background: rgba(0, 180, 240, .1); border: 1px solid rgba(0, 180, 240, .28);
  padding: 4px 10px; border-radius: 100px;
}

@media (max-width: 680px) {
  .reviews-masonry { columns: 1; }
}

/* the CTA band stays a dark hero in both themes so the light buttons pop */
.cta-band { text-align: center; overflow: hidden; background: #060d2a; border-radius: 0; }
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(700px 380px at 20% 0%, rgba(26, 95, 224, .45), transparent 70%),
    radial-gradient(640px 400px at 82% 100%, rgba(0, 180, 240, .32), transparent 70%);
}
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band h2 { max-width: 20ch; margin-inline: auto; color: #f2f6ff; }
.cta-band p { max-width: 56ch; margin-inline: auto; font-size: 1.08rem; color: #9aa8cf; }

/* ---------- forms ---------- */

.form-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(34px, 5vw, 66px); align-items: start; }
.form-card { padding: clamp(28px, 3.6vw, 44px); box-shadow: var(--shadow-lg); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; font: inherit; font-size: .95rem; color: var(--ink);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field select option { background: var(--panel); color: var(--ink); }
.field textarea { resize: vertical; min-height: 118px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: rgba(255, 255, 255, .07);
  border-color: rgba(0, 180, 240, .6); box-shadow: 0 0 0 4px rgba(0, 180, 240, .1);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-card .btn { width: 100%; margin-top: 8px; }
.form-note { font-family: var(--mono); font-size: .74rem; color: var(--muted); text-align: center; margin-top: 14px; }
.form-status {
  display: none; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(0, 180, 240, .1); border: 1px solid rgba(0, 180, 240, .3); color: var(--ink); font-size: .9rem;
}
.form-status.show { display: block; }
.form-status.is-ok { background: rgba(74, 222, 155, .12); border-color: rgba(74, 222, 155, .4); }
.form-status.is-error { background: rgba(255, 139, 139, .12); border-color: rgba(255, 139, 139, .4); }
.form-status a { color: var(--cyan); text-decoration: underline; }

.contact-item { display: flex; gap: 17px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.contact-item:first-of-type { border-top: 1px solid var(--line); }
.contact-item .icon { width: 44px; height: 44px; margin: 0; border-radius: 13px; flex: none; }
.contact-item .icon svg { width: 19px; height: 19px; }
.contact-item h3 { font-size: 1rem; margin-bottom: 3px; }
.contact-item p { font-size: .93rem; margin: 0; }

.expect { list-style: none; margin: 26px 0 0; padding: 0; counter-reset: e; }
.expect li { counter-increment: e; position: relative; padding-left: 46px; margin-bottom: 22px; font-size: .95rem; }
.expect li::before {
  content: counter(e); position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 180, 240, .1); border: 1px solid rgba(0, 180, 240, .3); color: var(--cyan);
  font-family: var(--mono); font-size: .78rem; display: grid; place-items: center;
}
.expect strong { color: var(--ink); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: clamp(56px, 6vw, 86px) 0 34px; background: var(--footer-bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 44px; }
.footer-brand p { font-size: .93rem; max-width: 34ch; margin-top: 20px; }
.footer-col h4 { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { font-size: .93rem; color: var(--body); transition: color .25s; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-top: 50px; padding-top: 28px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .76rem; color: var(--muted);
}

/* ---------- floating WhatsApp button ---------- */

.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366;
  box-shadow: 0 12px 30px rgba(37, 211, 102, .45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 18px 40px rgba(37, 211, 102, .55); }
.wa-float svg { position: relative; z-index: 1; width: 32px; height: 32px; fill: #fff; }
/* attention pulse */
.wa-float::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; z-index: 0;
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { opacity: 0; }
}
/* hover tooltip */
.wa-float-label {
  position: absolute; right: 70px; top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  background: var(--ink); color: var(--page-bg);
  font-size: .84rem; font-weight: 600;
  padding: 8px 13px; border-radius: 9px;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.wa-float-label::after {   /* little arrow pointing to the button */
  content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 9px; height: 9px; background: var(--ink); border-radius: 1px;
}
.wa-float:hover .wa-float-label { opacity: 1; transform: translateY(-50%) translateX(0); }

@media (max-width: 680px) {
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .wa-float svg { width: 28px; height: 28px; }
  .wa-float-label { display: none; }   /* no room for tooltip on small screens */
}
@media (prefers-reduced-motion: reduce) {
  .wa-float::after { animation: none; opacity: 0; }
}

/* ---------- reveal / motion ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-stagger].in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal, [data-stagger] > * { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  body::after { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .grid-4, .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 80px 0 auto; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 18px 22px 26px; background: var(--drawer-bg); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-140%); transition: transform .4s var(--ease); z-index: 55;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 15px; font-size: 1rem; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn { display: none; }
  .nav-links .nav-cta-mobile {
    display: block; margin-top: 14px; padding: 15px; border-radius: 100px;
    text-align: center; background: var(--grad); color: #fff; font-weight: 600;
  }
  .hero-grid, .problem-grid, .form-grid { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .process-grid, .stat-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  body::before { background-size: 42px 42px; }
}
