/* =========================================================
   Brightloop Technologies LLP — site styles
   Dark-first, with a light theme (toggle in the header,
   follows the system setting until the visitor picks one).
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --accent: #3d8bff;          /* the one brand colour: electric blue (solid, no gradients) */
  --accent-hover: #6aa6ff;
  --accent-soft: rgba(61, 139, 255, .18);
  --on-accent: #0a0f1c;

  --bg: #0a0f1c;
  --bg-2: #0e1424;
  --bg-3: #141b2e;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #e8edf7;
  --muted: #97a3ba;
  --header-bg: rgba(10, 15, 28, .62);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);

  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* shape + type tokens */
  --font-mono: ui-monospace, Consolas, monospace;
  --pill: 999px;              /* buttons, tags, chips, header bar */
  --round: 50%;               /* small round UI: icon buttons, step numbers */
  --border-w: 1px;
  --card-shadow: none;
  --head-weight: 700;
  --head-tracking: -.025em;
  --head-case: none;
  --head-style: normal;

  color-scheme: dark;
}

/* light theme: chosen explicitly, or by the system when nothing is chosen */
:root[data-theme="light"] {
  --accent: #1d5fd6;
  --accent-hover: #164db0;
  --accent-soft: rgba(29, 95, 214, .14);
  --on-accent: #ffffff;
  --bg: #f4f7fc;
  --bg-2: #ffffff;
  --bg-3: #e9eef7;
  --surface: rgba(10, 20, 40, .03);
  --surface-2: rgba(10, 20, 40, .055);
  --line: rgba(10, 20, 40, .1);
  --line-2: rgba(10, 20, 40, .18);
  --text: #0b1220;
  --muted: #4f5b72;
  --header-bg: rgba(244, 247, 252, .72);
  --shadow: 0 30px 60px -34px rgba(15, 30, 60, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --accent: #1d5fd6;
    --accent-hover: #164db0;
    --accent-soft: rgba(29, 95, 214, .14);
    --on-accent: #ffffff;
    --bg: #f4f7fc;
    --bg-2: #ffffff;
    --bg-3: #e9eef7;
    --surface: rgba(10, 20, 40, .03);
    --surface-2: rgba(10, 20, 40, .055);
    --line: rgba(10, 20, 40, .1);
    --line-2: rgba(10, 20, 40, .18);
    --text: #0b1220;
    --muted: #4f5b72;
    --header-bg: rgba(244, 247, 252, .72);
    --shadow: 0 30px 60px -34px rgba(15, 30, 60, .35);
    color-scheme: light;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-style: var(--head-style);
  text-transform: var(--head-case);
  line-height: 1.08;
  letter-spacing: var(--head-tracking);
  margin: 0 0 .5em;
}
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* subtle grain + grid backdrop used by heroes */
.backdrop-grid {
  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: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: .55;
}

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 14px 0;
  transition: padding .3s var(--ease);
}
.site-header .bar {
  position: relative; /* the mobile menu and style list hang from it */
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.site-header.scrolled { padding: 10px 0; }
.site-header.scrolled .bar,
.site-header.menu-open .bar {
  background: var(--header-bg);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
          backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.28rem; letter-spacing: -.03em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .loop { color: var(--accent); }
.brand-mark .ring { stroke: var(--accent); }
.brand-mark .orbit { transform-origin: 16px 16px; animation: orbit 6s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  position: relative; padding: 9px 16px; border-radius: var(--pill);
  font-size: .96rem; font-weight: 500; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: var(--round);
  border: var(--border-w) solid var(--line); background: var(--surface);
  cursor: pointer; transition: background-color .2s, border-color .2s, transform .3s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
}
.theme-toggle:active { transform: rotate(40deg); }


.nav-toggle { display: none; }
.nav-toggle .i-close { display: none; }
.menu-open .nav-toggle .i-open { display: none; }
.menu-open .nav-toggle .i-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .header-actions .header-cta { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); /* positioned against .bar */
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; border-radius: var(--radius);
    background: var(--bg-2); border: var(--border-w) solid var(--line); box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav a:not(.btn) { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav a.active::after { left: auto; right: 18px; top: 50%; bottom: auto; margin: -2.5px 0 0; }
  .nav .btn { margin-top: 8px; justify-content: center; }
}
@media (min-width: 861px) {
  .nav .nav-cta-mobile { display: none; }
  .nav[hidden] { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  --bx: 0px; --by: 0px;
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--pill); border: 0;
  font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transform: translate(var(--bx), var(--by));
  transition: transform .35s var(--ease), box-shadow .3s, background-color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 10px 30px -12px var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 16px 40px -12px var(--accent); }
.btn-ghost { background: var(--surface); border: var(--border-w) solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 10px 18px; font-size: .94rem; }

/* ---------- Sections ---------- */
main { display: block; }
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section.tight { padding: clamp(56px, 7vw, 90px) 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; box-sizing: border-box;
  border: 5px solid var(--accent);
}
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.h-xl { font-size: clamp(2.6rem, 7.2vw, 5.6rem); letter-spacing: -.045em; line-height: .98; }
.h-lg { font-size: clamp(2.1rem, 4.8vw, 3.6rem); letter-spacing: -.035em; }
.h-md { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 640px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 940px);
  display: flex; align-items: center;
  padding: 140px 0 90px;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
}
.hero-inner { position: relative; max-width: 780px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 8px; border-radius: var(--pill);
  background: var(--surface); border: var(--border-w) solid var(--line);
  font-size: .88rem; color: var(--muted); margin-bottom: 28px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.chip .dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent);
}
.chip .dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); }
.hero h1 { margin-bottom: 28px; }
.hero h1 .line { display: block; }
.rotator {
  display: inline-grid; vertical-align: bottom;
  overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em;
}
.rotator > span {
  grid-area: 1 / 1;
  color: var(--accent);
  transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.rotator > span.is-out { transform: translateY(-105%); opacity: 0; }
.rotator > span.is-next { transform: translateY(105%); opacity: 0; }
.hero .lead { margin-bottom: 38px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--line-2);
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--text); animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) {
  .hero { padding-top: 120px; }
  .hero-canvas { opacity: .55; }
  .scroll-cue { display: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(150px, 18vw, 210px) 0 clamp(60px, 8vw, 100px); }
.page-hero .ring-deco {
  position: absolute; z-index: -1; right: -120px; top: 40px;
  width: clamp(280px, 36vw, 480px); aspect-ratio: 1; border-radius: 50%;
  border: clamp(14px, 1.8vw, 24px) solid var(--accent);
  opacity: .9; animation: spin 24s linear infinite;
}
.page-hero .ring-deco::after { /* the bright dot riding the loop */
  content: ""; position: absolute; left: 50%; top: 0;
  width: clamp(22px, 2.6vw, 34px); aspect-ratio: 1; border-radius: 50%;
  background: var(--text); transform: translate(-50%, -50%);
  margin-top: calc(clamp(14px, 1.8vw, 24px) / -2);
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-hero h1 { max-width: 900px; }
.crumbs { display: flex; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--text); }

/* ---------- Cards (spotlight + tilt) ---------- */
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; isolation: isolate;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  box-shadow: var(--card-shadow);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), border-color .3s, background-color .3s, box-shadow .3s, translate .3s var(--ease);
  overflow: hidden;
}
.card:hover { border-color: var(--accent); background: var(--surface-2); }
a.card:hover .icon, .card[data-tilt]:hover .icon { background: var(--accent); border-color: var(--accent); }
a.card:hover .icon svg, .card[data-tilt]:hover .icon svg { color: var(--on-accent); }
.card.tilting { transition: transform .12s linear, border-color .3s, background-color .3s; }
.card h3 { font-size: 1.4rem; margin-bottom: .45em; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--surface-2); border: var(--border-w) solid var(--line);
  transition: background-color .3s, border-color .3s;
}
.card .icon svg { width: 26px; height: 26px; color: var(--accent); transition: color .3s; }

/* bento grid for services */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento > :nth-child(1) { grid-column: span 4; }
.bento > :nth-child(2) { grid-column: span 2; }
.bento > :nth-child(3) { grid-column: span 2; }
.bento > :nth-child(4) { grid-column: span 4; }
.bento .card { display: flex; flex-direction: column; min-height: 300px; }
.bento .card .more {
  margin-top: auto; padding-top: 26px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .95rem; color: var(--text);
}
.bento .card .more svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.bento .card:hover .more svg { transform: translateX(4px); }
.bento .card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  display: inline-block; padding: 5px 12px; border-radius: var(--pill); font-size: .82rem; font-weight: 500;
  background: var(--surface-2); border: var(--border-w) solid var(--line); color: var(--muted);
}
.mock { /* little browser illustration inside the big cards */
  position: absolute; right: -30px; bottom: -40px; width: 52%; max-width: 360px; z-index: -1;
  border-radius: 14px; border: var(--border-w) solid var(--line-2); background: var(--bg-3);
  box-shadow: var(--shadow); opacity: .9;
  transform: rotate(-6deg); transition: transform .6s var(--ease);
}
.card:hover .mock { transform: rotate(-3deg) translateY(-8px); }
.mock .mbar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mock .mbar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mock .mbody { padding: 14px; display: grid; gap: 9px; }
.mock .mbody b { display: block; height: 9px; border-radius: 5px; background: var(--surface-2); }
.mock .mbody b.g { height: 46px; background: var(--accent); }
.mock .mbody b.s { width: 60%; }
.mock.code .mbody { font: 500 .78rem/1.6 var(--font-mono); color: var(--muted); }
.mock.code .k { color: var(--text); } .mock.code .f { color: var(--accent); } .mock.code .s { color: var(--accent); }
.has-mock .card-copy { max-width: 56%; }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > :nth-child(n) { grid-column: span 1; }
  .bento > :nth-child(1), .bento > :nth-child(4) { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento > :nth-child(n) { grid-column: span 1; }
  .mock { display: none; }
  .has-mock .card-copy { max-width: none; }
  .bento .card { min-height: 0; }
}

/* ---------- Marquee (client names) ---------- */
.marquee-wrap { padding: 46px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee-label { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.marquee {
  display: flex; overflow: hidden; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; flex: none; align-items: center; gap: 56px; padding-right: 56px;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li {
  display: inline-flex; align-items: center; gap: 56px;
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: -.02em; white-space: nowrap; color: var(--muted);
  transition: color .3s;
}
.marquee-track li:hover { color: var(--text); }
.marquee-track li::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--accent);
}
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Process ---------- */
.steps { position: relative; display: grid; gap: 18px; counter-reset: step; --p: 0; }
.steps::before, .steps::after {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; border-radius: 2px;
}
.steps::before { background: var(--line); }
.steps::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--p)); }
.step {
  position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 22px; align-items: start;
  padding: 6px 0;
}
.step .num {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: var(--round);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  background: var(--bg); border: var(--border-w) solid var(--line-2); color: var(--muted);
  transition: color .4s, border-color .4s, box-shadow .4s, background-color .4s;
}
.section.alt .step .num { background: var(--bg-2); }
.step.lit .num { color: var(--on-accent); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.step .body { padding: 10px 0 22px; }
.step h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: .3em; }
.step p { color: var(--muted); margin: 0; max-width: 620px; }
.step .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.split .sticky { position: sticky; top: 120px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split .sticky { position: static; }
}

/* ---------- Feature grid (why us / principles) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feature h3 { font-size: 1.2rem; }

/* ---------- Tech stack ---------- */
.stack { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.stack li {
  padding: 12px 20px; border-radius: var(--pill); font-weight: 500;
  border: var(--border-w) solid var(--line); background: var(--surface);
  transition: transform .3s var(--ease), border-color .3s, background-color .3s, color .3s;
}
.stack li:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.stack-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stack-groups h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-family: var(--font-body); font-weight: 600; }
.stack-groups ul { display: grid; gap: 8px; }
.stack-groups li { font-weight: 500; }
@media (max-width: 900px) { .stack-groups { grid-template-columns: 1fr 1fr; } }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: calc(var(--radius) * 1.5);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  background: var(--bg-3); border: var(--border-w) solid var(--line);
  text-align: center;
}
.cta::before, .cta::after {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  border: 2px solid var(--line-2);
}
.cta::after {
  border-color: transparent; border-top-color: var(--accent); border-width: 3px;
  animation: spin 8s linear infinite;
}
.cta h2 { max-width: 760px; margin-left: auto; margin-right: auto; }
.cta .lead { margin: 0 auto 34px; }
.cta .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- Services page detail ---------- */
.svc-nav { display: grid; gap: 4px; }
.svc-nav a {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px;
  color: var(--muted); font-weight: 500; transition: background-color .2s, color .2s;
}
.svc-nav a span { font-family: var(--font-head); font-size: .85rem; opacity: .7; }
.svc-nav a:hover, .svc-nav a.on { background: var(--surface-2); color: var(--text); }
.svc { padding: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.svc .no { font-family: var(--font-head); font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.svc h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.svc > p { color: var(--muted); }
.svc h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin: 26px 0 12px; }
.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-1.6 17.2-5-5 1.7-1.7 3.3 3.3 7.5-7.5 1.7 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-1.6 17.2-5-5 1.7-1.7 3.3 3.3 7.5-7.5 1.7 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 640px) { .ticks { grid-template-columns: 1fr; } }

.models .card { display: flex; flex-direction: column; }
.models .card .label { font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.models .card ul { margin-top: 18px; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  border: var(--border-w) solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color .3s, background-color .3s;
}
.faq details[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: var(--border-w) solid var(--line-2); }
.faq summary .pm::before, .faq summary .pm::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -.8px 0 0 -5.5px;
  background: currentColor; transition: transform .35s var(--ease);
}
.faq summary .pm::after { transform: rotate(90deg); }
.faq details[open] .pm::after { transform: rotate(0deg); }
.faq .ans { padding: 0 24px 22px; color: var(--muted); }
.faq .ans p:last-child { margin: 0; }

/* ---------- About ---------- */
.statement { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.8rem); line-height: 1.2; letter-spacing: -.03em; max-width: 1000px; }
.statement .w { opacity: .18; transition: opacity .4s; }
.statement .w.on { opacity: 1; }
.loop-diagram { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; }
.loop-diagram svg { width: 100%; height: 100%; overflow: visible; }
.loop-diagram .lbl { font: 700 24px var(--font-head); fill: var(--text); }
.loop-diagram .sub { font: 400 18px var(--font-body); fill: var(--muted); }
.loop-diagram .track { stroke: var(--line-2); }
.loop-diagram .ring { stroke: var(--accent); }
.loop-diagram .node { fill: var(--accent); }
.loop-diagram .core { fill: var(--text); }
.loop-diagram .runner { transform-origin: 220px 220px; animation: spin 8s linear infinite; }
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.clients .card { display: flex; align-items: center; min-height: 120px; }
.clients .card strong { font-family: var(--font-head); font-size: 1.25rem; letter-spacing: -.02em; }
@media (max-width: 900px) { .clients { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .clients { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 14px; margin: 34px 0; }
.info-list a, .info-list div {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-sm);
  border: var(--border-w) solid var(--line); background: var(--surface); transition: border-color .3s, background-color .3s;
}
.info-list a:hover { border-color: var(--line-2); background: var(--surface-2); }
.info-list .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.info-list .ic svg { width: 21px; height: 21px; color: var(--accent); }
.info-list small { display: block; color: var(--muted); font-size: .84rem; }
.info-list strong { font-weight: 600; }
.next-steps { counter-reset: n; display: grid; gap: 14px; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 34px 1fr; gap: 14px; color: var(--muted); }
.next-steps li::before {
  content: counter(n); width: 34px; height: 34px; border-radius: var(--round); display: grid; place-items: center;
  border: var(--border-w) solid var(--line-2); color: var(--text); font-weight: 600; font-size: .9rem;
}
.next-steps strong { color: var(--text); display: block; }

.form-card { padding: clamp(24px, 4vw, 44px); border-radius: calc(var(--radius) * 1.2); background: var(--bg-2); border: var(--border-w) solid var(--line); box-shadow: var(--shadow); }
.form-card h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.field { position: relative; margin-bottom: 18px; }
.field > label, .group-label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: var(--border-w) solid var(--line-2); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2397a3ba' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field select option { background: var(--bg-2); color: var(--text); }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface-2);
}
.field .err { display: none; color: var(--accent); font-size: .85rem; margin-top: 6px; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--accent); }
.field.invalid .err { display: block; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { position: relative; cursor: pointer; }
.pills input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pills span {
  display: inline-block; padding: 9px 16px; border-radius: var(--pill); font-size: .93rem; font-weight: 500;
  border: var(--border-w) solid var(--line-2); background: var(--surface); color: var(--muted);
  transition: all .25s var(--ease);
}
.pills label:hover span { color: var(--text); border-color: var(--text); }
.pills input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pills input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset.field legend { padding: 0; }
.form-note {
  padding: 14px 16px; border-radius: 12px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--accent); font-size: .95rem;
}
.form-note a { text-decoration: underline; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.form-foot small { color: var(--muted); }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; position: relative; overflow: hidden; isolation: isolate; }
.nf .big { font-family: var(--font-head); font-weight: 800; font-size: clamp(7rem, 26vw, 16rem); line-height: .9; letter-spacing: -.06em; display: flex; justify-content: center; align-items: center; gap: .04em; }
.nf .big .o {
  position: relative; width: .72em; height: .72em; border-radius: 50%; box-sizing: border-box;
  border: .17em solid var(--accent);
  animation: spin 6s linear infinite;
}
.nf .big .o::after {
  content: ""; position: absolute; left: 50%; top: -.085em; width: .13em; height: .13em; border-radius: 50%;
  background: var(--text); transform: translate(-50%, -50%);
}
.nf .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { padding: 80px 0 34px; border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 80px); }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.foot-top p { color: var(--muted); max-width: 320px; margin-top: 16px; }
.foot-top h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.foot-top li { margin-bottom: 10px; }
.foot-top li a { transition: color .2s; }
.foot-top li a:hover { color: var(--accent); }
.foot-word {
  font-family: var(--font-head); font-weight: 800; letter-spacing: -.06em; line-height: .8;
  font-size: clamp(3.6rem, 16.5vw, 15rem); text-align: center; user-select: none;
  color: var(--line);
  margin: 0 0 30px; white-space: nowrap; overflow: hidden;
}
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-top { grid-template-columns: 1fr; } }

/* back to top */
.totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  background: var(--bg-2);
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .marquee { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .marquee-track[aria-hidden="true"], .marquee-track li[aria-hidden="true"] { display: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; gap: 18px 40px; padding: 0; }
  .marquee-track li { gap: 40px; }
  .statement .w { opacity: 1; }
}
