:root {
  --bg: #070a0f;
  --bg-top: #0d141c;
  --bg-bottom: #06090d;
  --surface: rgba(13, 20, 28, 0.66);
  --surface-strong: rgba(16, 25, 35, 0.85);
  --ink: #d9e4ec;
  --ink-dim: rgba(217, 228, 236, 0.62);
  --ink-faint: rgba(217, 228, 236, 0.38);
  --warm: #fff3dc;
  --stable: #a9c7d8;
  --shrinking: #e8b88a;
  --drifting: #9cc9b4;
  --perfect: #f6e7c1;
  --line: rgba(217, 228, 236, 0.14);
  --line-hover: rgba(217, 228, 236, 0.3);
  --font: ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  --max-w: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(169, 199, 216, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 48%, var(--bg-bottom) 100%);
  color: var(--ink);
}

main {
  width: 100%;
  min-width: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--warm);
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--stable);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.site-nav {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 228, 236, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(7, 10, 15, 0.55);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--warm);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--warm);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 24px 80px;
  min-height: min(82vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(217, 228, 236, 0.08);
}

#ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  max-width: 640px;
  margin: 0 auto;
}

.hero-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin: 0 auto 28px;
  display: block;
  border: 1px solid rgba(217, 228, 236, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 42px rgba(255, 243, 220, 0.12);
}

.hero-title {
  margin: 0;
  font-size: clamp(46px, 9vw, 76px);
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  text-transform: uppercase;
  color: var(--warm);
  text-shadow: 0 0 38px rgba(255, 243, 220, 0.24);
}

.hero-tagline {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hero-lead {
  margin: 26px auto 0;
  max-width: min(52ch, 100%);
  font-size: 17px;
  color: var(--ink);
  opacity: 0.88;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 20, 28, 0.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.cta-badge[aria-disabled='true'] {
  color: var(--ink-dim);
  cursor: default;
}

.cta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 10px rgba(255, 243, 220, 0.7);
}

.cta-note {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

/* Landing sections */
.section {
  padding: 76px 0;
}

.section-header {
  max-width: 580px;
  margin: 0 auto 44px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stable);
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 200;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm);
}

.section-desc {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--ink-dim);
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.node-card {
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.node-glyph {
  width: 56px;
  height: 56px;
  display: block;
  margin-bottom: 18px;
}

.node-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}

.node-card--stable h3 {
  color: var(--stable);
}

.node-card--shrinking h3 {
  color: var(--shrinking);
}

.node-card--drifting h3 {
  color: var(--drifting);
}

.node-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-dim);
}

/* Screenshot gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.screen-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-bottom);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.screen-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}

.highlight h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
}

.highlight p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-dim);
}

/* Support, Legal & 404 main pages */
.doc-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.doc-header {
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.doc-header h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 200;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm);
}

.doc-meta {
  margin: 12px 0 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.doc-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pdf-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-hover);
  background: var(--surface);
  color: var(--warm);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pdf-button:hover,
.ghost-button:hover {
  border-color: var(--warm);
  background: var(--surface-strong);
}

.summary-box,
.contact-card {
  padding: 22px 24px;
  margin: 0 0 32px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.summary-box p,
.contact-card p {
  margin: 8px 0 0;
  color: var(--ink-dim);
}

.summary-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stable);
}

.contact-email {
  display: inline-block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--warm);
  border-bottom: 1px solid rgba(255, 243, 220, 0.3);
}

.doc-section {
  margin-bottom: 30px;
}

.doc-section h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stable);
}

.doc-section p,
.doc-section li {
  color: var(--ink-dim);
  font-size: 16px;
}

.doc-section ul,
.doc-section ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

.doc-section li + li {
  margin-top: 8px;
}

.doc-section a {
  color: var(--warm);
  border-bottom: 1px solid rgba(255, 243, 220, 0.25);
}

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(217, 228, 236, 0.08);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.faq-item p {
  margin: 0;
  color: var(--ink-dim);
}

.not-found {
  text-align: center;
  padding-top: 96px;
}

.not-found-code {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--shrinking);
}

.not-found .doc-actions {
  justify-content: center;
  margin-top: 28px;
}

/* Print-only header */
.print-header {
  display: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(217, 228, 236, 0.1);
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--ink-faint);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-dim);
}

.footer-links a:hover {
  color: var(--warm);
}

@media (max-width: 960px) {
  .node-grid,
  .highlights {
    grid-template-columns: 1fr;
  }

  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .screen-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .site-nav-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .hero {
    padding: 64px 20px 60px;
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 18mm 20mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #16202a !important;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  .site-nav,
  .site-footer,
  .doc-actions,
  #ambient {
    display: none !important;
  }

  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid #d6e0e8;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .print-emblem {
    width: 34px;
    height: 34px;
    flex: none;
  }

  .print-brand-name {
    margin: 0;
    font-size: 13pt;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #16202a;
  }

  .print-brand-url {
    margin: 2px 0 0;
    font-size: 8.5pt;
    color: #4a5c6c;
  }

  .print-doc-meta {
    text-align: right;
    font-size: 8.5pt;
    color: #4a5c6c;
  }

  .doc-main {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  .doc-header {
    border-bottom-color: #d6e0e8;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }

  .doc-header h1 {
    color: #16202a;
    font-size: 20pt;
    font-weight: 400;
    letter-spacing: 0.08em;
  }

  .doc-meta {
    color: #4a5c6c;
  }

  .summary-box,
  .contact-card {
    background: #f6f9fb;
    border: 1px solid #d6e0e8;
    break-inside: avoid;
    padding: 14px 16px;
    margin-bottom: 18px;
  }

  .summary-label {
    color: #2f4b63;
  }

  .summary-box p,
  .doc-section p,
  .doc-section li {
    color: #16202a;
    font-size: 10.5pt;
  }

  .doc-section {
    margin-bottom: 16px;
  }

  .doc-section h2 {
    color: #16202a;
    font-size: 11.5pt;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    break-after: avoid;
  }

  .doc-section a {
    color: #16202a;
    border-bottom: none;
    text-decoration: underline;
  }
}
