/* =========================================================
   Amadeus Guess — визитка
   Эстетика: tactical dark-navy + matrix hints
   ========================================================= */

:root {
  /* background layers */
  --bg-0: #04071a;
  --bg-1: #080d24;
  --bg-2: #0e1638;
  --bg-3: #18214f;

  /* text */
  --fg-0: #eef2ff;
  --fg-1: #c5cdeb;
  --fg-2: #8a97c4;
  --fg-3: #5c6a97;
  --fg-4: #3d4a73;

  /* brand */
  --brand: #5b8dff;
  --brand-2: #7c6cff;
  --brand-3: #0984e3;
  --brand-glow: rgba(91, 141, 255, 0.35);

  /* accents */
  --accent: #00ff9c;
  --accent-green: #00ff41;
  --warn: #ff9f6b;
  --danger: #ff5e7e;

  /* lines */
  --line: rgba(160, 180, 230, 0.08);
  --line-strong: rgba(160, 180, 230, 0.18);
  --line-brand: rgba(91, 141, 255, 0.35);

  /* radii, spacing */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* fonts */
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Menlo", ui-monospace, monospace;

  /* misc */
  --max: 1280px;
  --pad-x: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
  min-width: 0; /* allow grid/flex children to shrink below min-content */
}
html {
  scroll-behavior: smooth;
  /* `.bg` (fixed, negative z-index) already paints the base gradient;
     keeping html transparent lets the canvases underneath be visible
     in the hero section. */
  background: transparent;
  overflow-x: clip;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--fg-1);
  background: transparent;
  line-height: 1.55;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
::selection {
  background: var(--brand);
  color: #050820;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.015em;
  margin: 0;
  overflow-wrap: break-word;
}
em {
  font-style: normal;
  background: linear-gradient(
    98deg,
    var(--brand) 0%,
    var(--brand-2) 60%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   BACKGROUND LAYERS
   ========================================================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  background:
    radial-gradient(
      120% 80% at 15% 0%,
      #101a44 0%,
      transparent 50%
    ),
    radial-gradient(
      90% 70% at 100% 100%,
      #1a1460 0%,
      transparent 55%
    ),
    linear-gradient(180deg, #04071a 0%, #020418 100%);
}
#bg-matrix,
#bg-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#bg-matrix {
  opacity: 0.85;
  mix-blend-mode: screen;
}
#bg-geo {
  opacity: 0.95;
}
.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(120, 150, 220, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 150, 220, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -0.5px -0.5px;
  mask-image: radial-gradient(
    ellipse 90% 70% at 50% 40%,
    black 0%,
    transparent 90%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 90% 70% at 50% 40%,
    black 0%,
    transparent 90%
  );
}
.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    transparent 55%,
    rgba(3, 5, 18, 0.45) 100%
  );
}
.bg__blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: blob 24s ease-in-out infinite;
}
.bg__blob--a {
  top: -20vmax;
  left: -15vmax;
  background: radial-gradient(
    circle,
    rgba(91, 141, 255, 0.6) 0%,
    transparent 60%
  );
}
.bg__blob--b {
  bottom: -25vmax;
  right: -20vmax;
  background: radial-gradient(
    circle,
    rgba(124, 108, 255, 0.55) 0%,
    transparent 60%
  );
  animation-delay: -12s;
}
@keyframes blob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); }
}
.bg__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 4px
  );
  pointer-events: none;
  opacity: 0.7;
}

/* =========================================================
   HUD CORNERS
   ========================================================= */
.hud {
  position: fixed;
  inset: 18px;
  pointer-events: none;
  z-index: 5;
}
.hud__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--line-brand);
  opacity: 0.7;
}
.hud__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(
    180deg,
    rgba(4, 7, 26, 0.85) 0%,
    rgba(4, 7, 26, 0.55) 100%
  );
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad-x);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 14px rgba(91, 141, 255, 0.35));
}
.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.nav__brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--fg-0);
}
.nav__brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  margin-top: 5px;
  letter-spacing: 0.04em;
}
.nav__links {
  display: flex;
  gap: 28px;
  justify-self: center;
  font-size: 14px;
  color: var(--fg-2);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--fg-0); }
.nav__links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--brand);
  transition: width 0.28s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* status pill */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  background: rgba(10, 15, 40, 0.6);
  letter-spacing: 0.02em;
}
.status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 2px #fff inset;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.22s, background 0.2s, border-color 0.2s;
  user-select: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn--sm { padding: 9px 14px; font-size: 13px; }
.btn--lg { padding: 16px 22px; font-size: 15px; gap: 14px; }
.btn--primary {
  background: linear-gradient(
    115deg,
    var(--brand) 0%,
    var(--brand-2) 100%
  );
  color: #040718;
  box-shadow:
    0 6px 30px -8px var(--brand-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 40px -6px rgba(91, 141, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 0.7s ease;
}
.btn--primary:hover::before { left: 130%; }
.btn--ghost {
  color: var(--fg-0);
  background: rgba(20, 28, 64, 0.5);
  border-color: var(--line-strong);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  border-color: var(--brand);
  background: rgba(30, 45, 100, 0.55);
  transform: translateY(-1px);
}
.btn__text { display: inline-flex; }
.btn__meta {
  display: inline-flex;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid rgba(4, 7, 26, 0.3);
  opacity: 0.85;
}
.btn--ghost .btn__meta { border-left-color: var(--line-strong); }

/* =========================================================
   SHARED SECTION
   =========================================================

   Some sections expose the fixed canvas (#bg-matrix, #bg-geo) as a
   living backdrop, others cover it with an opaque plate for readability.

   - hero, features, faq → transparent (animation visible)
   - why, stack, cta     → opaque plate, with fade gradients at the
                            boundaries so the transition from animated
                            to static areas isn't jarring.

   Each `.section` creates its own stacking context via `isolation:
   isolate`. Opaque sections add a `::before` pseudo painted with
   `var(--bg-0)` that stretches the full viewport width (extends past
   `max-width: var(--max)`). Transparent sections omit the pseudo
   entirely so the canvases bleed through.
*/
.section {
  position: relative;
  isolation: isolate;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
}
.section--why::before,
.section--stack::before,
.section--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--bg-0);
  z-index: -1;
  pointer-events: none;
}
/* why sits between transparent hero above and transparent features
   below — fade in/out on both ends. */
.section--why::before {
  background:
    linear-gradient(
      180deg,
      rgba(4, 7, 26, 0) 0%,
      var(--bg-0) 140px,
      var(--bg-0) calc(100% - 140px),
      rgba(4, 7, 26, 0) 100%
    );
}
/* stack is the second opaque island, surrounded by transparent
   features/faq — same two-sided fade. */
.section--stack::before {
  background:
    linear-gradient(
      180deg,
      rgba(4, 7, 26, 0) 0%,
      var(--bg-0) 140px,
      var(--bg-0) calc(100% - 140px),
      rgba(4, 7, 26, 0) 100%
    );
}
/* cta: fade in only (faq transparent above, footer solid below). */
.section--cta::before {
  background:
    linear-gradient(
      180deg,
      rgba(4, 7, 26, 0) 0%,
      var(--bg-0) 140px
    );
}
.section__head {
  max-width: 820px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow__mark {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-brand);
  border-radius: var(--r-sm);
  color: var(--brand);
  font-size: 10px;
}
.section__title {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-0);
  margin-bottom: 20px;
}
.section__lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--fg-2);
  max-width: 680px;
  line-height: 1.6;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--pad-x) clamp(60px, 8vw, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
  max-width: 100%;
}
.hero__meta-item {
  white-space: nowrap;
}
.hero__meta-key {
  color: var(--fg-4);
  text-transform: uppercase;
  padding-right: 6px;
}
.hero__meta-val { color: var(--fg-1); }
.hero__meta-sep { color: var(--fg-4); }

.hero__title {
  font-size: clamp(40px, 5.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--fg-0);
  margin: 0 0 26px;
  overflow-wrap: break-word;
  hyphens: auto;
}
.hero__title-kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-2);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero__title-bar {
  display: inline-block;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, transparent 100%);
}
.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(22px);
  animation: titleIn 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero__title-line--1 { animation-delay: 0.1s; }
.hero__title-line--2 { animation-delay: 0.25s; }
.hero__title-line--3 {
  animation-delay: 0.4s;
  color: var(--fg-2);
}
@keyframes titleIn {
  to { opacity: 1; transform: none; }
}
.hero__title-accent {
  position: relative;
  display: inline;
  color: transparent;
  background: linear-gradient(
    98deg,
    var(--brand) 0%,
    var(--brand-2) 60%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  padding-right: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hero__title-underline {
  display: none; /* re-enabled on wider viewports below */
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.08em;
  width: 100%;
  height: 0.2em;
  color: var(--brand);
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: underline 1.4s 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@media (min-width: 901px) {
  .hero__title-accent {
    display: inline-block;
  }
  .hero__title-underline {
    display: block;
  }
}
@keyframes underline {
  to { stroke-dashoffset: 0; }
}

.hero__lede {
  color: var(--fg-2);
  font-size: clamp(16px, 1.5vw, 18px);
  max-width: 580px;
  line-height: 1.65;
  margin: 0 0 36px;
}
.hero__lede strong {
  color: var(--fg-0);
  font-weight: 600;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0;
}
.hero__stat {
  padding: 22px 20px 22px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hero__stat:last-child { border-right: 0; padding-right: 0; }
.hero__stat + .hero__stat { padding-left: 20px; }
.hero__stat dt {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  color: var(--fg-0);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero__stat dt sup {
  font-size: 0.6em;
  color: var(--brand);
  margin-left: 2px;
}
.hero__stat dd {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
}
.hero__stat dd strong {
  color: var(--fg-1);
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}
.hero__stat dd span { color: var(--fg-3); }

/* HERO PANEL */
.hero__panel {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__logo-ghost {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(1.15);
  width: min(92%, 420px);
  height: auto;
  opacity: 0.08;
  filter: drop-shadow(0 0 80px var(--brand-glow));
  z-index: 0;
  animation: ghostFloat 18s ease-in-out infinite;
}
@keyframes ghostFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1.15) rotate(0deg); }
  50% { transform: translate(-50%, -52%) scale(1.2) rotate(2deg); }
}
/* ---------- connection status panel ---------- */
.conn {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(440px, 100%);
  background: linear-gradient(
    180deg,
    rgba(13, 20, 52, 0.94) 0%,
    rgba(8, 12, 36, 0.94) 100%
  );
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(91, 141, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.conn__top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 30, 0.6);
}
.conn__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(160, 180, 230, 0.18);
}
.conn__dot:nth-child(1) { background: #ff5e7e80; }
.conn__dot:nth-child(2) { background: #ffb75e80; }
.conn__dot:nth-child(3) { background: #00ff9c80; }
.conn__top-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}
.conn__body {
  padding: 26px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.conn__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-top: 4px;
}
.conn__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 7, 26, 0.5);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.conn__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-3);
  box-shadow: 0 0 0 2px rgba(160, 180, 230, 0.06);
  animation: pulse 1.6s ease-in-out infinite;
}
.conn__icon {
  margin: 6px 0 4px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.conn__icon svg { width: 100%; height: 100%; display: none; }
.conn__headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg-0);
  margin: 0;
}
.conn__note {
  margin: 0;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 320px;
}

/* state-specific colors */
.conn[data-state="checking"] .conn__icon-unprotected { display: block; opacity: 0.25; }
.conn[data-state="checking"] .conn__icon { color: var(--fg-3); }
.conn[data-state="unprotected"] {
  --conn-accent: #ff9f6b;
}
.conn[data-state="unprotected"] .conn__badge {
  border-color: rgba(255, 159, 107, 0.35);
  color: var(--conn-accent);
  background: rgba(255, 159, 107, 0.07);
}
.conn[data-state="unprotected"] .conn__badge-dot {
  background: var(--conn-accent);
  box-shadow: 0 0 10px var(--conn-accent);
}
.conn[data-state="unprotected"] .conn__icon {
  color: var(--conn-accent);
  filter: drop-shadow(0 0 14px rgba(255, 159, 107, 0.35));
}
.conn[data-state="unprotected"] .conn__icon-unprotected { display: block; }

.conn[data-state="protected"] {
  --conn-accent: var(--accent);
}
.conn[data-state="protected"] .conn__badge {
  border-color: rgba(0, 255, 156, 0.3);
  color: var(--conn-accent);
  background: rgba(0, 255, 156, 0.06);
}
.conn[data-state="protected"] .conn__badge-dot {
  background: var(--conn-accent);
  box-shadow: 0 0 10px var(--conn-accent);
}
.conn[data-state="protected"] .conn__icon {
  color: var(--conn-accent);
  filter: drop-shadow(0 0 14px rgba(0, 255, 156, 0.35));
}
.conn[data-state="protected"] .conn__icon-protected { display: block; }

/* meta list */
.conn__meta {
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.conn__meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.conn__meta dt {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
}
.conn__meta dd {
  margin: 0;
  color: var(--fg-1);
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
}

.conn__skeleton {
  display: inline-block;
  width: 90px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    rgba(160, 180, 230, 0.06) 0%,
    rgba(160, 180, 230, 0.18) 50%,
    rgba(160, 180, 230, 0.06) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.conn__cta {
  align-self: stretch;
  justify-content: center;
}

/* state hides the CTA-variant: when already protected, swap label via JS */
.conn[data-state="protected"] .conn__cta {
  background: rgba(0, 255, 156, 0.08);
  color: var(--accent);
  border: 1px solid rgba(0, 255, 156, 0.3);
  box-shadow: none;
}
.conn[data-state="protected"] .conn__cta::before { display: none; }

/* =========================================================
   PRINCIPLES
   ========================================================= */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}
.principle {
  position: relative;
  padding: 36px 32px 40px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(
    180deg,
    rgba(12, 18, 48, 0.28) 0%,
    rgba(4, 7, 26, 0) 100%
  );
  transition: background 0.3s;
}
.principle:hover {
  background: linear-gradient(
    180deg,
    rgba(30, 45, 100, 0.32) 0%,
    rgba(4, 7, 26, 0) 100%
  );
}
.principle__index {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brand);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 18px;
}
.principle h3 {
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  color: var(--fg-0);
  line-height: 1.2;
}
.principle p {
  color: var(--fg-2);
  font-size: 15px;
  margin: 0;
}
.principle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 1px;
  background: var(--brand);
  transform: translateY(-0.5px);
}

/* =========================================================
   FEATURES
   ========================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature {
  position: relative;
  padding: 30px 28px 28px;
  background: linear-gradient(
    180deg,
    rgba(14, 22, 56, 0.78) 0%,
    rgba(8, 13, 36, 0.7) 100%
  );
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.28s, border-color 0.3s, background 0.3s;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.feature--wide {
  grid-column: span 2;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-brand);
  background: linear-gradient(
    180deg,
    rgba(30, 50, 120, 0.78) 0%,
    rgba(10, 16, 44, 0.7) 100%
  );
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--brand) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.feature:hover::before { opacity: 1; }

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-brand);
  color: var(--brand);
  margin-bottom: 22px;
  background: rgba(91, 141, 255, 0.08);
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 {
  font-size: 19px;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  color: var(--fg-0);
}
.feature p {
  color: var(--fg-2);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}
.feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.feature__tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--fg-2);
  background: rgba(4, 7, 26, 0.4);
  letter-spacing: 0.02em;
}

/* =========================================================
   STACK
   ========================================================= */
.stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stack-card {
  position: relative;
  padding: 30px 28px 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(14, 22, 56, 0.55) 0%, rgba(8, 13, 36, 0.35) 100%);
  overflow: hidden;
}
.stack-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--brand) 0%,
    transparent 60%
  );
  opacity: 0.6;
}
.stack-card__layer {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stack-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--fg-0);
  letter-spacing: -0.015em;
}
.stack-card p {
  color: var(--fg-2);
  font-size: 14px;
  margin: 0 0 22px;
  line-height: 1.65;
}
.stack-card__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.stack-card__rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.stack-card__rows dt {
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
}
.stack-card__rows dd {
  margin: 0;
  color: var(--fg-1);
}

/* =========================================================
   FAQ
   =========================================================
   FAQ sits over the live canvas backdrop. Wrap the whole list in a
   translucent "card" with backdrop-filter so text stays readable,
   while the outer margins of the section still expose the animation.
*/
.faq {
  display: flex;
  flex-direction: column;
  padding: 8px clamp(18px, 3vw, 32px);
  background:
    linear-gradient(
      180deg,
      rgba(10, 16, 44, 0.72) 0%,
      rgba(6, 10, 30, 0.72) 100%
    );
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow:
    0 40px 80px -40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.faq__item {
  border-bottom: 1px solid var(--line-strong);
  transition: background 0.2s;
}
.faq__item:last-child {
  border-bottom: 0;
}
.faq__item[open] {
  background: linear-gradient(
    90deg,
    rgba(91, 141, 255, 0.05) 0%,
    transparent 60%
  );
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-0);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--brand); }
.faq__item summary > span:first-child {
  flex: 1;
  min-width: 0;
}
.faq__toggle {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 0.2s, background 0.2s;
}
.faq__toggle::before,
.faq__toggle::after {
  content: "";
  position: absolute;
  background: currentColor;
  left: 50%;
  top: 50%;
  transition: transform 0.3s ease;
}
.faq__toggle::before { width: 10px; height: 1.5px; transform: translate(-50%, -50%); }
.faq__toggle::after { width: 1.5px; height: 10px; transform: translate(-50%, -50%); }
.faq__item[open] .faq__toggle {
  border-color: var(--brand);
  background: rgba(91, 141, 255, 0.12);
  color: var(--brand);
}
.faq__item[open] .faq__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__answer {
  padding: 0 6px 26px;
  max-width: 720px;
}
.faq__answer p {
  color: var(--fg-2);
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}
.faq__answer a { color: var(--brand); }
.faq__answer a:hover { text-decoration: underline; }

/* =========================================================
   CTA BOTTOM
   ========================================================= */
.section--cta { padding-bottom: clamp(100px, 14vw, 180px); }
.cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
  padding: clamp(44px, 7vw, 80px) clamp(30px, 5vw, 64px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(
      120% 120% at 0% 0%,
      rgba(91, 141, 255, 0.24) 0%,
      transparent 55%
    ),
    radial-gradient(
      120% 120% at 100% 100%,
      rgba(124, 108, 255, 0.22) 0%,
      transparent 55%
    ),
    linear-gradient(180deg, rgba(12, 18, 48, 0.6) 0%, rgba(4, 7, 26, 0.5) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><path d='M0 40h80M40 0v80' stroke='%235b8dff' stroke-opacity='0.04' stroke-width='1'/></svg>");
  pointer-events: none;
  opacity: 0.6;
}
.cta__body { position: relative; z-index: 2; }
.cta__title {
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: var(--fg-0);
}
.cta__body p {
  color: var(--fg-2);
  font-size: 16px;
  max-width: 520px;
  margin: 0 0 30px;
  line-height: 1.6;
}
.cta__visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 320px;
  justify-self: end;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta__logo {
  position: relative;
  z-index: 2;
  width: 60%;
  height: auto;
  animation: ctaLogo 9s ease-in-out infinite;
  filter: drop-shadow(0 0 28px var(--brand-glow));
}
@keyframes ctaLogo {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.03); }
}
.cta__ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-brand);
  border-radius: 50%;
  animation: ring 7s linear infinite;
}
.cta__ring--1 { inset: 6%; opacity: 0.7; }
.cta__ring--2 {
  inset: 18%;
  opacity: 0.45;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 11s;
}
.cta__ring--3 {
  inset: 28%;
  opacity: 0.9;
  border-color: rgba(91, 141, 255, 0.55);
  border-width: 1px;
  animation-duration: 14s;
}
@keyframes ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  position: relative;
  isolation: isolate;
  border-top: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(4, 7, 26, 0) 0%,
    rgba(2, 4, 20, 0.6) 100%
  );
}
.foot::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--bg-0);
  z-index: -1;
  pointer-events: none;
}
.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--pad-x) 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.6fr;
  gap: 40px;
}
.foot__brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.foot__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-0);
  font-size: 15px;
  letter-spacing: -0.01em;
}
.foot__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.foot__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}
.foot__col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.foot__col a {
  color: var(--fg-2);
  transition: color 0.2s;
}
.foot__col a:hover { color: var(--brand); }
.foot__fp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-2);
  background: rgba(4, 7, 26, 0.5);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  letter-spacing: 0.04em;
  display: inline-block;
}
.foot__disclaimer {
  font-size: 12px;
  color: var(--fg-3);
  margin: 12px 0 0;
  line-height: 1.55;
  max-width: 360px;
}
.foot__base {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--pad-x) 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}
.foot__base-sep { color: var(--fg-4); }
.foot__base-bin {
  margin-left: auto;
  color: var(--accent-green);
  opacity: 0.6;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.2);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--wide { grid-column: span 2; }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: clamp(40px, 7vw, 80px);
  }
  .hero__panel {
    min-height: 0;
    justify-content: center;
  }
  .hero__logo-ghost {
    display: none; /* keeps the conn panel centered without overflow */
  }
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: auto 1fr; gap: 16px; }
  .nav__brand-sub { display: none; }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .principle { padding: 28px 22px 32px; }

  /* clean 2-col stats, no border-offset hack */
  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .hero__stat {
    padding: 18px 16px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .hero__stat:nth-child(2n) { border-right: 0; }
  .hero__stat:nth-last-child(-n + 2) { border-bottom: 0; }
  /* reset the desktop `+ .hero__stat` rule so nothing adds extra left padding */
  .hero__stat + .hero__stat { padding-left: 16px; }

  .cta {
    grid-template-columns: minmax(0, 1fr);
    padding: 36px 24px;
  }
  .cta__visual {
    max-width: 220px;
    justify-self: center;
    margin-top: 8px;
  }
}
@media (max-width: 640px) {
  :root { --pad-x: 18px; }
  .section { padding-left: 18px; padding-right: 18px; }

  /* gentle wrapping — breaks only when a word really can't fit */
  h1,
  h2,
  h3,
  .hero__title,
  .section__title,
  .cta__title,
  .faq__item summary,
  .hero__lede,
  .feature p,
  .principle p,
  .stack-card p {
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .features { grid-template-columns: minmax(0, 1fr); }
  .feature--wide { grid-column: span 1; }
  .stack { grid-template-columns: minmax(0, 1fr); }
  .foot__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .hud { inset: 10px; }
  .hud__corner { width: 14px; height: 14px; }
  .status { display: none; }
  .nav__cta { gap: 6px; }
  .btn__meta { display: none; }

  .hero__title { font-size: clamp(32px, 10vw, 48px); }
  .hero__lede { font-size: 15px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  .section__title { font-size: clamp(26px, 7vw, 36px); }
  .cta__title { font-size: clamp(24px, 7vw, 32px); }
  .conn__body { padding: 22px 20px 20px; }
  .feature { padding: 24px 20px; }
  .stack-card { padding: 26px 22px; }
  .stack-card__layer { top: 14px; right: 18px; }
  .faq__item summary { padding: 18px 4px; gap: 16px; }

  /* hide the "Подключить VPN" label in nav, keep icon only */
  .nav__cta .btn--primary {
    padding: 9px 11px;
    gap: 6px;
  }
  .nav__cta .btn--primary > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 360px) {
  :root { --pad-x: 14px; }
  .section { padding-left: 14px; padding-right: 14px; }
  .hero { padding-left: 14px; padding-right: 14px; }
  .hero__stat { padding: 14px 10px; }
  .hero__stat + .hero__stat { padding-left: 10px; }
  .hero__title { font-size: clamp(28px, 9vw, 40px); }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #bg-matrix, #bg-geo { display: none; }
  .reveal { opacity: 1; transform: none; }
}
