:root {
  color-scheme: dark;
  --bg-canvas: #0d0d11;
  --bg-header: #0f0f11;
  --bg-surface: #121216;
  --bg-elevated: #18181c;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.44);
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --cyan-400: #22d3ee;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@property --animation-reduced {
  syntax: "*";
  inherits: false;
  initial-value: none;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 0.1em 0.38em;
  border-radius: 5px;
}

:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--blue-600);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
}

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 15, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 900;
  font-size: 1.125rem;
  letter-spacing: 0.16em;
  color: #fff;
}

.brand-ifc {
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 0.18rem 0.42rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: var(--amber-400);
}

.version-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.32);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.main-nav a:hover {
  color: #fff;
}

.main-nav .nav-cta {
  padding: 0.48rem 1rem;
  border-radius: 8px;
  background: var(--blue-600);
  color: #fff;
  font-weight: 600;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.main-nav .nav-cta:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-glow {
  position: absolute;
  inset: -120px auto auto 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 460px;
  background:
    radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(circle at 72% 35%, rgba(245, 158, 11, 0.11), transparent 55%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-400);
}

.hero h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.text-gradient {
  display: block;
  background: linear-gradient(95deg, #fef08a 0%, #f59e0b 38%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: #1f1f25;
}

.hero-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.hero-meta li::before {
  content: "✓ ";
  color: var(--emerald-400);
  font-weight: 700;
}

/* Workspace preview mockup */
.workspace-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.window-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}

.traffic-lights {
  display: flex;
  gap: 6px;
}

.tl {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tl.red { background: #ef4444; opacity: 0.8; }
.tl.amber { background: #f59e0b; opacity: 0.8; }
.tl.green { background: #10b981; opacity: 0.8; }

.window-title {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.phase-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-400);
}

.window-body {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 270px;
}

.mock-sidebar {
  padding: 0.9rem;
  border-right: 1px solid var(--border-subtle);
  background: #101014;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mock-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.mock-tree-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  padding: 0.42rem 0.55rem;
  border-radius: 7px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.mock-tree-item span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.mock-tree-item strong {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-primary);
}

.mock-tree-item.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #fff;
}

.mock-rule-box {
  margin-top: auto;
  padding: 0.6rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.7rem;
}

.mock-rule-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.badge-blue {
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--blue-400);
}

.mock-rule-box p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mock-viewport {
  position: relative;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 45%, #171a24 0%, #0e0f14 100%);
}

.viewport-hud {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.hud-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.hud-tag.emerald {
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.bim-isometric {
  width: 100%;
  height: auto;
  max-height: 175px;
}

.viewport-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.emerald-text {
  color: var(--emerald-400);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 4.5rem 0;
  content-visibility: auto;
  contain-intrinsic-block-size: auto 640px;
}

.section-alt {
  background: #101015;
  border-block: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 680px;
  margin-bottom: 2.75rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--blue-400);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

/* Modules grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.module-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.module-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
}

.module-icon.blue {
  color: var(--blue-400);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}

.module-icon.emerald {
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}

.module-icon.amber {
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.module-icon.cyan {
  color: var(--cyan-400);
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.25);
}

.module-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.module-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
}

.tag-list {
  list-style: none;
  margin: auto 0 0;
  padding: 0.4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list li {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

/* Steps */
.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber-400);
  margin-bottom: 0.6rem;
}

.step-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.step-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Downloads */
.release-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber-400);
  flex-shrink: 0;
}

.status-dot.ready {
  background: var(--emerald-400);
}

.release-notes-link {
  margin-left: auto;
  color: var(--blue-400);
  font-weight: 600;
  font-size: 0.875rem;
}

.release-notes-link:hover {
  text-decoration: underline;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-card.is-recommended {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.os-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.os-badge.win {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
}

.recommended-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.download-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.arch-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
  padding: 0.75rem 0;
  border-block: 1px solid var(--border-subtle);
}

.meta-list dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.meta-list dd {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-download {
  margin-top: auto;
  width: 100%;
  background: var(--blue-600);
  color: #fff;
}

.btn-download:hover:not([aria-disabled="true"]) {
  background: var(--blue-500);
  transform: translateY(-1px);
}

.btn-download[aria-disabled="true"] {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-muted);
  cursor: not-allowed;
}

.install-notes {
  margin-top: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.2rem;
}

.install-notes summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.install-notes-body {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.install-notes-body p {
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  background: var(--bg-header);
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 1.25rem;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
    gap: 0.85rem;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav .nav-cta {
    text-align: center;
  }
}

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

  .btn,
  .module-card,
  .main-nav .nav-cta {
    transition: var(--animation-reduced);
  }
}
