/* =========================================================================
   MANEE BRIDES · WEBSITE-DYNAMIC-V2 (官网动态化二期)
   Spec: 曼妮全线设计系统 v1 · 候选一「冰翡水晶 · 光学雕塑」主干
   Motion law: transform + opacity ONLY · cubic-bezier(0.22,1,0.36,1) heavy-damping
   References (manee-design-resources):
     - Shimmer / border-beam button logic: Magic UI / Aceternity "Shimmer Button" (design system §1.2) + https://cta.gallery
     - Breathing halo + Ken Burns: design system §1.2 row 2
     - Glass: https://omnira.one , https://csstools.io/glassmorphism
     - Shader (optional, desktop only): https://movin.design/shaders (Breeze)
   ========================================================================= */

/* ---------- 0. Tokens: warm champagne v5.1 -> 冰翡水晶 (re-map, copy untouched) ---------- */
:root {
  --jade-900: #091E18;
  --jade-800: #0E3329;
  --jade-500: #2B7A65;
  --jade-400: #4E9A84;
  --jade-300: #6CC4AB;
  --rose-500: #C48B80;
  --rose-200: #E5C2B9;
  --pearl-warm: #FAF8F5;

  --bg-ivory: #F5FAF8;
  --bg-champagne: #E1ECE7;
  --bg-champagne-soft: #EDF4F1;
  --bg-linen: #DCE8E3;
  --surface-ivory: #F9FCFB;
  --glass-bg: rgba(248, 252, 250, 0.78);
  --glass-bg-strong: rgba(250, 253, 252, 0.92);

  --line-soft: rgba(43, 122, 101, 0.20);
  --line-strong: rgba(43, 122, 101, 0.40);
  --line-hair: rgba(43, 122, 101, 0.14);
  --shadow-card:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.98),
    0 1px 3px rgba(9, 30, 24, 0.05),
    0 16px 38px -18px rgba(14, 51, 41, 0.22);
  --shadow-card-hover:
    inset 0 1.5px 0 #FFFFFF,
    0 4px 12px rgba(9, 30, 24, 0.07),
    0 22px 46px -18px rgba(14, 51, 41, 0.30);

  --ink-900: #091E18;
  --ink-700: #27473E;
  --ink-500: #46685E;
  --ink-400: #5E7D73;

  --champagne-gold: #F5EFEA;
  --champagne-gold-bright: #FFFFFF;
  --champagne-mid: #C9D8D2;
  --champagne-deep: #2B7A65;
  --champagne-wash: rgba(198, 216, 212, 0.45);

  --rosegold: #C48B80;
  --rosegold-deep: #9A5A50;
  --rosegold-soft: rgba(196, 139, 128, 0.10);
  --rosegold-border: rgba(196, 139, 128, 0.42);

  --ok-color: #0F543F;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-release: cubic-bezier(0.34, 1.32, 0.64, 1); /* only for short button release */
}

html { background-color: var(--bg-ivory); }
body {
  background:
    radial-gradient(84% 48% at 10% 4%, rgba(255, 255, 255, 0.92) 0%, transparent 58%),
    radial-gradient(72% 48% at 90% 12%, rgba(198, 216, 212, 0.62) 0%, transparent 56%),
    radial-gradient(78% 46% at 50% 94%, rgba(206, 226, 219, 0.55) 0%, transparent 58%),
    linear-gradient(168deg, #F5FAF8 0%, #ECF3F0 48%, #E1ECE7 100%);
}
.ambient-veil {
  background: linear-gradient(180deg, rgba(245, 250, 248, 0.20) 0%, rgba(236, 243, 240, 0.40) 52%, rgba(225, 236, 231, 0.52) 100%);
}
/* GPU-layer drifting light orbs = shader fallback (zero WebGL, zero heat) */
.ambient-veil::before, .ambient-veil::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  will-change: transform; pointer-events: none;
}
.ambient-veil::before {
  left: -30vmax; top: -22vmax;
  background: radial-gradient(closest-side, rgba(108, 196, 171, 0.20), transparent 70%);
  animation: orb-a 26s ease-in-out infinite alternate;
}
.ambient-veil::after {
  right: -32vmax; bottom: -26vmax;
  background: radial-gradient(closest-side, rgba(229, 194, 185, 0.26), transparent 70%);
  animation: orb-b 32s ease-in-out infinite alternate;
}
@keyframes orb-a { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.08); } }
@keyframes orb-b { to { transform: translate3d(-12vmax, -8vmax, 0) scale(1.06); } }

:focus-visible { outline-color: var(--jade-500); }

.glass::before {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(108,196,171,0.30) 46%, rgba(196,139,128,0.20) 78%, rgba(255,255,255,0.94));
}
.icon-chip { background: linear-gradient(145deg, #FFFFFF 0%, #E3EFEA 100%); border-color: rgba(43,122,101,0.28); box-shadow: inset 0 1.5px 0 #fff, 0 8px 18px -10px rgba(14,51,41,0.30); }
.icon-chip.rosegold-tint { background: linear-gradient(145deg, #FFFCFB 0%, #F6E7E3 100%); }
.icon-chip img { filter: saturate(0.9) contrast(1.04) drop-shadow(0 3px 5px rgba(14,51,41,0.20)); }
.icon-chip.rosegold-tint img { filter: sepia(0.35) hue-rotate(-14deg) saturate(1.1) contrast(1.04) drop-shadow(0 3px 5px rgba(154,90,80,0.22)); }
.eyebrow { color: var(--jade-500); }
.eyebrow .rg-dot { background: var(--rose-500); }
.hero-stage { background: radial-gradient(85% 65% at 85% 15%, rgba(198,216,212,0.55) 0%, transparent 58%), rgba(248,252,250,0.84); }
.hero-frame { background: var(--pearl-warm); border-color: rgba(255,255,255,0.96); box-shadow: 0 18px 40px -18px rgba(9,30,24,0.30); }
.hero-frame::after { background: linear-gradient(180deg, transparent 0%, rgba(9,30,24,0.16) 100%); }
.frame-pill, .photo-caption-pill, .hero-frame-dock { background: rgba(250,253,252,0.88); }
.frame-pill.accent { color: var(--jade-500); border-color: rgba(43,122,101,0.34); }
.editorial-photo { background: var(--pearl-warm); border-color: rgba(43,122,101,0.26); box-shadow: 0 16px 36px -18px rgba(9,30,24,0.28); }
.phone-stage {
  background:
    radial-gradient(75% 65% at 50% 25%, rgba(255,255,255,0.94) 0%, transparent 66%),
    radial-gradient(65% 55% at 80% 85%, rgba(196,139,128,0.12) 0%, transparent 60%),
    linear-gradient(155deg, #F9FCFB 0%, #DCE9E4 100%);
  border-color: rgba(43,122,101,0.26);
}
.phone-mockup {
  background: linear-gradient(145deg, #12443A 0%, #091E18 52%, #0E3329 100%);
  box-shadow: 0 0 0 1px rgba(201,216,210,0.55), inset 0 1px 1px rgba(255,255,255,0.24), 0 24px 48px -18px rgba(9,30,24,0.42);
}
.phone-screen { background: var(--pearl-warm); }

/* Ice-jade rail on top-of-card hairlines */
.rg-hairline { background: linear-gradient(90deg, var(--rose-500), var(--jade-300) 60%, transparent) !important; }
.nav-links a:hover { color: var(--jade-500); }
.site-nav { box-shadow: var(--shadow-card); }

dialog.app-dialog { background: rgba(250,253,252,0.98); box-shadow: 0 28px 64px -18px rgba(9,30,24,0.36); }
dialog.app-dialog::backdrop { background: rgba(9,30,24,0.40); }

/* ---------- 1. Buttons: 流光 / 反馈 / 弹性 (transform + opacity only) ---------- */
.btn-primary, .btn-secondary, .tier-card, .store-btn, .slider-reset-btn {
  position: relative; isolation: isolate; overflow: hidden;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition:
    transform 420ms var(--ease-release),
    box-shadow 280ms var(--ease),
    border-color 280ms var(--ease),
    color 280ms var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, #0E3329 0%, #091E18 100%);
  border: 1px solid rgba(229, 194, 185, 0.34);
  color: var(--champagne-gold);
  box-shadow: inset 0 1.5px 0 rgba(245,239,234,0.22), inset 0 -2px 0 rgba(43,122,101,0.55), 0 14px 28px -12px rgba(9,30,24,0.52);
}
.btn-primary:hover {
  color: #fff; border-color: rgba(229,194,185,0.70);
  transform: translate3d(0, -1px, 0);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.30), inset 0 -2px 0 rgba(78,154,132,0.70), 0 18px 34px -12px rgba(9,30,24,0.58);
}
.btn-primary:active, .btn-primary.is-pressed {
  transform: translate3d(0, 1.5px, 0) scale(0.985);
  transition-duration: 90ms, 90ms, 90ms, 90ms;
}
.btn-secondary { background: #FFFFFF; border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-ivory); border-color: var(--jade-400); transform: translate3d(0,-1px,0); }
.btn-secondary:active, .btn-secondary.is-pressed { transform: translate3d(0,1.5px,0) scale(0.985); transition-duration: 90ms; }
.tier-card:active, .tier-card.is-pressed { transform: translate3d(0,1.5px,0) scale(0.99); transition-duration: 90ms; }

/* 105° champagne-silver mirror sweep */
.btn-primary::after, .btn-secondary::after, .tier-card.featured .tier-pill::after {
  content: ""; position: absolute; inset: -2px auto -2px 0; width: 38%;
  z-index: 1; pointer-events: none; will-change: transform; opacity: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.0) 20%, rgba(245,239,234,0.55) 50%, rgba(255,255,255,0) 80%, transparent 100%);
  transform: translate3d(-140%, 0, 0) skewX(-14deg);
}
.btn-secondary::after { background: linear-gradient(105deg, transparent 0%, rgba(108,196,171,0.22) 50%, transparent 100%); }
.btn-primary:hover::after, .btn-secondary:hover::after, .btn-primary.is-pressed::after {
  opacity: 1; transform: translate3d(340%, 0, 0) skewX(-14deg);
  transition: transform 900ms var(--ease), opacity 120ms linear;
}
/* idle glint on the hero CTA, runs only while on-screen (.is-live set by JS) */
.btn-primary.glint.is-live::after { animation: glint 6.4s var(--ease) 1.4s infinite; }
@keyframes glint {
  0% { opacity: 1; transform: translate3d(-140%,0,0) skewX(-14deg); }
  22% { opacity: 1; transform: translate3d(340%,0,0) skewX(-14deg); }
  23%, 100% { opacity: 0; transform: translate3d(340%,0,0) skewX(-14deg); }
}
/* trailing arrow micro-shift */
.btn-primary > span[aria-hidden="true"], .btn-secondary > span[aria-hidden="true"] { display: inline-block; transition: transform 320ms var(--ease); }
.btn-primary:hover > span[aria-hidden="true"], .btn-secondary:hover > span[aria-hidden="true"] { transform: translate3d(3px, -1px, 0); }

/* tap ripple (JS appends .rip) */
.rip {
  position: absolute; z-index: 0; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 50%; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(108,196,171,0.55), rgba(108,196,171,0));
  transform: translate3d(var(--rx,0), var(--ry,0), 0) scale(0); opacity: 0.9;
  animation: rip 640ms var(--ease) forwards;
}
.btn-primary .rip { background: radial-gradient(closest-side, rgba(245,239,234,0.55), rgba(245,239,234,0)); }
@keyframes rip { to { transform: translate3d(var(--rx,0), var(--ry,0), 0) scale(var(--rs, 14)); opacity: 0; } }

.btn-primary > *, .btn-secondary > * { position: relative; z-index: 2; }

/* ---------- 2. Dynamic characters 动态角色 ---------- */
.char { --tx: 0deg; --ty: 0deg; }
/* 2a. breathing double halo */
.hero-stage { isolation: isolate; }
.halo {
  position: absolute; inset: -7px; border-radius: 34px; pointer-events: none; z-index: -1;
  will-change: transform, opacity;
  border: 1px solid rgba(108,196,171,0.55);
  box-shadow: 0 0 34px -4px rgba(108,196,171,0.38), inset 0 0 22px -6px rgba(229,194,185,0.35);
  opacity: 0.42; animation: breathe 4.2s var(--ease) infinite alternate paused;
}
.halo.b { inset: -14px; border-radius: 40px; border-color: rgba(229,194,185,0.50); box-shadow: 0 0 40px -6px rgba(229,194,185,0.35); animation-delay: -2.1s; }
.is-live .halo, .halo.is-live { animation-play-state: running; }
@keyframes breathe { from { transform: scale(0.992); opacity: 0.42; } to { transform: scale(1.008); opacity: 0.95; } }

/* 2b. Ken Burns micro-push (8s) */
.kb { animation: kenburns 8s ease-in-out infinite alternate paused; will-change: transform; transform-origin: 50% 30%; }
.is-live .kb, .kb.is-live { animation-play-state: running; }
@keyframes kenburns { from { transform: scale(1.015); } to { transform: scale(1.045); } }
.editorial-photo img.kb { transition: none; }
.feature-card:hover .editorial-photo img.kb { transform: none; }

/* 2c. entrance: veil-lift + one-time light sweep across the portrait */
.sheen { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; border-radius: inherit; }
.sheen::before {
  content: ""; position: absolute; inset: -10% auto -10% 0; width: 46%; will-change: transform, opacity; opacity: 0;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.46) 50%, transparent);
  transform: translate3d(-160%, 0, 0) skewX(-14deg);
}
.reveal.is-visible .sheen::before, .sheen.go::before { animation: sheen 1500ms var(--ease) 380ms 1 both; }
@keyframes sheen { 0% { opacity: 1; transform: translate3d(-160%,0,0) skewX(-14deg); } 100% { opacity: 0; transform: translate3d(330%,0,0) skewX(-14deg); } }
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .char-in { opacity: 0; transform: translate3d(0, 26px, 0) scale(0.97); transition: opacity 900ms var(--ease), transform 1100ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
  html.js-reveal .char-in.is-visible { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

/* 2d. hover tilt (fine pointer, JS sets --tx/--ty) + press feedback */
.char[data-tilt] { transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform 600ms var(--ease); will-change: transform; transform-style: flat; }
.char[data-tilt].tilting { transition: transform 90ms linear; }
.phone-mockup.char { transform: perspective(900px) translate3d(0, var(--lift, 0px), 0) rotateX(var(--tx)) rotateY(var(--ty)); }
.feature-card:hover .phone-mockup.char { --lift: -3px; transform: perspective(900px) translate3d(0, -3px, 0) rotateX(var(--tx)) rotateY(var(--ty)); }
.char:active { --lift: 0px; }
@media (hover: none) {
  .char[data-tilt]:active { transform: perspective(900px) scale(0.988); transition-duration: 120ms; }
}

/* 2e. scroll-driven depth (native, zero JS) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .depth-img { animation: depth linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes depth { from { translate: 0 -2.4%; } to { translate: 0 2.4%; } }
    .depth-card { animation: depth-card linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    @keyframes depth-card { from { opacity: .0; translate: 0 22px; scale: .975; } to { opacity: 1; translate: 0 0; scale: 1; } }
    .read-progress { animation: progress linear both; animation-timeline: scroll(root); }
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}
.read-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 40; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0); will-change: transform;
  background: linear-gradient(90deg, var(--rose-500), var(--jade-300), var(--jade-500));
}

/* 2f. presence sound-bars inside the app preview */
.vu { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 8px; vertical-align: middle; }
.vu i { width: 2px; height: 12px; border-radius: 2px; background: var(--jade-300); transform-origin: 50% 100%; transform: scaleY(0.32); will-change: transform; animation: vu 1.2s var(--ease) infinite alternate paused; }
.vu i:nth-child(2) { animation-delay: -.3s; background: var(--rose-200); }
.vu i:nth-child(3) { animation-delay: -.7s; }
.vu i:nth-child(4) { animation-delay: -.5s; background: var(--rose-200); }
.vu i:nth-child(5) { animation-delay: -.9s; }
.is-live .vu i { animation-play-state: running; }
@keyframes vu { from { transform: scaleY(0.32); } to { transform: scaleY(1); } }
.phone-hud-title i, .photo-caption-pill i { background: var(--jade-300); }
.photo-caption-pill i { animation: ping 2.6s var(--ease) infinite paused; }
.is-live .photo-caption-pill i { animation-play-state: running; }
@keyframes ping { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }

/* ---------- 3. Dynamic video slots 动态视频位 ---------- */
.reel-wrap { container-type: inline-size; }
.reel-rail {
  display: flex; gap: 14px; margin-inline: -16px; padding: 4px 16px 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 16px;
}
.reel-rail::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .reel-rail { margin-inline: 0; padding-inline: 0; overflow: visible; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } }
.vslot {
  position: relative; flex: 0 0 min(66vw, 280px); scroll-snap-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 768px) { .vslot { flex: initial; } }
.vslot-frame {
  position: relative; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #F9FCFB, #DCE9E4);
  border: 1px solid rgba(43,122,101,0.26);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.9), 0 18px 38px -18px rgba(9,30,24,0.34);
  cursor: pointer; padding: 0; text-align: left; color: inherit;
  transition: transform 600ms var(--ease), box-shadow 400ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.vslot-frame:active { transform: scale(0.985); transition-duration: 120ms; }
.vslot-media { position: absolute; inset: 0; z-index: 0; }
.vslot-media img, .vslot-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transform: scale(1.015); display: block; }
.vslot-media video { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease); }
.vslot.is-playing .vslot-media video { opacity: 1; }
.vslot-media img { animation: kenburns 8s ease-in-out infinite alternate paused; will-change: transform; }
.vslot.is-live .vslot-media img { animation-play-state: running; }
.vslot.is-playing .vslot-media img { animation: none; }
.vslot-frame::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(9,30,24,0.10) 0%, transparent 22%, transparent 60%, rgba(9,30,24,0.40) 100%); }
/* four-corner viewfinder ticks */
.vslot-ticks { position: absolute; inset: 10px; z-index: 3; pointer-events: none; }
.vslot-ticks i { position: absolute; width: 14px; height: 14px; border: 1.5px solid rgba(255,255,255,0.88); filter: drop-shadow(0 1px 2px rgba(9,30,24,0.35)); }
.vslot-ticks i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 5px; }
.vslot-ticks i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 5px; }
.vslot-ticks i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 5px; }
.vslot-ticks i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 5px; }
/* breathing aurora hairline */
.vslot-beam { position: absolute; left: 14px; right: 14px; top: 8px; height: 3px; z-index: 4; border-radius: 3px; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; background: linear-gradient(90deg, transparent, var(--rose-200), var(--jade-300), transparent); animation: beam 3.6s var(--ease) infinite alternate paused; }
.vslot.is-live .vslot-beam { animation-play-state: running; }
@keyframes beam { from { transform: scaleX(0.92); opacity: .45; } to { transform: scaleX(1); opacity: 1; } }
.vslot-play {
  position: absolute; z-index: 4; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(14,51,41,0.30); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.7);
  transition: transform 500ms var(--ease), opacity 400ms var(--ease);
}
.vslot-play::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.45); animation: breathe 3.2s var(--ease) infinite alternate paused; will-change: transform, opacity; }
.vslot.is-live .vslot-play::before { animation-play-state: running; }
.vslot-play svg { width: 20px; height: 20px; margin-left: 3px; }
.vslot-frame:hover .vslot-play { transform: scale(1.06); }
.vslot.is-playing .vslot-play { opacity: 0; transform: scale(0.8); pointer-events: none; }
.vslot-frame.nudge .vslot-play { animation: nudge 520ms var(--ease); }
@keyframes nudge { 0% { transform: scale(1); } 35% { transform: scale(0.88); } 100% { transform: scale(1); } }
.vslot-badge {
  position: absolute; z-index: 4; left: 14px; top: 20px; padding: 4px 10px; border-radius: 999px;
  font: 700 10.5px/14px var(--font-mono); letter-spacing: 0.12em; color: var(--jade-900);
  background: rgba(250,253,252,0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.92);
}
.vslot-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.vslot-cap b { font: 700 11px/16px var(--font-mono); letter-spacing: 0.14em; color: var(--jade-500); }
.vslot-cap span { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.reel-hint { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.reel-hint i { width: 6px; height: 6px; border-radius: 6px; background: rgba(43,122,101,0.28); transform: scale(1); transition: transform 400ms var(--ease), background 400ms var(--ease); }
.reel-hint i.on { background: var(--jade-500); transform: scale(1.35); }
@media (min-width: 768px) { .reel-hint { display: none; } }

/* ---------- 4. Native-feel transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  html { animation: page-in 700ms var(--ease) both; }
  @keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
  dialog.app-dialog { transition: opacity 340ms var(--ease), transform 440ms var(--ease), overlay 340ms allow-discrete, display 340ms allow-discrete; opacity: 0; transform: translate3d(0, 22px, 0) scale(0.97); }
  dialog.app-dialog[open] { opacity: 1; transform: translate3d(0,0,0) scale(1); }
  @starting-style { dialog.app-dialog[open] { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.97); } }
  dialog.app-dialog::backdrop { transition: opacity 340ms var(--ease), overlay 340ms allow-discrete, display 340ms allow-discrete; opacity: 0; }
  dialog.app-dialog[open]::backdrop { opacity: 1; }
  @starting-style { dialog.app-dialog[open]::backdrop { opacity: 0; } }
  /* staggered children inside revealed blocks */
  html.js-reveal .stagger > * { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 700ms var(--ease), transform 800ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 120ms); }
  html.js-reveal .stagger.is-visible > * { opacity: 1; transform: none; }
  /* hairline draw */
  html.js-reveal .reveal .rg-hairline { transform: scaleX(0); transform-origin: 0 50%; transition: transform 900ms var(--ease) 260ms; }
  html.js-reveal .reveal.is-visible .rg-hairline { transform: scaleX(1); }
}
.site-nav { transition: transform 420ms var(--ease), box-shadow 420ms var(--ease); will-change: transform; }
.site-nav.is-scrolled { box-shadow: var(--shadow-card-hover); }

/* ---------- 5. Safety: lite mode + reduced motion = static, never jank ---------- */
html.lite .halo.b, html.lite .ambient-veil::before, html.lite .ambient-veil::after, html.lite .vu i,
html.lite .btn-primary.glint::after, html.lite .vslot-beam { animation: none !important; }
html.lite .kb, html.lite .vslot-media img { animation-duration: 16s !important; }
html.lite .glass, html.lite .hero-frame-dock, html.lite .frame-pill, html.lite .photo-caption-pill { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (prefers-reduced-motion: reduce) {
  .halo, .kb, .vu i, .vslot-beam, .vslot-media img, .ambient-veil::before, .ambient-veil::after, .photo-caption-pill i, .vslot-play::before { animation: none !important; }
  .btn-primary::after, .btn-secondary::after, .sheen::before, .read-progress { display: none; }
  .char[data-tilt] { transform: none; }
  html { animation: none; }
}
