/* ============================================================
   PikaDocs Landing Page — Design System & Styles
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg:             #0a0a0b;
  --surface-1:      #111113;
  --surface-2:      #1a1a1e;
  --border:         #2a2a30;
  --text-primary:   #e8e8ed;
  --text-secondary: #8b8b96;
  --text-muted:     #757580;
  --accent:         #80D47F;
  --accent-hover:   #96de95;
  --accent-subtle:  rgba(128, 212, 127, 0.08);
  --teal:           #3ecfa5;
  --code-bg:        #0f0f12;
  --radius-sm:      2px;
  --radius-md:      4px;
  --radius-lg:      8px;
  --font-sans:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', monospace;
  --container:      1200px;
  --gutter:         clamp(1rem, 4vw, 3rem);
}

/* --- Font Faces --- */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* --- Grain Texture Overlay --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.035;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Typography --- */
h1, h2, h3 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

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

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

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

.text-accent {
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(128, 212, 127, 0.3);
}

.btn-ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Focus Indicators (WCAG 2.2) --- */
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary:focus-visible {
  outline-color: var(--text-primary);
}

/* --- Scroll Reveal Animation --- */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate][data-delay="1"] { transition-delay: 0.15s; }
[data-animate][data-delay="2"] { transition-delay: 0.3s; }
[data-animate][data-delay="3"] { transition-delay: 0.45s; }


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.is-scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.navbar-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-logo {
  height: 32px;
  width: auto;
  position: relative;
  top: -2px;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-cta .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none;
  }

  .navbar.is-open .navbar-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem var(--gutter);
    gap: 1.5rem;
  }

  .navbar.is-open .navbar-links {
    flex-direction: column;
    gap: 0.25rem;
  }

  .navbar.is-open .navbar-cta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .navbar.is-open .navbar-links a,
  .navbar.is-open .navbar-cta .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .navbar.is-open .menu-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .navbar.is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .navbar.is-open .menu-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 6.5rem 0 3.5rem;
}

.hero .container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* --- Hero Header: headline left, subtitle+CTA right --- */
.hero-header {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.hero-headline h1 {
  margin: 0;
}

.hero-headline h1 .accent-word {
  color: var(--accent);
}

.hero-aside {
  padding-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-actions .see-examples {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.hero-actions .see-examples:hover {
  color: var(--accent);
}

/* Hero stat line */
.hero-stat {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Mobile: stack header vertically */
@media (max-width: 768px) {
  .hero-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Transformation Demo: full-width two columns --- */
.hero-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.demo-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-1);
  display: flex;
  flex-direction: column;
}

.demo-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.demo-panel-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
}

.demo-panel-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  flex: 1;
}

/* Markdown syntax highlighting (static spans) */
.md-heading { color: #e8e8ed; font-weight: 700; }
.md-text { color: #8b8b96; }
.md-code-fence { color: #5a5a65; }
.md-code { color: var(--teal); }
.md-string { color: #e8a443; }
.md-comment { color: #5a5a65; }
.md-keyword { color: #c084fc; }

/* Scan line animation */
.demo-input .demo-panel-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 20px var(--accent), 0 0 60px rgba(128, 212, 127, 0.3);
  animation: scanLine 10s ease-in-out infinite;
  opacity: 0;
}

@keyframes scanLine {
  0%, 15%  { top: 0; opacity: 0; }
  20%      { top: 0; opacity: 1; }
  40%      { top: 100%; opacity: 1; }
  45%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* Output panel reveal */
.demo-output .demo-panel-body {
  position: relative;
}

.demo-output .demo-panel-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.demo-output .demo-panel-body .output-placeholder {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 380px;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.output-reveal {
  animation: revealOutput 10s ease-in-out infinite;
}

@keyframes revealOutput {
  0%, 35%  { clip-path: inset(50% 50% 50% 50%); opacity: 0.3; }
  40%      { clip-path: inset(50% 50% 50% 50%); opacity: 0.3; }
  55%      { clip-path: inset(0% 0% 0% 0%); opacity: 1; }
  85%      { clip-path: inset(0% 0% 0% 0%); opacity: 1; }
  95%      { opacity: 0; }
  100%     { clip-path: inset(50% 50% 50% 50%); opacity: 0; }
}

/* Share badge */
.share-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  animation: badgeIn 10s ease-in-out infinite;
  opacity: 0;
}

.share-badge::before {
  content: ">";
  color: var(--text-muted);
}

@keyframes badgeIn {
  0%, 55%  { opacity: 0; transform: translateY(8px); }
  62%      { opacity: 1; transform: translateY(0); }
  85%      { opacity: 1; transform: translateY(0); }
  95%      { opacity: 0; transform: translateY(8px); }
  100%     { opacity: 0; }
}

/* Mobile hero */
@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 2.5rem;
  }

  .hero .container {
    gap: 2.5rem;
  }

  .hero-demo {
    grid-template-columns: 1fr;
  }

  .demo-panel-body {
    min-height: 240px;
  }
}

/* --- Output Mockup (HTML-rendered preview) --- */
.output-mockup {
  display: grid;
  grid-template-columns: 140px 1fr;
  width: 100%;
  height: 100%;
  min-height: 380px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: 1.5;
  background: #0d1117;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mockup-sidebar {
  background: #0a0e14;
  border-right: 1px solid #1c2333;
  padding: 1.25rem 0.875rem;
}

.mockup-sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.875rem;
}

.mockup-sidebar-item {
  padding: 0.35rem 0.5rem;
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 0.6875rem;
  margin-bottom: 0.175rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-sidebar-item.active {
  background: rgba(128, 212, 127, 0.1);
  color: var(--accent);
}

.mockup-content {
  padding: 1.5rem;
  overflow: hidden;
}

.mockup-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--teal);
  background: rgba(62, 207, 165, 0.08);
  border: 1px solid rgba(62, 207, 165, 0.15);
  padding: 0.2rem 0.625rem;
  border-radius: 2px;
  margin-bottom: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mockup-h1 {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.mockup-h2 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1rem;
  margin-bottom: 0.375rem;
  padding-top: 0.625rem;
  border-top: 1px solid #1c2333;
}

.mockup-text {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  line-height: 1.6;
  margin-bottom: 0.25rem;
}

.mockup-code-block {
  margin: 0.5rem 0;
  border: 1px solid #1c2333;
  border-radius: 3px;
  overflow: hidden;
}

.mockup-code-header {
  background: #161b25;
  padding: 0.25rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: var(--text-muted);
  border-bottom: 1px solid #1c2333;
}

.mockup-code-body {
  background: #0a0e14;
  padding: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--teal);
  line-height: 1.6;
}

.mockup-kw { color: #c084fc; }
.mockup-str { color: var(--accent); }
.mockup-comment { color: #5a5a65; }

.mockup-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.375rem 0;
  padding: 0.25rem 0.625rem;
  background: #0a0e14;
  border: 1px solid #1c2333;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
}

.mockup-method {
  color: var(--teal);
  font-weight: 700;
}

.mockup-path {
  color: var(--text-secondary);
}

.mockup-table {
  margin-top: 0.375rem;
  border: 1px solid #1c2333;
  border-radius: 3px;
  overflow: hidden;
  font-size: 0.625rem;
}

.mockup-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 0.3rem 0.625rem;
  border-bottom: 1px solid #1c2333;
  color: var(--text-secondary);
}

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

.mockup-table-header {
  background: #161b25;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.5625rem;
}

@media (max-width: 480px) {
  .output-mockup {
    grid-template-columns: 1fr;
    min-height: 240px;
  }

  .mockup-sidebar {
    display: none;
  }
}

/* Arrow between panels on mobile */
.demo-arrow {
  display: none;
  text-align: center;
  color: var(--accent);
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .demo-arrow {
    display: block;
  }
}


/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.how-it-works h2 {
  margin-bottom: 3.5rem;
}

.steps {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 2rem;
}

.step {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color 0.3s ease;
}

.step:hover {
  border-color: var(--accent);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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


/* ============================================================
   EXAMPLES — Before / After Tabs
   ============================================================ */
.examples {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.examples h2 {
  margin-bottom: 0.75rem;
}

.examples-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* Tab bar */
.examples-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.examples-tabs::-webkit-scrollbar {
  display: none;
}

.examples-tab {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  background: none;
  border-radius: 0;
}

.examples-tab:hover {
  color: var(--text-secondary);
}

.examples-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Panels */
.examples-panel {
  display: none;
}

.examples-panel.is-active,
.examples-panel:not([hidden]) {
  display: block;
}

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

/* Comparison grid */
.example-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

/* RFC raw text (before panels) */
.rfc-raw {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.rfc-line {
  white-space: pre;
}

.rfc-header-line {
  color: var(--text-muted);
  opacity: 0.7;
}

.rfc-title {
  color: var(--text-secondary);
  font-weight: 600;
}

.rfc-indent {
  padding-left: 1.5rem;
}

/* Arrow between panels (mobile only) */
.example-arrow {
  display: none;
  text-align: center;
  color: var(--accent);
  font-size: 1.5rem;
}

/* Status code colors in mockup */
.mockup-status-ok { color: var(--teal); font-weight: 700; }
.mockup-status-redirect { color: var(--accent); font-weight: 700; }
.mockup-status-err { color: #f87171; font-weight: 700; }

/* POST method color */
.mockup-method-post { color: var(--accent); }

/* Security badge variant */
.mockup-badge-security {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.08);
  border-color: rgba(192, 132, 252, 0.15);
}

/* Sequence diagram */
.mockup-sequence-diagram {
  margin: 0.5rem 0;
  background: #0a0e14;
  border: 1px solid #1c2333;
  border-radius: 3px;
  padding: 0.625rem;
}

.mockup-sequence-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Mobile: stack comparison panels */
@media (max-width: 768px) {
  .example-comparison {
    grid-template-columns: 1fr;
  }

  .example-arrow {
    display: block;
  }

}


/* ============================================================
   WHAT YOU CREATE — Bento Grid
   ============================================================ */
.what-you-create {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.what-you-create h2 {
  margin-bottom: 3.5rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
}

.bento-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.bento-card:hover {
  border-color: rgba(128, 212, 127, 0.4);
  box-shadow: 0 0 30px rgba(128, 212, 127, 0.06);
}

.bento-card.tall {
  grid-row: 1 / -1;
}

.bento-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.bento-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.bento-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.bento-card .preview {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.bento-card .preview-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

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

  .bento-card.tall {
    grid-row: auto;
  }
}


/* ============================================================
   FEATURES BAR
   ============================================================ */
.features-bar {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.features-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.features-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .features-list {
    gap: 1rem 1.5rem;
    font-size: 0.75rem;
  }
}


/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 8rem 0;
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-primary {
  font-size: 1.0625rem;
  padding: 1rem 2.5rem;
  animation: ctaGlow 3s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(128, 212, 127, 0.15); }
  50%      { box-shadow: 0 0 40px rgba(128, 212, 127, 0.3); }
}

.cta-note {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}


/* ============================================================
   SCROLL MARGIN (account for fixed navbar)
   ============================================================ */
[id] {
  scroll-margin-top: 5rem;
}


/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.faq-section h2 {
  margin-bottom: 3.5rem;
}

.faq-list {
  max-width: 740px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  position: relative;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}

.faq-icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.faq-icon::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}


/* ============================================================
   MID-PAGE CTA
   ============================================================ */
.mid-cta {
  padding: 4rem 0;
  text-align: center;
}

.mid-cta .btn-primary {
  font-size: 1rem;
  padding: 0.875rem 2rem;
}

.mid-cta .cta-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}


/* ============================================================
   PROBLEM LINE (above how-it-works)
   ============================================================ */
.problem-line {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
  font-style: italic;
}


/* ============================================================
   WAITLIST FORM
   ============================================================ */
.waitlist-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 440px;
}

.waitlist-form-centered {
  margin: 0 auto;
  justify-content: center;
}

.waitlist-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.waitlist-input::placeholder {
  color: var(--text-muted);
}

.waitlist-input:focus {
  border-color: var(--accent);
}

.waitlist-btn {
  flex-shrink: 0;
}

/* Success/error states */
.waitlist-form.is-success .waitlist-input,
.waitlist-form.is-success .waitlist-btn {
  display: none;
}

.waitlist-form.is-success::after {
  content: attr(data-success-msg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal);
}

.waitlist-form.is-error .waitlist-input {
  border-color: #f87171;
}

@media (max-width: 480px) {
  .waitlist-form {
    flex-direction: column;
  }
}


/* ============================================================
   BEST FOR SECTION
   ============================================================ */
.best-for {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.best-for h2 {
  margin-bottom: 0.75rem;
}

.best-for-definition {
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 740px;
}

.best-for-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.best-for-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.best-for-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  transition: border-color 0.3s ease;
}

.best-for-card:hover {
  border-color: var(--accent);
}

.best-for-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.best-for-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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


/* ============================================================
   COMPARE SECTION
   ============================================================ */
.compare-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.compare-section h2 {
  margin-bottom: 0.75rem;
}

.compare-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 3rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
}

.compare-table td {
  color: var(--text-secondary);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.compare-highlight {
  color: var(--accent) !important;
  font-weight: 600;
}

.compare-examples {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.compare-honest {
  max-width: 740px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
}

.compare-honest h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.compare-honest p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ============================================================
   BLOG
   ============================================================ */

.blog-main {
  padding-top: 6rem;
  padding-bottom: 4rem;
  min-height: 70vh;
}

/* --- Blog Index --- */
.blog-index-hero {
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.blog-index-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.blog-index-lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.5;
}

.blog-post-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 820px;
}

.blog-post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.blog-post-card-link {
  display: block;
  padding: 1.75rem 2rem;
}

.blog-post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.blog-post-card-meta-sep {
  color: var(--border);
}

.blog-post-card-title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.blog-post-card-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.blog-post-card-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.blog-empty {
  color: var(--text-muted);
  font-style: italic;
}

/* --- Blog Post --- */
.blog-post {
  /* article wrapper */
}

.blog-post-header {
  max-width: 740px;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.blog-back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.blog-back-link:hover {
  color: var(--accent);
}

.blog-post-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.blog-post-lede {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blog-post-meta-sep {
  color: var(--border);
}

/* --- Article body typography --- */
.blog-post-body {
  max-width: 740px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.blog-post-body > * + * {
  margin-top: 1.25rem;
}

.blog-post-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-post-body h2:first-child {
  margin-top: 1rem;
}

.blog-post-body h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-post-body p {
  color: var(--text-primary);
}

.blog-post-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

.blog-post-body em {
  font-style: italic;
}

.blog-post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.blog-post-body a:hover {
  color: var(--accent-hover);
}

.blog-post-body ul,
.blog-post-body ol {
  padding-left: 1.5rem;
  color: var(--text-primary);
}

.blog-post-body ul {
  list-style: disc;
}

.blog-post-body ol {
  list-style: decimal;
}

.blog-post-body li {
  margin-top: 0.5rem;
}

.blog-post-body li > ul,
.blog-post-body li > ol {
  margin-top: 0.5rem;
}

.blog-post-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.blog-post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.blog-post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
  font-size: inherit;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
}

.blog-post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.blog-post-body img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.blog-post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.blog-post-body thead {
  background: var(--surface-2);
}

.blog-post-body th,
.blog-post-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.blog-post-body th {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.blog-post-body tbody tr:last-child td {
  border-bottom: none;
}

.blog-post-body tbody tr:hover {
  background: rgba(128, 212, 127, 0.03);
}

/* --- Post footer --- */
.blog-post-footer {
  max-width: 740px;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Mobile tweaks --- */
@media (max-width: 640px) {
  .blog-main {
    padding-top: 5rem;
  }

  .blog-post-card-link {
    padding: 1.25rem 1.25rem;
  }

  .blog-post-body {
    font-size: 1rem;
    line-height: 1.7;
  }
}


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