/* Scroll-driven opening for the portfolio · 2026-11-15
   A pinned stage (position: sticky) inside a tall section. JS maps scroll progress 0→1 to
   five scenes; CSS only paints transforms and opacity (GPU-friendly). Palette = the site.
   Reduced motion: the stage is not pinned and every scene is shown stacked, no transforms. */
.sh { position: relative; height: 420vh; margin: 0; }
.sh-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; perspective: 1400px; perspective-origin: 50% 40%; background: var(--paper, #FBF8F2); }
.sh-light { position: absolute; inset: -20%; pointer-events: none; filter: blur(70px);
  background: radial-gradient(42% 42% at 68% 32%, rgba(238,244,239,.95), transparent 70%), radial-gradient(38% 38% at 24% 76%, rgba(242,239,247,.95), transparent 70%);
  transform: translate3d(calc(var(--p, 0) * 4%), calc(var(--p, 0) * -6%), 0) scale(calc(1 + var(--p, 0) * .08)); }
.sh-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(21,23,27,.07) 1px, transparent 1px); background-size: 28px 28px; opacity: calc(.35 - var(--p, 0) * .3); transform: translateY(calc(var(--p, 0) * -40px)); }
.sh-scene { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 24px; will-change: transform, opacity; transition: padding .6s cubic-bezier(.2,.7,.2,1); }
/* while the photo is on the right, the text centres in the space left of it */
@media (min-width: 821px) { .sh-stage.ph .sh-scene { padding-right: clamp(240px, 34vw, 480px); } }
.sh-scene > div { max-width: 1200px; transform-style: preserve-3d; }
.sh-name { font-size: clamp(52px, 8.6vw, 132px); line-height: .92; letter-spacing: -.04em; font-weight: 800; margin: 0; }
.sh-name .br { display: block; height: 0; }
.sh-name span { display: inline-block; transform-origin: 50% 100%; }
.sh-eyebrow { font-size: clamp(12px, 1.1vw, 15px); letter-spacing: .28em; text-transform: uppercase; font-weight: 700; color: var(--muted, #686D76); }
.sh-tag { font-size: clamp(36px, 6.5vw, 96px); font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 0; }
.sh-tag .dot { color: var(--muted, #686D76); font-weight: 400; margin: 0 .25em; }
.sh-claim { font-size: clamp(32px, 5vw, 76px); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; margin: 0; }
.sh-claim .w { display: inline-block; margin-right: .22em; }
.sh-sub { font-size: clamp(16px, 1.4vw, 22px); color: var(--muted, #686D76); margin-top: 22px; max-width: 60ch; margin-inline: auto; }
.sh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); max-width: 1100px; margin: 0 auto; }
.sh-stat { background: var(--white, #fff); border-radius: 22px; padding: clamp(18px, 2.4vw, 34px) clamp(22px, 3vw, 44px); box-shadow: 0 2px 4px rgba(21,23,27,.06), 0 30px 60px -30px rgba(21,23,27,.35); min-width: 220px; transform-style: preserve-3d; }
.sh-stat b { display: block; font-size: clamp(36px, 4.4vw, 72px); line-height: 1; letter-spacing: -.04em; font-weight: 800; font-variant-numeric: tabular-nums; position: relative; min-height: 1em; }
.sh-stat b s { position: absolute; left: 0; top: 0; text-decoration: none; color: rgba(21,23,27,.35); }
.sh-stat b em { font-style: normal; display: block; }
.sh-stat u { display: block; text-decoration: none; height: 6px; border-radius: 3px; background: rgba(21,23,27,.08); margin-top: 14px; overflow: hidden; }
.sh-stat u i { display: block; height: 100%; width: 0; border-radius: 3px; background: #1f6f54; }
.sh-stat span { display: block; margin-top: 10px; font-size: clamp(12px, 1vw, 15px); color: var(--muted, #686D76); }
.sh-stat::after { content: attr(data-delta); display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1f6f54; opacity: var(--d, 0); transform: translateY(calc((1 - var(--d, 0)) * 6px)); }
.sh-stat.jios { background: var(--mint, #EEF4EF); }
.sh-stat { min-width: 0; }
.sh-cta { display: inline-flex; gap: 10px; align-items: center; padding: 16px 26px; border-radius: 999px; background: var(--accent, #202126); color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; margin-top: 28px; }
.sh-cta.ghost { background: transparent; color: var(--ink, #15171B); border: 1px solid var(--line, #E6E4E2); margin-left: 10px; }
.sh-photo { position: absolute; right: clamp(16px, 6vw, 120px); top: 50%; width: clamp(160px, 22vw, 340px); aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(21,23,27,.45); transform-style: preserve-3d; }
.sh-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(var(--g, 1)); transition: filter .5s ease; }
.sh-photo:hover img { --g: 0; }
@keyframes sh-reveal { from { clip-path: inset(0 50% 0 50% round 22px); } to { clip-path: inset(0 0 0 0 round 22px); } }
.sh-dots { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.sh-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(21,23,27,.2); display: block; transition: transform .3s, background .3s; }
.sh-dots i.on { background: var(--ink, #15171B); transform: scale(1.5); }
.sh-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted, #686D76); display: flex; gap: 10px; align-items: center; }
.sh-hint i { width: 1px; height: 28px; background: currentColor; display: block; transform-origin: top; animation: sh-hint 1.6s ease-in-out infinite; }
@keyframes sh-hint { 0% { transform: scaleY(0); opacity: 0 } 40% { transform: scaleY(1); opacity: 1 } 100% { transform: scaleY(1) translateY(10px); opacity: 0 } }
@media (max-width: 820px) { .sh { height: 360vh; } .sh-photo { display: none; } .sh-stats { grid-template-columns: 1fr 1fr; gap: 10px; } .sh-stat { padding: 16px 12px; border-radius: 16px; } .sh-stat b { font-size: 30px; } .sh-stat span { font-size: 11px; margin-top: 6px; } .sh-stat u { margin-top: 8px; height: 4px; } .sh-stat::after { font-size: 9.5px; } }
/* no JS / reduced motion: a quiet stacked hero, nothing pinned */
html:not(.js) .sh, .sh.sh-static { height: auto; }
html:not(.js) .sh-stage, .sh.sh-static .sh-stage { position: static; height: auto; perspective: none; padding: 72px 0 24px; }
html:not(.js) .sh-scene, .sh.sh-static .sh-scene { position: static; opacity: 1 !important; transform: none !important; padding: 20px 24px; }
html:not(.js) .sh-photo, html:not(.js) .sh-dots, html:not(.js) .sh-hint, .sh.sh-static .sh-photo, .sh.sh-static .sh-dots, .sh.sh-static .sh-hint { display: none; }

/* Opening: the first scene pops in with a spring (overshoot easing), one element after another.
   fill-mode backwards only, so once the animation ends the scroll scrubber's inline transforms rule again. */
@keyframes sh-pop { from { opacity: 0; transform: translateY(22px) scale(.94); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .sh-scene:first-of-type .sh-eyebrow { animation: sh-pop .7s cubic-bezier(.34,1.56,.64,1) .15s backwards; }
  .sh-name > span { animation: sh-pop .6s cubic-bezier(.34,1.56,.64,1) backwards; }
  .sh-photo { animation: sh-reveal 1.1s cubic-bezier(.2,.8,.2,1) .5s backwards; }
  .sh-hint { animation: sh-pop .6s cubic-bezier(.34,1.56,.64,1) 1.1s backwards; }
}
.sh-name > span:nth-child(1) { animation-delay: 0.29s; }
.sh-name > span:nth-child(2) { animation-delay: 0.33s; }
.sh-name > span:nth-child(3) { animation-delay: 0.37s; }
.sh-name > span:nth-child(4) { animation-delay: 0.41s; }
.sh-name > span:nth-child(5) { animation-delay: 0.45s; }
.sh-name > span:nth-child(6) { animation-delay: 0.49s; }
.sh-name > span:nth-child(7) { animation-delay: 0.53s; }
.sh-name > span:nth-child(8) { animation-delay: 0.57s; }
.sh-name > span:nth-child(9) { animation-delay: 0.61s; }
.sh-name > span:nth-child(10) { animation-delay: 0.65s; }
.sh-name > span:nth-child(11) { animation-delay: 0.69s; }
.sh-name > span:nth-child(12) { animation-delay: 0.73s; }
.sh-name > span:nth-child(13) { animation-delay: 0.77s; }
.sh-name > span:nth-child(14) { animation-delay: 0.81s; }
.sh-name > span:nth-child(15) { animation-delay: 0.85s; }
.sh-name > span:nth-child(16) { animation-delay: 0.89s; }
.sh-name > span:nth-child(17) { animation-delay: 0.93s; }

/* Status line + facts (Opus's points 2 and 1, 2026-11-19): what she is looking for now, and four
   dry facts pinned on the photo like labels; on phones (photo hidden) the same facts sit under the name. */
.sh-status { display: inline-flex; align-items: center; gap: .5em; margin: 22px auto 0; padding: 9px 16px; border: 1px solid var(--line, #e9e5e2); border-radius: 999px; background: var(--white, #fff); font-size: clamp(12px, 1vw, 14px); font-weight: 600; color: var(--ink, #151922); box-shadow: 0 10px 30px -18px rgba(21,23,27,.35); }
.sh-facts { list-style: none; margin: 0; padding: 0; }
.sh-facts li { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 7px 12px; border-radius: 999px; background: var(--white, #fff); color: var(--ink, #151922); border: 1px solid var(--line, #e9e5e2); box-shadow: 0 12px 28px -16px rgba(21,23,27,.45); white-space: nowrap; }
.sh-facts-photo { position: absolute; inset: 0; pointer-events: none; }
.sh-facts-photo li { position: absolute; left: var(--x); top: var(--y); transform: rotate(var(--r)); }
.sh-facts-inline { display: none; }
@media (max-width: 820px) { .sh-facts-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; } .sh-facts-inline li { font-size: 11px; } }
@media (prefers-reduced-motion: no-preference) {
  .sh-status { animation: sh-pop .7s cubic-bezier(.34,1.56,.64,1) .95s backwards; }
  .sh-facts-photo li { animation: sh-pop .7s cubic-bezier(.34,1.56,.64,1) backwards; }
  .sh-facts-photo li:nth-child(1) { animation-delay: 1.05s; } .sh-facts-photo li:nth-child(2) { animation-delay: 1.2s; }
  .sh-facts-photo li:nth-child(3) { animation-delay: 1.35s; } .sh-facts-photo li:nth-child(4) { animation-delay: 1.5s; }
  .sh-facts-inline li { animation: sh-pop .6s cubic-bezier(.34,1.56,.64,1) backwards; }
  .sh-facts-inline li:nth-child(1) { animation-delay: 1.05s; } .sh-facts-inline li:nth-child(2) { animation-delay: 1.15s; }
  .sh-facts-inline li:nth-child(3) { animation-delay: 1.25s; } .sh-facts-inline li:nth-child(4) { animation-delay: 1.35s; }
}

/* The name shrinks into the nav once the opening is behind (scroll-hero.js sets .named on <body>) */
.brand { position: relative; display: inline-grid; align-items: center; }
.brand > span { grid-area: 1 / 1; transition: opacity .35s ease, transform .35s cubic-bezier(.34,1.56,.64,1); white-space: nowrap; }
.brand-long { font-size: 18px; font-weight: 800; letter-spacing: -.03em; opacity: 0; transform: translateY(8px) scale(.9); }
body.named .brand-short { opacity: 0; transform: translateY(-8px) scale(.9); }
body.named .brand-long { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .brand > span { transition: none; } }
@media (max-width: 900px) { body.named .brand-short { opacity: 1; transform: none; } .brand-long { display: none; } }
/* on phones the big photo is hidden, so a small round one sits above the name */
.sh-avatar { display: none; }
@media (max-width: 820px) { .sh-avatar { display: block; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; margin: 0 auto 16px; box-shadow: 0 16px 40px -16px rgba(21,23,27,.5); } }
@media (max-width: 820px) and (prefers-reduced-motion: no-preference) { .sh-avatar { animation: sh-pop .8s cubic-bezier(.34,1.56,.64,1) .05s backwards; } }
