/* ==========================================================================
   RemoteVibe · «Как это работает» (Liquid Glass, Apple-style motion)
   Loaded after liquid.css. Everything is scoped under .hw.
   Scroll-driven effects use CSS animation-timeline (Chrome, Safari 26+);
   motion.js provides an IntersectionObserver fallback for the word reveal.
   ========================================================================== */

.hw {
  --hw-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hw-grad-a: #0a8a7f;
  --hw-grad-b: #0284c7;
  --hw-term-bg: rgba(6, 23, 34, 0.86);
  position: relative;
  overflow-x: clip;
  padding-bottom: 40px;
}

html[data-theme="dark"] .hw {
  --hw-grad-a: #7ff3e3;
  --hw-grad-b: #38bdf8;
  --hw-term-bg: rgba(0, 0, 0, 0.38);
}

.hw h1,
.hw h2,
.hw h3,
.hw p {
  margin: 0;
}

.hw-wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
}

.hw-ic {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Living light ---------- */
.hw-wall {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hw-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--lg-orb-o);
  animation: hw-float 20s ease-in-out infinite alternate;
}

.hw-orb-1 { width: 720px; height: 720px; left: 56%; top: -260px; background: radial-gradient(circle, rgba(45, 212, 191, 0.55), transparent 65%); }
.hw-orb-2 { width: 620px; height: 620px; left: -14%; top: 420px; background: radial-gradient(circle, rgba(56, 189, 248, 0.4), transparent 65%); animation-duration: 24s; }
.hw-orb-3 { width: 560px; height: 560px; left: 44%; top: 2200px; background: radial-gradient(circle, rgba(52, 211, 153, 0.32), transparent 65%); animation-duration: 28s; }
.hw-orb-4 { width: 700px; height: 700px; left: -8%; top: 4100px; background: radial-gradient(circle, rgba(45, 212, 191, 0.32), transparent 65%); animation-duration: 22s; }

@keyframes hw-float {
  to { transform: translate3d(60px, -40px, 0) scale(1.1); }
}

/* ---------- Hero ---------- */
.hw-hero {
  padding: 72px 0 24px;
  text-align: center;
}

.hw-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--lg-accent-ink);
  background: color-mix(in srgb, var(--lg-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lg-accent) 30%, transparent);
}

.hw-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lg-accent);
  animation: hw-ping 2s infinite;
}

@keyframes hw-ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lg-accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

.hw-h1 {
  margin-top: 28px !important;
  font-size: clamp(2.75rem, 7.4vw, 6.5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hw-grad {
  background: linear-gradient(100deg, var(--lg-ink) 0%, var(--hw-grad-a) 35%, var(--hw-grad-b) 65%, var(--lg-ink) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hw-sheen 9s ease-in-out infinite;
}

@keyframes hw-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hw-lead {
  max-width: 680px;
  margin: 28px auto 0 !important;
  color: var(--lg-muted);
  font-size: clamp(1.06rem, 1.6vw, 1.32rem);
  line-height: 1.5;
}

.hw-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.hw-rise {
  opacity: 0;
  animation: hw-rise 1.1s var(--hw-ease) forwards;
}

.hw-d1 { animation-delay: 0.08s; }
.hw-d2 { animation-delay: 0.18s; }
.hw-d3 { animation-delay: 0.3s; }
.hw-d4 { animation-delay: 0.45s; }
.hw-d5 { animation-delay: 0.65s; }

@keyframes hw-rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- Hero stage ---------- */
.hw-stage {
  position: relative;
  height: 600px;
  margin-top: 72px;
  perspective: 1600px;
  text-align: left;
}

.hw-mac {
  position: absolute !important;
  left: 0;
  top: 30px;
  width: 720px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.42), 0 0 0 1px var(--lg-hair);
  transform: rotateY(10deg) rotateX(4deg);
  transform-origin: left center;
}

html[data-theme="light"] .hw-mac { box-shadow: 0 40px 80px rgba(18, 60, 84, 0.26), 0 0 0 1px var(--lg-hair); }

/* Screenshots: the one of the site theme is shown. */
.hw-shot { display: block; width: 100%; height: auto; }
html[data-theme="dark"] .hw-shot-light,
html:not([data-theme="dark"]) .hw-shot-dark { display: none; }

/* Phone — always a dark device, in both themes */
.hw-phone-wrap {
  position: absolute;
  right: 20px;
  top: 0;
}

.hw-phone {
  width: 290px;
  padding: 12px;
  border-radius: 52px;
  background: linear-gradient(160deg, #2b3540, #0b1117);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.22);
  transform: rotateY(-12deg) rotateX(4deg);
  transform-origin: right center;
  animation: hw-bob 7s ease-in-out infinite;
}

@keyframes hw-bob { 50% { translate: 0 -10px; } }

html[data-theme="light"] .hw-phone {
  box-shadow:
    0 40px 80px rgba(18, 60, 84, 0.28),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.hw-screen {
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 42px;
  background: #0b1a26;
}

html[data-theme="light"] .hw-screen { background: #cfe6ee; }

/* Beam between devices */
.hw-beam {
  position: absolute;
  left: 700px;
  right: 300px;
  top: 262px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(62, 230, 207, 0.1), rgba(62, 230, 207, 0.65), rgba(56, 189, 248, 0.1));
  box-shadow: 0 0 24px rgba(62, 230, 207, 0.6);
}

.hw-pkt {
  position: absolute;
  top: -4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #bffcf3;
  box-shadow: 0 0 18px 4px rgba(62, 230, 207, 0.9);
  animation: hw-pkt 2.4s linear infinite;
}

.hw-pkt-b { animation-delay: 0.8s; }

.hw-pkt-c {
  animation-delay: 1.6s;
  animation-direction: reverse;
  background: #bfe8fc;
  box-shadow: 0 0 18px 4px rgba(56, 189, 248, 0.9);
}

@keyframes hw-pkt {
  0% { left: 0; opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { left: calc(100% - 12px); opacity: 0; }
}

.hw-beam-tag {
  position: absolute !important;
  left: 50%;
  top: -58px;
  translate: -50% 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.hw-sec { padding-top: 140px; }

.hw-h2 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* ---------- Sticky stacked chapters ---------- */
.hw-stack {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 56px;
  padding-bottom: 40px;
}

.hw-chap {
  position: sticky !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
  min-height: 560px;
  padding: 56px;
  border-radius: 40px;
  transform-origin: 50% 0;
}

.hw-chap:nth-child(1) { top: calc(var(--rv-nav-height, 64px) + 40px); }
.hw-chap:nth-child(2) { top: calc(var(--rv-nav-height, 64px) + 64px); }
.hw-chap:nth-child(3) { top: calc(var(--rv-nav-height, 64px) + 88px); }

.hw-num {
  display: block;
  font-size: 120px;
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, var(--hw-grad-a), color-mix(in srgb, var(--hw-grad-a) 5%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hw-chap h3 {
  margin-top: 20px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hw-chap-copy p {
  margin-top: 16px;
  color: var(--lg-muted);
  font-size: 18px;
  line-height: 1.6;
}

.hw-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.hw-facts li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
}

.hw-tick {
  display: inline-grid;
  flex: 0 0 28px;
  place-items: center;
  height: 28px;
  border-radius: 50%;
  color: var(--lg-accent-ink);
  background: color-mix(in srgb, var(--lg-accent) 13%, transparent);
}

.hw-tick svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hw-vis {
  position: relative;
  display: grid;
  place-items: center;
  height: 440px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--lg-soft);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
}

/* Chapters 1–2: a real Host window */
.hw-win {
  width: 92%;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32), 0 0 0 1px var(--lg-hair);
}

html[data-theme="light"] .hw-win { box-shadow: 0 30px 60px rgba(18, 60, 84, 0.22), 0 0 0 1px var(--lg-hair); }

/* Chapter 3: the phone rises from the bottom edge */
.hw-vis-phone { place-items: start center; }
.hw-phone-peek { width: 260px; margin-top: 44px; transform: none; animation: none; }

/* ---------- Statement ---------- */
.hw-statement {
  max-width: 1100px;
  font-size: clamp(2.4rem, 6.2vw, 5.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hw-w.is-hl { color: var(--lg-accent-ink); }
.hw-words-io .hw-w { opacity: 0.16; transition: opacity 600ms var(--hw-ease); }
.hw-words-io .hw-w.is-lit { opacity: 1; }

/* ---------- Routes: direct first, TURN as fallback ---------- */
.hw-sub {
  max-width: 720px;
  margin-top: 18px !important;
  color: var(--lg-muted);
  font-size: 19px;
  line-height: 1.55;
}

.hw-arch {
  --hw-route-a: #12b8a6;
  --hw-route-b: #0ea5e9;
  --hw-relay: #d99a1b;
  position: relative;
  margin-top: 48px;
  padding: 22px 22px 30px;
  border-radius: 40px;
}

html[data-theme="dark"] .hw-arch {
  --hw-route-a: #5eead4;
  --hw-route-b: #38bdf8;
  --hw-relay: #fbbf24;
}

.hw-route-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hw-route-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 14px 16px;
  border: 0;
  border-radius: 22px;
  background: var(--lg-soft-2);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
  color: var(--lg-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 300ms var(--hw-ease), box-shadow 300ms var(--hw-ease), transform 160ms var(--hw-ease);
}

.hw-route-tab:active { transform: scale(0.98); }
.hw-route-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rv-focus-ring); }
.hw-route-tab .hw-ic { width: 26px; height: 26px; flex: none; color: var(--lg-muted); }
.hw-route-tab b { display: block; font-size: 16px; }
.hw-route-tab small { display: block; color: var(--lg-muted); font-size: 13px; }

.hw-route-tab[aria-selected="true"] {
  background: rgba(62, 230, 207, 0.14);
  box-shadow: inset 0 0 0 1px rgba(62, 230, 207, 0.45), 0 10px 30px rgba(13, 148, 136, 0.15);
}

.hw-route-tab[aria-selected="true"] .hw-ic { color: var(--lg-accent-ink); }
.hw-route-tab[data-route-btn="relay"][aria-selected="true"] .hw-ic { color: var(--hw-relay); }

/* Autoplay progress (JS adds .is-auto while it cycles the scenarios). */
.hw-route-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--hw-route-a), var(--hw-route-b));
  transform: scaleX(0);
  transform-origin: left;
}

.hw-arch.is-auto .hw-route-tab[aria-selected="true"] .hw-route-progress {
  animation: hw-progress var(--hw-cycle, 7s) linear forwards;
}

@keyframes hw-progress { to { transform: scaleX(1); } }

.hw-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
  overflow: visible;
  font-family: var(--rv-font-ui);
}

.hw-stop-a { stop-color: var(--hw-route-a); }
.hw-stop-b { stop-color: var(--hw-route-b); }

/* Zones */
.hw-zone { opacity: 0; transition: opacity 500ms var(--hw-ease); }
.hw-zone rect,
.hw-zone path {
  fill: rgba(62, 230, 207, 0.06);
  stroke: rgba(62, 230, 207, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
}
.hw-zone-net path { fill: rgba(56, 189, 248, 0.08); stroke: rgba(56, 189, 248, 0.45); }
.hw-zone text {
  fill: var(--lg-muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

[data-route="lan"] .hw-zone-home,
[data-route="direct"] .hw-zone-net,
[data-route="relay"] .hw-zone-net { opacity: 1; }

/* Signaling: thin dashed, always flowing */
.hw-sig {
  fill: none;
  stroke: var(--lg-faint);
  stroke-width: 2;
  stroke-dasharray: 5 9;
  animation: hw-sig-flow 1.4s linear infinite;
}

@keyframes hw-sig-flow { to { stroke-dashoffset: -28; } }

.hw-sig-pkts circle { fill: var(--lg-faint); opacity: 0.8; }

/* Data routes: only the active one is drawn (pathLength=1). */
.hw-path {
  fill: none;
  stroke: url(#hw-grad-link);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  filter: url(#hw-glow-line);
  transition: opacity 400ms var(--hw-ease);
}

.hw-path-relay { stroke: var(--hw-relay); }

[data-route="lan"] .hw-path-lan,
[data-route="direct"] .hw-path-direct,
[data-route="relay"] .hw-path-relay {
  opacity: 1;
  animation: hw-draw 900ms var(--hw-ease) 250ms forwards;
}

@keyframes hw-draw { to { stroke-dashoffset: 0; } }

.hw-motion { fill: none; stroke: none; }

.hw-path-blocked {
  fill: none;
  stroke: var(--lg-faint);
  stroke-width: 3;
  stroke-dasharray: 3 10;
  opacity: 0;
  transition: opacity 400ms var(--hw-ease);
}

.hw-blocked-x { opacity: 0; transition: opacity 400ms var(--hw-ease); }
.hw-blocked-x circle { fill: rgba(214, 69, 69, 0.14); stroke: #d64545; stroke-width: 2; }
.hw-blocked-x path { stroke: #d64545; stroke-width: 3; stroke-linecap: round; fill: none; }
.hw-blocked-x text { fill: #d64545; font-size: 14px; font-weight: 700; }
html[data-theme="dark"] .hw-blocked-x text { fill: #f87171; }

[data-route="relay"] .hw-zone-net text { opacity: 0; }
[data-route="relay"] .hw-path-blocked,
[data-route="relay"] .hw-blocked-x { opacity: 1; }
[data-route="relay"] .hw-blocked-x { animation: hw-shake 3.2s ease-in-out infinite; }

@keyframes hw-shake {
  0%, 82%, 100% { transform: translate(480px, 170px); }
  86% { transform: translate(474px, 170px); }
  90% { transform: translate(486px, 170px); }
  94% { transform: translate(477px, 170px); }
}

/* Encrypted packets */
.hw-pkts { opacity: 0; transition: opacity 300ms var(--hw-ease); }
[data-route="lan"] .hw-pkts-lan,
[data-route="direct"] .hw-pkts-direct,
[data-route="relay"] .hw-pkts-relay { opacity: 1; transition-delay: 900ms; }

.hw-pkt-g rect { fill: var(--hw-route-a); filter: url(#hw-glow); }
.hw-pkts-relay .hw-pkt-g rect { fill: var(--hw-relay); }
.hw-pkt-back rect { fill: var(--hw-route-b); }
.hw-pkt-lock { fill: none; stroke: #04201d; stroke-width: 1.6; stroke-linejoin: round; }

/* Nodes */
.hw-n-disc {
  fill: var(--rv-glass-bg-strong, rgba(255, 255, 255, 0.75));
  stroke: var(--lg-hair);
  stroke-width: 1.5;
}

.hw-n-ring {
  fill: none;
  stroke: rgba(62, 230, 207, 0.4);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: hw-ring 2.4s var(--hw-ease) infinite;
}

@keyframes hw-ring {
  from { transform: scale(0.9); opacity: 0.9; }
  to { transform: scale(1.25); opacity: 0; }
}

.hw-n-ic path {
  fill: none;
  stroke: var(--lg-accent-ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hw-n-turn .hw-n-ic path { stroke: var(--hw-relay); }
.hw-n-t { fill: var(--lg-ink); font-size: 19px; font-weight: 800; }
.hw-n-s { fill: var(--lg-muted); font-size: 15px; font-weight: 600; }

.hw-n-turn { opacity: 0.35; transition: opacity 500ms var(--hw-ease); }
[data-route="relay"] .hw-n-turn { opacity: 1; }

/* Caption + the same status pill the apps show */
.hw-route-foot {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 6px;
  text-align: center;
}

.hw-route-cap { display: none; justify-items: center; gap: 14px; max-width: 720px; }
.hw-route-cap p { color: var(--lg-ink); font-size: 18px; line-height: 1.55; }
[data-route="lan"] [data-route-cap="lan"],
[data-route="direct"] [data-route-cap="direct"],
[data-route="relay"] [data-route-cap="relay"] {
  display: grid;
  animation: hw-cap-in 500ms var(--hw-ease);
}

@keyframes hw-cap-in {
  from { opacity: 0; transform: translateY(8px); }
}

.hw-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--lg-soft-2);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
  font-size: 14px;
  font-weight: 700;
}

.hw-app-pill > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lg-ok);
  box-shadow: 0 0 10px var(--lg-ok);
}

.hw-app-pill-relay > i { background: var(--hw-relay); box-shadow: 0 0 10px var(--hw-relay); }

.hw-app-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  margin-left: 2px;
  border-left: 1px solid var(--lg-hair);
  color: var(--lg-accent-ink);
  font-weight: 650;
}

.hw-app-lock .hw-ic { width: 14px; height: 14px; }

.hw-sig-note { max-width: 640px; color: var(--lg-faint); font-size: 14px; line-height: 1.5; }

/* ---------- Encryption: what each party sees ---------- */
.hw-cipher {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 18px;
  margin-top: 48px;
  padding: 28px;
  border-radius: 36px;
}

.hw-cipher-col { position: relative; display: grid; align-content: start; gap: 12px; }
.hw-cipher-col small {
  color: var(--lg-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hw-cipher-msg {
  min-height: 74px;
  padding: 16px 18px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.hw-cipher-me { color: #022421; background: #3ee6cf; border-bottom-right-radius: 6px; }
.hw-cipher-pc { background: var(--lg-soft-2); box-shadow: inset 0 0 0 1px var(--lg-hair); }

.hw-cipher-noise {
  color: var(--lg-muted);
  background: repeating-linear-gradient(135deg, var(--lg-soft-2) 0 10px, transparent 10px 20px);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
  font-family: var(--rv-font-mono);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.hw-cipher-flow {
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: -18px;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--lg-soft-2);
}

.hw-cipher-flow i {
  position: absolute;
  top: 0;
  width: 34px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--lg-accent), transparent);
  animation: hw-flow 2.4s linear infinite;
}

.hw-cipher-flow i:nth-child(2) { animation-delay: 0.8s; }
.hw-cipher-flow i:nth-child(3) { animation-delay: 1.6s; }

@keyframes hw-flow {
  from { left: -40px; }
  to { left: 100%; }
}

.hw-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

/* ---------- Agents ---------- */
.hw-agent-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.hw-agent-tile {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 18px;
  border-radius: 30px;
  text-align: center;
  transition: transform 300ms var(--hw-ease);
}

.hw-agent-tile:hover { transform: translateY(-4px); }
.hw-agent-tile img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.hw-agent-tile b { margin-top: 6px; font-size: 18px; }
.hw-agent-tile span { color: var(--lg-muted); font-size: 14px; }
.hw-agent-tile small { color: var(--lg-muted); font-size: 12px; opacity: 0.85; }
.hw-agents-compat { margin: 18px auto 0; max-width: 640px; text-align: center; color: var(--lg-muted); font-size: 14px; }

.hw-agent { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.hw-agent img { grid-row: span 2; width: 28px; height: 28px; border-radius: 8px; }
.hw-cli img { width: 18px; height: 18px; border-radius: 5px; }
.hw-cli { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- FAQ ---------- */
.hw-faq { display: grid; gap: 12px; max-width: 860px; margin-top: 40px; }

.hw-faq-item { padding: 0; border-radius: 24px; }

.hw-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.hw-faq-item summary::-webkit-details-marker { display: none; }
.hw-faq-item summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--rv-focus-ring); border-radius: 24px; }

.hw-faq-plus { position: relative; width: 18px; height: 18px; flex: none; }
.hw-faq-plus::before,
.hw-faq-plus::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--lg-accent-ink);
  transition: transform 300ms var(--hw-ease);
}

.hw-faq-plus::after { transform: rotate(90deg); }
.hw-faq-item[open] .hw-faq-plus::after { transform: rotate(0deg); }

.hw-faq-item p { padding: 0 24px 22px; color: var(--lg-muted); font-size: 17px; line-height: 1.6; }

/* ---------- Bento ---------- */
.hw-bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.hw-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 250px;
  padding: 32px;
  border-radius: 32px;
}

.hw-tile h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
.hw-tile p { color: var(--lg-muted); font-size: 16px; line-height: 1.55; }

.hw-t-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 13px;
  border-radius: 16px;
  color: var(--lg-accent-ink);
  background: color-mix(in srgb, var(--lg-accent) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lg-accent) 24%, transparent);
}

.hw-s4 { grid-column: span 4; }
.hw-s2 { grid-column: span 2; }

.hw-cli-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

.hw-cli {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: var(--lg-soft);
  box-shadow: inset 0 0 0 1px var(--lg-hair);
}

/* ---------- Final CTA ---------- */
.hw-final {
  margin-top: 140px;
  padding: 96px 48px;
  overflow: hidden;
  border-radius: 48px;
  text-align: center;
}

.hw-final-orb {
  width: 720px;
  height: 720px;
  left: 50%;
  top: -320px;
  margin-left: -360px;
  z-index: -1;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.5), transparent 65%);
}

.hw-final h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hw-final p {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--lg-muted);
  font-size: 19px;
  line-height: 1.55;
}

/* ---------- Scroll-driven effects ---------- */
@supports (animation-timeline: view()) {
  .hw-chap {
    animation: hw-recede linear both;
    animation-timeline: view();
    animation-range: exit-crossing 0% exit-crossing 100%;
  }

  @keyframes hw-recede {
    to { transform: scale(0.9); filter: brightness(0.6) saturate(0.8); }
  }

  .hw-w {
    animation: hw-lit linear both;
    animation-timeline: view();
    animation-range: entry 60% cover 45%;
  }

  @keyframes hw-lit {
    from { opacity: 0.16; }
    to { opacity: 1; }
  }

  .hw-arch {
    animation: hw-zoom linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }

  @keyframes hw-zoom {
    from { transform: scale(0.88); opacity: 0.3; }
    to { transform: none; opacity: 1; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hw-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    height: auto;
    perspective: none;
  }

  .hw-mac,
  .hw-phone-wrap {
    position: relative !important;
    left: auto;
    right: auto;
    top: auto;
  }

  .hw-mac { width: 100%; max-width: 720px; transform: none; }
  .hw-phone { transform: none; }
  .hw-beam { display: none; }

}

@media (max-width: 900px) {
  .hw-cipher,
  .hw-trio { grid-template-columns: 1fr; }
  .hw-cipher-flow { display: none; }
  .hw-agent-grid { grid-template-columns: repeat(2, 1fr); }
  .hw-agent-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .hw-chap {
    position: relative !important;
    top: auto !important;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px;
    animation: none;
  }

  .hw-bento { grid-template-columns: 1fr; }
  .hw-s2,
  .hw-s4 { grid-column: auto; }
}

@media (max-width: 720px) {
  .hw-wrap { width: calc(100% - 32px); }
  .hw-arch { padding: 14px 12px 22px; border-radius: 30px; }
  .hw-route-tabs { gap: 6px; }
  .hw-route-tab {
    flex-direction: column;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 18px;
    text-align: center;
  }
  .hw-route-tab b { font-size: 13px; line-height: 1.2; }
  .hw-route-tab small { display: none; }
  /* SVG text scales with the diagram: bigger units keep it readable on phones. */
  .hw-n-t { font-size: 32px; }
  .hw-n-dev .hw-n-s { display: none; }
  .hw-n-s,
  .hw-zone text,
  .hw-blocked-x text { font-size: 26px; }
  .hw-app-pill { flex-wrap: wrap; justify-content: center; height: auto; padding: 7px 14px; row-gap: 4px; }
  .hw-n-sig text { display: none; }
  .hw-route-cap p { font-size: 16px; }
  .hw-sub { font-size: 17px; }
  .hw-hero { padding-top: 40px; }
  .hw-sec { padding-top: 96px; }
  .hw-vis { height: 380px; }
  .hw-num { font-size: 84px; }
  .hw-chap { padding: 24px; border-radius: 32px; }
  .hw-final { padding: 64px 24px; border-radius: 36px; }
  .hw-final p { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .hw *,
  .hw *::before,
  .hw *::after {
    animation: none !important;
    transition: none !important;
  }

  .hw-rise { opacity: 1; }
  .hw-w { opacity: 1 !important; }
  .hw-path { stroke-dashoffset: 0; }
  .hw-pkts,
  .hw-sig-pkts { display: none; }
}

.hw-more { color: var(--lg-accent-ink); font-weight: 700; text-decoration: none; }
.hw-more:hover { text-decoration: underline; }
