/* ==========================================================================
   Hero — oversized editorial headline with the portrait breaking the grid
   ========================================================================== */

.hero {
  position: relative;
  z-index: 2;
  padding-top: clamp(2.5rem, 1rem + 5vw, 5.5rem);
  overflow: hidden;
}

/* The headline runs the full measure; the lead and the portrait share the row
   beneath it. Keeping the h1 out of the two-column split is what lets it be
   genuinely oversized instead of merely large. */
.hero__grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 2.75rem);
  grid-template-areas: "head" "body" "portrait";
}

/* From tablet up the portrait sits beside the lead instead of alone underneath. */
@media (min-width: 46rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) clamp(13rem, 26vw, 20rem);
    grid-template-areas:
      "head head"
      "body portrait";
    align-items: end;
    column-gap: clamp(2rem, 4vw, 4.5rem);
  }
}

.hero__head { grid-area: head; }
.hero__portrait { grid-area: portrait; }

/* Body hugs the headline; only the portrait rides the baseline of the row. */
.hero__body {
  grid-area: body;
  align-self: start;
  padding-top: clamp(1rem, 2vw, 2rem);
}

/* When the text column runs taller than the portrait, keep the buttons off the stat rule. */
@media (min-width: 46rem) {
  .hero__body { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
}

/* --- Copy ----------------------------------------------------------------- */

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1.25rem, 2.4vw, 2rem);
}

.hero__eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.hero__title {
  font-size: var(--text-hero);
}

.hero__title-line { display: block; }

/* Hang the second line just off the left margin — an editorial offset that
   reads as deliberate at large sizes and collapses on narrow screens. */
@media (min-width: 64rem) {
  .hero__title-line--indent { padding-left: 0.62em; }
}

.hero__lead {
  margin-bottom: clamp(1.5rem, 2.6vw, 2.25rem);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

/* --- Portrait ------------------------------------------------------------- */

.hero__portrait {
  position: relative;
  justify-self: center;
  width: min(100%, 19rem);
  margin-bottom: -1px; /* sit exactly on the stat rule */
}

@media (min-width: 46rem) {
  .hero__portrait {
    justify-self: end;
    width: 100%;
  }
}

.hero__portrait img {
  width: 100%;
  height: auto;
  /* Fade the cropped hem so the figure grows out of the page. */
  -webkit-mask-image: linear-gradient(180deg, #000 84%, transparent 99%);
          mask-image: linear-gradient(180deg, #000 84%, transparent 99%);
}

/* --- Stat strip ----------------------------------------------------------- */

.stat-strip {
  margin-top: 0; /* the portrait's faded hem rests on this rule */
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 56rem) {
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat {
  padding: clamp(1.25rem, 2.4vw, 2rem) clamp(0.75rem, 1.6vw, 1.5rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat:nth-child(2n) { border-right: none; }

/* The strip draws the bottom rule; the last row must not double it. */
.stat:nth-last-child(-n + 2) { border-bottom: none; }

@media (min-width: 56rem) {
  .stat { border-bottom: none; }
  .stat:nth-child(2n) { border-right: 1px solid var(--rule); }
  .stat:last-child { border-right: none; }
}

.stat {
  display: flex;
  flex-direction: column;
  transition: background-color var(--duration-normal) linear;
}

/* The label comes first in the markup (dt before dd); the number still reads first. */
.stat__value { order: -1; }

.stat:hover { background: var(--paper-raised); }

.stat:hover .stat__value { color: var(--accent); }

.stat__value {
  transition: color var(--duration-normal) linear;
  font-family: var(--font-display);
  font-size: var(--text-metric);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.stat__value sup {
  font-size: 0.42em;
  vertical-align: super;
  color: var(--accent);
  margin-left: 0.08em;
}


.stat__label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.45;
}


/* --- Entrance ------------------------------------------------------------- */

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.hero__eyebrow          { animation: hero-rise 0.8s var(--ease-out-expo) 0.05s backwards; }
.hero__title-line:nth-child(1) { animation: hero-rise 0.9s var(--ease-out-expo) 0.14s backwards; }
.hero__title-line:nth-child(2) { animation: hero-rise 0.9s var(--ease-out-expo) 0.24s backwards; }
.hero__lead             { animation: hero-rise 0.8s var(--ease-out-expo) 0.36s backwards; }
.hero__actions          { animation: hero-rise 0.8s var(--ease-out-expo) 0.46s backwards; }
.hero__portrait         { animation: hero-rise 1.0s var(--ease-out-expo) 0.30s backwards; }
.stat-strip             { animation: hero-rise 0.9s var(--ease-out-expo) 0.55s backwards; }

@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow, .hero__title-line, .hero__title-line:nth-child(1),
  .hero__title-line:nth-child(2), .hero__lead, .hero__actions,
  .hero__portrait, .stat-strip { animation: none; }
}
