/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ── */
:root {
    --bg: #050508;
    --surface: #0c0c10;
    --border: #1a1018;
    --text: #b8b0b8;
    --text-dim: #4a4048;
    --fire: #dc2626;
    --fire-bright: #f97316;
    --fire-glow: #ef4444;
    --ember: #f59e0b;
    --deep: #7f1d1d;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(127, 29, 29, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(220, 38, 38, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 90%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
        var(--bg);
    background-size: 100% 100%;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── Background grid ── */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(220, 38, 38, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* ── Ember particles ── */
.ember-field {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ember-field::before,
.ember-field::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    animation: float-up linear infinite;
}

.ember-field::before {
    left: 20%;
    background: var(--fire-glow);
    box-shadow: 0 0 6px var(--fire-glow), 0 0 12px rgba(239, 68, 68, 0.3);
    animation-duration: 8s;
    animation-delay: 0s;
    opacity: 0;
}

.ember-field::after {
    left: 75%;
    background: var(--ember);
    box-shadow: 0 0 6px var(--ember), 0 0 12px rgba(245, 158, 11, 0.3);
    animation-duration: 10s;
    animation-delay: 3s;
    opacity: 0;
}

@keyframes float-up {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(1);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        bottom: 110vh;
        opacity: 0;
        transform: translateX(30px) scale(0.3);
    }
}

/* ── Vignette ── */
.vignette {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 25%, var(--bg) 100%);
    z-index: 1;
    pointer-events: none;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ── Container ── */
.container {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero ── */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    text-align: center;
    padding: 80px 0 60px;
}

/* ── Nexus symbol ── */
.logo-mark {
    width: 160px;
    height: 160px;
    margin-bottom: 48px;
    animation: torment-pulse 5s ease-in-out infinite;
}

.nexus-symbol {
    width: 100%;
    height: 100%;
}

.ring-outer {
    fill: none;
    stroke: var(--fire);
    stroke-width: 0.8;
    opacity: 0.25;
}

.ring-inner {
    fill: none;
    stroke: var(--fire-bright);
    stroke-width: 0.6;
    opacity: 0.4;
    stroke-dasharray: 4 6;
    animation: spin 25s linear infinite;
}

.spoke {
    stroke: var(--deep);
    stroke-width: 1.2;
    opacity: 0.5;
}

.torment-ring {
    animation: spin 40s linear infinite reverse;
}

.pentacle {
    fill: none;
    stroke: var(--fire);
    stroke-width: 0.8;
    opacity: 0.35;
}

.chain-ring {
    fill: none;
    stroke: var(--fire-bright);
    stroke-width: 0.6;
    opacity: 0.3;
    animation: spin 15s linear infinite;
}

.core {
    fill: var(--fire-glow);
    filter: drop-shadow(0 0 10px var(--fire-glow));
    animation: core-burn 1.5s ease-in-out infinite;
}

.core-glow {
    fill: none;
    stroke: var(--fire-glow);
    stroke-width: 0.5;
    opacity: 0;
    animation: core-glow-anim 1.5s ease-in-out infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); transform-origin: center; }
    to { transform: rotate(360deg); transform-origin: center; }
}

@keyframes core-burn {
    0%, 100% { opacity: 0.6; r: 10; }
    50% { opacity: 1; r: 11; }
}

@keyframes core-glow-anim {
    0%, 100% { opacity: 0; r: 16; }
    50% { opacity: 0.3; r: 20; }
}

@keyframes torment-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.15));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(220, 38, 38, 0.35)) drop-shadow(0 0 60px rgba(239, 68, 68, 0.1));
    }
}

/* ── Title ── */
.title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #d4c8c8;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(220, 38, 38, 0.2);
}

.amp {
    color: var(--fire);
    text-shadow: 0 0 20px var(--fire-glow);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 52px;
    font-style: italic;
    letter-spacing: 0.04em;
}

/* ── CTA buttons ── */
.cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--fire);
    color: #fff;
    box-shadow:
        0 0 20px rgba(220, 38, 38, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--fire-glow);
    box-shadow:
        0 0 40px rgba(239, 68, 68, 0.5),
        0 0 80px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--fire-bright);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--fire);
    background: rgba(220, 38, 38, 0.08);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
    transform: translateY(-3px);
}

/* ── Features ── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    padding: 60px 0 100px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 36px 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fire), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    border-color: var(--deep);
    box-shadow: 0 8px 40px rgba(127, 29, 29, 0.2);
    transform: translateY(-4px);
}

.card-icon {
    font-size: 2rem;
    color: var(--fire);
    margin-bottom: 20px;
    line-height: 1;
    text-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}

.feature-card h3 {
    font-size: 1.15rem;
    color: #d4c8c8;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .hero {
        min-height: 75vh;
        padding: 60px 0 40px;
    }

    .logo-mark {
        width: 120px;
        height: 120px;
        margin-bottom: 36px;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .btn {
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 40px 0 80px;
    }
}
