/* NexaFlow AI — shared styles (home + inner pages) */
:root {
  --bg: #07090b;
  --bg-2: #0d1014;
  --ink: #e7ebef;
  --muted: #8a96a8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #30d9e8;
  --accent-2: #77edf8;
  --violet: #7c6cff;
  --glass: rgba(18, 22, 28, 0.46);
  --glass-2: rgba(14, 17, 22, 0.58);
  --vh: 100vh;
  --pad: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --nav-top: max(14px, env(safe-area-inset-top, 0px));
  --safe-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  --display: "Space Grotesk", Inter, "Helvetica Neue", Arial, sans-serif;
  --body: Inter, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.55; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, a, input, select, textarea { font: inherit; color: inherit; }
a { text-decoration: none; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #031014; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- WebGL canvas: fixed behind everything ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: var(--vh); z-index: 0; pointer-events: none; }
.no-gl #gl { display: none; }
.no-gl body::before, .no-gl .gl-fallback { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(40vmax 40vmax at 70% 45%, rgba(48, 217, 232, 0.18), transparent 60%), radial-gradient(30vmax 30vmax at 30% 70%, rgba(124, 108, 255, 0.14), transparent 60%); }

/* ---------- preloader ---------- */
.boot { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg); transition: opacity 0.7s ease, visibility 0.7s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot p { font-size: 12.5px; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.42); }
.bar { width: 150px; height: 1px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.2s linear; }

/* ---------- nav ---------- */
.nav-wrap { position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 80; display: flex; justify-content: center; padding: 0 max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.nav { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 6px; width: min(100%, 760px); padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(28, 32, 38, 0.55); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.logo { display: flex; align-items: center; gap: 9px; padding-right: 10px; margin-right: auto; min-height: 44px; }
.logo span { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.logo b { color: var(--accent); font-weight: 600; }
.links { display: flex; align-items: center; gap: 2px; list-style: none; }
.links a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.66); transition: color 0.2s ease, background 0.2s ease; }
.links a:hover, .links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.07); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #031417; box-shadow: 0 6px 24px rgba(48, 217, 232, 0.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(48, 217, 232, 0.38); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); color: var(--ink); border: 1px solid rgba(255, 255, 255, 0.14); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.07); cursor: pointer; place-items: center; }
.menu-btn i { display: block; width: 16px; height: 1.5px; background: #fff; position: relative; transition: transform 0.25s ease; }
.menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: #fff; transition: transform 0.25s ease, top 0.25s ease; }
.menu-btn i::before { top: -5px; } .menu-btn i::after { top: 5px; }
.nav.open .menu-btn i { background: transparent; }
.nav.open .menu-btn i::before { top: 0; transform: rotate(45deg); }
.nav.open .menu-btn i::after { top: 0; transform: rotate(-45deg); }

/* ---------- typography + sections ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; }
.wrap { position: relative; z-index: 2; width: min(100% - 2 * var(--pad), var(--maxw)); margin: 0 auto; }
.section { position: relative; z-index: 2; padding: clamp(80px, 12vw, 150px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head h2 { font-size: clamp(32px, 4.6vw, 60px); margin: 14px 0 16px; }
.section-head p { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
.grad { background: linear-gradient(120deg, var(--accent), var(--accent-2) 45%, #b9a9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* ---------- HOME: scroll story ---------- */
.story { position: relative; z-index: 1; }
.stage { position: sticky; top: 0; height: var(--vh); overflow: hidden; }
.layer { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.hero { opacity: 1; isolation: isolate; }
.hero.has-video { background: #000; }
.hero-copy { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: calc(96px + env(safe-area-inset-top, 0px)) var(--pad) calc(60px + var(--safe-bottom)) max(var(--pad), env(safe-area-inset-left, 0px)); max-width: min(760px, 58vw); pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 { font-size: clamp(40px, 5.6vw, 84px); margin: 18px 0 20px; max-width: 13ch; color: rgba(255, 255, 255, 0.96); }
.hero-copy p.sub { font-size: clamp(16px, 1.35vw, 19px); color: rgba(231, 235, 239, 0.72); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-media { position: absolute; inset: 0; pointer-events: none; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: screen; will-change: transform; transform: translateZ(0); }
.cue { position: absolute; left: 50%; bottom: calc(18px + var(--safe-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.cue i { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.services-ui { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto; align-items: end; padding: calc(96px + env(safe-area-inset-top, 0px)) max(var(--pad), env(safe-area-inset-right, 0px)) calc(40px + var(--safe-bottom)) max(var(--pad), env(safe-area-inset-left, 0px)); pointer-events: none; }
.services-ui > * { pointer-events: auto; }
.services-ui { padding-right: calc(max(var(--pad), env(safe-area-inset-right, 0px)) + 70px); } /* room for the floating Call/WhatsApp buttons */
.menu { width: 300px; background: var(--glass); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; list-style: none; }
.menu-title { padding: 6px 12px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: rgba(255, 255, 255, 0.45); font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; transition: color 0.25s ease, background 0.25s ease; }
.opt small { font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.3); transition: color 0.25s ease; }
.opt:hover { color: rgba(255, 255, 255, 0.8); }
.opt.is-on { color: #fff; background: rgba(255, 255, 255, 0.07); }
.opt.is-on small { color: var(--accent); }
.hotspot { width: 54px; height: 54px; margin: 0 auto; align-self: center; border: 1.5px solid rgba(255, 255, 255, 0.5); border-radius: 50%; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.hotspot i { width: 8px; height: 8px; background: #fff; border-radius: 50%; }
.card { width: min(420px, 34vw); background: var(--glass-2); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border: 1px solid var(--line); border-radius: 18px; padding: 28px 28px 24px; min-height: 300px; }
.card .count { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); font-variant-numeric: tabular-nums; }
.card h2 { font-size: clamp(28px, 2.6vw, 40px); margin: 10px 0 10px; }
.card .pitch { color: rgba(231, 235, 239, 0.74); font-size: 15px; margin-bottom: 20px; }
.spec { display: flex; gap: 10px; margin: 0 0 14px; align-items: flex-start; }
.spec b { display: block; width: 3px; height: 14px; margin-top: 3px; background: var(--tone, var(--accent)); flex-shrink: 0; border-radius: 2px; }
.spec small { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); font-weight: 600; margin-bottom: 3px; }
.spec span { font-size: 14.5px; font-weight: 500; word-break: break-word; }
.tag { display: inline-block; margin-top: 3px; background: var(--tone, var(--accent)); color: #061013; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 6px; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--tone, var(--accent)); }
.more { position: absolute; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%); z-index: 6; background: rgba(20, 22, 26, 0.4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); color: rgba(255, 255, 255, 0.82); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; text-align: center; max-width: calc(100% - 28px); line-height: 1.3; }
.more:hover { color: #fff; }

/* ---------- HOME: content sections ---------- */
.grid-8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.svc { display: flex; flex-direction: column; gap: 10px; padding: 22px; min-height: 210px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease; }
.svc:hover { border-color: rgba(48, 217, 232, 0.45); transform: translateY(-3px); background: rgba(22, 28, 34, 0.6); }
.svc small { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 0.08em; }
.svc h3 { font-size: 21px; }
.svc p { color: var(--muted); font-size: 14.5px; }
.svc span { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; list-style: none; }
.steps li { padding: 26px 22px; border-top: 1px solid rgba(48, 217, 232, 0.5); background: linear-gradient(180deg, rgba(48, 217, 232, 0.07), transparent 70%); border-radius: 4px 4px 16px 16px; }
.steps li::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--display); font-size: 14px; color: var(--accent); margin-bottom: 18px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15px; }
.work { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project { display: flex; flex-direction: column; padding: 26px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.project small { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.project h3 { font-size: 24px; margin: 10px 0 10px; }
.project p { color: var(--muted); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 18px; list-style: none; }
.chips li { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: rgba(231, 235, 239, 0.8); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 20px; }
.kpis div { padding: 12px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.kpis b { display: block; font-family: var(--display); font-size: 22px; color: #fff; }
.kpis span { font-size: 11.5px; color: var(--muted); }
.project .btn { margin-top: auto; align-self: flex-start; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats div { padding: 26px 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); }
.stats b { display: block; font-family: var(--display); font-size: clamp(36px, 4vw, 54px); letter-spacing: -0.04em; }
.stats span { color: var(--muted); font-size: 14px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.stack li { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 14px; color: rgba(231, 235, 239, 0.85); }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { border-radius: 14px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; min-height: 44px; position: relative; font-weight: 600; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--accent); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }
.cta { min-height: 100vh; display: grid; align-items: center; text-align: center; }
.cta h2 { font-size: clamp(40px, 6.4vw, 92px); max-width: 14ch; margin: 18px auto 18px; }
.cta p.lead { color: rgba(231, 235, 239, 0.72); font-size: clamp(16px, 1.4vw, 19px); max-width: 52ch; margin: 0 auto 30px; }
.cta .hero-ctas { justify-content: center; }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; padding: clamp(20px, 3vw, 32px); }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(231, 235, 239, 0.8); }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(5, 7, 9, 0.55); font-size: 16px; font-weight: 400; color: var(--ink); }
.form textarea { min-height: 120px; resize: vertical; }
.form select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(48, 217, 232, 0.18); }
.form .row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form .note { font-size: 13px; color: var(--muted); }

/* ---------- inner pages ---------- */
.page-hero { position: relative; z-index: 2; min-height: min(92vh, 860px); display: grid; align-items: center; padding: calc(120px + env(safe-area-inset-top, 0px)) 0 60px; }
.page-hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.page-hero.compact { min-height: 0; padding-bottom: 24px; }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 76px); margin: 16px 0 18px; }
.page-hero p.sub { color: rgba(231, 235, 239, 0.74); font-size: clamp(16px, 1.4vw, 19px); max-width: 52ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.crumbs a:hover { color: var(--ink); }
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature { padding: 26px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p, .prose p, .prose li { color: var(--muted); font-size: 15.5px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: clamp(26px, 3vw, 38px); margin: 48px 0 14px; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0 20px; }
.prose li { margin: 6px 0; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: rgba(7, 9, 11, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 56px 0 calc(28px + var(--safe-bottom)); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h3 { font-family: var(--body); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 4px; }
.footer a { display: inline-flex; align-items: center; min-height: 32px; color: rgba(231, 235, 239, 0.8); font-size: 14.5px; }
.footer a:hover { color: var(--accent); }
.footer p { color: var(--muted); font-size: 14.5px; max-width: 36ch; margin-top: 12px; }
.legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); padding-right: 70px; font-size: 13px; color: var(--muted); }

/* ---------- quick contact: Call + WhatsApp ---------- */
.quick { position: fixed; z-index: 85; right: max(20px, env(safe-area-inset-right, 0px)); bottom: calc(6px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.quick a { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); transition: transform 0.2s ease; }
.quick a:hover { transform: translateY(-2px) scale(1.04); }
.quick span { display: none; }
.quick-call { background: linear-gradient(135deg, var(--accent), var(--violet)); }
.quick-wa { background: #25d366; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-quick { margin: 0 0 18px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .menu { width: min(280px, 34vw); }
  .card { width: min(400px, 40vw); }
  .grid-8 { grid-template-columns: repeat(2, 1fr); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .work, .related { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-wrap { padding: 0 10px; }
  .nav { padding: 4px 4px 4px 12px; }
  .links { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 20px; background: rgba(16, 19, 24, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
  .nav.open .links { display: flex; }
  .links a { min-height: 48px; font-size: 16px; }
  .menu-btn { display: grid; }
  .nav .btn-primary { padding: 0 14px; font-size: 13px; }
  .hero-copy { justify-content: flex-start; max-width: 100%; padding: calc(92px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .hero-copy h1 { font-size: clamp(34px, 9.4vw, 48px); max-width: 100%; margin: 14px 0 14px; }
  .hero-copy p.sub { font-size: 15.5px; }
  .hero-ctas { margin-top: 22px; }
  .services-ui { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: end; gap: 10px; padding: calc(76px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) calc(64px + var(--safe-bottom)) max(14px, env(safe-area-inset-left, 0px)); }
  .hotspot, .menu-title { display: none; }
  .menu { order: 2; width: 100%; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px; border-radius: 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .menu::-webkit-scrollbar { display: none; }
  .menu li { flex: 0 0 auto; scroll-snap-align: center; }
  .opt { white-space: nowrap; font-size: 13px; padding: 8px 12px; gap: 8px; }
  .card { order: 1; width: 100%; min-height: 0; padding: 18px 16px 12px; }
  .card h2 { font-size: clamp(24px, 6.6vw, 30px); margin: 6px 0 6px; }
  .card .pitch { font-size: 14px; margin-bottom: 12px; }
  .spec { margin-bottom: 10px; }
  .spec span { font-size: 13.5px; }
  .spec small { font-size: 9px; }
  .more { bottom: calc(12px + var(--safe-bottom)); font-size: 12.5px; padding: 10px 16px; }
  .page-hero { min-height: 0; padding-top: calc(100px + env(safe-area-inset-top, 0px)); }
  .page-hero .wrap { grid-template-columns: 1fr; }
  .page-hero .visual { order: -1; height: 38vh; }
  .page-hero.compact .visual { height: 18vh; }
  .split { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  /* bottom contact bar replaces the floating buttons on phones */
  :root { --bar-h: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .quick { left: 0; right: 0; bottom: 0; flex-direction: row; gap: 8px; padding: 8px max(12px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: rgba(7, 9, 11, 0.88); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .quick a { flex: 1; display: flex; gap: 8px; width: auto; height: 48px; border-radius: 14px; font-size: 15px; font-weight: 600; box-shadow: none; }
  .quick a:hover { transform: none; }
  .quick span { display: inline; }
  .footer { padding-bottom: calc(28px + var(--bar-h)); }
  .services-ui { padding-bottom: calc(16px + var(--bar-h)); }
  .more { display: none; }
  .legal { padding-right: 0; }
  .cue { bottom: calc(14px + var(--bar-h)); }
  .section { padding: clamp(64px, 14vw, 100px) 0; }
  .cta { min-height: 0; padding: 96px 0; }
  .hero-ctas .btn { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .grid-8, .steps, .stats { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; }
  .logo span { font-size: 16px; }
  .nav .btn-primary { display: none; }
  .card .spec:nth-of-type(2) { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .hero-copy h1 { font-size: 30px; }
  .services-ui { padding-top: calc(64px + env(safe-area-inset-top, 0px)); padding-bottom: calc(52px + var(--safe-bottom)); }
  .card { padding: 14px; min-height: 0; }
  .card h2 { font-size: 22px; }
  .card .pitch { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cue i { animation: none; }
}

/* ---------- AGENT MESH KNOWLEDGE GRAPH ---------- */
.agent-mesh-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
#meshCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.mesh-nodes-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.agent-node {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) translate(-50%, -50%);
  will-change: transform;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(14, 18, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 16px rgba(48, 217, 232, 0.05);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}
.agent-node:hover {
  border-color: rgba(48, 217, 232, 0.55);
  box-shadow: 0 14px 40px rgba(48, 217, 232, 0.25), inset 0 0 20px rgba(48, 217, 232, 0.15);
  z-index: 10;
}
.agent-node.is-active {
  background: rgba(18, 24, 32, 0.92);
  border-color: var(--accent);
  box-shadow: 0 0 35px rgba(48, 217, 232, 0.4), inset 0 0 24px rgba(48, 217, 232, 0.2);
  z-index: 15;
}
.node-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: visible;
}
.node-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px rgba(48, 217, 232, 0.4);
  transition: transform 0.3s ease;
}
.agent-node:hover .node-avatar {
  transform: scale(1.05);
}
.node-pulse {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #25d987;
  border: 2px solid #07090b;
  box-shadow: 0 0 8px #25d987;
}
.node-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid #25d987;
  animation: node-ripple 2s infinite ease-out;
}
@keyframes node-ripple {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.node-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.node-badge {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.node-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.node-feed {
  font-size: 11px;
  color: rgba(231, 235, 239, 0.7);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Central Orchestrator Node */
.orchestrator-node {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) translate(-50%, -50%);
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(48, 217, 232, 0.2), rgba(124, 108, 255, 0.2) 60%, rgba(7, 9, 11, 0.95));
  border: 2px solid rgba(48, 217, 232, 0.5);
  box-shadow: 0 0 50px rgba(48, 217, 232, 0.35), 0 0 100px rgba(124, 108, 255, 0.2), inset 0 0 30px rgba(48, 217, 232, 0.25);
  cursor: pointer;
  z-index: 8;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.orchestrator-node .node-avatar-wrap {
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
}
.orchestrator-node .node-avatar {
  border-color: #77edf8;
  box-shadow: 0 0 25px rgba(48, 217, 232, 0.6);
}
.orchestrator-node .node-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}
.orchestrator-node .node-badge {
  font-size: 9px;
  color: var(--accent);
}
.agent-node.is-active {
  background: rgba(14, 18, 26, 0.96);
  border-color: var(--accent);
  box-shadow: 0 0 45px rgba(48, 217, 232, 0.55), inset 0 0 24px rgba(48, 217, 232, 0.25);
  z-index: 25;
  padding: 12px 18px;
}
.agent-node.is-active .node-avatar-wrap {
  width: 54px;
  height: 54px;
}
.agent-node.is-active .node-avatar {
  border-width: 2.5px;
  border-color: #77edf8;
  box-shadow: 0 0 22px rgba(48, 217, 232, 0.7);
}
.agent-node.is-active .node-title {
  font-size: 14.5px;
  color: #fff;
  font-weight: 700;
}
.agent-node.is-active .node-feed {
  max-width: 260px;
  color: #77edf8;
  white-space: normal;
}

/* Service page hero visual agent card */
.service-agent-card {
  position: relative;
  background: var(--glass-2);
  border: 1px solid rgba(48, 217, 232, 0.3);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(48, 217, 232, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 440px;
  margin-left: auto;
}
.service-agent-top {
  display: flex;
  align-items: center;
  gap: 16px;
}
.service-agent-img {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 25px rgba(48, 217, 232, 0.4);
}
.service-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #25d987;
  margin-bottom: 4px;
}
.service-agent-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d987;
  box-shadow: 0 0 10px #25d987;
}
.service-agent-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.service-agent-feed {
  background: rgba(5, 7, 9, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: monospace;
  font-size: 12px;
  color: #77edf8;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-agent-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.service-agent-kpis div {
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}
.service-agent-kpis b {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  color: #fff;
}
.service-agent-kpis span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive adjustments for Agent Mesh */
@media (max-width: 900px) {
  .agent-node {
    padding: 3px;
  }
  .agent-node .node-info {
    display: none;
  }
  .agent-node .node-avatar-wrap,
  .agent-node.is-active .node-avatar-wrap {
    width: 36px;
    height: 36px;
  }
  .agent-node.is-active {
    padding: 3px;
  }
  /* decorative on phones: never steal taps from the hero buttons */
  .agent-mesh-stage * {
    pointer-events: none !important;
  }
  .orchestrator-node {
    width: 90px;
    height: 90px;
  }
  .orchestrator-node .node-avatar-wrap {
    width: 44px;
    height: 44px;
  }
  .orchestrator-node .node-title {
    font-size: 9px;
  }
  /* phones: the particle shape already fills the hero visual slot; the card would sit on top of it */
  .page-hero .service-agent-card {
    display: none;
  }
}
