@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Palette - Technical Precision Light Theme */
  --bg-primary: #f8f9ff;       /* Light bluish-white background */
  --bg-secondary: #eff4ff;     /* Subtle container low background */
  --bg-card: #ffffff;          /* Pure White card surface */
  --bg-tertiary: #F2F2EF;      /* Off-white / Sand surface-muted */
  
  --border-primary: #EAECF1;   /* Razor-sharp border-subtle outline */
  --border-secondary: #cfc4c5; /* outline-variant */
  
  --text-primary: #0b1c30;     /* On-surface dark navy/black */
  --text-secondary: #4c4546;   /* On-surface-variant */
  --text-muted: #7e7576;       /* Outline neutral gray */
  
  --accent-color: #4b41e1;     /* Brand Indigo Accent */
  --accent-glow: rgba(75, 65, 225, 0.1);
  --accent-gradient: linear-gradient(135deg, #4b41e1 0%, #645efb 100%);
  
  --warning-accent: #FBFF7A;   /* Marker Yellow for warnings */
  --error: #ba1a1a;            /* System Red */
  --success: #10b981;          /* System Green */
  
  /* Typography Variables */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Layout */
  --container-width: 1200px;
  --radius-sm: 2px;
  --radius-md: 4px;            /* Standard shape rounding (0.25rem) */
  --radius-lg: 6px;
  
  /* Transitions */
  --transition: 0.1s ease;
}

/* Reset & Base Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

h1, h2, h3, h4, .logo, .showcase-tab, .btn-primary, .btn-secondary, .qs-tab {
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.9;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Specifications */
h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em; /* Tightened look */
}

h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

p {
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-secondary);
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 16px;
}

.label-mono-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Accent text-gradient */
.text-gradient {
  color: #000000; /* Monochromatic-first preference */
  border-bottom: 2px solid var(--accent-color);
  display: inline;
}

/* Background grid styling */
.hero-wrapper {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
}

.grid-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(11, 28, 48, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 28, 48, 0.02) 1px, transparent 1px);
  mask-image: radial-gradient(circle 65% at 50% 30%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle 65% at 50% 30%, black 20%, transparent 100%);
}

.glow-overlay {
  display: none; /* Removed glow overlay in favor of monochromatic flat surfaces */
}

/* Header & Navbar - Pure White Sticky */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-primary);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 3.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo-icon {
  width: 20px;
  height: 20px;
  background: #000000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
}

nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav ul a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* Buttons - Opacity State Hover */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: #000000;
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  transition: opacity var(--transition);
}

.btn-secondary:hover {
  opacity: 0.9;
}

/* Hero Section */
.hero {
  padding: 8rem 0 5rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  max-width: 800px;
  margin-bottom: 1.25rem;
}

.hero p {
  max-width: 580px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Quick Copy Command Widget */
.quick-copy {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 400px;
  width: 100%;
  justify-content: space-between;
}

.quick-copy span {
  color: var(--accent-color);
}

.btn-copy {
  color: var(--text-muted);
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

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

/* Visual Tab Showcase Panel */
.showcase-container {
  margin-top: 4rem;
  margin-bottom: 4rem;
  width: 100%;
}

.showcase-header {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.showcase-tab {
  padding: 0.4rem 0.8rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition);
  background: transparent;
}

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

.showcase-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-primary);
}

.showcase-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
}

.showcase-pane {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.showcase-pane.active {
  display: block;
}

.showcase-pane img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

/* Section Title spacing */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

/* Crisp Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 4rem 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: border-color var(--transition);
}

.feature-card:hover {
  border-color: var(--border-secondary);
}

.feature-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-color);
  font-size: 1.05rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  line-height: 20px;
}

/* Spend Simulator layout panel */
.simulator-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
  padding: 5rem 0;
}

.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .simulator-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.simulator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.simulator-controls p {
  font-size: 14px;
  line-height: 20px;
}

.control-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.control-group label span {
  color: var(--accent-color);
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: var(--bg-secondary);
  outline: none;
  border: 1px solid var(--border-primary);
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-sm); /* 4px radius standard */
  background: #000000;
  cursor: pointer;
  transition: opacity var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
  opacity: 0.9;
}

.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.btn-radio {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  transition: all var(--transition);
}

.btn-radio:hover {
  border-color: var(--border-secondary);
  color: var(--text-primary);
}

.btn-radio.active {
  background: var(--bg-card);
  border-color: #000000;
  color: var(--text-primary);
}

.btn-simulate {
  width: 100%;
  padding: 0.75rem;
  background: #000000;
  color: #ffffff;
  font-weight: 500;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  transition: opacity var(--transition);
}

.btn-simulate:hover {
  opacity: 0.9;
}

/* Console window styled cleanly */
.terminal-window {
  background: #ffffff;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
}

.terminal-dots {
  display: flex;
  gap: 0.35rem;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted); /* Low key dots */
}

.terminal-title {
  color: var(--text-secondary);
  font-size: 11px;
  margin-left: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
}

.terminal-body {
  padding: 1.25rem;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #ffffff;
}

.terminal-line {
  color: var(--text-secondary);
  line-height: 1.5;
}

.line-input::before {
  content: '$ ';
  color: var(--accent-color);
  font-weight: bold;
}

.line-success { color: var(--success); }
.line-warning { 
  background-color: var(--warning-accent); 
  color: #000000;
  padding: 0 4px;
  border-radius: 2px;
}
.line-error { color: var(--error); font-weight: bold; }

.blocked-banner {
  border: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
}

.blocked-banner-title {
  color: var(--error);
  font-weight: bold;
  margin-bottom: 0.15rem;
}

/* Runaway block section layout */
.runaway-section {
  padding: 5rem 0;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .runaway-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.runaway-text p {
  margin-bottom: 1.5rem;
}

.runaway-image {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.4rem;
}

.runaway-image img {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
}

/* Quickstart Steps console wrapper */
.quickstart {
  padding: 5rem 0;
  text-align: center;
  border-top: 1px solid var(--border-primary);
}

.quickstart p {
  max-width: 500px;
  margin: 0 auto 2.5rem auto;
}

.quickstart-console {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  text-align: left;
}

.quickstart-tabs {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
}

.qs-tab {
  padding: 0.75rem 1.25rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border-primary);
  transition: all var(--transition);
}

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

.qs-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.qs-content {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 140px;
  position: relative;
  background: #ffffff;
}

.qs-pane {
  display: none;
}

.qs-pane.active {
  display: block;
}

.qs-line {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.qs-comment {
  color: var(--text-muted);
}

.qs-cmd {
  color: var(--text-primary);
}

.qs-cmd::before {
  content: '$ ';
  color: var(--accent-color);
}

.qs-pane .btn-copy-qs {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.6rem;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all var(--transition);
}

.qs-pane .btn-copy-qs:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* CTA Footer section layout */
.bottom-cta {
  padding: 6rem 0;
  text-align: center;
  border-top: 1px solid var(--border-primary);
  background-color: var(--bg-secondary);
}

.bottom-cta h2 {
  margin-bottom: 1rem;
}

.bottom-cta p {
  max-width: 500px;
  margin: 0 auto 2rem auto;
}

/* Footer layout rules */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-primary);
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 600px) {
  .footer-layout {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.footer-brand .logo-icon {
  color: #fff;
}

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

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

/* Progressive Scroll reveal animations supported browser */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-card {
      from {
        opacity: 0;
        transform: translateY(16px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .feature-card, .simulator-controls, .terminal-window, .runaway-text, .runaway-image, .quickstart-console {
      animation: reveal-card auto linear forwards;
      animation-timeline: view();
      animation-range: entry 5% entry 30%;
    }
  }
}

/* Fallback reveal class */
.reveal-fallback {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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