/* Homepage hero (Casey 2026-10-29). Copy and the four Start Here paths on a
   navy field with a brand-blue glow; a full-height photo whose bottom-left
   corner sweeps away, traced by the feature circle's blue ring; the paths
   straddle the navy edge into the white page. Phones restack the same
   markup: photo band, headline, paths, then the intro. All colour is
   palette tokens from css/site.css. */

.home-hero {
  --home-hero-ease: cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  background: var(--color-white);
  overflow-x: clip;
}

/* ---------- the navy field ---------- */
.home-hero-field {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 120% at 52% 55%, color-mix(in srgb, var(--eas-blue) 34%, transparent), transparent 70%),
    var(--es-secondary-navy);
  padding: clamp(40px, 4vw, 60px) 0 clamp(112px, 9vw, 132px);
}
.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

/* ---------- copy ---------- */
.home-hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; }
.home-hero-kicker {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.08em;
  color: var(--es-tertiary-sky);
  text-wrap: balance;
}
.home-hero-title {
  margin: 0;
  font-size: clamp(2.625rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-white);
  text-wrap: balance;
}
.home-hero-title span { color: var(--eas-yellow); }
.home-hero-lead {
  margin: 0;
  max-width: 34em;
  font-size: 1.25rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-white) 92%, var(--es-secondary-navy));
}
.home-hero-ask {
  margin: 10px 0 0;
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-white);
}

/* ---------- the photo and its ring ---------- */
.home-hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 47%; }
.home-hero-photo { position: absolute; inset: 0; z-index: 1; }
.home-hero-photo picture { display: block; height: 100%; }
.home-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  border-radius: 0 0 0 100% / 0 0 0 100%;
}
.home-hero-ring {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  box-sizing: border-box;
  border-left: 8px solid var(--eas-blue);
  border-bottom: 8px solid var(--eas-blue);
  border-radius: 0 0 0 100% / 0 0 0 100%;
  pointer-events: none;
}

/* ---------- the four paths, straddling the navy edge ---------- */
.home-hero-paths-wrap { position: relative; z-index: 2; margin-top: clamp(-92px, -6.5vw, -72px); padding-bottom: 64px; }
.home-hero-paths {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.home-hero-paths li { margin: 0; }
.home-hero-path {
  --hp-bg: var(--es-orange-10);
  --hp-ink: var(--color-primary);
  --hp-go: var(--color-primary);
  --hp-go-ink: var(--color-white);
  --hp-edge: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  box-sizing: border-box;
  padding: 24px 22px 22px;
  border-radius: 12px;
  background: var(--hp-bg);
  box-shadow: inset 0 0 0 1px var(--hp-edge), 0 12px 30px rgba(0, 36, 72, 0.1);
  text-decoration: none;
  transition: transform 0.35s var(--home-hero-ease), box-shadow 0.35s var(--home-hero-ease);
}
.home-hero-path--self    { --hp-bg: var(--es-sky-30);   --hp-ink: var(--color-secondary); --hp-go: var(--color-secondary); }
.home-hero-path--family  { --hp-bg: var(--es-sky-10);   --hp-ink: var(--eas-blue);        --hp-go: var(--eas-blue);        --hp-edge: var(--es-sky-30); }
.home-hero-path--explore { --hp-bg: var(--color-white); --hp-ink: var(--color-secondary); --hp-go: var(--eas-yellow);      --hp-go-ink: var(--color-secondary); --hp-edge: var(--es-yellow-30); }
.home-hero-icon { display: block; width: 40px; height: 40px; color: var(--hp-ink); }
.home-hero-icon svg { width: 100%; height: 100%; }
.home-hero-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }
.home-hero-path-title { font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--color-secondary); text-wrap: balance; }
.home-hero-path-desc { font-size: 0.98rem; line-height: 1.55; color: var(--color-text-body); }
.home-hero-go {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--hp-go);
  color: var(--hp-go-ink);
  transition: transform 0.35s var(--home-hero-ease);
}
.home-hero-go svg { width: 17px; height: 17px; }
.home-hero-path:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--hp-edge), 0 18px 40px rgba(0, 36, 72, 0.16); }
.home-hero-path:hover .home-hero-go { transform: translateX(5px); }
.home-hero-path:focus-visible { outline: 3px solid var(--focus-ring-color); outline-offset: 4px; }

/* ---------- one entrance, then still ---------- */
@media (prefers-reduced-motion: no-preference) {
  .home-hero-photo img { animation: home-hero-pop 0.9s var(--home-hero-ease) both; }
  .home-hero-ring { animation: home-hero-draw 1.1s var(--home-hero-ease) 0.2s both; }
  .home-hero-copy > * { animation: home-hero-rise 0.7s var(--home-hero-ease) both; }
  .home-hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .home-hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .home-hero-copy > :nth-child(4) { animation-delay: 0.24s; }
  .home-hero-paths li { animation: home-hero-rise 0.7s var(--home-hero-ease) both; }
  .home-hero-paths li:nth-child(1) { animation-delay: 0.3s; }
  .home-hero-paths li:nth-child(2) { animation-delay: 0.36s; }
  .home-hero-paths li:nth-child(3) { animation-delay: 0.42s; }
  .home-hero-paths li:nth-child(4) { animation-delay: 0.48s; }
}
@keyframes home-hero-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes home-hero-draw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes home-hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- desktop: the arrow rides the icon row ---------- */
@media (min-width: 1101px) {
  .home-hero-field { padding-top: clamp(32px, 3vw, 48px); }
  .home-hero-copy { gap: 16px; }
  .home-hero-path { position: relative; padding: 22px 22px 24px; gap: 12px; }
  .home-hero-go { position: absolute; top: 20px; right: 20px; }
}
/* short laptop screens (1280x800, 1366x768): tighter, so the paths land above the fold */
@media (min-width: 1101px) and (max-height: 840px) {
  .home-hero-field { padding-top: 24px; padding-bottom: 104px; }
  .home-hero-title { font-size: clamp(2.5rem, 4.2vw, 3.5rem); }
  .home-hero-lead { font-size: 1.125rem; line-height: 1.55; }
  .home-hero-copy { gap: 12px; }
  .home-hero-ask { margin-top: 4px; }
  .home-hero-path { padding-top: 18px; padding-bottom: 18px; }
  .home-hero-path-desc { line-height: 1.45; }
}

/* ---------- tablet: 2 x 2 rows ---------- */
@media (max-width: 1100px) {
  .home-hero-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-hero-path { flex-direction: row; align-items: center; }
  .home-hero-path-desc { display: none; }
}

/* ---------- phone: restacked, all four paths above the fold ----------
   Target: the fourth path ends by ~640px on 360-430px phones with browser
   chrome showing. The wrappers fall away (display: contents) and one grid
   orders the same DOM: photo band, headline, question, paths (straddling
   the navy edge), then the intro and the three statements on white. */
@media (max-width: 700px) {
  .home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "media" "title" "ask" "paths" "lead" "kick";
    padding: 0 20px 28px;
    overflow: hidden;
  }
  /* the navy field: photo band to the middle of the first path */
  .home-hero::before {
    content: "";
    grid-area: 1 / 1 / 4 / -1;
    margin: 0 -20px -34px;
    background:
      radial-gradient(90% 70% at 70% 60%, color-mix(in srgb, var(--eas-blue) 34%, transparent), transparent 75%),
      var(--es-secondary-navy);
  }
  .home-hero-field, .home-hero-inner, .home-hero-copy, .home-hero-paths-wrap { display: contents; }

  .home-hero-media {
    grid-area: media;
    position: relative;
    z-index: 1;
    width: auto;
    height: clamp(140px, 39vw, 176px);
    margin: 0 -20px;
  }
  .home-hero-photo { overflow: hidden; border-radius: 0 0 0 78% / 0 0 0 62%; }
  .home-hero-photo img { border-radius: 0; object-position: 55% 42%; }
  .home-hero-ring {
    width: 100%;
    height: calc(100% + 10px);
    border-left: 0;
    border-bottom-width: 5px;
    border-radius: 0 0 0 78% / 0 0 0 62%;
  }

  .home-hero-title {
    grid-area: title;
    z-index: 1;
    padding: 14px 0 0;
    font-size: clamp(1.9rem, 8.4vw, 2.4rem);
    line-height: 1.05;
    white-space: nowrap;
  }
  .home-hero-title span { display: block; }
  .home-hero-ask { grid-area: ask; z-index: 1; margin: 14px 0 12px; font-size: 1.2rem; }

  .home-hero-paths { grid-area: paths; z-index: 1; grid-template-columns: 1fr; gap: 8px; }
  .home-hero-path {
    gap: 12px;
    min-height: 54px;
    padding: 8px 12px 8px 14px;
    box-shadow: inset 0 0 0 1px var(--hp-edge), 0 6px 18px rgba(0, 20, 40, 0.18);
  }
  .home-hero-path--explore { --hp-bg: var(--es-yellow-10); }
  .home-hero-icon { width: 30px; height: 30px; flex: 0 0 auto; }
  .home-hero-path-title { font-size: 1.0625rem; }
  .home-hero-go { width: 34px; height: 34px; }

  /* below the navy, on white */
  .home-hero-lead { grid-area: lead; margin: 26px 4px 0; max-width: none; font-size: 1.05rem; color: var(--color-text); }
  .home-hero-kicker { grid-area: kick; margin: 14px 4px 0; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--color-primary); }
}

/* ---------- rotating photos (Casey 2026-10-29) ----------
   Five photos stacked in .home-hero-photo and crossfaded by js/home-hero.js.
   Each slide carries its own focal point per frame shape, because the swept
   corner hides the bottom-left and the frame changes shape a lot:
   --fp-d desktop (about 677x540 to 902x547), --fp-t tablet (tall, about
   361x552), --fp-p phone (a wide band, about 390x152). Without JS the first
   slide simply shows. */
.home-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.home-hero-slide.is-active { opacity: 1; }
.home-hero-photo .home-hero-slide img { object-position: var(--fp-d, 50% 45%); }

.home-hero-pause {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 36, 72, 0.6);
  color: var(--color-white);
  cursor: pointer;
  transition: background-color 0.2s;
}
.home-hero-pause[hidden] { display: none; }
.home-hero-pause:hover { background: rgba(0, 36, 72, 0.85); }
.home-hero-pause:focus-visible { outline: 3px solid var(--color-white); outline-offset: 2px; }
.home-hero-pause svg { width: 18px; height: 18px; fill: currentColor; }
.home-hero-play-icon { display: none; }
.home-hero-pause[aria-pressed="true"] .home-hero-pause-icon { display: none; }
.home-hero-pause[aria-pressed="true"] .home-hero-play-icon { display: block; }

@media (prefers-reduced-motion: reduce) {
  .home-hero-slide { transition: none; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .home-hero-photo .home-hero-slide img { object-position: var(--fp-t, 50% 45%); }
}
@media (max-width: 700px) {
  .home-hero-photo .home-hero-slide img { object-position: var(--fp-p, 55% 42%); }
  .home-hero-pause { top: 10px; right: 10px; width: 36px; height: 36px; }
}
