/* ============================================
   XENFM — Enhancement Layer
   Scroll animations, glassmorphism, glow effects
   ============================================ */

:root {
    --accent-soft: rgba(230, 18, 126, 0.08);
    --accent-2-soft: rgba(0, 212, 255, 0.06);
    --glow-magenta: 0 0 30px rgba(230, 18, 126, 0.15);
    --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.1);
}

/* ── Scroll Progress Bar ──────────────────── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ── Scroll Reveal ────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .scroll-progress { display: none; }
}

/* ── Glassmorphism Cards ──────────────────── */
.glass {
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Gradient Border Effect ───────────────── */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), transparent 40%, var(--accent-2) 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gradient-border:hover::before { opacity: 1; }

/* ── Nav Shrink on Scroll ─────────────────── */
.nav--scrolled {
    border-bottom-color: rgba(230, 18, 126, 0.15);
}
.nav--scrolled .nav__inner { height: 56px; }
.nav--scrolled .nav__logo { font-size: 1.4rem; }

/* ── Hero Animated Gradient ───────────────── */
.hero__bg {
    animation: hero-gradient-shift 8s ease-in-out infinite alternate;
}
@keyframes hero-gradient-shift {
    0% { background-position: 0% 50%, 100% 50%, 50% 100%; }
    100% { background-position: 30% 50%, 70% 50%, 50% 80%; }
}

/* ── Product Card Glow on Hover ───────────── */
.product-card:hover {
    box-shadow: 0 8px 40px rgba(230, 18, 126, 0.1), 0 0 0 1px rgba(230, 18, 126, 0.1);
}

/* ── Article Card Glow on Hover ───────────── */
.article-card:hover {
    box-shadow: 0 8px 40px rgba(0, 212, 255, 0.08), 0 0 0 1px rgba(0, 212, 255, 0.1);
}

/* ── Synth Wave Animation ─────────────────── */
.synth-wave {
    position: relative;
    overflow: hidden;
}
.synth-wave::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
    animation: wave-slide 3s linear infinite;
}
@keyframes wave-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Glow Text ────────────────────────────── */
.glow-text {
    text-shadow: 0 0 20px var(--accent-glow);
}
.glow-text--cyan {
    text-shadow: 0 0 20px var(--accent-2-glow);
}

/* ── Badge Pulse ──────────────────────────── */
.badge {
    transition: all var(--transition);
}
.badge:hover {
    box-shadow: var(--glow-magenta);
}
.badge--magenta:hover {
    box-shadow: var(--glow-magenta);
}

/* ── Magnetic Button Effect ───────────────── */
.btn {
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}
.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* ── 3D Card Tilt ─────────────────────────── */
.tilt {
    transition: transform 0.2s ease;
    transform-style: preserve-3d;
}

/* ── Animated Stat Counter ────────────────── */
.stat__num {
    font-variant-numeric: tabular-nums;
}

/* ── Section Divider ──────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
}

/* ── Article Page Styles ───────────────────── */
.article-body {
    max-width: 720px;
    margin: 0 auto;
}
.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--text-bright);
    margin: 40px 0 16px;
}
.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-bright);
    margin: 32px 0 12px;
}
.article-body p {
    margin-bottom: 20px;
    line-height: 1.8;
}
.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
    font-style: italic;
}
.article-body code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-2);
}
.article-body pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}
.article-body pre code {
    background: none;
    padding: 0;
    color: var(--text);
}
.article-body a {
    color: var(--accent-2);
    text-decoration: underline;
    text-decoration-color: rgba(0, 212, 255, 0.3);
}

/* ── Article Header ───────────────────────── */
.article-header {
    text-align: center;
    padding: 120px 0 40px;
}
.article-header__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-2);
    margin-bottom: 16px;
}
.article-header__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.article-header__meta {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

/* ── Article Navigation ───────────────────── */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 48px 0;
}
.article-nav__link {
    display: block;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
    text-decoration: none;
    color: inherit;
}
.article-nav__link:hover {
    border-color: rgba(230, 18, 126, 0.3);
    opacity: 1;
}
.article-nav__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.article-nav__title {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}
.article-nav__link--next { text-align: right; }

@media (max-width: 768px) {
    .article-nav { grid-template-columns: 1fr; }
}
