/* ============================================================================
   components/hero.css - the identity hero. ONE FILE OWNS THE HERO.

   Build 2 (Fable redesign spec V1.1, 2026-11-08; Kyle 11-07: "a who-I-am type
   thing with the picture"). The portrait sits top-left at EVERY width and is never
   placed below the text.

   Polish pass 2026-11-08 (third outside review, adopted): from 960px up the hero is
   ONE composition. The portrait is a narrow left column and the adjacent column
   carries the name, the availability line, the eyebrow, the frozen headline, the
   frozen deck, the buttons and, last and small, the employer sentence. Below 960px
   the hero stacks as before (portrait and name first, then the rest), with the
   employer sentence smaller and the gap to the headline tighter.

   Every selector is written as `section.hero ...` so its specificity beats any
   older cached copy of home.css or identity.css that still declares a hero.

   The portrait never exceeds 200 CSS px: the sharpest source is 512 px, a 2x
   display needs two pixels per CSS pixel, so nothing is upscaled. kyle.jpg (256)
   and kyle@2x.jpg (512) are the same image at 1x and 2x.
   ============================================================================ */

section.hero {
  --portrait: 200px;
  position: relative;
  display: grid;
  grid-template-columns: var(--portrait) minmax(0, 1fr);
  column-gap: var(--space-l);
  row-gap: 0;
  /* Unified composition (960px and up): the portrait spans every row of the text column. */
  grid-template-areas:
    "portrait id"
    "portrait eyebrow"
    "portrait title"
    "portrait body"
    "portrait intro";
  grid-template-rows: auto auto auto auto 1fr;
  align-items: start;
  padding-block: var(--space-l) var(--space-xl);
}

section.hero .hero-portrait {
  grid-area: portrait;
  display: block;
  width: var(--portrait);
  height: var(--portrait);
  justify-self: start;
  align-self: start;
  border-radius: var(--radius-l);
  border: 1px solid var(--gold-line);
  object-fit: cover;
  object-position: 50% 30%;
}

section.hero .hero-id {
  grid-area: id;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0 0 var(--space-2xs);
}
section.hero .id-name {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: var(--fraunces-display);
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
/* A sentence, not a label: sentence case, body size, the gold dot kept. */
section.hero .id-open {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-size: var(--step--1);
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
}
section.hero .id-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold) 25%, transparent);
}

section.hero .hero-eyebrow {
  grid-area: eyebrow;
  display: block;
  margin: 0 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--gold);
}

/* The employer sentence: a supporting line, last in the column, smaller than the deck. */
section.hero .hero-intro {
  grid-area: intro;
  margin: var(--space-m) 0 0;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}

section.hero .hero-title {
  grid-area: title;
  font-size: clamp(2.59rem, 1.20rem + 3.20vw, 4.10rem);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: var(--space-xs) 0 var(--space-m);
  max-width: none;
  text-wrap: balance;
}
section.hero .hero-body { grid-area: body; }
section.hero .hero-sub {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}
section.hero .hero-cta {
  display: flex;
  gap: var(--space-s);
  flex-wrap: wrap;
  margin-top: var(--space-m);
}

/* ---- RESPONSIVE ---------------------------------------------------------- */
@media (max-width: 959px) and (min-width: 700px) {
  /* Option B (stacked): the one-column headline would wrap past two lines here. */
  section.hero {
    --portrait: 160px;
    column-gap: var(--space-m);
    grid-template-areas:
      "portrait id"
      "portrait eyebrow"
      "intro    intro"
      "title    title"
      "body     body";
    grid-template-rows: auto;
  }
  section.hero .hero-intro { margin-top: var(--space-s); max-width: none; font-size: var(--step--1); }
  section.hero .hero-sub { max-width: 64ch; font-size: var(--step-0); }
  section.hero .hero-title { font-size: clamp(2.10rem, 1.30rem + 3.60vw, 3.20rem); margin-top: var(--space-m); }
}
@media (min-width: 700px) and (max-width: 780px) {
  section.hero .hero-intro { margin-top: var(--space-2xs); }
  section.hero .hero-title { margin-top: var(--space-s); }
}
@media (max-width: 699px) {
  /* Face and name on one row, then the eyebrow, paragraph, headline, deck, buttons. */
  section.hero {
    --portrait: 96px;
    column-gap: var(--space-s);
    grid-template-areas:
      "portrait id"
      "eyebrow  eyebrow"
      "intro    intro"
      "title    title"
      "body     body";
    grid-template-rows: auto;
    padding-block: var(--space-m) var(--space-m);
  }
  section.hero .hero-id { align-self: start; margin: 0; }
  section.hero .id-name { font-size: var(--step-2); }
  section.hero .hero-eyebrow { margin: var(--space-s) 0 var(--space-2xs); }
  section.hero .hero-title {
    font-size: clamp(2.10rem, 1.30rem + 3.60vw, 3.20rem);
    margin: var(--space-m) 0 var(--space-s);
  }
  section.hero .hero-intro { margin: 0; font-size: 0.875rem; line-height: 1.45; }
  section.hero .hero-sub { font-size: 0.97rem; line-height: 1.45; }
  /* Both actions on one row where they fit (390 and up), stacked below that. */
  section.hero .hero-cta { margin-top: var(--space-s); gap: var(--space-2xs); }
  section.hero .hero-cta a { font-size: 0.94rem; padding-inline: 14px; }
}
/* Smallest phones only: one step down so "mandate" is never stranded alone. */
@media (max-width: 399px) {
  section.hero .hero-title { margin-top: var(--space-s); }
}
@media (max-width: 340px) {
  section.hero .hero-title { font-size: 1.68rem; }
}
