/* ============================================================
   Greenlit Design System v4.0
   Visual Impact Redesign — bold sections, editorial serif, compact hero
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

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

:root {
  /* Backgrounds */
  --bg: #ffffff;
  --bg2: #fafafa;
  --surface: #f5f5f7;
  --surface2: #eeeef0;
  --surface-solid: #f0f0f2;

  /* Dark section */
  --dark-bg: #111113;
  --dark-surface: rgba(255,255,255,0.06);
  --dark-border: rgba(255,255,255,0.08);
  --dark-text: #f0f0f3;
  --dark-text2: #9ca3af;
  --dark-text3: #6b7280;

  /* Borders */
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);

  /* Text */
  --text: #1a1a1a;
  --text2: #6b7280;
  --text3: #9ca3af;

  /* Accent */
  --accent: #16a34a;
  --accent2: #22c55e;
  --accent-dim: rgba(22,163,74,0.06);

  /* Semantic */
  --green: #16a34a;
  --yellow: #ca8a04;
  --red: #dc2626;

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --wide: 1040px;
  --narrow: 640px;

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

  /* Code */
  --code-bg: #f8f9fb;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  transition: transform 0.35s var(--ease-out), background 0.3s, box-shadow 0.3s;
}
.navbar-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-logo svg {
  width: 24px;
  height: 24px;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar-links a {
  font-size: 0.875rem;
  color: var(--text2);
  transition: color 0.2s;
  font-weight: 500;
}
.navbar-links a:hover { color: var(--text); }
.navbar-cta {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: var(--accent);
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-pill);
  transition: opacity 0.2s, transform 0.2s;
}
.navbar-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Navbar states */
.navbar.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.navbar.hidden {
  transform: translateY(-100%);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.section {
  padding: 7rem 1.5rem;
  position: relative;
}
.section-narrow {
  max-width: var(--narrow);
  margin: 0 auto;
}
.section-wide {
  max-width: var(--wide);
  margin: 0 auto;
}

/* ============================================================
   SECTION COLOR VARIANTS
   ============================================================ */

/* Dark sections (problem, try-it, footer) */
.section-dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}
.section-dark h2 { color: #ffffff; }
.section-dark h3 { color: #ffffff; }
.section-dark .stat-card,
.section-dark .card {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  box-shadow: none;
}
.section-dark .stat-card:hover,
.section-dark .card:hover {
  background: rgba(255,255,255,0.08);
  box-shadow: none;
}
.section-dark .stat-number {
  color: var(--accent2);
  text-shadow: 0 0 40px rgba(34,197,94,0.3);
}
.section-dark .stat-text {
  color: var(--dark-text2);
}
.section-dark .problem-sub {
  color: var(--dark-text2);
}

/* Green CTA section */
.section-green {
  background: var(--accent);
  color: #ffffff;
}
.section-green h2 {
  color: #ffffff;
}
.section-green .cta-subtitle {
  color: rgba(255,255,255,0.85);
}
.section-green .cta-btn {
  background: #ffffff;
  color: var(--accent);
}
.section-green .cta-btn:hover {
  opacity: 0.95;
  background: #ffffff;
}

/* Green-tinted section (dimensions) */
.section-tint {
  background: #f0fdf4;
}

/* Light gray section */
.section-gray {
  background: var(--surface);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 240ms; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 8rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative gradient orb */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,0.08) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.05) 0%, transparent 70%);
  bottom: -100px;
  left: -150px;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--narrow);
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.hero-eyebrow .platform-icons {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}
.hero-eyebrow .platform-icons svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero h1 em {
  font-style: italic;
  font-weight: 700;
}
.hero h2,
.hero .hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text2);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.hero-cta-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.hero-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text2);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.hero-cta-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* Hero compact score badge */
.hero-badge {
  display: flex;
  justify-content: center;
  animation: float 3s ease-in-out infinite alternate;
  position: relative;
}
@keyframes float {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
.hero-ring {
  position: relative;
  width: 160px;
  height: 160px;
}
.hero-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.hero-ring circle {
  fill: none;
  stroke-width: 5;
  cx: 50;
  cy: 50;
  r: 44;
}
.hero-ring .bg { stroke: var(--surface2); }
.hero-ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.hero-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-ring-label span:first-child {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.hero-ring-grade {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================================
   CARD BASE
   ============================================================ */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
  max-width: 480px;
  margin: 0 auto;
  border: 2px dashed rgba(0,0,0,0.12);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.upload-zone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-zone svg {
  width: 48px;
  height: 48px;
  color: var(--text2);
  margin-bottom: 1rem;
  transition: transform 0.3s var(--ease-out), color 0.3s;
}
.upload-zone:hover svg {
  transform: translateY(-4px);
  color: var(--accent);
}
.upload-zone p { color: var(--text2); font-size: 0.9rem; position: relative; }
.upload-zone .browse { color: var(--accent); text-decoration: underline; cursor: pointer; }
.upload-zone .hint { font-size: 0.8rem; color: var(--text3); margin-top: 0.5rem; }
.upload-zone input { display: none; }

/* Upload zone in dark sections */
.section-dark .upload-zone {
  background: var(--dark-surface);
  border-color: rgba(255,255,255,0.15);
}
.section-dark .upload-zone:hover,
.section-dark .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(22,163,74,0.08);
}
.section-dark .upload-zone svg { color: var(--dark-text2); }
.section-dark .upload-zone:hover svg { color: var(--accent); }
.section-dark .upload-zone p { color: var(--dark-text2); }
.section-dark .upload-zone .browse { color: var(--accent2); }
.section-dark .upload-zone .hint { color: var(--dark-text3); }

/* Privacy note */
.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text2);
  letter-spacing: 0.01em;
}
.privacy-note svg {
  flex-shrink: 0;
  color: var(--text2);
}
.section-dark .privacy-note { color: var(--dark-text3); }
.section-dark .privacy-note svg { color: var(--dark-text3); }

/* ============================================================
   PROGRESS
   ============================================================ */
.progress-section {
  display: none;
  margin-top: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.section-dark .progress-section {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.progress-section.active { display: block; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; }
.progress-step { color: var(--text2); }
.progress-pct { color: var(--accent); font-weight: 600; }
.progress-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
}
/* Shimmer animation */
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-file { font-size: 0.8rem; color: var(--text3); margin-top: 0.5rem; }
.section-dark .progress-step { color: var(--dark-text2); }
.section-dark .progress-file { color: var(--dark-text3); }

/* ============================================================
   ERROR
   ============================================================ */
.error-box {
  display: none;
  margin-top: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(220,38,38,0.06);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--red);
  font-size: 0.9rem;
}
.error-box.active { display: block; }
.error-box .error-title { font-weight: 600; margin-bottom: 0.25rem; }

/* ============================================================
   RESULTS
   ============================================================ */
.results { display: none; margin-top: 1.5rem; }
.results.active { display: block; }

/* Score ring */
.score-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.section-dark .score-card {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle {
  fill: none;
  stroke-width: 5;
  cx: 50; cy: 50; r: 44;
}
.score-ring .bg { stroke: var(--surface2); }
.score-ring .fg { stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
}
.section-dark .score-number { color: #ffffff; }
.score-grade { font-size: 0.75rem; color: var(--text2); font-weight: 400; }
.score-meta { flex: 1; }
.score-meta h3 { font-size: 0.85rem; color: var(--text2); font-weight: 400; margin-bottom: 0.75rem; }

/* Dimension bars */
.dim-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; font-size: 0.85rem; }
.dim-label { width: 80px; color: var(--text2); }
.dim-bar-track { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.dim-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.dim-value { width: 55px; text-align: right; font-weight: 600; font-size: 0.8rem; }

/* Issues */
.issues-section {
  margin-top: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.section-dark .issues-section {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.issues-section h3 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text2);
}
.section-dark .issue-item { border-bottom-color: var(--dark-border); color: var(--dark-text2); }
.issue-item:last-child { border-bottom: none; }
.issue-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 1px;
}
.issue-badge.error { background: rgba(220,38,38,0.08); color: var(--red); }
.issue-badge.warning { background: rgba(202,138,4,0.08); color: var(--yellow); }
.issue-badge.info { background: rgba(59,130,246,0.08); color: #3b82f6; }
.no-issues { color: var(--green); font-size: 0.85rem; }

/* Keyframe gallery */
.keyframes-section {
  margin-top: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.section-dark .keyframes-section {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.keyframes-section h3 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.keyframe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
}
.keyframe-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  aspect-ratio: 9/16;
}
.keyframe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Accordion details */
.details-section { margin-top: 1rem; }
.accordion {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.section-dark .accordion {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.accordion-header {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  user-select: none;
  transition: background 0.2s;
}
.accordion-header:hover { background: var(--surface); }
.section-dark .accordion-header:hover { background: rgba(255,255,255,0.04); }
.accordion-arrow { transition: transform 0.2s; font-size: 0.75rem; color: var(--text2); }
.accordion.open .accordion-arrow { transform: rotate(90deg); }
.accordion-body {
  display: none;
  padding: 0 1rem 1rem;
}
.accordion.open .accordion-body { display: block; }

.detail-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
.detail-table td { padding: 0.3rem 0; vertical-align: top; }
.detail-table td:first-child { color: var(--text2); width: 45%; }
.detail-table td:last-child { font-weight: 500; }

.transcript-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text2);
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

/* Feedback row */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.section-dark .feedback-row {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.feedback-label {
  color: var(--text2);
  margin-right: auto;
}
.feedback-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  color: var(--text2);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}
.feedback-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.feedback-btn.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.feedback-thanks {
  display: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
}
.feedback-thanks.visible {
  display: inline;
}

/* Report email capture */
.report-email {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.section-dark .report-email {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.report-email-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.report-email-label {
  font-size: 0.85rem;
  color: var(--text2);
  white-space: nowrap;
}
.report-email-form {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 240px;
}
.report-email-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.section-dark .report-email-form input {
  background: rgba(255,255,255,0.04);
  border-color: var(--dark-border);
  color: var(--dark-text);
}
.report-email-form input:focus {
  border-color: var(--accent);
}
.report-email-form input::placeholder {
  color: var(--text3);
}
.report-email-form button {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.report-email-form button:hover {
  opacity: 0.9;
}
.report-email-form button:disabled {
  opacity: 0.5;
  cursor: default;
}
.report-email-sent {
  display: none;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
}
.report-email-sent.visible {
  display: inline;
}

/* New analysis button */
.new-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
}
.new-btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.section-dark .new-btn {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: var(--dark-text2);
}
.section-dark .new-btn:hover { border-color: var(--accent); color: #fff; }

/* Usage remaining */
.usage-remaining {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text3);
}
.section-dark .usage-remaining { color: var(--dark-text3); }
.usage-remaining strong {
  color: var(--text2);
}
.section-dark .usage-remaining strong { color: var(--dark-text2); }

/* Usage gate (email capture when limit reached) */
.usage-gate {
  max-width: 480px;
  margin: 1.5rem auto 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.section-dark .usage-gate {
  background: var(--dark-surface);
  border-color: var(--dark-border);
}
.usage-gate h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.usage-gate p {
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 1rem;
}
.usage-gate-form {
  display: flex;
  gap: 0.5rem;
  max-width: 360px;
  margin: 0 auto;
}
.usage-gate-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
}
.section-dark .usage-gate-form input {
  background: rgba(255,255,255,0.04);
  border-color: var(--dark-border);
  color: var(--dark-text);
}
.usage-gate-form input:focus { border-color: var(--accent); }
.usage-gate-form button {
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ============================================================
   SOCIAL PROOF STATS BAR
   ============================================================ */
/* Trust banner */
.trust-banner {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}
.trust-banner strong {
  color: var(--text2);
}

.social-proof {
  padding: 3rem 1.5rem;
  background: var(--surface);
  position: relative;
}
.social-proof-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 3rem;
}
.proof-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.proof-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proof-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}
.proof-text {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.3;
}
.proof-text strong {
  color: var(--text);
  font-weight: 600;
  display: block;
}

/* ============================================================
   PROBLEM SECTION
   ============================================================ */
.problem-section {
  position: relative;
  overflow: hidden;
}
/* Decorative orb for problem section */
.problem-section::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,0.06) 0%, transparent 70%);
  bottom: -200px;
  left: -200px;
  pointer-events: none;
}
.problem-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.problem-section .problem-sub {
  text-align: center;
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-number {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--accent);
}
.stat-text {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3.5rem;
  letter-spacing: -0.02em;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.how-step {
  text-align: center;
}
.how-step-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
}
.how-step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.how-step p {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ============================================================
   FOUR DIMENSIONS
   ============================================================ */
.dim-section {
  position: relative;
  overflow: hidden;
}
/* Decorative orb */
.dim-section::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,0.06) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}
.dim-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.dim-section .dim-sub {
  text-align: center;
  color: var(--text2);
  margin-bottom: 3.5rem;
  font-size: 1.05rem;
}
.dim-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  position: relative;
}
.dim-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.dim-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dim-card-icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding: 12px;
  background: var(--accent-dim);
  border-radius: 14px;
}
.dim-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}
.dim-card .weight-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 0.75rem;
}
.dim-card ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text2);
}
.dim-card li {
  padding: 0.2rem 0;
}
.dim-card li::before {
  content: '\2022';
  color: var(--accent);
  margin-right: 0.5rem;
}

/* ============================================================
   TRY IT SECTION
   ============================================================ */
.try-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.try-section .try-sub {
  text-align: center;
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.section-dark .try-sub {
  color: var(--dark-text2);
}

/* ============================================================
   PRICING SECTION
   ============================================================ */
.pricing-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: var(--wide);
  margin: 0 auto;
}
.pricing-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.pricing-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm);
}
.pricing-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.pricing-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.pricing-price span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text2);
}
.pricing-detail {
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.5;
}

/* ============================================================
   WHO SECTION
   ============================================================ */
.who-section h2 {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3.5rem;
  letter-spacing: -0.02em;
}
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.who-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.who-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.who-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.who-card p {
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.who-card .code-snippet {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text2);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}
.who-card .code-snippet .kw { color: var(--accent2); }
.who-card .code-snippet .str { color: var(--green); }
.who-card .code-snippet .cmt { color: var(--text3); }
.who-card .price-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.75rem;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  text-align: center;
  position: relative;
}
.cta-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-green .cta-section h2,
.section-green h2 {
  color: #ffffff;
}
.cta-section .cta-subtitle {
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.cta-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER (dark)
   ============================================================ */
.footer {
  background: var(--dark-bg);
  border-top: none;
  padding: 3.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
}
.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand .footer-logo svg {
  width: 20px;
  height: 20px;
}
.footer-brand .footer-tagline {
  font-size: 0.8rem;
  color: var(--dark-text3);
  line-height: 1.4;
}
.footer-links {
  display: flex;
  gap: 2rem;
}
.footer-links a {
  color: var(--dark-text2);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  font-weight: 500;
}
.footer-links a:hover { color: #ffffff; }
.footer-copy {
  text-align: right;
  font-size: 0.75rem;
  color: var(--dark-text3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 7rem 1.25rem 3rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero h2, .hero .hero-subtitle { font-size: 1.05rem; }
  .hero-ctas { flex-direction: column; gap: 0.75rem; }
  .section { padding: 4.5rem 1.25rem; }

  .hero-ring {
    width: 130px;
    height: 130px;
  }
  .hero-ring-label span:first-child {
    font-size: 2.25rem;
  }

  .social-proof-inner {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .stat-grid { grid-template-columns: 1fr; }
  .dim-grid { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .pricing-grid { grid-template-columns: 1fr; }

  .problem-section h2,
  .dim-section h2,
  .who-section h2,
  .how-section h2,
  .pricing-section h2,
  .cta-section h2,
  .try-section h2 { font-size: 1.75rem; }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-brand .footer-logo { justify-content: center; }
  .footer-links { justify-content: center; }
  .footer-copy { text-align: center; }

  .navbar-links a:not(.navbar-cta) { display: none; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .hero h2, .hero .hero-subtitle { font-size: 0.95rem; }
  .score-card { flex-direction: column; text-align: center; }
  .dim-label { width: 60px; font-size: 0.8rem; }
  .stat-number { font-size: 2.25rem; }
  .cta-section h2 { font-size: 1.5rem; }

  .hero-ring {
    width: 120px;
    height: 120px;
  }
  .hero-ring-label span:first-child {
    font-size: 2rem;
  }
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  margin: 1rem;
  overflow: hidden;
  animation: modalIn 0.25s var(--ease-out);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text3);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover {
  background: var(--surface);
  color: var(--text);
}
.modal-header {
  position: relative;
  padding: 1.5rem 1.5rem 0;
}
.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.modal-tab {
  flex: 1;
  padding: 0.6rem 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.modal-body {
  padding: 1.5rem;
}
.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.3rem; }
.auth-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text2);
}
.auth-field input {
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-submit {
  padding: 0.65rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 0.25rem;
}
.auth-submit:hover { opacity: 0.9; }
.auth-submit:disabled { opacity: 0.5; cursor: default; }
.auth-error {
  display: none;
  color: var(--red);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  background: rgba(220,38,38,0.06);
  border-radius: var(--radius-sm);
}
.auth-error.visible { display: block; }

/* ============================================================
   NAVBAR AUTH STATE
   ============================================================ */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.navbar-signin {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
}
.navbar-signin:hover { color: var(--text); }
.credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.account-menu {
  position: relative;
}
.account-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: border-color 0.2s;
}
.account-toggle:hover { border-color: var(--border-hover); }
.account-toggle svg { width: 12px; height: 12px; }
.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 110;
  overflow: hidden;
}
.account-dropdown.open { display: block; }
.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text2);
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.account-dropdown a:hover,
.account-dropdown button:hover {
  background: var(--surface);
  color: var(--text);
}
