/* ── Subcent402: $1M Swiss-Grade Developer Infrastructure Design System ── */
:root {
  /* Surfaces & Canvas */
  --bg: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-surface: #f3f4f6;
  --bg-card: #ffffff;
  --bg-code: #0b0f17;         /* Deep obsidian IDE canvas */
  --bg-code-header: #070a10;
  
  /* Precision Hairline Borders */
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --border-focus: #111827;
  
  /* High-Caliber Typography */
  --text: #09090b;            /* Obsidian Primary */
  --text-secondary: #334155;  /* Slate text */
  --text-muted: #475569;      /* Crisp high-contrast readable slate (No pale gray) */
  --text-dim: #64748b;        /* Dim text */
  
  /* Accents */
  --primary: #09090b;
  --primary-hover: #27272a;
  --accent: #2563eb;          /* Enterprise Blue */
  --accent-light: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.12);
  
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  /* Geometry & Elevation */
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.08), 0 4px 16px -2px rgba(0, 0, 0, 0.03);
  --shadow-window: 0 25px 60px -15px rgba(11, 15, 23, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Geist Mono", Menlo, Consolas, monospace;
}

/* ── Global Custom Hairline Scrollbars (Zero Ugly Default OS Bars) ── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.3);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.6);
}

/* Code & Terminal Dark Scrollbars */
.panel-code::-webkit-scrollbar,
.arena-panel::-webkit-scrollbar,
pre::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.panel-code::-webkit-scrollbar-track,
.arena-panel::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.panel-code::-webkit-scrollbar-thumb,
.arena-panel::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
}

.panel-code::-webkit-scrollbar-thumb:hover,
.arena-panel::-webkit-scrollbar-thumb:hover,
pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
  background-color: var(--bg);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Typography & Strict Anti-Orphan Layout Rules ── */
h1, h2, h3, h4 {
  color: var(--text);
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

p, .lead, .section-desc {
  text-wrap: balance;
}

.mono {
  font-family: var(--font-mono);
}

/* ── Standardized Expansive Container Width (Matching TokenEnrich Standard) ── */
.container {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 56px);
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.brand-name {
  font-weight: 800;
  color: #09090b;
}

.brand-tld {
  font-weight: 500;
  color: #64748b;
  font-size: 16.5px;
}

.logo-badge {
  width: 28px;
  height: 28px;
  background: #09090b;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #000000;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid #09090b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: #111827;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #9ca3af;
  color: #000000;
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 26px; font-size: 14.5px; }

/* ── Hero Persona Segmented Control (Slim, Compact & Balanced) ── */
.persona-toggle-bar {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 3px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.persona-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.persona-toggle-btn svg {
  width: 13.5px;
  height: 13.5px;
  stroke-width: 2;
  color: #64748b;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.persona-toggle-btn span {
  white-space: nowrap;
}

.persona-toggle-btn.active {
  background: #09090b;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.persona-toggle-btn.active svg {
  color: #ffffff;
}

.persona-toggle-btn:hover:not(.active) {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.persona-toggle-btn:hover:not(.active) svg {
  color: #0f172a;
}

/* ── Hero Section & Upgraded Typography ── */
.hero {
  padding: 44px 0 40px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 1100px;
  margin: 0 auto 22px;
}

.hero-line {
  display: block;
}

.hero-line-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Upgraded Subheadings & Descriptions Across All Sections */
.hero p.lead {
  font-size: clamp(17px, 1.8vw, 19.5px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 820px;
  margin: 0 auto 30px;
  font-weight: 450;
}

.section-desc {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto;
  font-weight: 450;
}

/* ── Live Telemetry Pulse Bar ── */
.pulse-bar {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
  margin-right: 6px;
}

.pulse-sep {
  color: var(--border-strong);
  font-weight: 400;
}

/* 402 Handshake Simulator Arena */
.arena-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  margin: 36px auto 64px;
  text-align: left;
}

.arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .arena-grid {
    grid-template-columns: 1fr;
  }
}

.arena-panel {
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  box-shadow: var(--shadow-window);
}

.arena-panel-red { background: #111319; }
.arena-panel-green { background: #090d16; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #9ca3af;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.panel-stats {
  display: flex;
  gap: 20px;
  padding: 11px 18px;
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-code {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #cbd5e1;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}

/* Feature Switcher Buttons */
.dev-feature-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.dev-feature-btn:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.dev-feature-btn.active {
  background: #ffffff;
  border: 1.5px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

/* Marketplace Filter Segmented Bar */
.market-filter-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.market-filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.market-filter-btn:hover {
  background: var(--bg-surface);
  color: var(--text);
}

.market-filter-btn.active {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
}

/* Sections */
.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: inline-block;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.pricing-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  position: relative;
}

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

.plan-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.plan-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  margin: 12px 0 4px;
}

.plan-features {
  list-style: none;
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--emerald);
  flex-shrink: 0;
}

/* ── Split FAQ Section ($1M Linear / Stripe Layout) ── */
.faq-split {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 72px;
  align-items: start;
}

.faq-left {
  position: sticky;
  top: 100px;
}

.faq-left h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  margin-bottom: 16px;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.faq-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.faq-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.faq-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.faq-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-card code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

@media (max-width: 1024px) {
  .faq-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .faq-left {
    position: static;
  }
}

/* ── Final Bottom CTA Section ($1M High-Conversion Box) ── */
.final-cta-section {
  padding: 88px 0 104px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.final-cta-box {
  background: #09090b;
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.final-cta-box h2 {
  color: #ffffff;
  font-size: clamp(32px, 3.6vw, 48px);
  margin-bottom: 18px;
  letter-spacing: -0.04em;
}

.final-cta-box p {
  color: #cbd5e1;
  font-size: clamp(16.5px, 1.8vw, 19px);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.final-cta-box .btn-primary {
  background: #ffffff !important;
  color: #09090b !important;
  border-color: #ffffff !important;
}

.final-cta-box .btn-primary:hover {
  background: #f1f5f9 !important;
  color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.final-cta-box .btn-secondary {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.final-cta-box .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Footer (3 Clear Columns: Platform, Developers, Legal) */
footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
