/* ============================================================
   HERO — the post-production stage
   Live HTML/CSS panels layered behind and in front of the subject
   ============================================================ */

.hero {
  position: relative;
  min-height: calc(100svh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

/* ---- ground -------------------------------------------------- */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero__bg::before {                       /* cyclorama light pool */
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(58% 52% at 52% 44%, #FBFAF7 0%, rgba(251,250,247,0) 68%),
    radial-gradient(90% 70% at 50% 108%, rgba(26,26,20,.11) 0%, rgba(26,26,20,0) 62%);
  transform: translate3d(calc(var(--px, 0px) * .5), calc(var(--py, 0px) * .5), 0);
}

.hero__grid {                              /* 12 hairline columns */
  position: absolute;
  inset: 0 var(--gutter);
  max-width: var(--maxw);
  margin-inline: auto;
  background-image: repeating-linear-gradient(
    to right, var(--line-soft) 0 1px, transparent 1px calc(100% / 12));
  background-size: calc(100% / 12 * 12) 100%;
  opacity: .9;
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 72%, transparent 100%);
}

/* ---- stage --------------------------------------------------- */
.hero__stage {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: inherit;
  perspective: 1500px;
  perspective-origin: 50% 46%;
}
/* the photograph + Editing + Rhythm. No box of its own above 760px, so
   they position against the stage exactly as they always have; on a
   phone it becomes the layered composition (see the end of this file). */
.hero__comp { display: contents; }

/* ---- wordmark (the page h1) ---------------------------------- */
.hero__wordmark {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(22px, 4.2vh, 54px);
  z-index: 1;
  margin: 0 auto;
  max-width: var(--maxw);
  padding-inline: var(--gutter);
  container-type: inline-size;
  text-align: center;
  pointer-events: none;
}
.hero__wordmark span {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 9.4vw;
  font-size: 9.6cqw;
  line-height: .78;
  letter-spacing: -.048em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(26, 26, 20, .86);
  transform: translate3d(calc(var(--px, 0px) * 1), 0, 0);
}

/* ---- the subject --------------------------------------------- */
.hero__figure {
  position: absolute;
  left: 52%;
  bottom: 0;
  z-index: 3;
  margin: 0;
  transform: translate3d(calc(-50% + var(--px, 0px) * .3), 0, 0);
  pointer-events: none;
}
.hero__figure img {
  height: clamp(380px, 76svh, 880px);
  width: auto;
  filter: drop-shadow(0 34px 44px rgba(26, 26, 20, .14));
}

/* ---- copy lockup --------------------------------------------- */
.hero__copy {
  position: absolute;
  z-index: 5;
  top: 38%;
  left: var(--gutter);
  width: clamp(290px, 30vw, 470px);
  transform: translate3d(calc(var(--px, 0px) * 1.2), calc(var(--py, 0px) * 1.2), 0);
}
.hero__eyebrow { color: var(--ink-45); display: block; margin-bottom: 20px; }
.hero__role {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.028em;
  text-wrap: balance;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__disciplines {
  font-size: var(--fs-small);
  color: var(--ink-70);
  letter-spacing: .01em;
  margin-bottom: 26px;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* ============================================================
   FLOATING PANELS
   ============================================================ */
.panel {
  position: absolute;
  width: var(--w);
  --s: 1;
  --d: 1;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  backdrop-filter: blur(16px) saturate(1.05);
  border: 1px solid rgba(26, 26, 20, .10);
  border-radius: 3px;
  box-shadow: var(--shadow-m);
  overflow: hidden;
  text-align: left;
  transform:
    translate3d(calc(var(--px, 0px) * var(--d)), calc(var(--py, 0px) * var(--d)), 0)
    rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) scale(var(--s));
  transition: box-shadow .55s var(--ease), border-color .55s var(--ease),
              background .55s var(--ease), transform .45s var(--ease-soft);
}
.panel::after {                             /* top light catch */
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.85), transparent);
  pointer-events: none;
}
.panel:hover, .panel:focus-within {
  background: var(--glass-2);
  border-color: rgba(26, 26, 20, .17);
  box-shadow: var(--shadow-l);
  --s: calc(var(--s0, 1) * 1.022);
  z-index: 9;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .30);
}
.panel__id { color: var(--ink-45); }
.panel__name { color: var(--ink); letter-spacing: .17em; font-weight: 500; }
.panel__tc { color: var(--ink-45); }
.panel__body { padding: 11px 12px 13px; }

.panel__tags {
  display: flex; flex-wrap: wrap; gap: 4px 5px;
  margin-bottom: 11px; padding: 0; list-style: none;
}
.panel__tags li {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-70);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 3px 6px; background: rgba(255,255,255,.4);
}

.panel__cta {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--sage-deep);
  margin-top: 10px; opacity: 0; transform: translateY(3px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.panel:hover .panel__cta, .panel:focus-within .panel__cta { opacity: 1; transform: none; }
.panel__cta span { transition: transform .4s var(--ease); }
.panel:hover .panel__cta span { transform: translateX(3px); }

/* ---- 01 · TIMELINE ------------------------------------------- */
.panel--timeline {
  --w: clamp(300px, 27vw, 424px);
  --d: 7; --ry: 4deg; --rx: -1deg;
  left: 3.5%; bottom: 8.5%;
  z-index: 4; transform-origin: bottom left;
}
.tl { position: relative; }
.tl__ruler {
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 5px; margin-bottom: 8px;
}
.tl__ruler span {
  font-family: var(--mono); font-size: 8.5px; color: var(--ink-25);
  letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.tl__tracks { display: grid; gap: 3px; }
.tl__row { display: grid; grid-template-columns: 20px 1fr; gap: 7px; align-items: center; }
.tl__lab {
  font-family: var(--mono); font-size: 8.5px; color: var(--ink-45); letter-spacing: .06em;
}
.tl__lane {
  position: relative; height: 15px; border-radius: 1px;
  background: rgba(26, 26, 20, .045);
}
.tl__lane--audio { height: 11px; }
.tl__clip {
  position: absolute; top: 1px; bottom: 1px;
  border-radius: 1px; border: 1px solid rgba(26,26,20,.16);
  background: rgba(255,255,255,.66);
  overflow: hidden;
}
.tl__clip--key { background: var(--sage-tint); border-color: rgba(107,122,97,.4); }
.tl__clip i {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(26,26,20,.12) 0 1px, transparent 1px 7px);
  opacity: .42;
}
.tl__clip--audio {
  background: rgba(26,26,20,.07); border-color: rgba(26,26,20,.13);
}
.tl__clip--audio i {
  background: repeating-linear-gradient(90deg,
    rgba(26,26,20,.30) 0 1px, transparent 1px 4px);
  mask-image: linear-gradient(to bottom, transparent 8%, #000 30%, #000 70%, transparent 92%);
  opacity: .5;
}
.tl__playhead { position: absolute; top: 14px; bottom: 0; left: 27px; right: 0; pointer-events: none; }
.tl__playhead i {
  position: absolute; top: 0; bottom: 0; width: 1px; left: 2%;
  background: var(--sage-deep);
  animation: tl-run 16s linear infinite;
}
.tl__playhead i::before {
  content: ""; position: absolute; top: -5px; left: -3.5px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--sage-deep);
}
.panel--timeline:hover .tl__playhead i,
.panel--timeline:focus-within .tl__playhead i { animation-duration: 5.5s; }
@keyframes tl-run { from { left: 2%; } to { left: 97%; } }

.panel--timeline:hover .tl__clip--key,
.panel--timeline:focus-within .tl__clip--key { animation: clip-pulse 2.4s var(--ease) infinite; }
@keyframes clip-pulse {
  0%, 100% { background: var(--sage-tint); }
  50% { background: rgba(107,122,97,.22); }
}

/* ---- 02 · MOTION --------------------------------------------- */
.panel--motion {
  --w: clamp(212px, 17.5vw, 262px);
  --d: 3; --ry: -6deg; --rx: 1.5deg;
  right: 4.5%; top: 14.5%;
  z-index: 2; transform-origin: top right;
}
.mo__rows { display: grid; gap: 5px; margin-bottom: 10px; }
.mo__row {
  display: grid; grid-template-columns: 9px 1fr auto; gap: 7px; align-items: center;
  font-family: var(--mono); font-size: 9.5px; color: var(--ink-70); letter-spacing: .05em;
}
.mo__dot {
  width: 5px; height: 5px; border-radius: 50%;
  border: 1px solid var(--ink-45); background: transparent;
}
.mo__row--on .mo__dot { background: var(--sage); border-color: var(--sage); }
.mo__row b { font-weight: 400; color: var(--ink); }
.mo__tc { color: var(--ink-25); font-variant-numeric: tabular-nums; }
.mo__graph {
  position: relative; height: 66px;
  border: 1px solid var(--line-soft); border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, var(--line-soft) 0 1px, transparent 1px 25%),
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 33.33%),
    rgba(255,255,255,.34);
}
.mo__graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mo__curve {
  fill: none; stroke: var(--sage-deep); stroke-width: 1.3;
  stroke-dasharray: 220; stroke-dashoffset: 0;
}
.panel--motion:hover .mo__curve,
.panel--motion:focus-within .mo__curve { animation: draw 2.6s var(--ease) infinite; }
@keyframes draw { 0% { stroke-dashoffset: 220; } 55%, 100% { stroke-dashoffset: 0; } }
.mo__key { fill: var(--paper); stroke: var(--sage-deep); stroke-width: 1.2; }
.panel--motion:hover .mo__key { animation: key-pop 2.6s var(--ease) infinite; }
@keyframes key-pop { 0%, 60%, 100% { fill: var(--paper); } 75% { fill: var(--sage); } }

/* ---- 03 · SELECTED PROJECT ----------------------------------- */
.panel--project {
  --w: clamp(238px, 21vw, 312px);
  --d: 6; --ry: -4.5deg; --rx: -.5deg;
  right: 2.5%; top: 38%;
  z-index: 4; transform-origin: top right;
  cursor: pointer;
}
.panel--project .panel__body { padding: 0; }
.pp__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--paper-3); border-bottom: 1px solid var(--line-soft);
}
.pp__frame img, .pp__frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pp__frame video { opacity: 0; transition: opacity .5s var(--ease); }
.panel--project:hover .pp__frame video.is-ready { opacity: 1; }
.pp__badge {
  position: absolute; right: 7px; bottom: 7px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  color: var(--paper); background: rgba(16,16,12,.72);
  padding: 3px 6px; border-radius: 2px; font-variant-numeric: tabular-nums;
}
.pp__meta { padding: 10px 12px 12px; }
.pp__title {
  font-family: var(--display); font-weight: 600; font-size: 15px;
  letter-spacing: -.02em; line-height: 1.15; margin-bottom: 4px;
}
.pp__sub {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-45);
}

/* ---- 04 · PROJECTS / MEDIA ----------------------------------- */
.panel--projects {
  --w: clamp(198px, 16vw, 240px);
  --d: 3; --ry: 6deg; --rx: 1deg;
  left: 3%; top: 10.5%;
  z-index: 2; transform-origin: top left;
  cursor: pointer;
}
.pb__rows { display: grid; gap: 4px; margin-bottom: 10px; }
.pb__row {
  display: grid; grid-template-columns: 11px 1fr auto; gap: 7px; align-items: center;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em;
  color: var(--ink-70); padding: 2px 3px; border-radius: 2px;
}
.pb__row:first-child { background: var(--sage-tint); color: var(--ink); }
.pb__ico {
  width: 11px; height: 8px; border: 1px solid currentColor;
  border-radius: 1px 2px 2px 2px; opacity: .6; position: relative;
}
.pb__ico::before {
  content: ""; position: absolute; top: -3px; left: 0; width: 5px; height: 3px;
  border: 1px solid currentColor; border-bottom: 0; border-radius: 1px 1px 0 0;
}
.pb__n { color: var(--ink-25); font-variant-numeric: tabular-nums; }
.pb__strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.pb__strip img {
  aspect-ratio: 16 / 10; width: 100%; height: 100%; object-fit: cover;
  border-radius: 1px; filter: saturate(.72);
}

/* ---- 05 · RHYTHM --------------------------------------------- */
.panel--rhythm {
  --w: clamp(178px, 14vw, 212px);
  --d: 8; --ry: -3deg; --rx: -2deg;
  right: 9%; bottom: 11%;
  z-index: 4; transform-origin: bottom right;
}
.rh__rows { display: grid; gap: 6px; margin-bottom: 9px; }
.rh__row {
  display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: center;
  font-family: var(--mono); font-size: 9px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-70);
}
.rh__meter { height: 4px; border-radius: 2px; background: rgba(26,26,20,.08); overflow: hidden; }
.rh__meter i {
  display: block; height: 100%; background: var(--sage);
  transform-origin: left; animation: meter 3.4s var(--ease-soft) infinite alternate;
}
.rh__row:nth-child(2) .rh__meter i { animation-duration: 2.6s; background: var(--sage-deep); }
.rh__row:nth-child(3) .rh__meter i { animation-duration: 4.2s; }
@keyframes meter { from { transform: scaleX(.34); } to { transform: scaleX(.92); } }

.rh__wave { display: flex; align-items: center; gap: 1.5px; height: 26px; }
.rh__wave i {
  flex: 1; background: var(--ink-45); border-radius: .5px;
  height: 100%; transform: scaleY(var(--h, .22)); transform-origin: center;
  animation: wave 1.5s var(--ease-soft) infinite alternate;
}
@keyframes wave {
  from { transform: scaleY(var(--h, .22)); }
  to   { transform: scaleY(1); }
}
.panel--rhythm:hover .rh__wave i { background: var(--sage-deep); }

/* ---- viewport-height scaling so the composition survives ----- */
@media (max-height: 880px) and (min-width: 1025px) { .hero .panel { --s0: .9; --s: .9; } }
@media (max-height: 760px) and (min-width: 1025px) { .hero .panel { --s0: .8; --s: .8; } }
@media (max-height: 680px) and (min-width: 1025px) {
  .hero .panel { --s0: .72; --s: .72; }
  .hero__figure img { height: clamp(320px, 70svh, 880px); }
}

@media (max-width: 1240px) and (min-width: 1025px) {
  .hero__copy { width: min(26ch, 23vw); }
  .panel--project { top: 36%; }
}

/* ============================================================
   MOBILE / TABLET — a real layout, not a shrunken desktop one
   ============================================================ */
@media (max-width: 1024px) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--header-h) + 26px);
    padding-bottom: 40px;
  }
  .hero__grid { display: none; }
  .hero__stage {
    display: flex;
    flex-direction: column;
    perspective: none;
    padding-inline: var(--gutter);
    max-width: var(--maxw);
    margin-inline: auto;
  }
  .hero__stage > *,
  .hero__comp > * {
    position: static !important;
    width: auto !important;
    transform: none !important;
    inset: auto !important;
  }

  .hero__copy { order: 2; padding: 0; margin-top: 16px; width: auto; }
  .hero__eyebrow { display: none; }
  .hero__role { font-size: clamp(1.15rem, 4.6vw, 1.6rem); margin-bottom: 8px; }
  .hero__disciplines { margin-bottom: 0; font-size: .8125rem; }

  .hero__wordmark {
    order: 1; padding: 0; margin: 0;
    text-align: left; container-type: inline-size;
  }
  .hero__wordmark span {
    font-size: 15.5cqw; letter-spacing: -.045em; line-height: .84;
    white-space: normal; color: rgba(26,26,20,.92);
  }

  .hero__ctas { margin-top: 20px; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }

  .hero__figure {
    order: 3;
    align-self: center;
    margin-top: 10px;
    margin-bottom: -2px;
  }
  .hero__figure img {
    height: auto;
    width: min(66vw, 344px);
    filter: drop-shadow(0 20px 28px rgba(26,26,20,.13));
  }

  .panel { --s: 1 !important; --s0: 1 !important; border-radius: 3px; }
  .panel--projects, .panel--motion, .panel--project { display: none; }

  .panel--timeline { order: 4; margin-top: 4px; }
  .panel--rhythm { order: 5; margin-top: 10px; align-self: flex-start; width: min(100%, 268px) !important; }
}

@media (max-width: 1024px) and (min-width: 760px) {
  .hero__stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
    align-items: end; gap: 0 36px;
  }
  .hero__wordmark, .hero__copy, .panel--timeline, .panel--rhythm { grid-column: 1; }
  .hero__figure { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin: 0; }
  .hero__figure img { width: min(40vw, 430px); }
  .hero__wordmark span { font-size: 17cqw; }
}

/* ============================================================
   PHONE — one layered composition instead of a stack
   ------------------------------------------------------------
   The type keeps its place on top. Below the button the photograph
   sits to the right, and Editing and Rhythm come in over it from the
   left:  ground → photograph → Editing → Rhythm.
   Everything is sized off the photograph's width, so the face stays
   clear of the panels at any phone width. 760px and up is untouched.
   ============================================================ */
@media (max-width: 759px) {
  .hero__comp {
    --fig-w:   clamp(232px, 70vw, 330px);
    --fig-h:   calc(var(--fig-w) * 1.5107);   /* igor-mobile.webp is 607 × 917 */
    --ed-top:  calc(var(--fig-h) * .19);      /* the chin sits at 16.4 % */
    --overlap: clamp(46px, 14vw, 62px);       /* how far the photo runs under Rhythm */
    /* the same frosted glass, a little denser: here the panels sit over
       the dark of the jeans and the hair, and the timecode ruler has to
       stay readable on top of them */
    --glass:   rgba(247, 246, 242, .84);
    --glass-2: rgba(242, 240, 235, .9);

    order: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    /* 1 · head and shoulders, clear of every panel
       2 · Editing
       3 · whatever of the photograph is still left under Editing
       4 · Rhythm, over the foot of the photograph                */
    /* max-content, not auto: the panels clip their overflow, which gives
       them no automatic minimum height, and the photograph spanning
       rows 1–3 would otherwise pour half its height into row 2 */
    grid-template-rows: var(--ed-top) max-content auto max-content;
    margin-top: clamp(14px, 4.4vw, 22px);
  }

  .hero__comp > .hero__figure {
    grid-row: 1 / 4;
    grid-column: 1;
    justify-self: end;
    align-self: start;
    width: var(--fig-w) !important;
    /* leans a little into the right gutter; the bottom margin lets
       the feet run on under Rhythm without pushing Rhythm down */
    margin: 0 calc(var(--gutter) * -.5) calc(var(--overlap) * -1) 0;
    z-index: 3;
  }
  .hero__comp > .hero__figure picture { display: block; }
  .hero__comp > .hero__figure img { width: 100%; height: auto; }

  .hero__comp > .panel--timeline {
    grid-row: 2;
    grid-column: 1;
    justify-self: start;
    align-self: start;
    width: min(84vw, 360px) !important;
    margin: 0;
    z-index: 4;
  }

  .hero__comp > .panel--rhythm {
    grid-row: 4;
    grid-column: 1;
    justify-self: start;
    align-self: start;
    width: min(60vw, 262px) !important;
    margin: 14px 0 0 clamp(10px, 4vw, 18px);
    z-index: 5;
  }
}

/* ---- motion preferences -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tl__playhead i, .rh__meter i, .rh__wave i, .mo__curve, .mo__key { animation: none !important; }
  .tl__playhead i { left: 42%; }
  .rh__wave i { transform: scaleY(.5); }
  .rh__meter i { transform: scaleX(.6); }
}
