/* ==========================================================================
   AINewZ Premium Motion Layer
   Depth, light and motion for a premium feel. Progressive enhancement:
   nothing here hides content if JS fails. Respects prefers-reduced-motion.
   ========================================================================== */

/* ---------- 1. Favicon preloader ---------- */
#premium-preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #08080c;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
    /* CSS fallback: fade out even if JS never runs */
    animation: premium-preloader-fallback 1s ease 4.5s forwards;
}
#premium-preloader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.premium-preloader-mark {
    width: 72px;
    height: 72px;
    animation: premium-mark-pulse 1.6s ease-in-out infinite;
}
.premium-preloader-ring {
    position: absolute;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .07);
    border-top-color: #3b82f6;
    animation: premium-spin 1.1s linear infinite;
}
@keyframes premium-mark-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.12); opacity: .85; }
}
@keyframes premium-spin { to { transform: rotate(360deg); } }
@keyframes premium-preloader-fallback { to { opacity: 0; visibility: hidden; } }

/* ---------- 2. Scroll reveals (class added by JS) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}
.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- 3. 3D tilt cards (class added by JS) ---------- */
.tilt {
    transform-style: preserve-3d;
    transition: transform .18s ease-out, box-shadow .25s ease;
    will-change: transform;
}

/* ---------- 4. AI Pulse ticker ---------- */
.premium-ticker {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .02);
    overflow: hidden;
}
.premium-ticker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    white-space: nowrap;
    flex-shrink: 0;
}
.premium-ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: premium-mark-pulse 1.6s ease-in-out infinite;
}
.premium-ticker-viewport {
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.premium-ticker-track {
    display: flex;
    align-items: center;
    gap: 56px;
    padding: 12px 28px;
    width: max-content;
    animation: premium-ticker-scroll 45s linear infinite;
}
.premium-ticker:hover .premium-ticker-track {
    animation-play-state: paused;
}
.premium-ticker-item {
    white-space: nowrap;
    font-size: 13.5px;
    color: #cbd5e1;
    text-decoration: none;
    transition: color .2s ease;
}
.premium-ticker-item:hover { color: #fff; }
.premium-ticker-item::before {
    content: "◆";
    font-size: 8px;
    color: #3b82f6;
    margin-right: 16px;
    vertical-align: 2px;
}
@keyframes premium-ticker-scroll {
    to { transform: translateX(-50%); }
}

/* ---------- 5. Hero ambient orbs + watermark ---------- */
.hero-editorial {
    position: relative;
    overflow: hidden;
}
.hero-editorial::before,
.hero-editorial::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.hero-editorial::before {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -120px;
    background: radial-gradient(circle, rgba(59, 130, 246, .20), transparent 70%);
    animation: premium-orb-drift 14s ease-in-out infinite alternate;
}
.hero-editorial::after {
    width: 420px;
    height: 420px;
    bottom: -160px;
    right: -100px;
    background: radial-gradient(circle, rgba(139, 92, 246, .18), transparent 70%);
    animation: premium-orb-drift 18s ease-in-out infinite alternate-reverse;
}
.hero-editorial__main,
.hero-editorial__sidebar {
    position: relative;
    z-index: 1;
}
@keyframes premium-orb-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 44px) scale(1.15); }
}
.premium-watermark {
    position: absolute;
    width: 520px;
    height: 520px;
    right: -140px;
    top: -120px;
    background: url('../../images/favicon.png') center / contain no-repeat;
    opacity: .05;
    pointer-events: none;
    z-index: 0;
    animation: premium-watermark-float 22s ease-in-out infinite alternate;
}
@keyframes premium-watermark-float {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    to { transform: translate3d(-44px, 54px, 0) rotate(8deg); }
}

/* ---------- 6. Cursor glow ---------- */
.premium-cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 560px;
    height: 560px;
    margin: -280px 0 0 -280px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(circle, rgba(96, 165, 250, .10) 0%, rgba(139, 92, 246, .06) 40%, transparent 65%);
    opacity: 0;
    transition: opacity .5s ease;
}
body.premium-glow-on .premium-cursor-glow { opacity: 1; }

/* ---------- 7. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    #premium-preloader { animation: none; display: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-editorial::before,
    .hero-editorial::after,
    .premium-watermark,
    .premium-ticker-track,
    .premium-ticker-dot,
    .premium-preloader-mark,
    .premium-preloader-ring {
        animation: none !important;
    }
    .premium-cursor-glow { display: none !important; }
}

/* ---------- Designed placeholder covers (coverPlaceholder()) ---------- */
.ph-cover {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ph-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .14), transparent 55%);
    pointer-events: none;
}
.ph-cover-initial {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.ph-cover-label {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}
