/* ═══════════════════════════════════════════════════
   ClearChoiceRadar — Homepage
   Modern, trust-first design for a YMYL comparison site
   ═══════════════════════════════════════════════════ */

:root {
  --brand: #0ea5e9;
  --brand-dark: #0284c7;
  --brand-light: #e0f2fe;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card: #fff;
  --ring: #e2e8f0;
  --ring-light: #f1f5f9;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 16px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
}


/* ─── BUTTONS ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14,165,233,.35);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ring);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}


/* ─── SECTION UTILITIES ─── */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.section-header h2 {
  font-size: 1.85rem;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.6;
}


/* ─── HERO ─── */

.hero {
  background: linear-gradient(168deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
  color: #fff;
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(125,211,252,.4);
  padding-bottom: 2px;
}

.hero h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 800;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 560px;
  margin: 0 auto 30px;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero .btn-ghost {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.2);
}
.hero .btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}


/* ─── Hero stats ─── */

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 20px 32px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  max-width: 540px;
  margin: 0 auto;
}

.stat {
  flex: 1;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-divider {
  width: 1px;
  background: rgba(255,255,255,.12);
  margin: 4px 0;
}


/* ─── HOW IT WORKS ─── */

.how-it-works {
  background: var(--bg);
  padding: 48px 0;
  border-bottom: 1px solid var(--ring);
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.hiw-step {
  text-align: center;
}

.hiw-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
}

.hiw-icon svg {
  width: 26px;
  height: 26px;
}

.hiw-step h3 {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 6px;
}

.hiw-step p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}


/* ─── INDUSTRY CARDS ─── */

.industries-section {
  padding: 64px 0;
}

.industry-grid {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.industry-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}

.industry-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(14,165,233,.08);
  transform: translateY(-2px);
}

.ic-icon-wrap {
  flex: 0 0 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-icon-wrap svg {
  width: 28px;
  height: 28px;
  fill: var(--brand);
}

.ic-body {
  flex: 1;
  min-width: 0;
}

.ic-title {
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: var(--ink);
}

.ic-blurb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.ic-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ic-chip {
  display: inline-block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  border-bottom: 1.5px solid var(--ring);
}

.ic-arrow {
  flex: 0 0 24px;
  color: #cbd5e1;
  transition: color .2s ease, transform .2s ease;
}

.ic-arrow svg {
  width: 24px;
  height: 24px;
}

.industry-card:hover .ic-arrow {
  color: var(--brand);
  transform: translateX(3px);
}


/* ─── LATEST GUIDES ─── */

.guides-section {
  padding: 64px 0;
  background: var(--bg);
  border-top: 1px solid var(--ring);
  border-bottom: 1px solid var(--ring);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}

.guide-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gc-industry-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.gc-industry-tag::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.gc-tag-tax-relief { color: #b45309; }
.gc-tag-tax-relief::before { background: #f59e0b; }

.gc-tag-debt-relief { color: #1d4ed8; }
.gc-tag-debt-relief::before { background: #3b82f6; }

.gc-tag-solar { color: #047857; }
.gc-tag-solar::before { background: #10b981; }

.gc-title {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}

.gc-excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 auto;
  padding-bottom: 12px;
}

.gc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: auto;
}

.guide-card:hover .gc-link {
  text-decoration: underline;
}


/* ─── METHODOLOGY ─── */

.methodology-section {
  padding: 64px 0;
}

.meth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.meth-card {
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.meth-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.meth-card h3 {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 8px;
}

.meth-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.meth-cta {
  text-align: center;
}


/* ─── TRUST / ABOUT ─── */

.trust-section {
  padding: 64px 0;
  background: linear-gradient(180deg, var(--bg-alt), #e8f4fd);
  border-top: 1px solid var(--ring);
}

.trust-inner {
  max-width: 640px;
  margin: 0 auto;
}

.trust-content h2 {
  font-size: 1.75rem;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.trust-content > p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0 0 24px;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 12px;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.trust-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}


/* ─── SCROLL REVEAL ANIMATIONS ─── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays for child elements */
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }
.reveal-d6 { transition-delay: 0.48s; }


/* ─── ROTATING HERO TEXT ─── */

.hero-cycle-wrap {
  display: inline-block;
  position: relative;
  color: var(--brand);
  min-width: 180px;
  text-align: left;
}

.hero-cycle-word {
  display: inline-block;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-cycle-word.out {
  opacity: 0;
  transform: translateY(-12px);
  position: absolute;
  left: 0;
}

.hero-cycle-word.in {
  opacity: 1;
  transform: translateY(0);
}

/* Cursor blink after the cycling word */
.hero-cycle-wrap::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.75em;
  background: var(--brand);
  margin-left: 4px;
  vertical-align: baseline;
  animation: cursorBlink 1s steps(1) infinite;
  position: relative;
  top: 2px;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}


/* ─── COUNTER ANIMATION ─── */

.stat-num[data-count] {
  font-variant-numeric: tabular-nums;
}


/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 900px) {
  .meth-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 48px 0 40px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-sub {
    font-size: 1.02rem;
  }
  .hero-stats {
    max-width: 100%;
    padding: 16px 20px;
  }
  .stat-num {
    font-size: 1.25rem;
  }

  .hiw-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 400px;
  }

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

  .section-header h2 {
    font-size: 1.5rem;
  }

  .industries-section,
  .guides-section,
  .methodology-section,
  .trust-section {
    padding: 48px 0;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 36px 0 32px;
  }
  .hero h1 {
    font-size: 1.65rem;
  }
  .hero-badge {
    font-size: 0.72rem;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    align-items: center;
  }
  .stat-divider {
    width: 80px;
    height: 1px;
    margin: 0;
  }

  .industry-card {
    padding: 18px 16px;
    gap: 14px;
  }
  .ic-icon-wrap {
    flex: 0 0 46px;
    height: 46px;
    border-radius: 12px;
  }
  .ic-icon-wrap svg {
    width: 22px;
    height: 22px;
  }
  .ic-title {
    font-size: 1.05rem;
  }
  .ic-blurb {
    display: none;
  }

  .meth-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto 24px;
  }
}
