/* ==========================================================================
   Hero. Sized to fit one desktop viewport below the sticky header.
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(24px, 4.5vh, 64px);
}

.hero-bg { position: absolute; inset: calc(var(--header-h) * -1) 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(34, 58, 140, 0.55), transparent 70%),
    radial-gradient(40% 50% at 85% 45%, rgba(61, 107, 255, 0.12), transparent 70%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(243, 241, 236, 0.08) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 75%);
}
/* Cursor spotlight. Position is set by js/effects.js. */
.hero-spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(61, 107, 255, 0.13), transparent 65%);
  opacity: var(--spot-o, 0.6);
  transition: opacity 600ms var(--ease);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "copy card"
    "factors card";
  column-gap: clamp(40px, 6vw, 96px);
  row-gap: clamp(22px, 4vh, 40px);
  align-items: center;
}
.hero-copy { grid-area: copy; align-self: end; }
.hero-factors { grid-area: factors; align-self: start; }
.reward-card { grid-area: card; }

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-a16);
}

.hero-title {
  margin-top: clamp(12px, 2vh, 20px);
  font-size: clamp(46px, min(6.4vw, 10.2vh), 104px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.hero-lede {
  margin-top: clamp(14px, 2.4vh, 24px);
  max-width: 34em;
  font-size: clamp(16px, 2.2vh, 19px);
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3.4vh, 32px);
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.hero-note .icon { width: 15px; height: 15px; color: var(--blue-soft); }

.hero-factors .label { display: block; margin-bottom: 12px; }

/* Short laptop screens: tighten the hero so it stays inside one viewport */
@media (min-width: 1024px) and (max-height: 760px) {
  .factor-sub { display: none; }
  .factor-tile { padding: 10px 12px; }
  .factor-icon { width: 32px; height: 32px; }
  .hero-note { margin-top: 10px; }
  .btn-lg { --btn-h: 52px; }
}

/* ==========================================================================
   Generic sections
   ========================================================================== */
.section { padding-block: var(--section-y) 0; }
.section:last-of-type { padding-bottom: var(--section-y); }

.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: end;
}
.section-title {
  margin-top: 14px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.section-lede {
  max-width: 30em;
  font-size: 18px;
  color: var(--muted);
}
.section-head .section-lede { margin-top: 18px; }
.section-head-split .section-lede { margin-top: 0; justify-self: end; }
.section-lede a { color: var(--blue-soft); text-decoration: underline; text-underline-offset: 3px; }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step { padding: 28px; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-a16);
  color: var(--blue-soft);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.step h3 { margin-top: 44px; font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.step p { margin-top: 10px; color: var(--muted); }
/* Connector line between steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50px;
  left: 84px;
  right: -17px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue-a32), var(--line));
}
.step:hover { transform: translateY(-3px); }

/* Factor grid */
.factor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.factor-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  scroll-margin-top: calc(var(--header-h) + 80px);
}
.factor-card .factor-icon { width: 44px; height: 44px; border-radius: 12px; }
.factor-card .factor-icon .icon { width: 20px; height: 20px; }
.factor-card:hover .factor-icon,
.factor-card:target .factor-icon { background: var(--blue); border-color: var(--blue); color: #fff; }
.factor-card h3 { margin-top: 22px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.factor-card p { margin-top: 8px; color: var(--muted); flex: 1; }
.factor-card .signal { margin-top: 22px; }
.factor-card:target { border-color: rgba(61, 107, 255, 0.6); }
.factor-card:target .signal i { background: var(--blue); }

/* Honest notes, in the voice of the bluf.fun docs */
.notes {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr);
  gap: 32px;
  margin-top: 16px;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
}
.notes-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.notes-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.notes-list li { color: var(--muted); font-size: 15px; }
.notes-list strong { display: block; margin-bottom: 4px; }

/* Ecosystem */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.eco-card { padding: 28px; }
.eco-card:hover { transform: translateY(-3px); }
.eco-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.eco-icon .icon { width: 22px; height: 22px; }
.eco-icon-short { background: var(--blue); color: #fff; }
.eco-icon-back { background: var(--paper); color: var(--ink); }
.eco-icon-burn { background: var(--surface-3); color: var(--blue-soft); border: 1px solid var(--line-strong); }
.eco-card h3 { margin-top: 44px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.eco-card p { margin-top: 10px; color: var(--muted); }

.eco-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 24px;
}
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}
.eco-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-soft);
  font-weight: 700;
  font-size: 15px;
}
.link-arrow .icon { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover { color: var(--paper); }
.link-arrow:hover .icon { transform: translate(2px, -2px); }

/* FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 32px); }

/* Final CTA */
.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 88px) 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(34, 58, 140, 0.6), transparent 70%),
    var(--surface);
}
.cta-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.eyes-cta { width: clamp(120px, 14vw, 170px); }
.cta-title {
  margin-top: 30px;
  font-size: clamp(36px, 5.4vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.cta-lede { margin-top: 16px; font-size: 18px; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-top: 56px; }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
}
.footer-brand p { margin-top: 16px; max-width: 30em; color: var(--muted); font-size: 15px; }
.footer-brand .ca-chip { margin-top: 20px; }
.footer-cols { display: flex; gap: clamp(32px, 6vw, 72px); }
.footer-cols .label { margin-bottom: 14px; }
.footer-cols ul { display: grid; gap: 10px; }
.footer-cols a { color: var(--muted); font-size: 15px; transition: color var(--t-fast) var(--ease); }
.footer-cols a:hover { color: var(--paper); }
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 13px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .header-nav { display: none; }
}

@media (max-width: 1023px) {
  .hero { min-height: 0; padding-block: 40px 56px; }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "factors" "card";
    row-gap: 32px;
  }
  .hero-copy { align-self: auto; }
  .hero-title { font-size: clamp(46px, 11vw, 84px); }
  .hero-lede { font-size: 18px; }
  .reward-card { width: 100%; max-width: 520px; justify-self: center; }
  .ring { --ring-size: min(280px, 70vw); }

  .steps, .eco-grid { grid-template-columns: minmax(0, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .step h3, .eco-card h3 { margin-top: 24px; }
  .factor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .section-head-split { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .section-head-split .section-lede { justify-self: start; }
  .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .faq-layout .section-head { position: static; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .brand-logo img { height: 24px; }
  .brand { gap: 10px; }
  .brand-tag { height: 24px; padding: 0 8px; font-size: 11px; }
  .site-header .btn-sm { padding: 0 12px; height: 38px; font-size: 13.5px; }
  .site-header .btn-sm .icon { display: none; }

  .hero { padding-block: 28px 44px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .factor-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .factor-tile { padding: 10px; gap: 10px; }
  .factor-icon { width: 32px; height: 32px; }
  .factor-name { font-size: 14px; }
  .factor-sub { font-size: 12px; }

  .hero-title { font-size: clamp(44px, 13vw, 60px); }

  .factor-grid, .notes-list { grid-template-columns: minmax(0, 1fr); }
  .factor-grid { gap: 10px; }
  .factor-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }
  .factor-card .factor-icon { grid-row: span 2; width: 40px; height: 40px; }
  .factor-card h3 { margin-top: 0; font-size: 18px; }
  .factor-card p { margin-top: 4px; font-size: 15px; }
  .factor-card .signal { display: none; }
  .notes-list { gap: 16px; }
  .step, .eco-card, .factor-card, .notes { padding: 22px; }
  .faq-item summary { font-size: 16.5px; padding: 18px 2px; }
  .faq-body { padding-right: 8px; }
  .cta-actions .btn { flex: 1 1 100%; }

  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .footer-cols { justify-content: space-between; }
  .footer-base { flex-direction: column; gap: 6px; }
}

@media (max-width: 360px) {
  .brand-tag { display: none; }
}
