/* ==========================================================================
   home.css — hero, trust strip, feature grid, closing CTA
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  /* Gradient rather than a flat panel: it lifts the band off the near-black
     navy it used to be while keeping the brand hue end to end. */
  background: var(--color-surface-hero);
  color: var(--color-text-invert);
  padding-block: var(--space-7);
}

/* --- hero entrance -------------------------------------------------------
   Pure CSS, no observer: this content is above the fold by definition, so it
   should play on load rather than wait for a scroll. `both` fill mode means
   the end state holds even when the reduced-motion rule collapses the
   duration to ~0, so nothing can be left stranded at opacity 0. */

@keyframes hero-rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.hero__content > *,
.hero__rates {
  animation: hero-rise var(--dur-reveal) var(--ease-out) both;
}

.hero__eyebrow { animation-delay:  60ms; }
.hero__title   { animation-delay: 130ms; }
.hero__lead    { animation-delay: 200ms; }
.hero__actions { animation-delay: 270ms; }
/* Last, and only just — the rate card is the thing most visitors came for. */
.hero__rates   { animation-delay: 340ms; }

.hero__inner {
  display: grid;
  gap: var(--space-7);
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow-500);
  margin-bottom: var(--space-4);
}

.hero__title {
  color: var(--color-text-invert);
  margin-bottom: var(--space-4);
  max-width: 16ch;
}

.hero__lead {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.86);
  max-width: 52ch;
  margin-bottom: var(--space-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --- rate preview card inside the hero --- */

.rate-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

.rate-card__head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.rate-card__title { font-size: var(--text-md); }

.rate-card__store {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Last-resort scroller for an unusually long denomination; normally there is
   nothing to scroll and no scrollbar appears. */
.rate-card__table { overflow-x: auto; }

.rate-card__link {
  display: block;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.rate-card__link:hover {
  background: var(--color-primary-tint);
  text-decoration: underline;
}

/* Two columns only from 1100px. Between 900 and 1100 the side column was
   narrow enough that a currency, its denomination and two figures could not
   share a line; full width there costs nothing and keeps every row intact. */
@media (min-width: 900px) {
  .hero { padding-block: var(--space-9); }
}

@media (min-width: 1100px) {
  .hero__inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: var(--space-8);
  }
}

/* --------------------------------------------------------------------------
   Trust strip
   -------------------------------------------------------------------------- */

.trust {
  /* One step below the hero gradient's end colour, so the two bands read as a
     continuation rather than the page dropping into a black strip. */
  background: var(--color-surface-band);
  color: rgba(255, 255, 255, 0.88);
  border-top: 3px solid var(--color-accent);
}

.trust__inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-5);
  padding-block: var(--space-5);
  font-size: var(--text-sm);
  text-align: center;
}

.trust__item strong {
  display: block;
  color: var(--yellow-500);
  font-size: var(--text-md);
}

@media (min-width: 768px) {
  .trust__inner { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.features { padding-block: var(--space-8); }

/* 64px of air above and below reads as generous on a desktop and as dead
   scrolling on a phone. */
@media (max-width: 559px) {
  .features { padding-block: var(--space-7); }
  .hero { padding-block: var(--space-6); }
}

.feature-grid {
  display: grid;
  gap: var(--space-5);
}

.feature {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.feature__title { margin-bottom: var(--space-3); }

.feature__body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --------------------------------------------------------------------------
   Closing CTA
   -------------------------------------------------------------------------- */

.cta {
  background: var(--color-primary);
  color: var(--color-text-invert);
  padding-block: var(--space-7);
}

.cta__inner {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

.cta__title {
  color: var(--color-text-invert);
  margin-bottom: var(--space-2);
}

.cta__lead {
  color: rgba(255, 255, 255, 0.86);
  max-width: 52ch;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (min-width: 900px) {
  .cta__inner {
    grid-template-columns: 1.4fr auto;
    gap: var(--space-7);
  }
}
