/* Project Aevum - site-wide effects (see fx.js) */

/* sparks + secret storm */
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 300; pointer-events: none; }

/* custom cursor */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor.cur-text input, .has-cursor.cur-text textarea { cursor: text !important; }
.cur-dot { position: fixed; left: 0; top: 0; z-index: 310; pointer-events: none; width: 0; height: 0; }
.cur-dot i {
    position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fffbe6, var(--gold-hi) 45%, var(--gold));
    box-shadow: 0 0 12px var(--gold), 0 0 26px rgba(245, 182, 32, 0.55);
    transition: transform .18s cubic-bezier(.2, 1.6, .4, 1), box-shadow .2s;
}
.cur-dot.hot i { transform: scale(1.9); box-shadow: 0 0 16px var(--gold-hi), 0 0 40px rgba(245, 182, 32, 0.8); }
.cur-dot.grab i { transform: scale(1.5); animation: curpulse .35s ease-in-out infinite alternate; }
@keyframes curpulse { to { transform: scale(2.1); } }
.cur-dot.down i { transform: scale(0.6); }
.cur-out .cur-dot { opacity: 0; }

/* rope scroll progress */
.rope-bar { position: fixed; left: 0; right: 0; top: 0; height: 4px; z-index: 120; pointer-events: none; }
.rope-bar i {
    display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0);
    background: repeating-linear-gradient(60deg, var(--gold-hi) 0 6px, #c98a3e 6px 12px);
    box-shadow: 0 0 10px rgba(245, 182, 32, 0.7);
}

/* eye-blink page transition */
.blink { position: fixed; inset: 0; z-index: 290; pointer-events: none; }
.blink-lid {
    position: absolute; left: -10%; right: -10%; height: 52%; background: #0b0115;
    transition: transform .42s cubic-bezier(.7, 0, .3, 1);
}
.blink-lid.top { top: 0; transform: translateY(-105%); border-radius: 0 0 50% 50% / 0 0 30% 30%; box-shadow: 0 5px 0 rgba(47, 211, 191, 0.6); }
.blink-lid.bot { bottom: 0; transform: translateY(105%); border-radius: 50% 50% 0 0 / 30% 30% 0 0; box-shadow: 0 -5px 0 rgba(123, 47, 208, 0.65); }
.blink.shut { pointer-events: auto; }
.blink.shut .blink-lid { transform: none; }
.blink.instant .blink-lid { transition: none; }

/* little toast */
.fx-toast {
    position: fixed; left: 50%; bottom: 34px; z-index: 305; translate: -50% 0;
    padding: 12px 22px; border-radius: 14px; background: #0b0115; color: var(--cream);
    border: 2px solid var(--gold); box-shadow: 0 0 30px rgba(245, 182, 32, 0.45);
    font: 700 1rem/1 var(--serif); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
    opacity: 0; transform: translateY(30px); transition: opacity .3s, transform .4s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none;
}
.fx-toast.show { opacity: 1; transform: none; }

/* magnetic buttons glide back */
.magnet { transition: translate .25s cubic-bezier(.2, 1.4, .4, 1), transform .2s, box-shadow .2s, filter .2s, background .2s !important; }

/* the storm shakes the page */
.quake body { animation: quake .12s linear 10; }
@keyframes quake { 25% { translate: -4px 2px; } 50% { translate: 3px -3px; } 75% { translate: -2px -1px; } }

/* achievements */
.trophy {
    position: fixed; left: 16px; bottom: 16px; z-index: 140; display: flex; align-items: center; gap: 8px;
    padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(11, 1, 21, 0.88); color: var(--cream);
    border: 1px solid rgba(245, 182, 32, 0.45); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    font: 700 0.85rem/1 var(--sans); letter-spacing: 0.06em; cursor: pointer; backdrop-filter: blur(6px);
    transition: transform .2s, border-color .2s;
}
.trophy span { font-size: 1.15rem; }
.trophy:hover { transform: translateY(-3px); border-color: var(--gold); }
.trophy.bump { animation: tbump .7s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes tbump { 30% { transform: scale(1.35) rotate(-10deg); } 60% { transform: scale(0.95) rotate(6deg); } }
.ach-panel {
    position: fixed; left: 16px; bottom: 70px; z-index: 141; width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto;
    padding: 18px; border-radius: 18px; background: #0d0219; border: 1px solid rgba(245, 182, 32, 0.35);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(47, 211, 191, 0.12);
    opacity: 0; transform: translateY(16px) scale(0.97); transform-origin: 0 100%; pointer-events: none; transition: opacity .2s, transform .25s;
}
.ach-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.ach-panel h3 { font: 700 1rem/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream); margin: 0 0 14px; display: flex; justify-content: space-between; }
.ach-panel h3 small { color: var(--gold); font-family: var(--sans); }
.ach-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ach-panel li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); opacity: 0.45; filter: grayscale(1); }
.ach-panel li.got { opacity: 1; filter: none; background: linear-gradient(90deg, rgba(245, 182, 32, 0.12), rgba(255, 255, 255, 0.02)); }
.ach-i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #1d0b33; border: 1px solid rgba(245, 182, 32, 0.4); font-size: 1.25rem; }
.ach-panel b, .ach-pop b { display: block; color: var(--cream); font-size: 0.95rem; }
.ach-panel em, .ach-pop em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; }
.ach-pop {
    position: fixed; left: 16px; bottom: 70px; z-index: 306; display: flex; gap: 12px; align-items: center;
    padding: 12px 18px 12px 12px; border-radius: 16px; background: #0d0219; border: 2px solid var(--gold);
    box-shadow: 0 0 34px rgba(245, 182, 32, 0.45), 0 18px 40px rgba(0, 0, 0, 0.55);
    transform: translateX(-120%); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; max-width: calc(100vw - 32px);
}
.ach-pop.show { transform: none; }
.ach-pop small { display: block; font: 700 0.68rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.ach-pop .ach-i { width: 46px; height: 46px; font-size: 1.5rem; animation: aspin 1s ease; }
@keyframes aspin { from { transform: rotate(-200deg) scale(0); } }

@media (prefers-reduced-motion: reduce) {
    .blink { display: none; }
    .quake body { animation: none; }
}
