/* ==========================================================================
   sections/hero.css — homepage hero
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: stretch;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
}

/* Page content keeps to the centered container width; only the photo on the
   right runs all the way out to the edge of the window. */
.hero__copy {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  padding-right: clamp(2rem, 5vw, 4.5rem);
  padding-left: calc(var(--gutter) + max(0px, (100vw - var(--page-max)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__eyebrow {
  margin-bottom: var(--sp-4);
}

/* Stagger for the fade-in: the hero arrives line by line */
.hero__eyebrow { --d: 0s; }
.hero__media   { --d: 0.05s; }
.hero__title   { --d: 0.09s; }
.hero__lede    { --d: 0.16s; }
.hero__actions { --d: 0.23s; }
.hero__promise { --d: 0.29s; }
.hero__facts   { --d: 0.35s; }

.hero__title {
  font-size: var(--step-4);
  max-width: 15ch;
  text-wrap: balance;
}

.hero__lede {
  margin-top: var(--sp-4);
  max-width: 46ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* --- Calls to action ---------------------------------------------------
   Two equal halves. Together they span the same width as the rule above the
   facts row below them. */
.hero__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.hero__promise {
  margin-top: var(--sp-2);
  font-size: var(--step--1);
  color: var(--ink-mute);
}

/* --- Trust strip: concrete facts, no adjectives ------------------------ */
/* Three facts, one row, each with its own icon */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
}

/* One or two facts is a legitimate edit, and three fixed columns turn it into a
   short row with a hole where the third fact would be. The track count follows
   the item count instead, so two facts read as a deliberate pair of halves --
   the same halves .hero__actions above them is already drawn in -- and one fact
   fills the line. Three is unchanged. */
.hero__facts:has(li:first-child:nth-last-child(2)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero__facts:has(li:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.hero__facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--step--1);
  line-height: 1.4;
  color: var(--ink-soft);
}

.hero__facts svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--red);
  margin-top: -1px;
}

.hero__facts strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* --- Photo ------------------------------------------------------------- */
.hero__media {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: var(--paper-tint);
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 62%;
}

/* The photo settles rather than slides: it eases out of a slight zoom */
.js .hero__media[data-reveal] { transform: none; }

.js .hero__media[data-reveal] img {
  transform: scale(1.05);
  transition: transform 1.2s var(--ease) 0.05s;
}

.js .hero__media[data-reveal].is-visible img { transform: none; }

/* --- Stacked layout ---------------------------------------------------- */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding: clamp(2.5rem, 7vw, 3.5rem) var(--gutter) clamp(2rem, 5vw, 2.75rem);
  }

  .hero__title { max-width: 18ch; }

  .hero__facts { margin-top: var(--sp-5); }

  .hero__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
    max-height: 340px;
  }

  .hero__media img { position: static; }
}

@media (max-width: 560px) {
  .hero__actions { grid-template-columns: 1fr; }
  .hero__promise { text-align: center; }
  /* One column on a phone at every count, so the two rules above, which are
     more specific than a bare .hero__facts, have to be answered in kind. */
  .hero__facts,
  .hero__facts:has(li:first-child:nth-last-child(2)) { grid-template-columns: 1fr; gap: var(--sp-3); }
  .hero__media { aspect-ratio: 4 / 3; }
}
