@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Light Theme Default */
  --bg-color: #ffffff;
  --surface-color: #f8fafc;
  --surface-hover: #f1f5f9;
  --text-main: #000000;
  --text-dim: #475569;
  --primary: #ff0000; /* Red from the logo */
  --primary-hover: #cc0000;
  --primary-glow: rgba(255, 0, 0, 0.15);
  --secondary: #000212; /* Very dark navy / Black */
  --border-color: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-color: #000000;
  --surface-color: #0a0a0a;
  --surface-hover: #171717;
  --text-main: #ffffff;
  --text-dim: #a1a1aa;
  --primary: #ff0000;
  --primary-hover: #ff3333;
  --primary-glow: rgba(255, 0, 0, 0.4);
  --secondary: #ffffff;
  --border-color: #27272a;
  --glass-bg: rgba(0, 0, 0, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(80px + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate-up {
    animation: none;
    opacity: 1;
  }
  .faq-answer,
  .faq-icon {
    transition: none;
  }
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right));
}

/* Typography Enhancements */
h1, h2, h3, h4, .logo-text {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
}

/* Base Components */
.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  padding: 0.8rem 1.5rem;
  min-height: 44px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

@media (min-width: 480px) {
  .btn-primary {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  padding: 0.8rem 1.5rem;
  min-height: 44px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 480px) {
  .btn-outline {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: var(--surface-hover);
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: background 0.3s ease;
}

.nav-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 80px;
  padding-top: max(0.5rem, env(safe-area-inset-top));
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.nav-toggle {
  order: 2;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin-left: auto;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
}

.nav-toggle:hover {
  background: var(--surface-hover);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.logo-display {
  order: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-icon path, .logo-icon circle {
  stroke: var(--text-main);
}
.logo-icon path.pin {
  stroke: none;
  fill: var(--primary);
}

.logo-text {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo-text .geo { color: var(--text-main); }
.logo-text .tailor { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  order: 3;
  flex: 0 1 auto;
}

.nav-links a.nav-item {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a.nav-item:hover,
.nav-links a.nav-item.active {
  color: var(--text-main);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--text-dim);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

/* Background grid for aesthetic */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  z-index: 0;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
  position: relative;
}

.hero h1 {
  font-size: clamp(2.125rem, 5vw + 1rem, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
}

.highlight-red {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero p {
  font-size: clamp(1rem, 1.5vw + 0.85rem, 1.3rem);
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* How It Works Section */
.py-section {
  padding: clamp(3.5rem, 8vw, 8rem) 0;
}
.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: clamp(1rem, 1vw + 0.9rem, 1.15rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  max-width: 600px;
  margin-inline: auto;
  padding: 0 0.25rem;
}

/* Merchant “What is GeoTailor?” deep dive (homepage) */
.merchant-overview {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.merchant-overview-lead {
  max-width: 44rem;
  line-height: 1.65;
}

.merchant-overview-body {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 0.25rem 0.5rem;
}

.merchant-overview-body > p {
  color: var(--text-dim);
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.08rem);
  line-height: 1.65;
  margin-bottom: 1rem;
  text-align: left;
}

.merchant-overview-body ul {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.25rem;
  text-align: left;
}

.merchant-overview-body li {
  color: var(--text-dim);
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.06rem);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.merchant-overview-body h3 {
  color: var(--text-main);
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem);
  margin: 2rem 0 0.75rem;
  text-align: left;
}

.merchant-overview-body h3:first-of-type {
  margin-top: 1.25rem;
}

.merchant-overview-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem !important;
  margin-bottom: 0 !important;
}

.merchant-overview-cta .btn-outline {
  margin: 0;
}

/* How it works: readable lead + left-aligned step copy */
.how-it-works-section .how-it-works-lead {
  max-width: 42rem;
  line-height: 1.65;
}

.how-it-works-section .step-card {
  text-align: left;
}

.how-it-works-section .step-card h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.1rem, 0.8vw + 1rem, 1.35rem);
}

.how-it-works-section .step-card p {
  margin: 0;
  font-size: clamp(0.95rem, 0.35vw + 0.9rem, 1.05rem);
  line-height: 1.6;
  color: var(--text-dim);
}

.how-it-works-section .step-number {
  margin-left: 0;
  margin-right: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  position: relative;
}

.step-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px var(--primary-glow);
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px var(--primary-glow);
}

/* Features: 6 cards, 1 col / 2 / 3 on wide screens */
.features-grid {
  display: grid;
  gap: clamp(1.25rem, 2vw, 1.75rem);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  transition: var(--transition);
  text-align: left;
}

.feature-card:hover { border-color: var(--text-main); }
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-hover);
  color: var(--primary);
}

.feature-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card p { color: var(--text-dim); }

.feature-card-actions {
  margin-top: 1.35rem;
}

.feature-card-actions .btn-outline,
.feature-card-actions .btn-primary {
  width: 100%;
}

@media (min-width: 480px) {
  .feature-card-actions .btn-outline,
  .feature-card-actions .btn-primary {
    width: auto;
  }
}

.btn-compact {
  padding: 0.55rem 1.15rem;
  min-height: 40px;
  font-size: 0.92rem;
}

@media (min-width: 480px) {
  .btn-compact {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
}

/* Documentation Snippet Section */
.doc-section {
  background: var(--surface-color);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.doc-content {
  min-width: 0;
}

.doc-content h2 {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  margin-bottom: 1.5rem;
}
.doc-content p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.1rem);
}

.code-mockup {
  background: #1e1e1e;
  border-radius: 12px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid #333;
  max-width: 100%;
  min-width: 0;
}
.code-mockup-header {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }
.code-text {
  color: #d4d4d4;
  font-family: monospace;
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
  max-width: 100%;
}
.code-text .keyword { color: #569cd6; }
.code-text .string { color: #ce9178; }
.code-text .function { color: #dcdcaa; }
.code-text .comment { color: #6a9955; font-style: italic; }

/* FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-dim);
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer__inner {
  min-height: 0;
  overflow: hidden;
  line-height: 1.6;
}

.faq-item.active .faq-answer__inner {
  padding-top: 1rem;
}
.faq-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--primary);
}
.faq-item.active .faq-icon { transform: rotate(45deg); }

/* Pricing: fixed 4 columns on large screens */
.pricing-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
  margin: 0 auto;
}

@media (min-width: 700px) and (max-width: 1099px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pricing-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  padding: 3rem 2rem;
  border-radius: var(--radius);
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary);
  box-shadow: 0 10px 40px var(--primary-glow);
}

.pricing-card.popular {
  border-color: var(--primary);
  background: var(--surface-hover);
}

.pricing-badge {
  position: absolute;
  top: 1rem;
  right: -2.5rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 3rem;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.pricing-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.pricing-annual {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted-color, #5b6472);
}

.pricing-price span {
  font-size: 1.25rem;
  color: var(--text-dim);
  font-weight: 400;
}

.pricing-desc {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
  flex: 1;
}

.pricing-features li {
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-dim);
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.pricing-card .btn-primary, .pricing-card .btn-outline {
  width: 100%;
  justify-content: center;
}

@media (min-width: 1100px) {
  .pricing-card {
    padding: 2.5rem 1.35rem;
  }

  .pricing-title {
    font-size: 1.35rem;
  }

  .pricing-price {
    font-size: 2.5rem;
  }

  .pricing-desc {
    margin-bottom: 1.5rem;
    min-height: 3.2em;
  }
}

/* Privacy Policy Layout */
.page-header {
  padding: 12rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(ellipse at top, var(--surface-color) 0%, transparent 70%);
}
.page-header h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin-bottom: 1rem;
}

/* About page: hero-style header + card panels */
.page-header--about {
  padding: 10rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.page-header--about::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.22;
  z-index: 0;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, black 25%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, black 25%, transparent 72%);
}

.page-header--about .container {
  position: relative;
  z-index: 1;
}

.about-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.about-header-lead {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.1vw + 0.92rem, 1.2rem);
  max-width: 26rem;
  margin: 0 auto;
  line-height: 1.45;
}

.about-main {
  padding: clamp(2rem, 4vw, 3rem) 0 4rem;
  background: var(--bg-color);
}

.about-container {
  max-width: 52rem;
  margin: 0 auto;
}

.about-panel {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 2.5vw, 2rem) clamp(1.15rem, 2.5vw, 1.85rem);
  margin-bottom: 1.15rem;
}

.about-panel--lead {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border-color));
}

.about-lead-copy + .about-lead-copy {
  margin-top: 1.1rem;
}

.about-panel-title {
  font-size: clamp(1.1rem, 0.7vw + 1rem, 1.3rem);
  color: var(--text-main);
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.about-panel-plain {
  margin: 0;
  color: var(--text-dim);
  font-size: clamp(0.98rem, 0.35vw + 0.93rem, 1.06rem);
  line-height: 1.6;
}

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

.about-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
  font-size: clamp(0.95rem, 0.3vw + 0.9rem, 1.04rem);
}

.about-list li:last-child {
  margin-bottom: 0;
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.about-two {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 720px) {
  .about-two {
    grid-template-columns: 1fr 1fr;
  }

  .about-two .about-panel {
    margin-bottom: 0;
  }
}

.about-panel--cta {
  margin-bottom: 0;
  padding-top: 1.35rem;
  padding-bottom: 1.35rem;
}

.about-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
}

.about-cta-bar .btn-outline,
.about-cta-bar .btn-primary {
  margin: 0;
  flex: 1 1 auto;
  min-width: min(100%, 12.5rem);
  text-align: center;
}

.compare-panel--win {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border-color));
}

.compare-panel--alt {
  background: var(--bg-color);
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.15rem;
  padding: 0 0.15rem 0.15rem;
}

.compare-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

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

.compare-table th {
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-color);
}

.compare-table th:first-child,
.compare-table td:first-child {
  font-weight: 500;
  color: var(--text-main);
}

.compare-table thead th {
  border-bottom-width: 2px;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table th.compare-table__gt,
.compare-table td.compare-table__gt {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface-color));
}

.compare-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.compare-badge--yes {
  color: #0f5132;
  background: #d1e7dd;
}

.compare-badge--partial {
  color: #664d03;
  background: #fff3cd;
}

.compare-badge--no {
  color: #842029;
  background: #f8d7da;
}

[data-theme="dark"] .compare-badge--yes {
  color: #75b798;
  background: rgba(25, 135, 84, 0.2);
}

[data-theme="dark"] .compare-badge--partial {
  color: #ffda6a;
  background: rgba(255, 193, 7, 0.15);
}

[data-theme="dark"] .compare-badge--no {
  color: #ea868f;
  background: rgba(220, 53, 69, 0.18);
}

.compare-switch-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .compare-switch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.compare-switch-item {
  margin: 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-color);
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

.compare-switch-item strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.content-section { padding: 4rem 0; max-width: 800px; margin: 0 auto; }
.content-section h2 { font-size: 2rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--text-main); }
.content-section h3 { font-size: 1.35rem; margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--text-main); }
.content-section p, .content-section ul { margin-bottom: 1.5rem; color: var(--text-dim); font-size: 1.1rem; }
.content-section a { color: var(--primary); text-decoration: none; }

.policy-points {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.policy-point {
  margin: 0;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  border-left: 3px solid var(--primary);
  background: var(--surface-color);
  border-radius: 0 10px 10px 0;
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  background: var(--surface-color);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 0;
  transition: color 0.3s ease;
  font-weight: 500;
}

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

.copyright {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-up { opacity: 0; animation: fadeInUp 0.8s ease forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

/* Responsive */
@media (min-width: 901px) {
  .nav-container {
    flex-wrap: nowrap;
  }

  .nav-links {
    margin-left: auto;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero h1 {
    letter-spacing: -0.5px;
  }

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

  .doc-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2rem);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1 1 100%;
    gap: 0;
    padding: 0;
    margin: 0;
  }

  .nav-links.is-open {
    display: flex;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--glass-border);
  }

  .nav-links a.nav-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a.nav-item:last-of-type {
    border-bottom: none;
  }

  .nav-links .theme-toggle {
    align-self: flex-start;
    margin-top: 0.5rem;
  }

  .nav-links .btn-primary {
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    /* Extra space below fixed nav + notches on phones */
    padding-top: calc(80px + env(safe-area-inset-top, 0px) + 1.25rem);
    padding-bottom: clamp(3rem, 10vw, 5rem);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .faq-question {
    font-size: clamp(1rem, 2vw + 0.85rem, 1.25rem);
    gap: 1rem;
  }

  .page-header {
    padding-top: clamp(7rem, 18vw, 12rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
  }

  .pricing-card {
    padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2rem);
  }

  .pricing-badge {
    right: -2rem;
    font-size: 0.72rem;
  }
}
