/* RV Warranty Review - AI Warranty Agent | rvwarrantyreview.com */
:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a24;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --accent-secondary: #06b6d4;
  --success: #22c55e;
  --border: #27272a;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  background-image: 
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(139, 92, 246, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse 80% 50% at 0% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
}

.funnel-container {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px calc(52px + var(--safe-bottom));
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  position: relative;
}

/* Site header - character top center */
.site-header {
  padding: 16px 0 24px;
  text-align: center;
}

.agent-character {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 0 24px var(--accent-glow);
}

/* Welcome step */
.welcome-headline {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  text-align: center;
}

.welcome-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

/* Step headings */
.step-heading {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bg-elevated);
  z-index: 100;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
  width: 0%;
  transition: width 0.4s ease;
}

/* Steps */
.step {
  display: none;
  animation: fadeIn 0.35s ease;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-content {
  padding: 12px 0 16px;
}

.step-content .btn-primary {
  margin-top: 8px;
}

/* Content card for steps - adds depth */
.step[data-step="0"] .step-content {
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.6) 0%, transparent 100%);
  border-radius: var(--radius);
  padding: 20px 16px 24px;
}

/* RV details form */
.rv-details-form {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group-half {
  margin-bottom: 14px;
}

.form-group input {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

/* Lead intro - analyzing animation */
.lead-intro {
  margin-bottom: 20px;
}

.analyzing-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.analyzing-dots {
  display: flex;
  gap: 4px;
}

.analyzing-dots span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: analyzing-bounce 1.4s ease-in-out infinite;
}

.analyzing-dots span:nth-child(2) { animation-delay: 0.2s; }
.analyzing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes analyzing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.lead-intro-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0;
}

.analyzing-bar {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.analyzing-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-secondary) 100%);
  border-radius: 999px;
  animation: analyzing-sweep 2s ease-in-out infinite;
}

@keyframes analyzing-sweep {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(400%); }
  100% { transform: translateX(-100%); }
}

.lead-intro-result {
  color: var(--text);
  font-weight: 500;
  margin: 0;
}

/* Thank you */
.checkmark-large {
  width: 56px;
  height: 56px;
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.checkmark-large svg {
  width: 28px;
  height: 28px;
}

.thank-you-headline {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Options grid - uniform card heights like Perspective */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.option-card {
  cursor: pointer;
  display: block;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card .card-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.option-card .card-content .icon-svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.option-card input:checked + .card-content .icon-svg {
  color: var(--accent);
}

.option-card .card-content .text-wrap,
.option-card .card-content > span:not(.icon) {
  flex: 1;
  min-width: 0;
}

.option-card .card-content .text-wrap > span,
.option-card .card-content > span:not(.icon) {
  font-size: 0.95rem;
  font-weight: 500;
}

.option-card .card-content small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 2px;
  font-weight: 400;
}

.option-card:hover .card-content,
.option-card input:focus-visible + .card-content {
  border-color: rgba(139, 92, 246, 0.5);
  background: var(--bg-elevated);
}

.option-card input:checked + .card-content {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 1px var(--accent);
}

/* Buttons - 44px min height for touch */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-full {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--accent);
}

.cta-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Step indicator */
.step-indicator {
  position: fixed;
  bottom: calc(16px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Lead form */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lead-form .form-group input {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease;
}

.form-group input::placeholder,
.lead-form input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.lead-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Thank you / Results */
.thank-you {
  text-align: center;
}

.thank-you p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.results-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  margin: 20px 0 16px 0;
}

.results-summary h3 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.results-summary ul {
  list-style: none;
}

.results-summary li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-summary li:last-child {
  border-bottom: none;
}

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

/* SEO footer */
.seo-footer {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  border-top: 1px solid var(--border);
}

.seo-footer p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

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

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

/* ========== Shared navigation ========== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.nav-cta {
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
}

.nav-link.nav-cta:hover {
  opacity: 0.95;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ========== Compare page ========== */
.sidebar-cta {
  display: block;
  text-align: center;
  margin-bottom: 20px;
  text-decoration: none;
}

.compare-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
}

.compare-hero {
  margin-bottom: 32px;
}

.compare-hero h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.compare-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  margin-top: 20px;
  width: 100%;
  max-width: 360px;
  justify-content: center;
}

.compare-section {
  margin-bottom: 40px;
}

.compare-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.provider-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
}

.provider-rank {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.provider-card.provider-rank-1 .provider-rank {
  color: var(--accent);
  background: rgba(139, 92, 246, 0.15);
}

.provider-card.provider-rank-1 {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.1);
}

.provider-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.provider-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.meta-label {
  font-weight: 500;
  color: var(--text-muted);
}

.provider-meta span:not(.meta-label) {
  color: var(--text);
}

.provider-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 12px 0;
}

.provider-pros,
.provider-cons {
  list-style: none;
  font-size: 0.85rem;
  margin-top: 12px;
}

.provider-pros li::before {
  content: "+ ";
  color: var(--success);
  font-weight: 600;
}

.provider-cons li::before {
  content: "− ";
  color: var(--text-muted);
}

.provider-pros li,
.provider-cons li {
  margin-bottom: 4px;
  color: var(--text-muted);
}

.compare-cta {
  text-align: center;
  padding: 32px 20px;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.compare-cta h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.compare-cta p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.compare-cta .btn-primary {
  display: inline-flex;
  width: auto;
  min-width: 220px;
}

.compare-faq h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 16px 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.compare-page .seo-footer {
  max-width: 720px;
}

/* Responsive - desktop */
@media (min-width: 640px) {
  .compare-main {
    padding: 40px 24px 56px;
  }

  .compare-hero h1 {
    font-size: 2rem;
  }

  .provider-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .funnel-container {
    max-width: 480px;
    padding: 24px 20px calc(56px + var(--safe-bottom));
  }

  .step-heading {
    font-size: 1.25rem;
  }

  .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .option-card .card-content {
    min-height: 52px;
  }

  .step-indicator {
    bottom: calc(24px + var(--safe-bottom));
  }
}
