/* Prestige Marble & Tile v2 — effects. Everything here is gated by html.fx
   (set in the head, dropped if fx.js never runs) and skipped for reduced motion. */

/* ---------- intro: the backlight switches on behind the slab ---------- */
.lamp { position: fixed; inset: 0; z-index: 90; background: #0c0805; display: none; pointer-events: none; }
.intro .lamp { display: block; }
.lamp i { position: absolute; left: 50%; top: 50%; width: min(520px, 70vw); height: 1px; margin-left: calc(min(520px, 70vw) / -2);
  background: linear-gradient(90deg, transparent, #ffd49a, transparent); box-shadow: 0 0 24px 2px rgba(255, 190, 110, .6);
  transform: scaleX(0); animation: lampLine .9s .15s var(--ease) forwards; }
.lit .lamp { opacity: 0; transition: opacity 1.4s var(--ease); }
.lit .lamp i { transform: scaleX(1) scaleY(30); opacity: 0; transition: transform 1.1s var(--ease), opacity .9s; animation: none; }
@keyframes lampLine { to { transform: scaleX(1); } }
.fx.intro .slab { transform: scale(1.1); }
.fx.intro.lit .slab { transform: none; transition: transform 2.8s var(--ease); }

/* ---------- split lines rise into place ---------- */
.split .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.split .ln > span { display: inline-block; }
.fx .split .ln > span { transform: translate3d(0, 108%, 0); transition: transform 1.25s var(--ease); }
.fx .split.in .ln > span { transform: none; }
.fx .split.in .ln:nth-child(2) > span { transition-delay: .09s; }
.fx .split.in .ln:nth-child(3) > span { transition-delay: .18s; }

/* hero bits wait for the light */
.fx .hero-place, .fx .hero-foot, .fx .proof { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.fx.ready .hero-place { opacity: 1; transform: none; }
.fx.ready .hero-foot { opacity: 1; transform: none; transition-delay: .35s; }
.fx.ready .proof { opacity: 1; transform: none; transition-delay: .5s; }
.fx .proof { border-top-color: transparent; position: relative; }
.fx .proof::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; transition: transform 1.6s .6s var(--ease); }
.fx.ready .proof::before { transform: scaleX(1); }

/* ---------- words light up as you read ---------- */
.fx .reveal-words .wd { color: rgba(241, 231, 216, .2); transition: color .5s; }
.fx .reveal-words .wd.on { color: var(--trav); }

/* ---------- soft entrances for blocks (one per group, not per element) ---------- */
.fx .rise { opacity: 0; transform: translate3d(0, 40px, 0); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.fx .rise.in { opacity: 1; transform: none; }
.fx .svc li { opacity: 0; transform: translate3d(0, 60px, 0); transition: opacity 1s var(--ease), transform 1.3s var(--ease); }
.fx .svc.in li { opacity: 1; transform: none; }
.fx .svc.in li:nth-child(2) { transition-delay: .08s; } .fx .svc.in li:nth-child(3) { transition-delay: .16s; }
.fx .svc.in li:nth-child(4) { transition-delay: .24s; } .fx .svc.in li:nth-child(5) { transition-delay: .32s; } .fx .svc.in li:nth-child(6) { transition-delay: .4s; }

/* ---------- cursor (mouse only) ---------- */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor b { position: absolute; inset: 0; border: 1px solid rgba(227, 165, 92, .75); border-radius: 50%; display: grid; place-items: center; font: 600 .7rem/1 var(--body); color: transparent; transition: transform .45s var(--ease), background .35s, color .25s, border-color .35s; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--honey); }
.cursor.on, .cursor-dot.on { opacity: 1; }
.cursor.big b { transform: scale(1.5); background: rgba(227, 165, 92, .1); }
.cursor.view b { transform: scale(2); background: rgba(241, 231, 216, .92); border-color: transparent; color: #1e140c; }
.cursor.view + .cursor-dot, .cursor.drag + .cursor-dot { opacity: 0; }
.cursor.press b { transform: scale(.8); }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select, .has-cursor iframe { cursor: auto; }

/* ---------- magnetic buttons ---------- */
.magnetic { will-change: transform; transition: transform .6s var(--ease), box-shadow .4s, border-color .3s, background .3s; }
.magnetic span { display: inline-block; transition: transform .6s var(--ease); }

/* ---------- film grain, static ---------- */
.fx body::after { content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- progress hairline ---------- */
.progress { position: fixed; left: 0; top: 0; z-index: 45; height: 2px; width: 100%; background: linear-gradient(90deg, var(--ember), #ffd49a); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* ---------- screenshots and reduced motion ---------- */
.shot .hero { min-height: 0; padding-top: 160px; }
.shot .lamp, .shot .scroll-cue { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
