:root {
  --bg-base: #090A0F;
  --bg-surface: #11131A;
  --bg-elevated: #171A24;
  --bg-input: #0D0F16;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-muted: #64748B;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-border: rgba(59, 130, 246, 0.38);
  --status-online: #10B981;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --radius-card: 12px;
  --radius-btn: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Top Navigation (<= 72px height, single line on desktop) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: rgba(9, 10, 15, 0.84);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #60A5FA;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
  white-space: nowrap;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-btn);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-switch:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Buttons (WCAG AA compliant, 8px radius, single-line lock) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
  border: 1px solid transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

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

.btn-secondary:hover {
  background: var(--bg-elevated);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 13px;
}

/* Layout Containers */
.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 88px 24px;
}

.section-divider {
  border-top: 1px solid var(--border-subtle);
}

/* Hero Section: Asymmetric Split, min-h-[100dvh], pt-20 max */
.hero-section {
  min-height: calc(100dvh - 68px);
  display: flex;
  align-items: center;
  padding: 48px 24px 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #60A5FA;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 5px 11px;
  border-radius: var(--radius-btn);
  margin-bottom: 20px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--status-online);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

.hero-headline {
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.hero-subtext {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 52ch;
  line-height: 1.55;
  margin-bottom: 28px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-visual-stage {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 10px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-main-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.hero-floating-card {
  position: absolute;
  bottom: -22px;
  left: -22px;
  width: 54%;
  max-width: 310px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 6px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.75);
}

.hero-floating-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 7px;
}

/* Protocol & Standards Strip (Under Hero) */
.protocol-strip {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(17, 19, 26, 0.55);
  padding: 22px 24px;
}

.protocol-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.protocol-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  opacity: 0.82;
}

.protocol-logos img {
  height: 22px;
  width: auto;
  display: block;
}

/* Interactive Product Tour (Showcase Switcher) */
.section-stack-header {
  max-width: 65ch;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

.tour-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px;
  border-radius: var(--radius-card);
  margin-bottom: 24px;
}

.tour-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 9px 16px;
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-tab-btn:hover {
  color: var(--text-primary);
}

.tour-tab-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tour-stage {
  display: grid;
  grid-template-columns: 0.36fr 0.64fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px;
}

.tour-panel {
  display: none;
}

.tour-panel.active {
  display: contents;
}

.tour-copy h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.tour-copy p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 18px;
}

.tour-meta-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tour-meta-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
}

.tour-meta-badge {
  color: #60A5FA;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 7px;
  border-radius: 5px;
}

.tour-screenshot-wrap {
  background: var(--bg-base);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
}

.tour-screenshot-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

/* 5-Cell Asymmetric Bento Grid (5 items -> 5 cells, zero empty cells) */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bento-span-7 {
  grid-column: span 7;
}

.bento-span-5 {
  grid-column: span 5;
}

.bento-span-4 {
  grid-column: span 4;
}

.bento-media {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
  display: block;
}

.bento-body {
  padding: 24px;
}

.bento-body h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.bento-body p {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 54ch;
}

.bento-tinted {
  background: linear-gradient(155deg, rgba(59, 130, 246, 0.12), rgba(17, 19, 26, 0.96) 65%);
  border-color: var(--accent-border);
}

.bento-code-snippet {
  margin: 0 24px 24px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #93C5FD;
  overflow-x: auto;
}

/* 3-Step Quickstart & Interactive CLI Copy */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-btn);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: #60A5FA;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-block h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-block p {
  font-size: 14px;
  color: var(--text-secondary);
}

.cmd-box {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

.cmd-box code {
  overflow-x: auto;
  white-space: nowrap;
  color: #93C5FD;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  cursor: pointer;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: var(--accent);
}

/* Cryptographic Spec Cards (2-Col Grouped Spec Cards per Section 4.9) */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.spec-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.spec-why {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Final CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(17, 19, 26, 0.96));
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-card);
  padding: 48px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-banner h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cta-banner p {
  color: var(--text-secondary);
  max-width: 54ch;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

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

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

/* Responsive Collapse (< 768px explicit rules) */
@media (max-width: 960px) {
  .hero-grid,
  .tour-stage,
  .steps-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .bento-span-7,
  .bento-span-5,
  .bento-span-4 {
    grid-column: span 12;
  }

  .hero-floating-card {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 12px;
  }

  .nav-links {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  .btn,
  .tour-tab-btn {
    transition: none !important;
    transform: none !important;
  }
}
