/* ==========================================================================
   HOME / HERO: full-bleed photo, like a still on the program monitor.
   Sequence: preloader lifts → photo settles in (scale + fade) → text rises.
   The photo itself is never altered: theme blending is done with gradient
   overlays that sit mostly over the out-of-focus stage, not the subject.
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--nav-top) + var(--nav-h) + 48px) var(--gutter) 120px;
  overflow: clip;
  isolation: isolate;
  background: var(--bg);
}

/* ---------- Photo ---------- */
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__plx { position: absolute; inset: -4% 0 -4% 0; will-change: transform; }
.hero__pic {
  position: absolute;
  inset: 0;
  background: var(--lqip) center 30% / cover no-repeat;
}
.hero__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
}
.js .hero__pic img { opacity: 0; transform: scale(1.12); }
.is-ready .hero__pic img {
  opacity: 1;
  transform: none;
  transition: opacity 1.5s var(--ease-out), transform 2.6s var(--ease-out);
}

/* Theme blending: left side carries the text, bottom fades into the page */
.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(var(--bg-rgb), 0.94) 0%,
      rgba(var(--bg-rgb), 0.8) 26%,
      rgba(var(--bg-rgb), 0.32) 48%,
      rgba(var(--bg-rgb), 0) 64%),
    linear-gradient(0deg, rgba(var(--bg-rgb), 1) 0%, rgba(var(--bg-rgb), 0) 30%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.6) 0%, rgba(var(--bg-rgb), 0) 20%),
    radial-gradient(60% 70% at 8% 60%, rgba(var(--particle), 0.14), transparent 70%);
}
:root[data-scheme="light"] .hero__shade {
  background:
    linear-gradient(90deg,
      rgba(var(--bg-rgb), 0.97) 0%,
      rgba(var(--bg-rgb), 0.9) 28%,
      rgba(var(--bg-rgb), 0.45) 47%,
      rgba(var(--bg-rgb), 0) 64%),
    linear-gradient(0deg, rgba(var(--bg-rgb), 1) 0%, rgba(var(--bg-rgb), 0) 32%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.7) 0%, rgba(var(--bg-rgb), 0) 22%),
    radial-gradient(60% 70% at 8% 60%, rgba(var(--wash), 0.6), transparent 70%);
}
.js .hero__shade { opacity: 0; }
.is-ready .hero__shade { opacity: 1; transition: opacity 1.2s var(--ease-out) 0.35s; }

/* ---------- Program-monitor HUD ---------- */
.hero__hud {
  position: absolute;
  inset: calc(var(--nav-top) + var(--nav-h) + 22px) var(--gutter) 28px;
  pointer-events: none;
  color: rgba(var(--motif), 0.55);
}
.js .hero__hud { opacity: 0; }
.is-ready .hero__hud { opacity: 1; transition: opacity 1s var(--ease-out) 1.6s; }
.hud-c { position: absolute; width: 22px; height: 22px; border: 0 solid currentColor; }
.hud-c--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud-c--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.hud-c--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud-c--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud-tc {
  position: absolute;
  right: 34px;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 0.75rem / 1 var(--font-body);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.hud-tc::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  animation: hud-blink 1.6s steps(1) infinite;
}
@keyframes hud-blink { 50% { opacity: 0.25; } }

/* ---------- Text ---------- */
.hero__grid {
  width: min(100%, var(--content));
  margin-inline: auto;
}
.hero__copy { max-width: 660px; }
.hero__head { container-type: inline-size; }

.hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font: 600 0.9375rem / 1.4 var(--font-body);
  color: var(--ink-2);
}
.hero__kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}
:root[data-scheme="dark"] .hero__kicker .dot { background: var(--lavender); }
.hero__kicker strong { color: var(--ink); font-weight: 700; letter-spacing: 0.04em; }

.hero__title {
  margin: 20px 0 28px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 15.2cqi, 7rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero__title .line > span { display: inline-block; white-space: nowrap; }
.hero__title .line--top { font-weight: 300; color: var(--ink-2); letter-spacing: -0.02em; }
.hero__title .line--main > span {
  font-weight: 800;
  background: var(--title-fill);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink);
}
.js .hero__title .line > span { transform: translateY(112%); }
.is-ready .hero__title .line > span {
  transform: none;
  transition: transform 1.25s var(--ease-out) var(--d, 0s);
}

.hero__intro {
  max-width: 44ch;
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--ink-2);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px 10px;
  font: 600 var(--fs-label) / 1 var(--font-body);
  color: var(--ink-3);
  transition: color 0.3s;
}
.scroll-cue:hover { color: var(--ink); }
.scroll-cue__track {
  position: relative;
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
}
.scroll-cue__track span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 7px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: cue 2.2s var(--ease-io) infinite;
}
:root[data-scheme="dark"] .scroll-cue__track span { background: var(--lavender); }
@keyframes cue {
  0% { transform: translateY(0); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Tablet & mobile: photo on top, text below over a soft fade ---------- */
@media (max-width: 920px) {
  .hero {
    align-items: end;
    padding-top: 0;
    padding-bottom: 112px;
  }
  .hero__media { bottom: auto; height: 74svh; min-height: 420px; }
  .hero__pic img { object-position: 60% 25%; }
  .hero__shade,
  :root[data-scheme="light"] .hero__shade {
    background:
      linear-gradient(0deg, rgba(var(--bg-rgb), 1) 0%, rgba(var(--bg-rgb), 0.85) 18%, rgba(var(--bg-rgb), 0) 52%),
      linear-gradient(180deg, rgba(var(--bg-rgb), 0.65) 0%, rgba(var(--bg-rgb), 0) 22%);
  }
  .hero__grid { padding-top: 54svh; }
  .hero__title { font-size: clamp(2.6rem, 15cqi, 5.5rem); margin: 16px 0 22px; }
  .hud-c--bl, .hud-c--br, .hud-tc { display: none; }
  .hero__hud { bottom: auto; height: calc(74svh - 160px); }
}
@media (max-width: 560px) {
  .hero__cta .btn { flex: 1 1 auto; }
  .scroll-cue { display: none; }
}
@media (max-height: 640px) and (min-width: 921px) {
  .scroll-cue { display: none; }
}

/* ---------- Outlined name behind the subject ---------- */
.hero__name {
  position: absolute;
  left: 50%;
  top: 14%;
  width: 46%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.hero__name text { font: 800 190px var(--font-display); letter-spacing: -0.02em; }
.hero__name-line { fill: #fff; }                 /* only its clean outer edge is drawn (filter) */
.hero__name-fill { fill: rgba(255, 255, 255, 0); }
.hero__name-wipe { transform: translateX(-1100px); }
.is-ready .hero__name-wipe { animation: name-wipe 2.4s var(--ease-io) 1s forwards; }
.is-ready .hero__name-fill { animation: name-fill 1.6s var(--ease-out) 3.1s forwards; }
@keyframes name-wipe { to { transform: translateX(0); } }
@keyframes name-fill { to { fill: rgba(255, 255, 255, 0.07); } }
.hero__name { filter: drop-shadow(0 0 18px rgba(199, 181, 255, 0.35)); }
.js .hero__name { opacity: 0; }
.is-ready .hero__name { opacity: 1; transition: opacity 0.6s ease 0.9s; }

/* The subject cut-out: identical pixels and placement as the photo, so the name
   sits behind the head. It moves and scales exactly with the photo. */
.hero__cut { position: absolute; inset: 0; pointer-events: none; }
.hero__cut img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.js .hero__cut img { opacity: 0; transform: scale(1.12); }
.is-ready .hero__cut img { opacity: 1; transform: none; transition: opacity 1.5s var(--ease-out), transform 2.6s var(--ease-out); }

/* ---------- Camera HUD: autofocus box, exposure meter, REC ---------- */
.hud-af { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; }
.hud-af i { position: absolute; width: 16px; height: 16px; border: 0 solid rgba(255, 255, 255, 0.85); }
.hud-af i:nth-child(1) { left: 0; top: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.hud-af i:nth-child(2) { right: 0; top: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.hud-af i:nth-child(3) { left: 0; bottom: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.hud-af i:nth-child(4) { right: 0; bottom: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.is-ready .hud-af { animation: af-lock 2.4s var(--ease-out) 1.7s forwards; }
@keyframes af-lock {
  0% { opacity: 0; transform: scale(1.7); }
  35% { opacity: 0.95; transform: scale(0.96); }
  45% { transform: scale(1); }
  55% { opacity: 0.95; }
  62% { opacity: 0.35; }
  70% { opacity: 0.95; }
  100% { opacity: 0.32; transform: scale(1); }
}

.hud-meter {
  position: absolute;
  left: 34px;
  bottom: 4px;
  width: 190px;
  font: 600 0.6875rem / 1 var(--font-body);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.hud-meter__scale {
  display: flex;
  justify-content: space-between;
  padding-bottom: 7px;
  background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 100%) 0 100% / calc(100% / 12) 4px repeat-x;
  opacity: 0.8;
}
.hud-meter__scale b { font-weight: 600; width: 0; display: flex; justify-content: center; }
.hud-meter__needle {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-bottom-color: var(--lavender);
  margin-left: -5px;
  animation: meter 6s var(--ease-io) infinite alternate;
}
:root[data-scheme="light"] .hud-meter__needle { border-bottom-color: var(--accent); }
@keyframes meter { 0% { transform: translateX(-14px); } 40% { transform: translateX(6px); } 100% { transform: translateX(-4px); } }
.hud-tc b { font-weight: 700; color: #ff5a6e; letter-spacing: 0.1em; }
.hud-tc::before { background: #ff5a6e; box-shadow: 0 0 8px rgba(255, 90, 110, 0.8); }
@media (max-width: 920px) { .hud-meter { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero__name-wipe { transform: none; }
  .hero__name-fill { fill: rgba(255, 255, 255, 0.07); }
  .hud-af { opacity: 0.32; }
}
