:root {
  --bg: #07111f;
  --bg-elev: #0d1a2f;
  --bg-elev-2: #12233d;
  --text: #edf3ff;
  --muted: #9db0cf;
  --gold: #c39b3f;
  --blue: #4f7cff;
  --border: rgba(189, 205, 233, 0.22);
  --radius: 14px;
  --container: 1080px;
  --glass: rgba(12, 24, 42, 0.55);
  --glass-border: rgba(189, 205, 233, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --mx: 50%;
  --my: 40%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #06101d, #091629);
  color: var(--text);
  line-height: 1.65;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(92%, var(--container));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 17, 31, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand span {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.2rem;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.nav-toggle:hover {
  border-color: rgba(79, 124, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.15);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.92rem;
  color: #c8d7f0;
  border-bottom: 2px solid transparent;
  padding: 3px 0;
  transition: color 0.35s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-bottom-color: transparent;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

main section {
  position: relative;
  padding: 78px 0;
}

main section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(92%, var(--container));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(189, 205, 233, 0.12) 18%,
    rgba(195, 155, 63, 0.35) 50%,
    rgba(189, 205, 233, 0.12) 82%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: dividerPulse 14s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.68), rgba(4, 10, 20, 0.78)),
    url("hero_banner_backround.png") center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 14, 28, 0.9) 0%, rgba(7, 14, 28, 0.56) 54%, rgba(7, 14, 28, 0.92) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1.5px 1.5px at 18% 34%, rgba(79, 124, 255, 0.55), transparent 70%),
    radial-gradient(1.5px 1.5px at 42% 58%, rgba(195, 155, 63, 0.45), transparent 70%),
    radial-gradient(1.5px 1.5px at 68% 28%, rgba(79, 124, 255, 0.4), transparent 70%),
    radial-gradient(1.5px 1.5px at 82% 72%, rgba(195, 155, 63, 0.35), transparent 70%),
    radial-gradient(1.5px 1.5px at 28% 78%, rgba(79, 124, 255, 0.35), transparent 70%);
  animation: ledBreath 8s ease-in-out infinite;
  opacity: 0.55;
}

.hero-topology {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.14;
  pointer-events: none;
}

.hero-topology .topo-line {
  fill: none;
  stroke: rgba(79, 124, 255, 0.85);
  stroke-width: 1;
  stroke-linecap: square;
  stroke-dasharray: 6 10;
  animation: topoDash 28s linear infinite;
}

.hero-topology .topo-line.gold {
  stroke: rgba(195, 155, 63, 0.7);
  animation-duration: 36s;
  animation-direction: reverse;
}

.hero-topology .topo-node {
  fill: rgba(79, 124, 255, 0.9);
  animation: nodeBreath 7s ease-in-out infinite;
}

.hero-topology .topo-node.gold {
  fill: rgba(195, 155, 63, 0.85);
}

.hero-signal {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(79, 124, 255, 0.55);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  animation: signalTravel 11s linear infinite;
}

.hero-signal.s2 {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(195, 155, 63, 0.5);
  animation-delay: 4s;
  animation-duration: 14s;
}

.hero-signal.s3 {
  animation-delay: 7.5s;
  animation-duration: 12s;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px 0 46px;
}

.hero-card {
  position: relative;
  width: min(100%, 620px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(14, 28, 48, 0.72), rgba(8, 16, 30, 0.58));
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  padding: 20px;
  box-shadow:
    0 14px 36px rgba(2, 8, 18, 0.55),
    0 1px 0 var(--glass-highlight) inset,
    0 0 0 1px rgba(79, 124, 255, 0.06);
  overflow: hidden;
  --lx: 30%;
  --ly: 25%;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--lx) var(--ly),
    rgba(255, 255, 255, 0.07),
    transparent 55%
  );
  opacity: 0.9;
  transition: opacity 0.4s ease;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  max-width: 20ch;
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.45rem, 3.2vw, 2.05rem);
  margin-bottom: 10px;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 7px;
}

p {
  color: var(--muted);
}

.hero p {
  color: #cfddf4;
}

.actions {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  overflow: hidden;
  transition:
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background-color 0.4s ease,
    color 0.35s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn:hover::after {
  transform: translateX(120%);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: rgba(140, 175, 255, 0.35);
  box-shadow: 0 6px 18px rgba(79, 124, 255, 0.22);
}

.btn-primary:hover {
  border-color: rgba(195, 155, 63, 0.55);
  box-shadow:
    0 8px 24px rgba(79, 124, 255, 0.32),
    0 0 0 1px rgba(195, 155, 63, 0.2);
}

.btn-ghost {
  border-color: rgba(189, 205, 233, 0.45);
  color: #dce8ff;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.btn-ghost:hover {
  border-color: rgba(79, 124, 255, 0.55);
  background: rgba(79, 124, 255, 0.08);
  box-shadow:
    0 8px 20px rgba(4, 10, 22, 0.35),
    0 0 0 1px rgba(79, 124, 255, 0.12);
}

/* ---------- Glass panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 32, 54, 0.72), rgba(10, 20, 36, 0.58));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow:
    0 12px 28px rgba(3, 8, 18, 0.4),
    0 1px 0 var(--glass-highlight) inset;
  overflow: hidden;
  --lx: 40%;
  --ly: 20%;
  transition:
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.45s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--lx) var(--ly),
    rgba(255, 255, 255, 0.055),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
}

.panel:hover {
  border-color: rgba(79, 124, 255, 0.42);
  box-shadow:
    0 16px 34px rgba(3, 8, 18, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 0 1px rgba(79, 124, 255, 0.08);
  transform: translateY(-2px);
  background: linear-gradient(160deg, rgba(18, 36, 60, 0.78), rgba(11, 22, 40, 0.64));
}

.panel:hover::before {
  opacity: 1;
}

.grid {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.focus-icon {
  width: 36px;
  height: 36px;
  color: var(--blue);
  opacity: 0.9;
}

.focus-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.focus-card:nth-child(2) .focus-icon {
  color: var(--gold);
}

.focus-card:nth-child(3) .focus-icon {
  color: #7aa2ff;
}

/* Architecture stack */
.arch-stack {
  margin-top: 22px;
  padding: 18px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 28, 48, 0.55), rgba(8, 16, 30, 0.45));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(3, 8, 18, 0.35), 0 1px 0 var(--glass-highlight) inset;
  overflow: hidden;
}

.arch-stack svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 88px;
}

.arch-stack .arch-path {
  fill: none;
  stroke: rgba(79, 124, 255, 0.55);
  stroke-width: 1.2;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
}

.arch-stack.is-visible .arch-path {
  animation: drawLine 2.4s ease forwards;
}

.arch-stack .arch-node {
  fill: rgba(12, 24, 42, 0.9);
  stroke: rgba(79, 124, 255, 0.65);
  stroke-width: 1;
  opacity: 0;
}

.arch-stack.is-visible .arch-node {
  animation: fadeInSoft 0.6s ease forwards;
}

.arch-stack .arch-label {
  fill: #b8c9e6;
  font-size: 11px;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0.04em;
  opacity: 0;
}

.arch-stack.is-visible .arch-label {
  animation: fadeInSoft 0.7s ease 0.5s forwards;
}

.arch-stack .arch-dot {
  fill: var(--gold);
  opacity: 0;
}

.arch-stack.is-visible .arch-dot {
  animation: fadeInSoft 0.5s ease 1.2s forwards, ledBreath 5s ease-in-out 1.4s infinite;
}

.status {
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  color: #dce7ff;
  background: rgba(79, 124, 255, 0.2);
  border: 1px solid rgba(189, 205, 233, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
}

.bullet-list {
  list-style: none;
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.bullet-list li {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(16, 32, 54, 0.68), rgba(10, 20, 36, 0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 12px;
  color: #d6e4fb;
  box-shadow: 0 1px 0 var(--glass-highlight) inset;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.bullet-list li:hover {
  border-color: rgba(79, 124, 255, 0.4);
  box-shadow: 0 8px 18px rgba(3, 8, 18, 0.35);
  transform: translateY(-1px);
}

.step-list {
  margin-top: 18px;
  margin-left: 20px;
  display: grid;
  gap: 8px;
  color: #d6e4fb;
}

.legal-note {
  margin-top: 14px;
  border: 1px solid rgba(195, 155, 63, 0.4);
  background: rgba(195, 155, 63, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f0d99f;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.small {
  font-size: 0.94rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 10, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 28px 0;
  margin-top: 8px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #cfddf5;
}

.footer-links a {
  position: relative;
  transition: color 0.3s ease;
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

/* ---------- Reveal system ---------- */
.js-enhanced .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(10px);
}

.js-enhanced .reveal.is-visible {
  animation: constructReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.js-enhanced .reveal-delay-1.is-visible { animation-delay: 0.08s; }
.js-enhanced .reveal-delay-2.is-visible { animation-delay: 0.16s; }
.js-enhanced .reveal-delay-3.is-visible { animation-delay: 0.24s; }

.js-enhanced .panel.reveal.is-visible {
  animation: panelConstruct 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ---------- Keyframes ---------- */
@keyframes dividerPulse {
  0%, 100% { background-position: 0% 0; opacity: 0.55; }
  50% { background-position: 100% 0; opacity: 1; }
}

@keyframes ledBreath {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

@keyframes topoDash {
  to { stroke-dashoffset: -160; }
}

@keyframes nodeBreath {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes signalTravel {
  0% { opacity: 0; transform: translate(8vw, 72%) scale(0.7); }
  8% { opacity: 0.75; }
  50% { opacity: 0.55; transform: translate(52vw, 38%) scale(1); }
  92% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(90vw, 18%) scale(0.7); }
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeInSoft {
  to { opacity: 1; }
}

@keyframes constructReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelConstruct {
  0% {
    opacity: 0;
    transform: translateY(8px);
    box-shadow: 0 0 0 rgba(3, 8, 18, 0);
    border-color: rgba(79, 124, 255, 0.08);
  }
  35% {
    opacity: 0.85;
    border-color: rgba(79, 124, 255, 0.35);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    border-color: var(--glass-border);
    box-shadow:
      0 12px 28px rgba(3, 8, 18, 0.4),
      0 1px 0 var(--glass-highlight) inset;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .js-enhanced .reveal:not(.is-visible),
  .js-enhanced .reveal.is-visible,
  .js-enhanced .panel.reveal.is-visible {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .hero-signal,
  .hero::after,
  .hero-topology {
    display: none;
  }

  main section + section::before {
    background: rgba(189, 205, 233, 0.15);
    background-size: auto;
  }
}

@media (max-width: 920px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  main section {
    padding: 62px 0;
  }

  .hero-inner {
    padding: 54px 0 36px;
  }

  .hero-topology,
  .hero-signal {
    opacity: 0.08;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 4%;
    right: 4%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(9, 22, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav.open {
    display: flex;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .arch-stack {
    display: none;
  }
}
