:root {
  --color-navy: #1c325c;
  --color-midnight: #060b1b;
  --color-parchment: #f7e8c6;
  --color-parchment-deep: #d9c091;
  --color-accent-teal: #63d4ff;
  --color-accent-lilac: #b784ff;
  --color-accent-soft: #e0f6ff;
  --color-text: #e8efff;
  --color-text-muted: #aabbe2;
  --max-width: 1100px;
  --shadow-soft: 0 20px 60px rgba(10, 20, 45, 0.25);
  --shadow-card: 0 16px 40px rgba(15, 32, 66, 0.3);
  --blur-backdrop: blur(14px);
  --transition-base: 300ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, rgba(247, 232, 198, 0.08), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(99, 212, 255, 0.08), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(183, 132, 255, 0.12), transparent 40%),
    var(--color-midnight);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.35;
  z-index: -2;
}

body::before {
  top: -120px;
  left: -100px;
  width: 340px;
  height: 340px;
  background: var(--color-accent-teal);
}

body::after {
  bottom: -180px;
  right: -140px;
  width: 420px;
  height: 420px;
  background: var(--color-accent-lilac);
}

.constellation-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 2.5px;
  height: 2.5px;
  background: #E0F6FF;
  border-radius: 50%;
  opacity: 0.8;
  animation: twinkle 3s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(224, 246, 255, 1), 0 0 12px rgba(99, 212, 255, 0.7), 0 0 18px rgba(99, 212, 255, 0.4);
  will-change: opacity, transform;
}

.star.bright {
  width: 4px;
  height: 4px;
  opacity: 1;
  animation: twinkle 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(99, 212, 255, 1), 0 0 20px rgba(183, 132, 255, 0.9), 0 0 30px rgba(99, 212, 255, 0.6), 0 0 40px rgba(99, 212, 255, 0.3);
  background: #FFFFFF;
}

.star.faint {
  width: 2px;
  height: 2px;
  opacity: 0.6;
  animation: twinkle 4s ease-in-out infinite;
  box-shadow: 0 0 4px rgba(224, 246, 255, 0.8), 0 0 8px rgba(99, 212, 255, 0.5);
}

.constellation-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 212, 255, 0.5), transparent);
  opacity: 0.25;
  transform-origin: left center;
  animation: pulse-line 6s ease-in-out infinite;
  will-change: opacity;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

@keyframes pulse-line {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.25;
  }
}

.star-group {
  position: absolute;
}

main {
  display: block;
  position: relative;
  z-index: 1;
}

a {
  color: var(--color-accent-teal);
  text-decoration: none;
  transition: color var(--transition-base), opacity var(--transition-base);
}

a:hover,
a:focus-visible {
  color: var(--color-accent-soft);
}

.layout {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

header.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: var(--blur-backdrop);
  background: rgba(6, 11, 27, 0.85);
  border-bottom: 1px solid rgba(99, 212, 255, 0.12);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand .logo-img,
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(8, 17, 35, 0.45);
  object-fit: contain;
  display: block;
  background: transparent;
}

.footer-logo {
  width: 64px;
  height: 64px;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  position: relative;
  padding-bottom: 6px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-teal), var(--color-accent-lilac));
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a.active::after {
  width: 100%;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 20, 44, 0.6);
  border: 1px solid rgba(99, 212, 255, 0.24);
  padding: 4px;
  border-radius: 999px;
}

.language-switch button {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}

.language-switch button.is-active {
  background: linear-gradient(135deg, rgba(99, 212, 255, 0.8), rgba(183, 132, 255, 0.8));
  color: #050b18;
  box-shadow: 0 12px 24px rgba(99, 212, 255, 0.35);
}

.language-switch button:hover:not(.is-active),
.language-switch button:focus-visible:not(.is-active) {
  color: var(--color-accent-soft);
  transform: translateY(-1px);
}

.socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.icon-link {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(99, 212, 255, 0.12);
  border: 1px solid rgba(99, 212, 255, 0.24);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.icon-link:hover,
.icon-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(99, 212, 255, 0.3);
  background: rgba(99, 212, 255, 0.2);
}

.icon-link svg {
  width: 16px;
  height: 16px;
  fill: var(--color-accent-soft);
}

.hero {
  position: relative;
  padding: 120px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(247, 232, 198, 0.16), transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  text-align: left;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(99, 212, 255, 0.2), rgba(183, 132, 255, 0.24));
  border: 1px solid rgba(99, 212, 255, 0.36);
  color: var(--color-accent-soft);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 0 0 20px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 24px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-teal), var(--color-accent-lilac));
  color: #050b18;
  box-shadow: var(--shadow-card);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(99, 212, 255, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent-soft);
  border: 1px solid rgba(224, 246, 255, 0.3);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(99, 212, 255, 0.12);
  transform: translateY(-2px);
}

.section {
  padding: 80px 0;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 20px;
}

.section p.section-lead {
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 720px;
}

.architecture-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.architecture-nav .nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(13, 21, 42, 0.7);
  border: 1px solid rgba(99, 212, 255, 0.18);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.architecture-nav .nav-pill:hover,
.architecture-nav .nav-pill:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(183, 132, 255, 0.45);
  box-shadow: 0 18px 36px rgba(8, 17, 35, 0.4);
}

.architecture-section {
  margin-bottom: 72px;
}

.cta-block {
  padding: 48px;
  border-radius: 24px;
  background: rgba(10, 20, 38, 0.8);
  border: 1px solid rgba(99, 212, 255, 0.2);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.cta-block h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.cta-block p {
  margin-bottom: 24px;
  color: var(--color-text-muted);
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  margin: 24px 0;
  border-radius: 16px;
  background: rgba(8, 16, 34, 0.78);
  border: 1px solid rgba(99, 212, 255, 0.22);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
}

.info-note::before {
  content: "\2139";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(99, 212, 255, 0.18);
  color: var(--color-accent-teal);
  font-size: 18px;
  font-weight: 600;
}

.info-note p {
  margin: 0;
  color: var(--color-text-muted);
}

.info-inline {
  color: var(--color-text-muted);
  margin: 12px 0 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.four {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lang-block {
  display: none;
}

.lang-block.is-active {
  display: block;
}

.lang-inline {
  display: none;
}

.lang-inline.is-active {
  display: inline;
}

.card {
  position: relative;
  padding: 32px;
  border-radius: 20px;
  background: rgba(13, 21, 42, 0.75);
  border: 1px solid rgba(99, 212, 255, 0.18);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(99, 212, 255, 0.15), transparent 65%);
  transform: translate(var(--glow-x, 0), var(--glow-y, 0));
  transition: transform var(--transition-base);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(183, 132, 255, 0.4);
  box-shadow: 0 24px 56px rgba(8, 17, 35, 0.45);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}

.card a.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-weight: 600;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-list li::before {
  content: "◆";
  font-size: 0.85rem;
  color: var(--color-accent-lilac);
  padding-top: 2px;
}

.metrics {
  display: grid;
  gap: 24px;
  margin: 40px 0;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric {
  padding: 26px;
  border-radius: 18px;
  background: rgba(247, 232, 198, 0.08);
  border: 1px solid rgba(247, 232, 198, 0.22);
  color: var(--color-text);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.metric span {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-accent-soft);
  letter-spacing: -0.02em;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
}

.timeline {
  position: relative;
  margin: 40px 0;
  padding-left: 28px;
  border-left: 2px solid rgba(99, 212, 255, 0.2);
  display: grid;
  gap: 26px;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -41px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--color-accent-teal), var(--color-accent-lilac));
  box-shadow: 0 0 12px rgba(99, 212, 255, 0.4);
}

.timeline-item h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.timeline-item p {
  margin: 0;
  color: var(--color-text-muted);
}

.list-grid {
  display: grid;
  gap: 18px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.list-grid li {
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(12, 20, 44, 0.75);
  border: 1px solid rgba(99, 212, 255, 0.18);
  box-shadow: var(--shadow-soft);
}

.diagram-callout {
  margin: 32px 0;
  padding: 24px 28px;
  border-radius: 22px;
  border: 1px solid rgba(224, 246, 255, 0.24);
  background: linear-gradient(145deg, rgba(6, 15, 32, 0.95), rgba(12, 24, 48, 0.7));
  box-shadow: var(--shadow-card);
}

.diagram-callout h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.diagram-callout p {
  margin: 0;
  color: var(--color-text-muted);
}

.steps {
  display: grid;
  gap: 28px;
  margin: 32px 0;
}

.step {
  padding: 28px;
  border-radius: 20px;
  background: rgba(8, 16, 32, 0.82);
  border: 1px solid rgba(99, 212, 255, 0.22);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--color-midnight);
  background: linear-gradient(135deg, var(--color-accent-teal), var(--color-accent-lilac));
}

.code-block {
  margin: 16px 0 0;
  background: rgba(5, 11, 24, 0.9);
  border-radius: 16px;
  border: 1px solid rgba(99, 212, 255, 0.18);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

pre {
  margin: 0;
  padding: 18px 20px;
  color: var(--color-accent-soft);
  font-family: "Fira Code", "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-x: auto;
}

code {
  font-family: inherit;
}

.two-column {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 32px;
}

.highlight {
  border-left: 3px solid rgba(99, 212, 255, 0.6);
  padding: 18px 20px;
  border-radius: 0 14px 14px 0;
  background: rgba(6, 14, 30, 0.85);
  margin-top: 24px;
  color: var(--color-text-muted);
}

.content {
  background: rgba(13, 21, 42, 0.75);
  border-radius: 20px;
  border: 1px solid rgba(99, 212, 255, 0.18);
  padding: 48px;
  box-shadow: var(--shadow-soft);
}

.content h1,
.content h2,
.content h3,
.content h4 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--color-text);
}

.content h1:first-child,
.content h2:first-child {
  margin-top: 0;
}

.content p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 16px;
}

.content ul,
.content ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--color-text-muted);
}

.content li {
  margin: 8px 0;
}

.content code {
  background: rgba(5, 11, 24, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent-soft);
}

.mermaid-block {
  margin: 32px 0;
  padding: 24px;
  border-radius: 18px;
  background: rgba(10, 20, 40, 0.78);
  border: 1px solid rgba(183, 132, 255, 0.2);
  box-shadow: var(--shadow-soft);
}

footer.site-footer {
  padding: 60px 0;
  border-top: 1px solid rgba(99, 212, 255, 0.08);
  background: rgba(6, 12, 24, 0.85);
  margin-top: 80px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer-brand img,
.footer-logo {
  width: 64px;
  height: 64px;
  opacity: 0.9;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.footer-columns h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}

.footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-columns a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-columns a:hover {
  color: var(--color-accent-soft);
}

.footer-meta {
  text-align: center;
  margin-top: 40px;
  color: rgba(224, 246, 255, 0.45);
  font-size: 0.85rem;
}

.floating-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.18;
  animation: float 16s ease-in-out infinite;
}

.floating-orbs span:nth-child(1) {
  width: 180px;
  height: 180px;
  top: 120px;
  right: 12%;
  background: var(--color-accent-teal);
  animation-duration: 18s;
}

.floating-orbs span:nth-child(2) {
  width: 140px;
  height: 140px;
  top: 320px;
  left: 8%;
  background: var(--color-accent-lilac);
  animation-duration: 22s;
}

.floating-orbs span:nth-child(3) {
  width: 200px;
  height: 200px;
  bottom: 120px;
  right: 24%;
  background: rgba(247, 232, 198, 0.4);
  animation-duration: 26s;
}

.pre-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-24px) translateX(12px);
  }
}

@media (max-width: 900px) {
  .nav {
    flex-wrap: wrap;
    gap: 16px;
  }

  .language-switch {
    order: 2;
    margin: 0 auto;
  }

  .nav-links {
    flex: 1 1 100%;
    justify-content: center;
    order: 3;
  }

  .socials {
    order: 4;
  }

  .hero {
    padding: 100px 0 64px;
  }

  .cta-group {
    width: 100%;
  }

  .cta-group .btn {
    flex: 1 1 220px;
    justify-content: center;
  }

  .card {
    padding: 28px;
  }
}

@media (max-width: 600px) {
  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand span {
    font-size: 0.85rem;
  }

  .nav-links {
    gap: 16px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
  }

  .footer-content {
    flex-direction: column;
  }

  .language-switch {
    order: 2;
  }
}
