/* ===== Polish & motion (v2) ===== */
/* Hero */
.hero-actions .btn-play::before { content: ""; width: 0; height: 0; margin-right: 10px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.hero-resume { display: inline-block; margin-top: 14px; font-family: var(--ui); font-weight: 600; font-size: .98rem; color: var(--champagne); text-underline-offset: 4px; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.hero-resume:hover { color: var(--ivory); }

/* Header: shrink on scroll + current section */
.bar, .bar-inner, .mark img { transition: min-height .3s ease, height .3s ease, background-color .3s ease, box-shadow .3s ease; }
.bar.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.bar.is-scrolled .bar-inner { min-height: 60px; }
.bar.is-scrolled .mark img { height: 38px; }
.nav a[aria-current="true"]:not(.nav-cta) { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Signature write-on + star twinkle */
.mark, .foot-sig { position: relative; display: inline-block; }
.sig-glow { position: absolute; left: 95.1%; top: 22.1%; width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(255,226,170,.95) 0, rgba(179,139,85,.55) 35%, transparent 70%); opacity: 0; transform: scale(.2); }
.sig-glow::before, .sig-glow::after { content: ""; position: absolute; left: 50%; top: 50%; background: #FFE9BF; border-radius: 2px; transform: translate(-50%,-50%); }
.sig-glow::before { width: 2px; height: 30px; }
.sig-glow::after { width: 30px; height: 2px; }

/* Star divider */
.star-rule { display: flex; align-items: center; gap: 18px; color: var(--gold); margin: 0 auto clamp(40px, 6vw, 64px); max-width: 420px; }
.star-rule::before, .star-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); opacity: .6; }
.star-rule::after { background: linear-gradient(270deg, transparent, currentColor); }
.star-rule svg { width: 18px; height: 18px; flex: none; }

/* Footer signature */
.foot-thanks { display: flex; flex-direction: column; align-items: center; padding: clamp(40px, 6vw, 64px) 0 8px; text-align: center; border-bottom: 1px solid rgba(179,139,85,.25); margin-bottom: 22px; }
.foot-thanks img { height: clamp(56px, 8vw, 84px); width: auto; display: block; }
.foot-thanks p { margin: 10px 0 0; font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--champagne); }
.foot-thanks .foot-sig { margin: 0 auto; }

/* Reel hover preview */
.reel-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.reel-thumb video.is-playing { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* write-on */
  .js-motion .sig-write { clip-path: inset(-10% 100% -10% 0); }
  .js-motion .sig-write.is-in { animation: sigWrite 1.5s cubic-bezier(.6,.05,.3,1) .15s forwards; }
  .js-motion .sig-write.is-in + .sig-glow { animation: twinkle 1.2s ease 1.55s both, twinkleIdle 6s ease-in-out 3.5s infinite; }
  @keyframes sigWrite { to { clip-path: inset(-10% 0 -10% 0); } }
  @keyframes twinkle { 0% { opacity: 0; transform: scale(.2) rotate(0); } 45% { opacity: 1; transform: scale(1.25) rotate(45deg); } 100% { opacity: 0; transform: scale(.6) rotate(90deg); } }
  @keyframes twinkleIdle { 0%, 88%, 100% { opacity: 0; transform: scale(.4); } 94% { opacity: .85; transform: scale(1) rotate(45deg); } }

  /* scroll reveal */
  .js-motion [data-reveal] { opacity: 0; transform: translateY(48px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.16,.84,.24,1); transition-delay: var(--d, 0s); }
  .js-motion .marquee-list li[data-reveal] { transform: translateX(-64px); }
  .js-motion .reel-list li[data-reveal] { transform: translateX(48px); }
  .js-motion .cc-stats > div[data-reveal] { transform: translateY(24px) scale(.9); }
  .js-motion [data-reveal].is-in { opacity: 1; transform: none; }
  /* photo zoom-settle */
  .js-motion .about-photo[data-reveal] img, .js-motion .cc-main[data-reveal] img:first-child, .js-motion .reel-stage[data-reveal] video { transform: scale(1.12); transition: transform 1.6s cubic-bezier(.16,.84,.24,1); }
  .js-motion .about-photo.is-in img, .js-motion .cc-main.is-in img:first-child, .js-motion .reel-stage.is-in video { transform: none; }
  .js-motion .about-photo, .js-motion .cc-main, .js-motion .reel-stage { overflow: hidden; }
  /* photo cards cascade in */
  .js-motion .p-rail .p-card { opacity: 0; transform: translateX(60px); transition: opacity .8s ease, transform 1s cubic-bezier(.16,.84,.24,1); transition-delay: var(--d, 0s); }
  .js-motion .p-rail.is-in .p-card { opacity: 1; transform: none; }

  /* champion shimmer */
  .champ.is-in .champ-title { background: linear-gradient(100deg, var(--ivory) 34%, #E9C27E 44%, #FFF3D6 50%, #E9C27E 56%, var(--ivory) 66%); background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.6s ease .4s forwards; }
  @keyframes shine { to { background-position: 0 0; } }
  .champ.is-in .champ-star { animation: starPop .9s cubic-bezier(.2,.8,.2,1) .3s both, starSpin 6s linear 1.4s infinite; }
  @keyframes starSpin { to { transform: rotate(360deg); } }
  .champ.is-in { animation: champGlow 2.6s ease .4s both; }
  @keyframes champGlow { 0% { box-shadow: 0 0 0 rgba(179,139,85,0); } 40% { box-shadow: 0 0 60px rgba(179,139,85,.45); } 100% { box-shadow: 0 0 24px rgba(179,139,85,.15); } }
  @keyframes starPop { from { transform: scale(0) rotate(-90deg); } to { transform: none; } }

  .star-rule.is-in svg { animation: starPop .8s cubic-bezier(.2,.8,.2,1) both; }
}

/* Mobile fix: never allow sideways scrolling, and keep reveal motion vertical on small screens */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .js-motion .marquee-list li[data-reveal],
  .js-motion .reel-list li[data-reveal] { transform: translateY(32px); }
  .js-motion .p-rail .p-card { transform: translateY(24px); }
  .js-motion [data-reveal].is-in, .js-motion .p-rail.is-in .p-card { transform: none; }
}

/* Pen-trace signature */
.trace-on img[data-trace] { visibility: hidden; }
svg.sig-trace { width: auto; display: block; }
.mark svg.sig-trace { height: 48px; transition: height .3s ease; }
@media (max-width: 760px) { .mark svg.sig-trace { height: 40px; } }
.bar.is-scrolled .mark svg.sig-trace { height: 38px; }
.cc-main svg.cc-sig { width: 52%; max-width: 280px; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .sig-glow.go { animation: twinkle 1.2s ease both, twinkleIdle 6s ease-in-out 2s infinite; }
}
@media print { img[data-trace] { visibility: visible !important; } .sig-trace path { mask: none !important; } }
