/* ============================================
   BATCH B — Design Refresh
   Landing hero + sections + modal + loading polish + report refresh.
   Loaded AFTER styles.css so cascade picks overrides from here.
   ============================================ */

/* Visually-hidden utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Landing-page scoped: drop main-content centering so sections can be full-width */
body.landing-page .main-content {
  padding: 0;
  display: block;
  align-items: stretch;
  justify-content: flex-start;
}

/* ===========================================================
   Sticky Frosted Header (matches paintlaunch.com treatment)
   =========================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.9rem 1.5rem;
  background: hsla(222, 47%, 6%, 0.68);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid hsla(217, 33%, 22%, 0.4);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ===========================================================
   Landing: Hero (single-column stack, golden-ratio typography)
   =========================================================== */
.hero {
  padding: clamp(3rem, 6vw, 5.236rem) var(--space-5) clamp(2.618rem, 5vw, 4.236rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 50% 28%, hsla(var(--primary), 0.14) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.hero-inner > * { min-width: 0; max-width: 100%; }

.hero-eyebrow {
  display: inline-block;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: hsl(var(--primary));
  padding: 0.5rem 1rem;
  border: 1px solid hsla(var(--primary), 0.32);
  border-radius: 999px;
  background: hsla(var(--primary), 0.08);
  margin-bottom: 0.382rem;
}

.hero-title {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.618rem, 5.5vw, 4.236rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
  max-width: 18ch;
  margin: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.hero-sub {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(1.0625rem, 1.35vw, 1.272rem);
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  max-width: min(56ch, 100%);
  width: 100%;
  margin: 0;
}

.hero-visual {
  width: 100%;
  max-width: 880px;
  margin-top: 1.618rem;
}

.hero-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
  box-shadow:
    0 30px 80px -30px hsla(var(--primary), 0.4),
    0 0 0 1px hsla(217, 33%, 22%, 0.5);
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-hero {
  padding: 1.125rem 2.25rem;
  font-size: 1.0625rem;
  box-shadow: var(--shadow-glow);
}

.btn-hero:hover {
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-2px);
}

.hero-micro {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

@media (max-width: 820px) {
  .hero { padding: 0.75rem var(--space-4) 1rem; }
  .hero-inner { gap: 0.375rem; }
  .hero-title {
    font-size: clamp(1.625rem, 6.5vw, 2.125rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 100%;
    padding: 0 0.25rem;
    margin: 0;
  }
  .hero-eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    padding: 0.3rem 0.7rem;
    margin: 0 0 0.125rem;
  }
  .hero-sub {
    font-size: 0.9375rem;
    line-height: 1.45;
    margin: 0.125rem 0 0;
  }
  .hero-visual { margin-top: 0.75rem; }
  .hero-img { border-radius: 0.75rem; }
  .hero-ctas { align-items: stretch; width: 100%; margin-top: 0.5rem; }
  .btn-hero { width: 100%; padding: 1rem 1.5rem; }
  .hero-micro { text-align: center; margin-top: 0; }
}

@media (max-width: 420px) {
  .hero { padding: 0.5rem var(--space-4) 1rem; }
  .hero-inner { gap: 0.25rem; }
  .hero-title {
    font-size: clamp(1.5rem, 6.8vw, 1.875rem);
    line-height: 1.05;
    max-width: 100%;
    padding: 0;
  }
  .hero-eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
  }
}

/* --- Landing: Trust Strip --- */
.trust-strip {
  padding: var(--space-5);
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
  background: hsla(217, 33%, 12%, 0.5);
}

.trust-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.01em;
}

.trust-item strong {
  color: hsl(var(--foreground));
  font-weight: 700;
  margin-right: var(--space-1);
}

.trust-sep {
  color: hsl(var(--border));
  user-select: none;
}

@media (max-width: 600px) {
  .trust-inner { gap: var(--space-3); font-size: 0.875rem; }
  .trust-sep { display: none; }
  .trust-item { text-align: center; }
}

/* --- Landing: Steps Section --- */
.steps-section {
  padding: var(--space-8) var(--space-5);
}

.steps-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  text-align: center;
}

.section-heading {
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
  margin-bottom: var(--space-2);
}

.section-sub {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: var(--space-7);
}

.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  text-align: left;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 2.5rem;
  left: 16.666%;
  right: 16.666%;
  height: 1px;
  background: linear-gradient(to right, transparent, hsl(var(--border)) 12%, hsl(var(--border)) 88%, transparent);
  z-index: 0;
}

.step-card {
  position: relative;
  z-index: 1;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: hsla(var(--primary), 0.12);
  border: 1px solid hsla(var(--primary), 0.35);
  color: hsl(var(--primary));
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: -0.015em;
}

.step-body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
}

@media (max-width: 820px) {
  .steps-section { padding: var(--space-6) var(--space-4); }
  .steps-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .steps-grid::before { display: none; }
  .step-card { padding: var(--space-5); }
}

/* --- Landing: Proof Section --- */
.proof-section {
  padding: var(--space-8) var(--space-5);
  background: hsla(217, 33%, 11%, 0.4);
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

.proof-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  text-align: center;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  text-align: left;
}

.proof-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: var(--space-6);
}

.proof-number {
  font-size: clamp(2.25rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  color: hsl(var(--primary));
  margin-bottom: var(--space-2);
  font-feature-settings: 'tnum' 1;
}

.proof-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.proof-body {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
}

.proof-reassurance {
  margin-top: var(--space-6);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

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

/* --- Landing: Secondary CTA --- */
.cta-section {
  padding: var(--space-8) var(--space-5);
  background: radial-gradient(80% 100% at 50% 50%, hsla(var(--primary), 0.15), transparent 70%), hsl(var(--background));
  text-align: center;
}

.cta-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.cta-heading {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: hsl(var(--foreground));
}

.cta-sub {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  max-width: 520px;
  line-height: 1.55;
}

.cta-section .btn-hero {
  margin-top: var(--space-3);
}

.cta-micro {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-top: var(--space-2);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: hsla(222, 47%, 4%, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-premium);
}

.modal.is-open .modal-backdrop {
  opacity: 1;
}

.modal-dialog {
  position: relative;
  z-index: var(--z-modal);
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - var(--space-7));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.25);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity var(--dur-base) var(--ease-premium), transform var(--dur-base) var(--ease-premium);
}

.modal.is-open .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-body {
  overflow-y: auto;
  padding: var(--space-6);
  flex: 1;
}

.modal-body .state {
  max-width: none;
}

.modal-body .form-container {
  border: none;
  padding: 0;
  background: transparent;
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: hsla(var(--muted), 0.6);
  color: hsl(var(--muted-foreground));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}

.modal-close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.modal-close:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.modal-close:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.modal-disclaimer {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  margin-top: var(--space-4);
  line-height: 1.5;
  padding: 0 var(--space-2);
}

.modal-disclaimer a {
  color: hsl(var(--muted-foreground));
  text-decoration: underline;
}

.modal-disclaimer a:hover {
  color: hsl(var(--foreground));
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .modal { padding: 0; align-items: stretch; }
  .modal-dialog { max-width: none; max-height: 100vh; border-radius: 0; border: none; }
  .modal-body { padding: var(--space-4); padding-top: var(--space-7); }
}

/* --- Loading polish: overrides .theater-* rules from styles.css --- */
.loading-container {
  position: relative;
  overflow: hidden;
}

.loading-container::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(40% 30% at 50% 50%, hsla(var(--primary), 0.12), transparent 60%);
  animation: loadingSweep 8s var(--ease-premium) infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.loading-theater {
  position: relative;
  z-index: 1;
}

@keyframes loadingSweep {
  0%   { transform: translate(-15%, -10%); opacity: 0.6; }
  50%  { transform: translate(10%, 5%); opacity: 1; }
  100% { transform: translate(-5%, 15%); opacity: 0.7; }
}

.theater-step {
  padding: 0.625rem 1rem;
  gap: 0.625rem;
}

.theater-step-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.theater-step-spinner {
  animation: none;
}

.theater-step-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.theater-step.active {
  background: hsla(var(--primary), 0.06);
  position: relative;
}

.theater-step.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: hsl(var(--primary));
  box-shadow: 0 0 12px hsla(var(--primary), 0.6);
  animation: stepPulse 1.8s var(--ease-premium) infinite;
}

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

.theater-step.completed .theater-step-icon {
  background: hsla(var(--success), 0.18);
  border-radius: 50%;
}

.theater-quote-container {
  margin-top: 2.5rem;
  min-height: 4.5rem;
}

.theater-quote {
  font-size: 1rem;
  font-style: normal;
  font-weight: 500;
  color: hsl(var(--foreground));
  line-height: 1.5;
  max-width: 420px;
  letter-spacing: -0.01em;
  transition: opacity 0.7s var(--ease-premium);
}

.theater-quote::before {
  content: '"';
  color: hsl(var(--primary));
  font-size: 1.5rem;
  margin-right: 0.125rem;
  font-family: Georgia, serif;
  line-height: 0;
}

.loading-eta {
  margin-top: 0.75rem;
}

.loading-eta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid hsl(var(--border));
  background: hsla(var(--muted), 0.6);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.02em;
}

.loading-eta-pill::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: hsl(var(--primary));
  box-shadow: 0 0 6px hsla(var(--primary), 0.7);
}

/* --- Report: Interpretation section --- */
.report-interpretation {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--band-mid));
  border-radius: var(--radius);
  padding: 1.25rem 1.375rem;
  margin-bottom: 2rem;
}

.report-interpretation[data-band="low"]  { border-left-color: hsl(var(--band-low)); }
.report-interpretation[data-band="high"] { border-left-color: hsl(var(--band-high)); }

.report-interp-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.report-interp-body {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--foreground));
  font-weight: 400;
}

@media (max-width: 600px) {
  .report-interpretation { padding: 1rem 1.125rem; }
  .report-interp-body { font-size: 0.9375rem; }
}

/* --- Report: Stronger CTA v2 --- */
.report-cta-v2 {
  background:
    radial-gradient(80% 60% at 50% 0%, hsla(var(--primary), 0.18), transparent 65%),
    hsl(var(--card));
  border: 1px solid hsla(var(--primary), 0.3);
  border-radius: calc(var(--radius) * 1.25);
  padding: 3rem 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.report-cta-inner {
  max-width: 560px;
  margin: 0 auto;
}

.report-cta-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.report-cta-headline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
}

.report-cta-sub {
  font-size: 1rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.report-cta-v2 .report-cta-btn {
  max-width: 360px;
  width: 100%;
  margin: 0 auto 1rem;
  animation: pulseGlow 2s ease-in-out infinite;
}

.report-cta-proof {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-top: 0.75rem;
  letter-spacing: 0.01em;
}

.report-cta-urgency {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
  font-style: italic;
  opacity: 0.85;
}

@media (max-width: 600px) {
  .report-cta-v2 { padding: 2rem 1.25rem; margin-top: 2rem; }
  .report-cta-headline { font-size: 1.375rem; }
  .report-cta-sub { font-size: 0.9375rem; }
}

/* --- Report: tighter per-ad cards (override earlier rules) --- */
.report-ad-card {
  border-radius: calc(var(--radius) * 0.85);
}

.report-ad-header {
  padding: 0.875rem;
  border-bottom: none;
}

.report-ad-thumbnail {
  height: 11rem;
  border-radius: 0.5rem;
}

.report-ad-copy-block {
  padding: 0.75rem 1rem;
}

.report-ad-copy-label {
  font-size: 0.625rem;
  margin-bottom: 0.25rem;
}

.report-ad-copy-value {
  font-size: 0.875rem;
  line-height: 1.5;
}

.report-ad-list-section {
  padding: 0.75rem 1rem;
}

.report-ad-list-item {
  font-size: 0.8125rem;
}

.report-ad-scores {
  padding: 0.875rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.report-ad-score-bar {
  height: 0.25rem;
}

@media (max-width: 600px) {
  .report-ad-thumbnail { height: 9rem; }
  .report-ad-copy-block,
  .report-ad-list-section { padding: 0.625rem 0.875rem; }
  .report-ad-copy-value { word-break: break-word; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  .report-ad-scores { grid-template-columns: 1fr; }
}

/* --- Reduced-motion fallbacks for Batch B animations --- */
@media (prefers-reduced-motion: reduce) {
  .hph-bar::after { animation: none; }
  .modal-backdrop,
  .modal-dialog { transition: none; }
  .loading-container::before { animation: none; opacity: 0.6; transform: none; }
  .theater-step.active::before { animation: none; opacity: 1; }
  .report-cta-v2 .report-cta-btn { animation: none; }
  .theater-step-spinner circle { opacity: 0.6; }
  .btn-hero:hover { transform: none; }
}
