/* ============================================================
   QUADROAI — AI Operations Platform · Info site
   Design system per product brief (midnight theme)
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #06070a;
  --surface: #0d0f15;
  --surface-2: #161a24;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.11);

  /* Text */
  --text: #e7ebf3;
  --text-2: #9ca3af;
  --text-3: #5a6478;

  /* Brand / accents */
  --accent: #5eead4;
  --accent-hover: #34e0c0;
  --iris: #7c8cff;
  --rose: #fb7185;
  --amber: #f59e0b;

  /* Agent palette (tailwind-ish) */
  --sky: #38bdf8;
  --violet: #a78bfa;
  --emerald: #34d399;
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --slate: #94a3b8;
  --lime: #a3e635;
  --teal: #5eead4;
  --fuchsia: #e879f9;
  --orange: #fb923c;
  --pink: #f472b6;
  --red: #f87171;
  --purple: #c084fc;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  cursor: default;
}

::selection { background: rgba(94, 234, 212, 0.24); color: #fff; }

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

/* ---------- atmosphere layers (fixed) ---------- */
.fx-grid, .fx-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.fx-grid {
  background-image:
    linear-gradient(rgba(94, 234, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.5;
}
.fx-noise {
  opacity: 0.035; z-index: 2; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.orb {
  position: fixed; border-radius: 50%; filter: blur(90px);
  pointer-events: none; z-index: 1; opacity: 0.5; will-change: transform;
}
.orb--teal { width: 620px; height: 620px; top: -180px; right: -140px;
  background: radial-gradient(circle, rgba(94,234,212,0.42), transparent 65%); }
.orb--iris { width: 680px; height: 680px; bottom: 4%; left: -220px;
  background: radial-gradient(circle, rgba(124,140,255,0.36), transparent 65%); }

/* content above atmosphere */
.shell { position: relative; z-index: 3; }

/* ============================================================
   BOOT SCREEN
   ============================================================ */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-hex { width: 84px; height: 84px; color: var(--accent); animation: spin 28s linear infinite; }
.boot-bar { width: 220px; height: 2px; background: var(--border-strong); border-radius: 2px; overflow: hidden; }
.boot-bar > i { display: block; height: 100%; width: 0%; background: var(--accent);
  box-shadow: 0 0 16px var(--accent); transition: width 0.2s linear; }
.boot-log { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-3); height: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 9, 13, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand svg { width: 30px; height: 30px; color: var(--accent); animation: spin 28s linear infinite; }
.brand .wm { display: flex; flex-direction: column; line-height: 1; }
.brand .wm b { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.brand .wm span { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.32em;
  color: var(--text-3); margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-2); padding: 9px 14px; border-radius: var(--r-md);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-cta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bg) !important; background: var(--accent); padding: 11px 20px; border-radius: var(--r-md);
  font-weight: 600; transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(94,234,212,0.3); }
.nav-burger { display: none; }

/* ============================================================
   SHARED
   ============================================================ */
section { position: relative; padding: clamp(90px, 12vh, 160px) var(--gutter); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); display: inline-block; }

h2.sec-title {
  font-size: clamp(34px, 5vw, 60px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.04;
  margin: 22px 0 0; max-width: 18ch; text-wrap: balance;
}
.sec-sub { color: var(--text-2); font-size: clamp(16px, 1.4vw, 19px); max-width: 56ch; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: var(--r-md);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; cursor: pointer; transition: all 0.28s var(--ease); border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(94,234,212,0.28); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 16px; height: 16px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); }
.reveal[data-anim="left"] { transform: translateX(-44px); }
.reveal[data-anim="right"] { transform: translateX(44px); }
.reveal[data-anim="scale"] { transform: scale(0.9); }
.reveal[data-anim="blur"] { filter: blur(14px); transform: translateY(14px); }
.reveal[data-anim="rise"] { transform: translateY(48px); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }

/* top scroll-progress bar */
.scroll-prog { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 300;
  background: linear-gradient(90deg, var(--accent), var(--iris));
  box-shadow: 0 0 14px rgba(94,234,212,0.7); transition: width 0.08s linear; }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--gutter) 80px; overflow: hidden; position: relative; }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-veil { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 2%, rgba(6,7,10,0.78) 24%, rgba(6,7,10,0.35) 46%, transparent 64%),
    linear-gradient(180deg, rgba(6,7,10,0.5) 0%, transparent 22%, transparent 64%, var(--bg) 100%); }
.hero h1, .hero-lede { text-shadow: 0 2px 40px rgba(6,7,10,0.7); }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(255,255,255,0.02); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(94,234,212,0.6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94,234,212,0.55); }
  70% { box-shadow: 0 0 0 9px rgba(94,234,212,0); }
  100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); }
}
.hero h1 {
  font-size: clamp(44px, 8.2vw, 116px); font-weight: 500; line-height: 0.96; letter-spacing: -0.035em;
  margin: 30px 0 0; max-width: 16ch; text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 400;
  background: linear-gradient(120deg, var(--accent), var(--iris) 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lede { color: var(--text-2); font-size: clamp(17px, 1.7vw, 22px); max-width: 52ch; margin-top: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 64px;
  padding-top: 36px; border-top: 1px solid var(--border); }
.hero-meta div b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.hero-meta div span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-3); }

.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--text-3), transparent); display: block; }



/* ============================================================
   HOW IT WORKS — orchestration diagram
   ============================================================ */
.how { background: linear-gradient(180deg, transparent, rgba(13,15,21,0.5), transparent); }
.diagram { margin-top: 64px; position: relative; }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.flow-line { fill: none; stroke: rgba(94,234,212,0.2); stroke-width: 1.5; }
.flow-pulse { fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-dasharray: 2 98; filter: drop-shadow(0 0 5px var(--accent)); }
.diagram-mobile { display: none; }
.node-card {
  position: absolute; transform: translate(-50%, -50%);
  background: rgba(22,26,36,0.72); border: 1px solid var(--border); backdrop-filter: blur(12px);
  border-radius: var(--r-lg); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  white-space: nowrap; box-shadow: 0 8px 28px rgba(0,0,0,0.4); font-size: 13px;
}
.node-card i { width: 16px; height: 16px; }
.node-card.core {
  padding: 18px 24px; border-color: rgba(94,234,212,0.4); background: rgba(13,18,22,0.85);
  box-shadow: 0 0 0 1px rgba(94,234,212,0.18), 0 12px 50px rgba(94,234,212,0.18);
}
.node-card.core b { font-size: 16px; }
.node-card .role { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-3); }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 80px; }
.how-step { border-top: 1px solid var(--border); padding-top: 22px; }
.how-step .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.2em; }
.how-step h4 { font-size: 19px; font-weight: 600; margin: 14px 0 8px; }
.how-step p { color: var(--text-2); font-size: 15px; }

/* ============================================================
   AGENTS CATALOG
   ============================================================ */
.agents-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; }
.family { margin-top: 64px; }
.family-label { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.family-label span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.family-label .ln { flex: 1; height: 1px; background: var(--border); }
.family-label .ct { color: var(--text-3); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 16px; }
.agent {
  position: relative; border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; background: linear-gradient(180deg, rgba(22,26,36,0.5), rgba(13,15,21,0.4));
  overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.agent::before { content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), color-mix(in srgb, var(--c) 16%, transparent), transparent 60%);
  transition: opacity 0.4s; }
.agent:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.agent:hover::before { opacity: 1; }
.agent .ico {
  width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); color: var(--c); margin-bottom: 18px;
}
.agent .ico svg { width: 20px; height: 20px; }
.agent h5 { font-size: 17px; font-weight: 600; }
.agent .tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--c); margin-top: 3px; }
.agent p { color: var(--text-2); font-size: 13.5px; margin-top: 12px; line-height: 1.5; }
.agent.special { grid-column: span 2; border-color: rgba(192,132,252,0.3);
  background: linear-gradient(120deg, rgba(192,132,252,0.08), rgba(13,15,21,0.4)); }

/* ============================================================
   CAPABILITIES
   ============================================================ */
.caps-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; margin-top: 64px; }
.cap {
  border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px;
  background: rgba(13,15,21,0.5); transition: border-color 0.4s, transform 0.4s var(--ease);
}
.cap:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.cap.wide { grid-column: 1 / -1; }
.cap h4 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.cap h4 svg { width: 20px; height: 20px; color: var(--accent); }
.cap > p { color: var(--text-2); font-size: 15px; margin-top: 12px; max-width: 60ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-2);
  padding: 7px 12px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: rgba(255,255,255,0.02); transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.chip:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: rgba(94,234,212,0.06); }

/* ============================================================
   INTEGRATIONS
   ============================================================ */
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 56px; }
.int {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: rgba(13,15,21,0.5); transition: border-color 0.3s, transform 0.3s;
}
.int:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.int .ico { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); flex-shrink: 0; }
.int .ico svg { width: 19px; height: 19px; }
.int b { font-size: 15px; font-weight: 600; display: block; }
.int .st { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }
.int .st.on { color: var(--accent); }
.int .st.soon { color: var(--text-3); }
.int .st .d { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.int.soon { opacity: 0.6; }

/* ============================================================
   TECH STACK
   ============================================================ */
.stack-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.tech {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; padding: 12px 20px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-2);
  background: rgba(255,255,255,0.02); transition: all 0.3s;
}
.tech:hover { color: var(--text); border-color: var(--accent); }
.arch { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-top: 64px; }
.arch-box { border: 1px solid var(--border); border-radius: var(--r-xl); padding: 32px;
  background: rgba(13,15,21,0.5); text-align: center; }
.arch-box .tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent); }
.arch-box h4 { font-size: 24px; font-weight: 600; margin: 12px 0 6px; }
.arch-box p { color: var(--text-2); font-size: 14px; }
.arch-conn { color: var(--text-3); font-family: var(--font-mono); font-size: 11px; text-align: center; }
.arch-conn svg { width: 36px; height: 36px; color: var(--accent); display: block; margin: 0 auto 6px; }

/* ============================================================
   SECURITY
   ============================================================ */
.sec-bg { background:
  radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,140,255,0.07), transparent 70%); }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 64px; }
.sec-item { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px;
  background: rgba(13,15,21,0.4); transition: border-color 0.3s; }
.sec-item:hover { border-color: var(--border-strong); }
.sec-item .ico { width: 36px; height: 36px; color: var(--iris); margin-bottom: 16px; }
.sec-item .ico svg { width: 24px; height: 24px; }
.sec-item h5 { font-size: 16px; font-weight: 600; }
.sec-item p { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.sec-note { margin-top: 40px; font-family: var(--font-mono); font-size: 13px; color: var(--text-3);
  border-left: 2px solid var(--border-strong); padding-left: 18px; max-width: 70ch; line-height: 1.7; }

/* ============================================================
   METRICS BAND
   ============================================================ */
.metrics { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(13,15,21,0.4); }
.metrics .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); }
.metric { background: var(--bg); padding: 44px 32px; text-align: center; }
.metric b { font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -0.02em;
  display: block; line-height: 1; background: linear-gradient(160deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.metric span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-3); display: block; margin-top: 14px; }

/* ============================================================
   CTA + FOOTER
   ============================================================ */
.cta { text-align: center; }
.cta h2 { font-size: clamp(38px, 6vw, 78px); font-weight: 500; letter-spacing: -0.03em; line-height: 1;
  max-width: 16ch; margin: 24px auto 0; text-wrap: balance; }
.cta h2 em { font-style: italic; background: linear-gradient(120deg, var(--accent), var(--iris));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cta .hero-actions { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 60px var(--gutter) 48px; }
.foot { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 24px; }
.foot .status { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.foot .status .d { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); animation: pulse 2.4s infinite; }
.foot .meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text-3); }

/* ---------- mobile menu ---------- */
.nav-burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: none; border: 1px solid var(--border-strong);
  border-radius: var(--r-md); cursor: pointer; padding: 0; }
.nav-burger span { display: block; width: 19px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.25s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mob-menu { position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px); z-index: 99;
  background: rgba(8,9,13,0.97); backdrop-filter: blur(20px); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; padding: 96px 24px 32px;
  transform: translateX(100%); transition: transform 0.4s var(--ease); visibility: hidden; }
.mob-menu.open { transform: none; visibility: visible; }
.mob-menu a { font-size: 18px; font-weight: 500; color: var(--text); padding: 15px 12px;
  border-radius: var(--r-md); transition: background 0.2s, color 0.2s; }
.mob-menu a:active { background: rgba(255,255,255,0.05); }
.mob-menu .mob-cta { margin-top: 16px; background: var(--accent); color: var(--bg); font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.mob-menu .mob-cta i { width: 17px; height: 17px; }
body.menu-open { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav { padding: 14px var(--gutter); }
  .caps-grid { grid-template-columns: 1fr; }
  .arch { grid-template-columns: 1fr; }
  .arch-conn { transform: rotate(90deg); }
  .how-steps { grid-template-columns: 1fr; gap: 0; }
  .how-step { border-top: 1px solid var(--border); padding: 22px 0; }
  .metrics .wrap { grid-template-columns: repeat(2, 1fr); }
  .agent.special { grid-column: auto; }
  .diagram { display: none; }
  .diagram-mobile { display: block !important; }
  .hero-meta { gap: 28px 32px; }
}
@media (max-width: 600px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; }
  section { padding: clamp(64px, 9vh, 90px) var(--gutter); }
  .hero { padding-top: 104px; min-height: auto; }
  .hero h1 { font-size: clamp(38px, 11vw, 56px); }
  .nav-cta { display: none; }
  .agent-grid { grid-template-columns: 1fr; }
  .metrics .wrap { grid-template-columns: 1fr; }
  .hero-meta { gap: 22px 28px; }
  .hero-meta div b { font-size: 26px; }
  .btn { padding: 13px 22px; font-size: 11px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1; justify-content: center; min-width: 0; }
  .int-grid { grid-template-columns: 1fr; }
  .sec-grid { grid-template-columns: 1fr; }
  h2.sec-title { font-size: clamp(28px, 8vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.1ms !important; }
}

/* mobile overflow safety */
html { overflow-x: clip; }

/* consent checkbox (152-ФЗ) */
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 14px; cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex-shrink: 0;
  margin-top: 1px; border: 1px solid var(--border-strong); border-radius: 5px;
  background: rgba(255,255,255,0.03); cursor: pointer; position: relative; transition: background .2s, border-color .2s; }
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #04201c; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent input.bad { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(244,63,94,0.18); }
.consent span { font-size: 12.5px; line-height: 1.45; color: var(--text-2); text-transform: none; letter-spacing: normal; font-family: var(--font-display); }
.consent a { color: var(--accent); text-decoration: underline; }

/* ── large-screen (PC) optimization — only >1500px, mobile/laptop untouched ── */
@media (min-width: 1600px) { :root { --maxw: 1360px; } }
@media (min-width: 1920px) { :root { --maxw: 1480px; } }
@media (min-width: 2560px) { :root { --maxw: 1680px; } body { font-size: 18px; } }
