/* ==========================================================================
   acceleryate.com — motion layer (v3)
   Everything here builds on the live page's own styles. Without JS, without
   WebGL, or with reduced motion, the page falls back to the live layout.
   ========================================================================== */

/* the live page sets body{overflow-x:hidden}, which silently turns body into a scroll box and
   breaks position:sticky. clip hides sideways overflow the same way without doing that. */
.anim body { overflow-x: clip; }

/* ---- the moving grid (WebGL, transparent, sits between the page glow and the content) ---- */
#grid { position: fixed; inset: 0; width: 100%; height: 100vh; z-index: -1; display: none; pointer-events: none; }
.anim #grid { display: block; }
.anim.gl-on body::before { opacity: 0; transition: opacity .8s var(--ease); }

/* DOM planes standing on the grid, projected with the grid's own camera */
.floor3d { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
.anim .floor3d { display: block; }
.plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; backface-visibility: hidden; -webkit-backface-visibility: hidden; visibility: hidden; }
.plane.ref { backface-visibility: visible; -webkit-backface-visibility: visible; -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.5) 0%, rgba(0,0,0,.16) 34%, transparent 70%); mask-image: linear-gradient(to top, rgba(0,0,0,.5) 0%, rgba(0,0,0,.16) 34%, transparent 70%); }
[data-theme="light"] .plane.ref { -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.32) 0%, rgba(0,0,0,.1) 34%, transparent 66%); mask-image: linear-gradient(to top, rgba(0,0,0,.32) 0%, rgba(0,0,0,.1) 34%, transparent 66%); }

/* wall cards: real thumbnail + creator caption (sized in local px; the projection scales them) */
.card3d { width: 640px; height: 456px; }
.card3d .thumb { position: relative; width: 640px; height: 360px; border-radius: 22px; overflow: hidden; background: var(--bg-2); box-shadow: 0 0 0 2px var(--border-2), 0 40px 80px -30px rgba(0,0,0,.8); }
.card3d .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card3d .thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 32%); pointer-events: none; }
.card3d .cap { display: flex; align-items: center; gap: 18px; height: 96px; padding: 20px 8px 0; box-sizing: border-box; }
.card3d .cap .who { min-width: 0; }
.card3d .cap b, .card3d .cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card3d .cap .pic { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--green-deep), #064e3b); box-shadow: 0 0 0 2px var(--border-2); }
.card3d .cap .pic img { width: 100%; height: 100%; object-fit: cover; }
.card3d .cap b { display: block; font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; color: var(--text); }
.card3d .cap span { display: block; font-family: var(--mono); font-size: 22px; line-height: 1.3; color: var(--text-3); margin-top: 2px; }
.card3d .thumb { transition: box-shadow .45s var(--ease); }
.card3d.hot .thumb { box-shadow: 0 0 0 4px var(--green), 0 0 60px -6px rgba(16,185,129,.55), 0 40px 80px -30px rgba(0,0,0,.8); }
.card3d.hot .cap b { color: var(--green-light); }
[data-theme="light"] .card3d.hot .cap b { color: var(--green-deep); }
.card3d.ref .cap { visibility: hidden; }
.screen3d { width: var(--scr-w, 360px); }
.screen3d .video-card { max-width: none; width: var(--scr-w, 360px); margin: 0; }
.screen3d.ref .poster { width: var(--scr-w, 360px); aspect-ratio: 9 / 16; border-radius: var(--radius); background: var(--bg-2) center / cover no-repeat; }

/* cards that sit over the grid get a frosted base so text stays easy to read */
.anim { --glass: rgba(8, 8, 10, .58); }
.anim[data-theme="light"] { --glass: rgba(255, 255, 255, .7); }
.anim .price-row, .anim .stat, .anim .pack-card, .anim .price-card, .anim .cta-card, .anim .faq {
  background-color: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
/* phones: a denser base instead of live blur (cheaper while the grid moves underneath) */
@media (max-width: 768px) {
  .anim { --glass: rgba(8, 8, 10, .8); }
  .anim[data-theme="light"] { --glass: rgba(255, 255, 255, .86); }
  .anim .price-row, .anim .stat, .anim .pack-card, .anim .price-card, .anim .cta-card, .anim .faq { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---- pinned scenes ---- */
.anim .scene > .stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.anim .scene > .stage.wrap { max-width: none; padding: 0; }

/* creators: the wall of real thumbnails */
.anim #creators { height: 340vh; padding: 0; }
.anim #creators::before { display: none; }
.anim #creators .shead { position: absolute; left: 50%; top: calc(84px + 3vh); transform: translateX(-50%); width: min(92vw, 900px); margin: 0; }
.anim #creators .creator-grid {
  position: absolute; left: 50%; bottom: 5.5vh; transform: translateX(-50%);
  display: flex; flex-wrap: nowrap; justify-content: center; gap: 0 clamp(8px, 1.6vw, 26px); max-width: none; width: min(96vw, 1100px);
}
.anim #creators .creator { gap: 8px; flex: 0 1 auto; min-width: 0; }
.anim #creators .creator:hover { transform: none; }
.anim #creators .av { width: clamp(38px, 4vw, 56px); height: clamp(38px, 4vw, 56px); font-size: 15px; transition: box-shadow .4s var(--ease), transform .4s var(--ease); }
.anim #creators .creator .nm { font-size: 12px; white-space: nowrap; }
@media (max-width: 1023px) {
  .anim #creators .creator-grid { flex-wrap: wrap; row-gap: 12px; width: min(94vw, 560px); }
}
@media (min-width: 769px) and (max-width: 1023px) { .anim #creators .creator { width: 17%; } }   /* 5 + 4 */
.anim #creators .creator .ht { display: none; }
.anim #creators .creator.lit .av { transform: scale(1.12); box-shadow: 0 0 0 2px var(--green-light), 0 0 26px -2px rgba(16,185,129,.8); }
.anim #creators .creator.lit .nm { color: var(--green-light); }
.anim #creators .stats { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); margin: 0; width: max-content; max-width: 94vw; }
.anim #creators .stat-note { position: absolute; left: 50%; top: calc(47% + 120px); transform: translateX(-50%); margin: 0; width: 90vw; }
.anim #creators .stats, .anim #creators .stat-note { opacity: 0; }
@media (max-width: 768px) {
  .anim #creators { height: 300vh; }
  .anim #creators .creator-grid { flex-wrap: wrap; gap: 10px 12px; width: 94vw; bottom: calc(124px + 1vh); }
  .anim #creators .creator .nm { font-size: 10.5px; }
  .anim #creators .av { width: 36px; height: 36px; }
  .anim #creators .stats { top: 44%; }
  .anim #creators .stat-note { top: calc(44% + 110px); }
}

/* walkthrough: the portrait video rises out of the grid */
.anim #walkthrough { height: 230vh; padding: 0; pointer-events: none; }
.anim #walkthrough a, .anim #walkthrough button { pointer-events: auto; }
.anim #walkthrough::before { display: none; }
.anim #walkthrough .shead { position: absolute; left: 50%; top: calc(84px + 2vh); transform: translateX(-50%); width: min(92vw, 820px); margin: 0; }
.anim #walkthrough .video-cap { position: absolute; left: 50%; bottom: 4.5vh; transform: translateX(-50%); margin: 0; width: 90vw; }
.anim .floor3d .screen3d { pointer-events: auto; }
@media (max-width: 768px) {
  .anim #walkthrough .shead p { display: none; }
  .anim #walkthrough .video-cap { bottom: calc(124px + 1vh); }
}
@media (min-width: 900px) {
  .anim #walkthrough .shead { left: max(24px, calc((100vw - 1180px) / 2 + 24px)); top: 50%; transform: translateY(-50%); text-align: left; width: min(34vw, 460px); }
  .anim #walkthrough .shead p { margin-left: 0; }
  .anim #walkthrough .video-cap { left: max(24px, calc((100vw - 1180px) / 2 + 24px)); transform: none; text-align: left; width: auto; bottom: 8vh; }
}

/* what's inside: the layer storm (real layers from the Master Pack) */
.storm-scene { display: none; }
.anim .storm-scene { display: block; height: 300vh; }
.anim #whats-inside { padding-top: 0; }
.anim #whats-inside::before { display: none; }
.anim #whats-inside .mp-head .left { display: none; }
.anim #whats-inside .mp-head { justify-content: flex-end; margin-top: -10vh; position: relative; z-index: 2; }
.storm-scene { --hl: max(24px, calc((100vw - 1180px) / 2 + 24px)); }
.storm-head { position: absolute; left: var(--hl); right: var(--hl); top: calc(84px + 4vh); z-index: 3; opacity: 0; }
.storm-head h2 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4.8vw, 56px); letter-spacing: -.04em; line-height: 1.04; }
.storm-head h2 .accent { background: linear-gradient(120deg, var(--orange), var(--orange-light) 60%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.storm-head p { color: var(--text-2); margin-top: 16px; font-size: 16px; max-width: 40ch; }
/* size + position are set by motion.js to fit the free space (these are only starting values) */
.storm { --tw: min(88vw, 860px); position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: var(--tw); aspect-ratio: 16 / 9; container-type: inline-size; z-index: 1; }
.storm-rig { position: absolute; inset: 0; }
/* previews, not downloads: no right-click "save image", no drag-out, no long-press menu
   (the files themselves are 80% size with a watermark pressed in, see img/storm/) */
.storm { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ly { position: absolute; inset: 0; will-change: transform, opacity; }
.ly .art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; pointer-events: none; -webkit-user-drag: none; }
.ly:first-child .art { border-radius: 1.4cqw; }
.ly::before, .ly::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--chk, 0); }
.ly::before { background: conic-gradient(rgba(255,255,255,.07) 25%, transparent 0 50%, rgba(255,255,255,.07) 0 75%, transparent 0) 0 0 / 2.6cqw 2.6cqw; }
[data-theme="light"] .ly::before { background: conic-gradient(rgba(12,16,22,.07) 25%, transparent 0 50%, rgba(12,16,22,.07) 0 75%, transparent 0) 0 0 / 2.6cqw 2.6cqw; }
.ly::after {
  inset: -1px; border: 1px solid rgba(16,185,129,.75); z-index: 2;
  background:
    linear-gradient(var(--green), var(--green)) 0 0 / 7px 7px no-repeat,
    linear-gradient(var(--green), var(--green)) 100% 0 / 7px 7px no-repeat,
    linear-gradient(var(--green), var(--green)) 0 100% / 7px 7px no-repeat,
    linear-gradient(var(--green), var(--green)) 100% 100% / 7px 7px no-repeat;
}
.ly:first-child::before { display: none; }
.ly:first-child::after { border-radius: 1.4cqw; }
.storm-tags { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.st-tag {
  position: absolute; left: 50%; top: 50%;
  display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
  padding: 5px 10px 5px 9px; margin-left: 18px; transform-origin: 0 50%;
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2;
  color: var(--text); background: var(--nav-bg); backdrop-filter: blur(8px); border: 1px solid rgba(16,185,129,.55); border-radius: 6px;
  opacity: 0; will-change: transform, opacity;
}
.st-tag b { color: var(--green); font-weight: 600; }
.st-tag::before { content: ""; position: absolute; right: 100%; top: 50%; width: 16px; height: 1px; background: rgba(16,185,129,.7); }
.st-tag::after { content: ""; position: absolute; right: calc(100% + 14px); top: calc(50% - 2.5px); width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,.9); }
.storm-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; border-radius: 1.4cqw; background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,.35) 72%, rgba(255,255,255,0)); }
.storm.snapfx .storm-flash { animation: snapflash .6s var(--ease); }
@keyframes snapflash { from { opacity: .5; } to { opacity: 0; } }
.storm-count { position: absolute; left: var(--hl); bottom: 7vh; z-index: 3; display: flex; align-items: baseline; gap: 14px; opacity: 0; }
@media (min-width: 1000px) and (min-aspect-ratio: 6/5) {
  .storm-head { right: auto; top: calc(84px + 5vh); width: 420px; }
  .storm-count { bottom: 9vh; }
}
.storm-num { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 6vw, 96px); line-height: .9; letter-spacing: -.045em; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, var(--green-light), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.storm-lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.storm.snap ~ .storm-count .storm-num { animation: numpop .7s var(--ease); }
@keyframes numpop { 30% { transform: scale(1.06); } }
@media (max-width: 768px) {
  .anim .storm-scene { height: 280vh; }
  .storm-scene { --hl: 20px; }
  .storm-head { top: calc(80px + 3vh); }
  .storm-head p { font-size: 15px; }
  .storm-count { bottom: calc(124px + 1vh); }
  .storm-num { font-size: 52px; }
  /* twelve labels on a phone: a tighter, Layers-panel-sized list */
  .st-tag { gap: 6px; padding: 3px 8px 3px 7px; font-size: 9.5px; letter-spacing: .04em; border-radius: 5px; }
}

/* final CTA: the camera cranes up and the grid pulses orange */
.anim #get { height: 190vh; padding: 0 !important; }
.anim #get .stage { display: flex; align-items: center; justify-content: center; }
.anim #get .stage > .cta-card { width: min(1180px, calc(100vw - 48px)); }

/* ---- views counter (motion mode only) ---- */
.hud { display: none; }
.anim .hud {
  --p: 0;
  display: grid; position: fixed; z-index: 80; pointer-events: none;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: auto 9px; column-gap: 10px; row-gap: 10px;
  padding: 12px 12px 11px 14px;
  background: var(--nav-bg); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card);
  font-family: var(--mono); font-size: 10px; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); opacity: 0; visibility: hidden;
}
.hud-w { grid-column: 1; grid-row: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; text-align: right; }
.hud-w li { height: 22px; line-height: 22px; white-space: nowrap; transition: color .35s var(--ease); }
.hud-w li.on { color: var(--text); }
.hud-rail { grid-column: 2; grid-row: 1; position: relative; justify-self: center; width: 1px; margin: 11px 0; background: var(--border-2); }
.hud-fill { position: absolute; inset: 0; background: var(--green); transform-origin: 50% 100%; transform: scaleY(var(--p)); }
.hud-dot { position: absolute; left: -3px; bottom: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(16,185,129,.9); transform: translateY(calc(var(--p) * -88px)); }
.hud-c { grid-column: 1 / -1; grid-row: 2; margin: 0; padding-top: 9px; border-top: 1px solid var(--border); display: grid; gap: 5px; text-align: right; }
.hud-k { font-size: 9px; }
.hud-n { font-size: 11px; letter-spacing: .02em; color: var(--green); font-variant-numeric: tabular-nums; min-width: 14ch; }
@media (max-width: 768px) {
  .anim .hud { left: 12px; right: auto; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); grid-template-columns: auto; padding: 7px 11px; border-radius: 100px; }
  .anim .hud-w, .anim .hud-rail { display: none; }
  .anim .hud-c { grid-row: 1; padding: 0; border: 0; display: flex; gap: 10px; align-items: baseline; }
}
@media (prefers-reduced-motion: reduce) { .anim #grid, .anim .floor3d, .anim .hud { display: none; } }
