/* FORME hero motion. Layout, typography and glass materials come from style.css. */
html:has(.hero-character-ready) { overflow-x: clip; }
.hero-character-ready { position: relative; --hero-out: 0; }
.hero.hero-character-ready :is(.hero-intro, h1 > span, .sticker, .handnote, .hero-bottom, .preview-card) { animation: none; }
.hero-character-ready:not(.hero-reduced):is([data-hero-phase="loading"], [data-hero-phase="away"]) :is(.capsule-entry, .hero-stage, .hero-bottom, .preview-strip) { opacity: 0; pointer-events: none; }
.hero-character-ready:not([data-hero-phase="live"]) :is(.star-drag, .eye-drag) { pointer-events: none; }
.hero-title-parallax { position: relative; }
.hero-glyph, .hero-letter { display: inline-block; }
.hero-character-ready[data-hero-phase="live"] .hero-glyph { pointer-events: auto; }
.hero-character-ready .hero-play {
  display: inline-block; vertical-align: baseline; padding: 0; background: none;
  color: inherit; letter-spacing: inherit; line-height: inherit; scale: 1;
}
.hero-character-ready[data-hero-phase="live"] .hero-play:enabled { pointer-events: auto; }
.hero-character-ready h1 em::after { content: none; }
.hero-title-mark {
  position: absolute; height: 9px; left: 1%; right: 3%; bottom: -2%; z-index: -1;
  transform: rotate(-1.5deg); transform-origin: left center;
  background: var(--yellow); border-radius: 65% 45% 50% 60%;
  box-shadow: 0 2px 3px rgba(255, 242, 160, .2); pointer-events: none;
}
.hero-title-exit {
  transform: translateY(calc(var(--hero-out) * var(--exit-title-y, 0) * 1px))
    scale(calc(1 + var(--hero-out) * var(--exit-title-scale, 0)));
}
.hero-bg-frame { position: fixed; inset: 0; overflow: clip; pointer-events: none; z-index: 0; }
.hero-bg-parallax { position: absolute; inset: 0; }
.hero-bg-frame .landscape { position: absolute; }
.hero-sun {
  position: absolute; left: 0; top: 0; width: min(76vmax, 1120px); aspect-ratio: 1;
  translate: -50% -50%; opacity: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle, #fff5b2 0%, #fff1c7ae 27%, #fff3c43d 48%, transparent 70%);
}
.hero-ambient { position: absolute; inset: 0; pointer-events: none; overflow: clip; }
.hero-mote-drift { position: absolute; opacity: 0; }
.hero-mote {
  display: block; width: 4px; height: 4px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 5px currentColor;
}
.hero-mote.hero-petal { width: 6px; height: 3px; border-radius: 70% 36% 64% 44%; }

/* Positioning shells retain the original anchors. Their children own every moving transform. */
.hero-character-ready .sticker:is(.sticker-star, .sticker-eyes) { display: block; transform: none; scale: 1; filter: none; transition: none; pointer-events: none; }
.hero-character-ready .sticker:focus-visible { outline: 0; }
.hero-character-ready .sticker:focus-visible :is(.star-drag, .eye-drag) { outline: 3px solid var(--yellow); outline-offset: 5px; border-radius: 16px; }
.hero-character-ready :is(.star-drag, .eye-drag) { pointer-events: auto; touch-action: none; }
.eye-drag, .eyes-entry, .eyes-mood, .eyes-stretch, .eyes-static { display: flex; align-items: center; }
.eyes-static { gap: 4px; position: relative; transform: rotate(var(--rotation)); }
.eye-follow, .eye-turn, .eye-blink, .eye-lid { display: block; transform-origin: center; }
.eye-follow { perspective: 680px; }
.hero-character-ready .eye { overflow: hidden; }
.hero-character-ready .pupil { left: 28.5%; top: 25.5%; transform: none; }
.hero-character-ready .pupil::after { content: none; }
.pupil-gaze { position: absolute; inset: 0; }
.pupil-shine { position: absolute; width: 22%; height: 19%; border-radius: 50%; left: 24%; top: 14%; background: #fdfcf7; }
.hero-character-ready .sticker .spark { pointer-events: none; }

.star-drag, .star-lift, .star-idle, .star-hover, .star-tilt, .star-flip, .star-static {
  display: block; position: relative; width: 100%; height: 100%;
}
.star-exit { transform: rotate(calc(var(--hero-out) * var(--exit-star-angle, 0) * 1deg)); }
.star-hover { perspective: 650px; }
.star-tilt { transform-style: preserve-3d; perspective: 650px; }
.star-flip { transform-style: preserve-3d; backface-visibility: hidden; }
.star-static { transform: rotate(var(--rotation)); }
.star-rays { position: absolute; inset: 0; display: block; pointer-events: none; }
.star-holo {
  position: absolute; inset: -70%; opacity: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(118deg, transparent 26%, #a7e7ff80 43%, #fff6c7d4 49%, #ffd3edb0 55%, transparent 69%);
}
.star-peel-shadow {
  position: absolute; z-index: -1; inset: 18% 8% 8%; border-radius: 50%; opacity: 0;
  box-shadow: 0 16px 28px #153949a0; pointer-events: none;
}
.star-label { pointer-events: none; padding-inline: 7%; z-index: 1; }
.hero-character-ready .sticker-star .star-label {
  inset: 15% 8%; padding: 0; width: 84%; height: 70%;
  text-align: center; white-space: nowrap;
}

.capsule-entry { position: relative; z-index: 81; width: max-content; max-width: 100%; margin-inline: auto; }
.hero-character-ready .hero-intro { position: relative; text-align: left; color: inherit; scale: 1; }
.hero-character-ready .mini-face::before, .hero-character-ready .mini-face::after { content: none; }
.mini-face .capsule-face { width: 100%; height: 100%; display: block; overflow: hidden; }
.capsule-face :is(.face-pupil, .face-pose) { transform-box: fill-box; transform-origin: center; }
.capsule-face .face-pose { opacity: 0; transition: opacity .24s ease-in-out; }
.capsule-face .face-pose[data-current] { opacity: 1; }
.mini-face[data-blinking] .face-pose { transition-duration: .095s; }
.capsule-face .face-line { fill: none; stroke: #113b55; stroke-width: 3.1; stroke-linecap: round; }
.capsule-face .face-smile { stroke-width: 3.5; }
.hero-reduced .capsule-face .face-pose { transition: none; }
.hero-intro small { position: relative; overflow: hidden; white-space: nowrap; }
.greeting-sizer { visibility: hidden; }
.greeting-value { position: absolute; inset: 0; }
.capsule-hand, .capsule-hello { position: absolute; pointer-events: none; opacity: 0; z-index: 2; }
.capsule-hand { bottom: calc(100% + 5px); left: 12%; font-size: 29px; transform-origin: 55% 90%; }
.capsule-hello { bottom: calc(100% + 6px); left: 29%; border-radius: 15px 15px 15px 3px; background: #fff3c1; color: #173b52; padding: 6px 12px; font-size: 14px; font-weight: 800; }

.card-entry, .card-exit, .card-parallax, .card-float, .card-fan, .card-tilt, .card-focus, .card-press { min-width: 0; position: relative; }
.card-entry { --exit-side: 0; }
.card-entry:first-child { --exit-side: -1; }
.card-entry:last-child { --exit-side: 1; }
.card-entry[data-focus="hover"] { z-index: 4; }
.card-entry[data-focus="selected"] { z-index: 5; }
.card-exit {
  transform: translate(calc(var(--hero-out) * var(--exit-card-x, 0) * var(--exit-side) * 1px),
    calc(var(--hero-out) * var(--exit-card-y, 0) * 1px));
}
.card-fan { perspective: 1000px; }
.preview-strip {
  --card-glow-color: #b9ec65;
  --card-shadow-hover: 0 24px 44px 0 #162b3363, 0 0 24px 0 var(--card-glow-color);
  --card-reflected-light: #f1fbcf;
}
.preview-strip .preview-card::after { background: var(--card-reflected-light); }
.hero-character-ready .preview-card {
  width: 100%; scale: 1; transition: none;
  transform: translateY(var(--lift, 0px)) rotate(var(--rot, 0deg));
}
.hero-character-ready .card-mori { --rot: -4.5deg; --lift: 0px; }
.hero-character-ready .card-offbeat { --rot: 3deg; --lift: 9px; }
.hero-character-ready .card-form { --rot: 4deg; --lift: 7px; }
.hero-character-ready .preview-card:is(:hover, :focus-visible, .selected) {
  scale: 1; transform: translateY(var(--lift, 0px)) rotate(var(--rot, 0deg));
}
.hero-character-ready .preview-card img,
.hero-character-ready .preview-card:is(:hover, .selected) img { transform: none; transition: none; }
.hero-character-ready .preview-card:hover .view-mark { transform: none; }
.hero-character-ready .preview-card.selected { outline: 2px solid var(--yellow); outline-offset: 3px; }
.card-effects, .card-glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.card-effects { overflow: hidden; z-index: 1; }
.card-shade, .card-sweep { position: absolute; inset: 0; opacity: 0; }
.card-shade { background: #10202c; }
.card-sweep { background: linear-gradient(115deg, transparent 24%, #ffffff13 40%, #ffffffb8 49%, #ffffff35 56%, transparent 73%); mix-blend-mode: screen; }
.card-glow { opacity: 0; box-shadow: var(--card-shadow-hover); }
.card-chip-motion, .card-meta-motion { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.card-chip-motion { transform-origin: 18% 5%; }
.card-meta-motion { transform-origin: 86% 88%; }
.card-arrow-motion { display: inline-flex; }

.hero-effects { position: absolute; inset: 0; z-index: 12; overflow: clip; pointer-events: none; }
.hero-ripple, .hero-confetti { position: absolute; pointer-events: none; }
.hero-ripple { width: 32px; height: 32px; margin: -16px; border: 2px solid currentColor; border-radius: 50%; }
.hero-confetti { margin: -8px; font-size: 16px; text-shadow: 0 2px 4px #344b6850; }
.hero-debug {
  position: fixed; z-index: 30; top: 12px; left: 12px; pointer-events: none;
  padding: 7px 10px; border-radius: 8px; color: #fff; background: #17374ae8;
  font: 11px/1.45 ui-monospace, monospace; white-space: pre;
}
.hero-cursor, .hero-cursor * { pointer-events: none; }
.hero-cursor { position: fixed; z-index: 80; inset: 0; opacity: 0; transition: opacity .12s; }
.hero-cursor[data-active] { opacity: 1; }
.hero-cursor[data-capsule-safe] { visibility: hidden; }
.hero-cursor-dot, .hero-cursor-ring { position: absolute; left: 0; top: 0; translate: -50% -50%; border-radius: 50%; }
.hero-cursor-dot { width: var(--cursor-dot); height: var(--cursor-dot); background: #fff3a5; box-shadow: 0 1px 6px #1c3d5265; }
.hero-cursor[data-labeled] .hero-cursor-dot { opacity: .24; }
.hero-cursor-ring { width: var(--cursor-ring); height: var(--cursor-ring); }
.hero-cursor-shape {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; border: 1px solid #fffc;
  background: #e9f5ff42; backdrop-filter: blur(6px); box-shadow: 0 4px 13px #13375240;
}
.hero-cursor-label { display: block; color: #0c314b; font: 800 10px/1 Arial, sans-serif; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero.hero-cursor-active, .hero.hero-cursor-active * { cursor: none !important; }
  .hero-character-ready .work-link > span { transition: none; }
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .hero-cursor { display: none; }
}
@media (max-width: 767px) {
  .eyes-static { gap: 2px; }
  .card-entry { flex: 0 0 83%; scroll-snap-align: center; }
  .hero-character-ready .card-mori { --rot: -3deg; --lift: 0px; }
  .hero-character-ready :is(.card-offbeat, .card-form) { --rot: 2deg; --lift: 0px; }
  .hero-title-mark { height: 5px; bottom: -3%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-character-ready .preview-card.selected { outline-offset: 2px; }
}
@media print {
  .hero-character-ready :is(.capsule-entry, .hero-stage, .hero-bottom, .preview-strip) { opacity: 1 !important; }
  .hero-effects, .hero-debug, .hero-cursor, .hero-ambient, .hero-sun { display: none; }
  .hero-bg-frame { position: absolute; }
}
