/* ===========================================
   DESIGN TOKENS
   =========================================== */
:root {
  /* Colors */
  --bg-color: #0d1117;
  --bg-solid: #161b22;
  --bg-elevated: #1c2128;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  /* Brand */
  --accent-primary: #2f81f7;
  --accent-primary-hover: #1f6feb;
  --accent-secondary: #a371f7;
  --accent-teal: #238636;
  --color-warning: #d29922;
  --color-danger: #f85149;
  --color-success: #2ea043;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);

  /* Glass */
  --glass-bg: rgba(22, 27, 34, 0.5);
  --glass-border: rgba(240, 246, 252, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s var(--ease-out);
}


/* ===========================================
   RESET & BASE
   =========================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.15;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(47, 129, 247, 0.1);
  color: var(--accent-primary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: rgba(240, 246, 252, 0.08);
  border: 1px solid var(--glass-border);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  color: var(--text-primary);
}

.section-padding {
  padding: 6rem 0;
}

.section-header {
  max-width: 680px;
}

.section-header h2 {
  background: linear-gradient(180deg, #ffffff 30%, #8b949e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-intro {
  color: var(--text-secondary);
  font-size: 1.15rem;
}

.dark-section {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.ls-wide {
  letter-spacing: 0.06em;
}

.eyebrow-inline {
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}


/* ===========================================
   BUTTONS
   =========================================== */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  transition: all var(--transition-normal);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 4px 14px rgba(47, 129, 247, 0.25);
}

.btn-primary:hover {
  background: var(--gradient-brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 129, 247, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(240, 246, 252, 0.08);
  border-color: rgba(240, 246, 252, 0.2);
  transform: translateY(-2px);
  color: white;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}


/* ===========================================
   NAVBAR
   =========================================== */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-normal);
  padding: 0.875rem 0;
}

.site-header.scrolled {
  background: rgba(13, 17, 23, 0.95);
  border-bottom-color: var(--glass-border);
  padding: 0.625rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: white !important;
}

.main-nav {
  gap: 0.25rem;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
  color: white;
  background: rgba(240, 246, 252, 0.04);
}


/* ===========================================
   HERO
   =========================================== */
.hero {
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Ambient glow */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(47, 129, 247, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -15%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(circle, rgba(163, 113, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: rgba(47, 129, 247, 0.08);
  border: 1px solid rgba(47, 129, 247, 0.2);
  color: var(--accent-primary);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, #FFFFFF 20%, rgba(139, 148, 158, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero .subhead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions .btn {
  padding: 0.875rem 1.75rem;
}


/* --- IDE Mockup --- */
.ide-window {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  position: relative;
}

.ide-header {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

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

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

.dot.red { background: var(--color-danger); }
.dot.yellow { background: var(--color-warning); }
.dot.green { background: var(--color-success); }

.ide-filename {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.ide-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  min-height: 280px;
}

.code-line {
  color: var(--text-primary);
  white-space: nowrap;
}

.code-line.indent {
  padding-left: 2rem;
}

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

.code-line .kw {
  color: var(--accent-primary);
}

.code-line .fn {
  color: var(--accent-secondary);
}

.code-line .num {
  color: var(--color-warning);
}

/* Results Panel */
.results-panel {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 72%;
  background: rgba(22, 27, 34, 0.97);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: float 6s ease-in-out infinite;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--glass-border);
}

.results-title {
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
}

.results-meta {
  color: var(--color-success);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 4px;
}

.results-grid {
  padding: 0.25rem 0;
}

.results-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(240, 246, 252, 0.04);
}

.results-row:last-child {
  border-bottom: none;
}

.results-row-header {
  color: var(--text-muted);
  font-weight: 600;
  border-bottom-color: var(--glass-border);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}


/* --- DB Strip --- */
.db-strip-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.db-strip-logos {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.db-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: rgba(240, 246, 252, 0.02);
}

.db-chip.muted {
  color: var(--text-muted);
  border-style: dashed;
}


/* ===========================================
   PROBLEM SECTION
   =========================================== */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--transition-normal);
}

.glass-card:hover {
  background: rgba(240, 246, 252, 0.04);
  transform: translateY(-4px);
  border-color: rgba(47, 129, 247, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon.warning-icon {
  background: rgba(248, 81, 73, 0.1);
  color: var(--color-danger);
}

.problem-card h3 {
  font-size: 1.25rem;
}


/* ===========================================
   HOW IT WORKS
   =========================================== */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 0;
}

.step-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.step-item::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -2rem;
  width: 2px;
  background: rgba(47, 129, 247, 0.15);
}

.step-item:last-child::after {
  display: none;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 16px rgba(47, 129, 247, 0.15);
}

.step-text h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.step-text p {
  font-size: 0.95rem;
}

/* Code Window */
.glow-box {
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.8) 0%, rgba(13, 17, 23, 0.9) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

.glow-box::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--gradient-brand);
  z-index: -1;
  border-radius: 14px;
  opacity: 0.2;
  filter: blur(12px);
}

.code-window {
  border-radius: 12px;
  overflow: hidden;
}

.window-header {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.window-title {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.window-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}

.window-body pre {
  font-size: inherit;
}

.json-key { color: var(--accent-primary); }
.json-str { color: var(--color-success); }
.json-bool { color: var(--color-warning); }


/* ===========================================
   FEATURES
   =========================================== */
.feature-card {
  background: rgba(240, 246, 252, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  background: rgba(240, 246, 252, 0.04);
  transform: translateY(-4px);
  border-color: rgba(47, 129, 247, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: rgba(47, 129, 247, 0.08);
  color: var(--accent-primary);
}

.feature-card h3 {
  font-size: 1.1rem;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Also / Plus chips */
.also-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.also-chip {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: rgba(240, 246, 252, 0.02);
  transition: all var(--transition-fast);
}

.also-chip:hover {
  border-color: rgba(47, 129, 247, 0.3);
  color: var(--text-primary);
}


/* ===========================================
   DATABASES
   =========================================== */
.db-card {
  background: rgba(240, 246, 252, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: all var(--transition-normal);
}

.db-card:hover {
  background: rgba(240, 246, 252, 0.05);
  transform: translateY(-3px);
  border-color: rgba(47, 129, 247, 0.2);
}

.db-card-icon {
  color: var(--accent-primary);
}

.db-card-icon.snowflake {
  color: var(--accent-secondary);
}

.db-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-badge.built-in {
  background: rgba(46, 160, 67, 0.1);
  color: var(--color-success);
}

.db-badge.addon {
  background: rgba(163, 113, 247, 0.1);
  color: var(--accent-secondary);
}

/* Extensibility Callout */
.extensibility-callout {
  background: rgba(47, 129, 247, 0.04);
  border: 1px solid rgba(47, 129, 247, 0.12);
  border-radius: 12px;
  padding: 1.75rem 2rem;
}

.ext-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 129, 247, 0.1);
  color: var(--accent-primary);
}


/* ===========================================
   SECURITY
   =========================================== */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.security-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: rgba(240, 246, 252, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: all var(--transition-normal);
}

.security-item:hover {
  background: rgba(240, 246, 252, 0.04);
  border-color: rgba(47, 129, 247, 0.2);
}

.security-item i {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  color: var(--text-primary);
}

.security-item span {
  font-size: 0.8rem;
  line-height: 1.5;
}


/* ===========================================
   SECUREQL
   =========================================== */
.secureql-section {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.secureql-card {
  background: rgba(47, 129, 247, 0.03);
  border: 1px solid rgba(47, 129, 247, 0.1);
  border-radius: 16px;
  padding: 3rem;
}

.secureql-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.secureql-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.secureql-features li i {
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* SecureQL Flow Diagram */
.secureql-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sq-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.sq-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 160px;
  justify-content: center;
}

.sq-analyst {
  background: rgba(240, 246, 252, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.sq-proxy {
  background: rgba(47, 129, 247, 0.1);
  border: 1px solid rgba(47, 129, 247, 0.3);
  color: var(--accent-primary);
}

.sq-db {
  background: rgba(46, 160, 67, 0.08);
  border: 1px solid rgba(46, 160, 67, 0.25);
  color: var(--color-success);
}

.sq-arrow {
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.sq-audit {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(240, 246, 252, 0.03);
  border: 1px dashed var(--glass-border);
}


/* ===========================================
   FAQ
   =========================================== */
.faq-container {
  max-width: 760px;
}

.faq-item {
  margin-bottom: 0.5rem;
  border-radius: 10px !important;
  border: 1px solid var(--glass-border) !important;
  background: transparent !important;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: rgba(47, 129, 247, 0.3) !important;
}

.faq-item .accordion-button {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  background: transparent;
  color: var(--text-primary);
}

.faq-item .accordion-button:not(.collapsed) {
  background: transparent;
  color: var(--accent-primary);
  box-shadow: none;
}

.faq-item .accordion-button:focus {
  box-shadow: none;
}

.faq-item .accordion-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}


/* ===========================================
   FINAL CTA
   =========================================== */
.cta-section h2 {
  background: linear-gradient(180deg, #ffffff 30%, #8b949e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
  padding: 2rem 0;
  background: var(--bg-color);
  border-top: 1px solid var(--glass-border);
}

.footer-link {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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


/* ===========================================
   SCROLL REVEAL ANIMATION
   =========================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 991.98px) {
  .section-padding {
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subhead {
    max-width: 100%;
  }

  .ide-body {
    font-size: 11px;
    min-height: 220px;
    padding: 1rem;
  }

  .results-panel {
    width: 80%;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .secureql-card {
    padding: 2rem;
  }
}

@media (max-width: 767.98px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-header h2,
  .display-5 {
    font-size: 1.75rem !important;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .db-strip-logos {
    gap: 0.5rem;
  }

  .db-chip {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .results-panel {
    position: relative;
    width: 100%;
    bottom: auto;
    right: auto;
    margin: 0.75rem;
    animation: none;
  }

  .secureql-card {
    padding: 1.5rem;
  }

  .also-chips {
    gap: 0.35rem;
  }

  .also-chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}
