/* =============================================================================
   SECTIONS — Base (below-fold)
   ============================================================================= */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.case-section .section-inner,
#how .section-inner,
.faq-section .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* =============================================================================
   DEMO SECTION
   ============================================================================= */
.demo-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.demo-container {
  margin-top: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-accent);
  background: var(--bg-primary);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.5s ease;
}

.demo-container:hover {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

.demo-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot.red { background: #FF5F57; }
.demo-dot.yellow { background: #FEBC2E; }
.demo-dot.green { background: #28C840; }

.demo-toolbar-url {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.demo-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  min-height: 420px;
}

.demo-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 2rem;
}

.demo-sidebar h3, .demo-main h3 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.demo-doc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-doc:hover, .demo-doc.active {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.demo-doc-icon { font-size: 1.25rem; }
.demo-doc-info { flex: 1; }

.demo-doc-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.demo-doc-meta {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.demo-main { display: flex; flex-direction: column; }
.demo-results { flex: 1; }

/* Animated demo flags */
.demo-flag {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  transition: all 0.2s;
  opacity: 0;
  transform: translateX(15px);
}

.demo-flag.flag-visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, background 0.2s;
}

.demo-flag:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.demo-flag-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.demo-flag-indicator.aligned { background: var(--accent); }
.demo-flag-indicator.flagged { background: var(--warning); }
.demo-flag-indicator.deviated { background: var(--danger); }

.demo-flag-content { flex: 1; }

.demo-flag-claim {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.demo-flag-evidence {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  line-height: 1.5;
}

.demo-flag-score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  flex-shrink: 0;
}

.score-high { color: var(--accent); }
.score-mid { color: var(--warning); }
.score-low { color: var(--danger); }

.demo-summary {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}

.demo-summary.summary-visible { opacity: 1; }

.demo-summary-item { text-align: center; }

.demo-summary-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.demo-summary-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === DEMO TABS === */
.demo-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.demo-tab:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.demo-tab.active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.demo-tab-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.demo-tab.active .demo-tab-badge {
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent-dim);
}

.demo-panel {
  display: none;
}

.demo-panel.active {
  display: block;
  animation: demoPanelIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes demoPanelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   PROBLEM SECTION — Enhanced Contrast (per PRD)
   ============================================================================= */
.problem-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.problem-card {
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-accent);
  border-left: 3px solid var(--warning);
  background: var(--bg-card-hover);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.problem-card:hover {
  border-color: var(--warning);
  background: #1E2330;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.problem-card-icon { font-size: 1.5rem; margin-bottom: 1rem; }

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.problem-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================================================
   PIPELINE — How It Works
   ============================================================================= */
.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 2rem;
  position: relative;
  min-height: 180px;
}

/* Pipeline reward pulse animation */
.pipeline-step.pulse .step-number {
  animation: rewardPulse 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pipeline-step.pulse.final .step-number {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 15px var(--accent-glow-strong);
}

@keyframes rewardPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow-strong); }
  50% { transform: scale(1.12); box-shadow: 0 0 20px var(--accent-glow-strong); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

.pipeline-step {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

.pipeline-step::after {
  content: '\2192';
  position: absolute;
  right: -8px;
  top: 2.5rem;
  color: var(--text-muted);
  font-size: 1.25rem;
}

.pipeline-step:last-child::after { display: none; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.pipeline-step:hover .step-number {
  background: var(--accent);
  color: var(--bg-primary);
}

.step-verb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.pipeline-step h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pipeline-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =============================================================================
   VERTICALS — Simplified Pills (per PRD)
   ============================================================================= */
.verticals-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.vertical-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  cursor: default;
}

.vertical-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-glow);
}

.vertical-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.vertical-pill:hover .vertical-pill-dot {
  opacity: 1;
}

/* =============================================================================
   THESIS — Redesigned (per PRD)
   ============================================================================= */
.thesis-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.thesis-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 2rem;
}

.thesis-visual {
  position: relative;
  padding: 3rem;
  min-height: 280px;
}

.entropy-diagram {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.entropy-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.entropy-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 100px;
  text-align: right;
  flex-shrink: 0;
}

.entropy-bar-container {
  flex: 1;
  height: 32px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.entropy-bar {
  height: 100%;
  border-radius: 6px;
  width: 0%;
  transition: width 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.entropy-bar.high {
  background: linear-gradient(90deg, var(--danger), #FF8A8A);
}

.entropy-bar.high.bar-animated { width: 92%; }

.entropy-bar.governed {
  background: linear-gradient(90deg, var(--accent), #00FFD0);
}

.entropy-bar.governed.bar-animated { width: 28%; }

.entropy-bar-label {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.thesis-text h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.thesis-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.thesis-text p strong { color: var(--text-primary); }

/* =============================================================================
   COMPARISON
   ============================================================================= */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.comparison-card {
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.comparison-card.without { background: var(--bg-card); }

.comparison-card.with {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.comparison-card-header {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.comparison-card.without .comparison-card-header { color: var(--text-muted); }
.comparison-card.with .comparison-card-header { color: var(--accent); }

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comparison-icon { font-size: 0.85rem; margin-top: 2px; }

.comparison-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =============================================================================
   CTA SECTION
   ============================================================================= */
.cta-section {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}

.cta-section .section-title {
  max-width: 600px;
  margin: 0 auto 1rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.cta-section .section-desc {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cta-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 2rem;
  border-radius: 2px;
  opacity: 0.6;
}

/* =============================================================================
   CONTACT FORM
   ============================================================================= */
.contact-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-input::placeholder {
  color: var(--text-muted);
}

.contact-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.contact-input:valid:not(:placeholder-shown) {
  border-color: var(--accent-dim);
}

@keyframes successPulse {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.form-success {
  display: none;
  padding: 3rem 0;
}

.form-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  animation: successPulse 0.6s ease;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.8rem;
  color: #9DA4B7;
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-right a {
  font-size: 0.8rem;
  color: #9DA4B7;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a:hover { color: var(--text-primary); }

.footer-social {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-social:hover { color: var(--accent) !important; }

/* =============================================================================
   RESPONSIVE (below-fold)
   ============================================================================= */
@media (max-width: 1024px) {
  .pipeline-steps { grid-template-columns: repeat(3, 1fr); }
  .pipeline-step:nth-child(3)::after { display: none; }
}

@media (max-width: 768px) {
  .problem-grid { grid-template-columns: 1fr; }
  .pipeline-steps { grid-template-columns: 1fr; }
  .pipeline-step::after { display: none; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-sidebar { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 2rem; }
  .thesis-content { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .demo-summary { flex-wrap: wrap; }
  .verticals-pills { justify-content: center; }
}
