/* ═══════════════════════════════════════════════════════════════════════════
   GOAT SCREAMS API — A Serious API for Unserious Sounds
   Design: Developer-focused minimalism meets dry absurdist humor
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   FONTS: Bricolage Grotesque for personality, JetBrains Mono for code
   ───────────────────────────────────────────────────────────────────────────── */
/* Fonts loaded via Google Fonts in head.js */

/* ─────────────────────────────────────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Colors - Warm cream with forest green accent */
  --bg: #faf9f7;
  --bg-subtle: #f5f4f1;
  --bg-muted: #efeee9;
  --fg: #1a1a1a;
  --fg-muted: #666666;
  --fg-subtle: #999999;

  /* Primary: Forest green (like a goat's natural habitat) */
  --accent: #2d5a3d;
  --accent-hover: #234830;
  --accent-subtle: rgba(45, 90, 61, 0.08);
  --accent-muted: rgba(45, 90, 61, 0.15);

  /* Terminal green for code */
  --terminal-bg: #1e1e1e;
  --terminal-fg: #e5e5e5;
  --terminal-accent: #4ade80;
  --terminal-muted: #6b7280;

  /* Status */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BASE RESET
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */
.section-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-3xl) 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -100px;
  background: var(--accent);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.2s ease;
  z-index: 1000;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ─────────────────────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-muted);
}

.top-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--fg);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.nav-logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--fg);
  background: var(--accent-subtle);
}

.nav-link--primary {
  background: var(--accent);
  color: white;
}

.nav-link--primary:hover {
  background: var(--accent-hover);
  color: white;
}

/* Hide dropdown on this clean design */
.nav-dropdown { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.hero-header {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero-section {
  max-width: 720px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-muted);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-xl);
}

.hero-status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

.hero-title span {
  display: inline;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--fg-muted);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* Hero Audio Demo */
.hero-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-lg);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.hero-demo-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(45, 90, 61, 0.3);
}

.hero-demo-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(45, 90, 61, 0.4);
}

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

.hero-demo-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.hero-demo-btn.is-playing {
  background: var(--terminal-bg);
}

.hero-demo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.hero-demo-btn.is-playing .hero-demo-icon {
  background: var(--terminal-accent);
  color: var(--terminal-bg);
}

.hero-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-demo.is-playing .hero-waveform {
  opacity: 1;
}

.waveform-bar {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.hero-demo.is-playing .waveform-bar {
  animation: waveform 0.5s ease-in-out infinite;
}

.hero-demo.is-playing .waveform-bar:nth-child(1) { animation-delay: 0s; }
.hero-demo.is-playing .waveform-bar:nth-child(2) { animation-delay: 0.05s; }
.hero-demo.is-playing .waveform-bar:nth-child(3) { animation-delay: 0.1s; }
.hero-demo.is-playing .waveform-bar:nth-child(4) { animation-delay: 0.15s; }
.hero-demo.is-playing .waveform-bar:nth-child(5) { animation-delay: 0.2s; }
.hero-demo.is-playing .waveform-bar:nth-child(6) { animation-delay: 0.25s; }
.hero-demo.is-playing .waveform-bar:nth-child(7) { animation-delay: 0.3s; }
.hero-demo.is-playing .waveform-bar:nth-child(8) { animation-delay: 0.35s; }
.hero-demo.is-playing .waveform-bar:nth-child(9) { animation-delay: 0.4s; }
.hero-demo.is-playing .waveform-bar:nth-child(10) { animation-delay: 0.45s; }
.hero-demo.is-playing .waveform-bar:nth-child(11) { animation-delay: 0.5s; }
.hero-demo.is-playing .waveform-bar:nth-child(12) { animation-delay: 0.55s; }

@keyframes waveform {
  0%, 100% { height: 8px; }
  50% { height: 32px; }
}

.hero-demo-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-align: center;
  min-height: 1.2em;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button--primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

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

.button--secondary {
  background: white;
  color: var(--fg);
  border-color: var(--bg-muted);
}

.button--secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--fg-subtle);
}

.button--ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: transparent;
}

.button--ghost:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.button--subtle {
  background: var(--bg-subtle);
  color: var(--fg);
  border-color: var(--bg-muted);
}

.button--subtle:hover {
  background: var(--bg-muted);
}

.button svg {
  width: 18px;
  height: 18px;
}

.hero-cta {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BADGES
   ───────────────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-subtle);
  color: var(--fg-muted);
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-sm);
}

.badge--primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.badge--secondary {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent-muted);
}

.badge--accent, .badge-ironic {
  background: linear-gradient(135deg, #fef3c7, #fce7f3);
  color: #92400e;
  border-color: #fcd34d;
}

.badge--neutral {
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  border-color: var(--terminal-bg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CARDS
   ───────────────────────────────────────────────────────────────────────────── */
.card {
  background: white;
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.card-body {
  padding: var(--space-xl);
}

.card-interactive {
  transition: all 0.2s ease;
}

.card-interactive:hover {
  border-color: var(--accent-muted);
  box-shadow: var(--shadow-md);
}

/* ─────────────────────────────────────────────────────────────────────────────
   WHY SECTION (Story Card)
   ───────────────────────────────────────────────────────────────────────────── */
.story-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--bg-muted);
  border-bottom: 1px solid var(--bg-muted);
}

.story-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.story-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: var(--space-lg);
}

.story-card p {
  color: var(--fg-muted);
  margin-bottom: var(--space-md);
}

.story-card ul {
  list-style: none;
  text-align: left;
  max-width: 480px;
  margin: 0 auto var(--space-lg);
}

.story-card li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.story-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.story-footnote {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-subtle);
  padding-top: var(--space-lg);
  border-top: 1px dashed var(--bg-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   API PLAYGROUND
   ───────────────────────────────────────────────────────────────────────────── */
.playground-section {
  background: var(--terminal-bg);
  color: var(--terminal-fg);
}

.playground-section .section-wrapper {
  max-width: 900px;
}

.playground-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.playground-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--terminal-fg);
  margin-bottom: var(--space-sm);
}

.playground-header p {
  color: var(--terminal-muted);
  max-width: 500px;
  margin: 0 auto;
}

.playground-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.playground-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-xs);
  gap: var(--space-xs);
  background: rgba(0, 0, 0, 0.2);
}

.playground-tab {
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--terminal-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.playground-tab:hover {
  color: var(--terminal-fg);
  background: rgba(255, 255, 255, 0.05);
}

.playground-tab.is-active {
  color: var(--terminal-accent);
  background: rgba(74, 222, 128, 0.1);
}

.playground-pane {
  padding: var(--space-xl);
}

.playground-pane[hidden] {
  display: none;
}

.playground-pane-header {
  margin-bottom: var(--space-lg);
}

.playground-pane-header h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--terminal-fg);
  margin-bottom: var(--space-xs);
}

.playground-pane-header p {
  font-size: 0.875rem;
  color: var(--terminal-muted);
}

.playground-form {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.tool-form-grid--split {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.playground-form .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.playground-form .field-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--terminal-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.playground-form .field-hint {
  font-size: 0.75rem;
  color: var(--terminal-muted);
  opacity: 0.7;
}

.playground-form input,
.playground-form select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--terminal-fg);
  transition: all 0.15s ease;
}

.playground-form input::placeholder {
  color: var(--terminal-muted);
}

.playground-form input:focus {
  outline: none;
  border-color: var(--terminal-accent);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.playground-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.playground-actions .button {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.playground-actions .button--primary {
  background: var(--terminal-accent);
  color: var(--terminal-bg);
  border-color: var(--terminal-accent);
}

.playground-actions .button--primary:hover {
  background: #22c55e;
}

.playground-actions .button--subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--terminal-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

.playground-results {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.playground-result-panel[hidden] {
  display: none;
}

.playground-result-panel[data-empty="true"]:empty::before {
  content: '// Response will appear here';
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--terminal-muted);
  opacity: 0.5;
}

.playground-snippet {
  margin-bottom: var(--space-lg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CODE BLOCKS
   ───────────────────────────────────────────────────────────────────────────── */
.code-block {
  background: var(--terminal-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-block-tabs {
  display: flex;
  gap: var(--space-xs);
}

.code-block-tab {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terminal-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-block-tab:hover {
  color: var(--terminal-fg);
}

.code-block-tab.is-active {
  color: var(--terminal-accent);
  background: rgba(74, 222, 128, 0.1);
}

.code-block-copy {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--terminal-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-block-copy:hover {
  color: var(--terminal-fg);
  background: rgba(255, 255, 255, 0.1);
}

.code-block pre {
  margin: 0;
  padding: var(--space-md);
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--terminal-fg);
}

.code-block pre[hidden] {
  display: none;
}

/* Standalone code blocks (outside playground) need dark bg */
section:not(.playground-section) .code-block {
  background: var(--terminal-bg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   FEATURES SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.features-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  background: white;
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.feature-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.feature-card a {
  color: var(--accent);
  text-decoration: none;
}

.feature-card a:hover {
  text-decoration: underline;
}

.feature-card code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-subtle);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

.features-footer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 0.875rem;
  color: var(--fg-muted);
  font-style: italic;
}

.features-footer a {
  color: var(--accent);
  text-decoration: none;
}

.features-footer a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   API ENDPOINTS SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.endpoints-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--bg-muted);
  border-bottom: 1px solid var(--bg-muted);
}

.endpoints-section h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
}

.endpoints-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.endpoint-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: white;
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.endpoint-item:hover {
  border-color: var(--accent-muted);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.endpoint-method {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--fg);
}

.endpoint-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.endpoint-desc code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-subtle);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

.endpoints-params h3,
.endpoints-response h3 {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.endpoints-params ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.endpoints-params li {
  margin-bottom: var(--space-xs);
}

.endpoints-params code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-muted);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRICING SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.pricing-section {
  text-align: center;
}

.pricing-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.pricing-header p {
  color: var(--fg-muted);
  margin-bottom: var(--space-2xl);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card-highlight {
  border-color: var(--accent);
  border-width: 2px;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.pricing-features .icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-footnote {
  font-size: 0.75rem;
  color: var(--fg-subtle);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.pricing-card .button {
  width: 100%;
}

/* Concerning tier special styles */
.pricing-card[data-pricing-tier="concerning"] {
  border-color: var(--error);
}

.pricing-card[data-pricing-tier="concerning"] h3 {
  color: var(--error);
}

.pricing-card[data-pricing-tier="concerning"] .pricing-features .icon {
  color: var(--error);
}

.pricing-card[data-pricing-tier="concerning"] .pricing-features span {
  color: var(--error);
}

@keyframes concerningShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.pricing-card-shake {
  animation: concerningShake 0.5s ease-in-out;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FEEDBACK PROMO
   ───────────────────────────────────────────────────────────────────────────── */
.feedback-section {
  text-align: center;
}

.feedback-cta {
  margin-bottom: var(--space-2xl);
}

.feedback-projects h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.feedback-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
}

.project-card {
  background: white;
  border: 1px solid var(--bg-muted);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: left;
  transition: all 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent-muted);
}

.project-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.project-card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: var(--space-md);
}

.project-card a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--bg-muted);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  max-width: 500px;
  margin: 0 auto var(--space-sm);
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--fg-subtle);
}

.footer-meta a {
  color: var(--accent);
  text-decoration: none;
}

.footer-meta a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────────
   STATUS TICKER (for hero)
   ───────────────────────────────────────────────────────────────────────────── */
#status-ticker-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-muted);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

#status-ticker-pill.status-pill--error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

#status-ticker-pill.status-pill--error .status-dot {
  background: var(--error);
}

/* Hide the duplicate status ticker */
#status-ticker {
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-primary { color: var(--accent); }
.text-muted-foreground { color: var(--fg-muted); }
.text-foreground { color: var(--fg); }
.text-destructive { color: var(--error); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono { font-family: var(--font-mono); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

.bg-card\/50 { background: rgba(255, 255, 255, 0.5); }
.backdrop-blur { backdrop-filter: blur(8px); }

.border { border: 1px solid var(--bg-muted); }
.border-l-4 { border-left: 4px solid; }
.border-primary { border-color: var(--accent); }
.border-secondary { border-color: #0891b2; }
.border-accent { border-color: #7c3aed; }
.border-chart-4 { border-color: var(--fg-subtle); }

.ring-1 { box-shadow: 0 0 0 1px var(--bg-muted); }
.ring-zinc-200 { box-shadow: 0 0 0 1px #e4e4e7; }

.p-4 { padding: 1rem; }
.pl-4 { padding-left: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }

.max-w-\[550px\] { max-width: 550px; }

.min-h-screen { min-height: 100vh; }
.flex-1 { flex: 1; }

.w-full { width: 100%; }
.h-9 { height: 2.25rem; }
.h-px { height: 1px; }
.w-24 { width: 6rem; }

.inline-flex { display: inline-flex; }
.whitespace-nowrap { white-space: nowrap; }
.shrink-0 { flex-shrink: 0; }

.italic { font-style: italic; }

.transition-all { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease; }

.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-accent:hover { background: var(--accent-subtle); }
.hover\:text-accent-foreground:hover { color: var(--accent); }
.hover\:bg-primary\/90:hover { background: var(--accent-hover); }
.hover\:bg-destructive\/90:hover { background: #dc2626; }

.bg-primary { background: var(--accent); }
.bg-destructive { background: var(--error); }
.text-primary-foreground { color: white; }
.text-destructive-foreground { color: white; }
.bg-transparent { background: transparent; }

.border-transparent { border-color: transparent; }
.shadow-xs { box-shadow: var(--shadow-sm); }

.outline-none { outline: none; }
.pointer-events-none { pointer-events: none; }
.opacity-50 { opacity: 0.5; }

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Grid utilities */
.md\:grid-cols-2 {
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.md\:grid-cols-3 {
  @media (min-width: 768px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lg\:grid-cols-3 {
  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Responsive text */
.sm\:flex-row {
  @media (min-width: 640px) {
    flex-direction: row;
  }
}

.sm\:gap-2 {
  @media (min-width: 640px) {
    gap: 0.5rem;
  }
}

.sm\:gap-12 {
  @media (min-width: 640px) {
    gap: 3rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   READABLE TEXT LIMIT
   ───────────────────────────────────────────────────────────────────────────── */
.readable-text {
  max-width: 65ch;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ANCHOR TARGETS
   ───────────────────────────────────────────────────────────────────────────── */
.anchor-target {
  scroll-margin-top: 100px;
}

.tool-section {
  scroll-margin-top: 100px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TOOL NOTE
   ───────────────────────────────────────────────────────────────────────────── */
.tool-note {
  font-size: 0.75rem;
  color: var(--terminal-muted);
  margin-top: var(--space-md);
}

.tool-note code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CODE EXAMPLES SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.code-examples-section h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.code-examples-note {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: var(--space-md);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PLAYGROUND RESULTS (Scream Cards)
   ───────────────────────────────────────────────────────────────────────────── */
.tool-result {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.tool-result:last-child {
  margin-bottom: 0;
}

.tool-result--summary {
  background: transparent;
  border: none;
  padding: var(--space-sm) 0;
}

.tool-result--summary p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--terminal-muted);
}

.tool-result-header {
  margin-bottom: var(--space-md);
}

.tool-result-header h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--terminal-fg);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.tool-result-header p {
  font-size: 0.875rem;
  color: var(--terminal-muted);
  margin: 0 0 var(--space-xs) 0;
  line-height: 1.5;
}

.tool-result-header p strong {
  color: var(--terminal-fg);
  font-weight: 500;
}

.tool-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.tool-result-tags .badge {
  background: rgba(74, 222, 128, 0.1);
  color: var(--terminal-accent);
  border-color: rgba(74, 222, 128, 0.2);
  font-size: 0.6875rem;
  text-transform: uppercase;
}

/* Custom Audio Player */
.audio-player {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.audio-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--terminal-accent);
  color: var(--terminal-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.audio-player-btn:hover {
  background: #5ce898;
  transform: scale(1.05);
}

.audio-player-btn:active {
  transform: scale(0.95);
}

.audio-player.is-loading .audio-player-btn {
  opacity: 0.6;
  cursor: wait;
}

.audio-player.is-playing .audio-player-btn {
  background: rgba(255, 255, 255, 0.15);
  color: var(--terminal-accent);
}

.audio-player.is-playing .audio-player-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.audio-player-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-player-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.audio-player-waveform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  gap: 2px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.audio-player.is-playing .audio-player-waveform {
  opacity: 1;
}

.audio-player-waveform .waveform-bar {
  flex: 1;
  height: 6px;
  background: var(--terminal-accent);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.audio-player.is-playing .audio-player-waveform .waveform-bar {
  animation: playgroundWaveform 0.5s ease-in-out infinite;
}

.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(1) { animation-delay: 0s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(2) { animation-delay: 0.04s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(3) { animation-delay: 0.08s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(4) { animation-delay: 0.12s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(5) { animation-delay: 0.16s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(6) { animation-delay: 0.2s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(7) { animation-delay: 0.24s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(8) { animation-delay: 0.28s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(9) { animation-delay: 0.32s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(10) { animation-delay: 0.36s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(11) { animation-delay: 0.4s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(12) { animation-delay: 0.44s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(13) { animation-delay: 0.48s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(14) { animation-delay: 0.52s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(15) { animation-delay: 0.56s; }
.audio-player.is-playing .audio-player-waveform .waveform-bar:nth-child(16) { animation-delay: 0.6s; }

@keyframes playgroundWaveform {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.audio-player-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.audio-player-progress:hover {
  height: 6px;
  margin-top: -1px;
  margin-bottom: -1px;
}

.audio-player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--terminal-accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.audio-player-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--terminal-muted);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Fallback for native audio (hide it) */
.tool-result audio {
  display: none;
}

.tool-result-json {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-result-json .code-block {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.08);
}

.tool-result-json .code-block pre {
  max-height: 250px;
  overflow-y: auto;
}

.tool-result-json .code-block code {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8125rem;
}

/* Pagination */
.tool-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: var(--space-md);
}

.tool-pagination-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--terminal-muted);
}

.tool-pagination .button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-md);
}

.tool-pagination .button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SCROLL ANIMATIONS (JS adds these)
   ───────────────────────────────────────────────────────────────────────────── */
.feature-card,
.pricing-card,
.endpoint-item,
.story-card,
.project-card {
  will-change: opacity, transform;
}

/* ─────────────────────────────────────────────────────────────────────────────
   ENHANCED HOVER EFFECTS
   ───────────────────────────────────────────────────────────────────────────── */
.badge-ironic {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.badge-ironic:hover {
  box-shadow: 0 2px 8px rgba(252, 211, 77, 0.4);
}

/* Subtle link underline animation */
.feature-card a,
.footer-links a,
.project-card a {
  position: relative;
}

.feature-card a::after,
.project-card a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.2s ease;
}

.feature-card a:hover::after,
.project-card a:hover::after {
  width: 100%;
}

/* Button press feedback */
.button:active {
  transform: scale(0.98);
}

/* Nav link hover glow */
.nav-link:hover {
  text-shadow: 0 0 20px rgba(45, 90, 61, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .feature-card,
  .pricing-card,
  .endpoint-item,
  .story-card,
  .project-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────────────────────── */
@media print {
  .top-nav,
  .playground-section,
  .skip-link {
    display: none;
  }

  body {
    background: white;
  }

  .code-block {
    break-inside: avoid;
  }
}
