/* =========================================================
   Hero — portrait grid + rotating proxy-prompt headline
   ========================================================= */

.hero {
  position: relative;
  padding-block: var(--space-5) var(--space-6);
  overflow: hidden;
  height: 52rem;
  box-sizing: border-box;
  background: var(--paper);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
  opacity: 0.9;
  z-index: 0;
}

.hero-grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(243,241,234,0.35) 0%, rgba(243,241,234,0.88) 78%, var(--paper) 100%);
}

/* Dual-face tiles: new portraits fade in over the old ones so
   the grid never drops to the paper color mid-swap. */
.portrait-tile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--paper-dim);
  min-height: 0;
}

.portrait-face {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: grayscale(15%) saturate(85%);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.18s ease;
}

.portrait-face.is-active {
  opacity: 1;
  z-index: 1;
}

.portrait-face.is-incoming {
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--space-5);
  text-align: left;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-deep);
  background: var(--paper);
  display: inline-block;
  padding: 0.3em 0.7em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--step-4);
  max-width: 22em;
  margin-bottom: var(--space-3);
  height: 3.45em;
}

.hero-line {
  display: block;
  height: 1.15em;
}

.hero-prefix {
  height: 1.15em;
  transition: opacity 0.18s ease;
}

.hero-blank {
  display: block;
  height: 1.15em;
  color: var(--slate);
  border-bottom: 3px solid var(--ochre);
  padding-inline: 0.05em;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}

.hero-sub {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-style: italic;
}

.hero-cta { display: flex; gap: var(--space-2); flex-wrap: wrap; }

@media (max-width: 720px) {
  .hero { height: 58rem; }
  .hero-grid-bg { grid-template-columns: repeat(5, 1fr); }
  .hero-title { font-size: var(--step-3); height: 5.65em; max-width: none; }
  .hero-blank { height: 2.3em; white-space: normal; }
  .hero-line:last-child { height: 2.2em; }
}
