/* ═══════════════════════════════════════════════
   PoE2 Chaos Spam Crafter — Landing Page
   ═══════════════════════════════════════════════ */

:root {
    --bg-dark: #0d0d0d;
    --bg-section: #111118;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --text: #e0e0e0;
    --text-dim: #8a8a9a;
    --gold: #d4a017;
    --gold-light: #f0c040;
    --green: #2ecc71;
    --green-hover: #27ae60;
    --purple: #8868b8;
    --border: #2a2a3a;
    --radius: 12px;
    --max-width: 1000px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Particles canvas ─────────────────────────── */

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* All content above particles */
.hero, .screenshots, .video, .features, .currency-bar, .footer {
    position: relative;
    z-index: 1;
}

/* ── Hero ─────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 120px 0 90px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212, 160, 23, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(136, 104, 184, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(46, 204, 113, 0.06) 0%, transparent 40%),
        var(--bg-dark);
    overflow: hidden;
}

.hero__logo {
    display: block;
    margin: 0 auto 24px;
    filter: drop-shadow(0 0 30px rgba(150, 30, 30, 0.4));
    animation: fadeInDown 0.6s ease-out;
}

.hero__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    animation: fadeInDown 0.8s ease-out 0.15s both;
}

.hero__icon {
    filter: drop-shadow(0 0 16px rgba(212, 160, 23, 0.5));
}

.hero__title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
    text-shadow: 0 0 40px rgba(212, 160, 23, 0.3);
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 44px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero__version {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* ── Floating orbs ────────────────────────────── */

.hero__orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    opacity: 0.4;
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 16px rgba(200, 168, 78, 0.5));
    animation: float 6s ease-in-out infinite;
    image-rendering: pixelated;
}

.orb--chaos {
    top: 15%;
    left: 8%;
    color: #c8a84e;
    animation-delay: 0s;
}

.orb--exalted {
    top: 25%;
    right: 10%;
    color: #f0c848;
    animation-delay: -1.5s;
    animation-duration: 7s;
}

.orb--annul {
    bottom: 20%;
    left: 12%;
    color: #8868b8;
    animation-delay: -3s;
    animation-duration: 5.5s;
}

.orb--augment {
    bottom: 15%;
    right: 8%;
    filter: drop-shadow(0 0 16px rgba(72, 184, 120, 0.5));
    animation-delay: -4s;
    animation-duration: 6.5s;
}

.orb--divine {
    top: 50%;
    left: 4%;
    filter: drop-shadow(0 0 16px rgba(200, 168, 78, 0.5));
    animation-delay: -2s;
    animation-duration: 8s;
    opacity: 0.25;
    width: 48px;
    height: 48px;
}

.orb--vaal {
    top: 45%;
    right: 5%;
    filter: drop-shadow(0 0 16px rgba(200, 50, 50, 0.5));
    animation-delay: -5s;
    animation-duration: 7.5s;
    opacity: 0.25;
    width: 48px;
    height: 48px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-15px) rotate(3deg); }
    50%      { transform: translateY(-5px) rotate(-2deg); }
    75%      { transform: translateY(-20px) rotate(1deg); }
}

/* ── Button ───────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn__icon {
    font-size: 1.1em;
}

.btn--download {
    font-size: 1.2rem;
    padding: 18px 52px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    box-shadow:
        0 4px 24px rgba(46, 204, 113, 0.35),
        0 0 0 0 rgba(46, 204, 113, 0);
}

.btn--download:hover {
    background: linear-gradient(135deg, #27ae60, #219a52);
    box-shadow:
        0 8px 32px rgba(46, 204, 113, 0.45),
        0 0 0 4px rgba(46, 204, 113, 0.15);
    transform: translateY(-3px);
}

.btn--download:active {
    transform: translateY(-1px);
}

/* ── Section titles ───────────────────────────── */

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 44px;
    color: var(--text);
}

/* ── Screenshots ──────────────────────────────── */

.screenshots {
    padding: 80px 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(212, 160, 23, 0.04) 0%, transparent 60%),
        var(--bg-dark);
}

.screenshots__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.screenshot-slot {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    aspect-ratio: 16/10;
    transition: all 0.25s ease;
}

.screenshot-slot:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(212, 160, 23, 0.15);
    transform: translateY(-2px);
}

.screenshot-slot::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-dim);
    font-size: 0.8rem;
    text-align: center;
}

.screenshot-slot__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    color: #444;
}

.screenshot-slot__placeholder span {
    font-size: 0.75rem;
    color: #444;
}

/* When actual screenshots are added: */
.screenshot-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Video ────────────────────────────────────── */

.video {
    padding: 80px 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(136, 104, 184, 0.06) 0%, transparent 50%),
        var(--bg-section);
}

.video__wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--border);
}

.video__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ── Features ─────────────────────────────────── */

.features {
    padding: 80px 0;
    background: var(--bg-dark);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: all 0.25s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 160, 23, 0.08);
}

.feature-card__icon {
    margin-bottom: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0;
}

.feature-card__icon img {
    filter: drop-shadow(0 0 8px rgba(200, 168, 78, 0.4));
    image-rendering: pixelated;
}

.feature-card__icon .icon-overlap {
    margin-left: -12px;
}

.feature-card__icon svg {
    filter: drop-shadow(0 0 6px rgba(200, 168, 78, 0.3));
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.55;
}

/* ── Currency bar ──────────────────────────────── */

.currency-bar {
    position: relative;
    z-index: 1;
    padding: 32px 0;
    background: var(--bg-section);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.currency-bar__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.currency-bar__inner img {
    image-rendering: pixelated;
    filter: drop-shadow(0 0 10px rgba(200, 168, 78, 0.4));
    transition: all 0.3s ease;
    opacity: 0.7;
}

.currency-bar__inner img:hover {
    opacity: 1;
    transform: scale(1.3);
    filter: drop-shadow(0 0 18px rgba(212, 160, 23, 0.7));
}

/* ── Footer ───────────────────────────────────── */

.footer {
    padding: 36px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
}

.footer__orbs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
    opacity: 0.5;
}

.footer__orbs img {
    image-rendering: pixelated;
    transition: opacity 0.2s;
}

.footer__orbs img:hover {
    opacity: 0.8;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ── Landing Nav ──────────────────────────────── */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 2rem;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.landing-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gold);
    font-weight: 700;
    font-size: 1.05rem;
}

.landing-nav__links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.landing-nav__links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.landing-nav__links a:hover {
    color: var(--gold);
}

.landing-nav__auth {
    padding: 0.35rem 1rem;
    border: 1px solid var(--gold);
    border-radius: 6px;
    color: var(--gold) !important;
    transition: background 0.2s, color 0.2s !important;
}

.landing-nav__auth:hover {
    background: var(--gold);
    color: #0d0d0d !important;
}

/* ── Animations ───────────────────────────────── */

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll fade-in targets ───────────────────── */

.fade-target {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-target.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger cards */
.feature-card.fade-target:nth-child(2) { transition-delay: 0.1s; }
.feature-card.fade-target:nth-child(3) { transition-delay: 0.2s; }
.feature-card.fade-target:nth-child(4) { transition-delay: 0.3s; }
.feature-card.fade-target:nth-child(5) { transition-delay: 0.4s; }
.feature-card.fade-target:nth-child(6) { transition-delay: 0.5s; }

.screenshot-slot.fade-target:nth-child(2) { transition-delay: 0.15s; }
.screenshot-slot.fade-target:nth-child(3) { transition-delay: 0.3s; }

/* ── Responsive ───────────────────────────────── */

@media (max-width: 768px) {
    .hero {
        padding: 70px 0 50px;
    }

    .hero__logo {
        width: 160px;
    }

    .hero__icon {
        width: 44px;
        height: 44px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .btn--download {
        font-size: 1.05rem;
        padding: 14px 36px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

    .features__grid,
    .screenshots__gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .video, .features, .screenshots {
        padding: 50px 0;
    }

    .orb { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .screenshots__gallery .screenshot-slot:last-child {
        grid-column: span 2;
        max-width: 50%;
        justify-self: center;
    }
}
