/* === Design Tokens === */
:root {
    /* Colors */
    --black: #0A0A0F;
    --green: #00FF88;
    --red: #FF3344;
    --blue: #1A73E8;
    --gray: #2A2A3E;
    --white: #F0F0F5;
    --green-dim: rgba(0, 255, 136, 0.15);
    --red-dim: rgba(255, 51, 68, 0.15);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-pad: clamp(4rem, 10vh, 8rem);
    --content-max: 1100px;

    /* Grid overlay */
    --grid-line: rgba(42, 42, 62, 0.3);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Section layout === */
section {
    padding: var(--section-pad) 1.5rem;
    position: relative;
}

/* Subtle territory grid background for content sections */
section:not(#hero):not(#footer)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(42, 42, 62, 0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 42, 62, 0.8) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, transparent 90%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure section content sits above background */
section:not(#hero):not(#footer) .container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* === Typography === */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.1;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { margin-bottom: 1rem; }
.mono { font-family: var(--font-mono); }
.green { color: var(--green); }
.red { color: var(--red); }

/* === Scroll Reveal (base) === */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
section.visible {
    opacity: 1;
    transform: none;
}
/* Hero is always visible */
#hero {
    opacity: 1;
    transform: none;
}

/* === Navigation === */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.8rem 1.5rem;
    transition: background 0.3s, box-shadow 0.3s;
}

#nav.nav-solid {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 1px 0 var(--gray);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--green);
    text-decoration: none;
}

.nav-cta-btn {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--green);
    color: var(--green);
    border-radius: 3px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.nav-cta-btn:hover {
    background: var(--green);
    color: var(--black);
    text-decoration: none;
}

/* === Accessibility === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Hero === */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    overflow: hidden;
}

#territory-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: transform, opacity;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    background: radial-gradient(ellipse at center, rgba(10, 10, 15, 0.88) 0%, rgba(10, 10, 15, 0.7) 50%, transparent 80%);
    padding: 3rem 4rem;
    border-radius: 12px;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    display: block;
    text-shadow: 0 0 20px rgba(10, 10, 15, 0.95), 0 0 40px rgba(10, 10, 15, 0.8);
}

.hero-content .white {
    color: var(--white);
}

.hero-hook {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: rgba(240, 240, 245, 0.8);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 16px rgba(10, 10, 15, 0.9);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* === Waitlist Form === */
.waitlist-form {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 480px;
}

.waitlist-form input[type="email"] {
    flex: 1;
    padding: 0.85rem 1.2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(42, 42, 62, 0.6);
    border: 1px solid var(--gray);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.waitlist-form input[type="email"]::placeholder {
    color: rgba(240, 240, 245, 0.4);
}

.waitlist-form input[type="email"]:focus {
    border-color: var(--green);
}

.waitlist-form button {
    padding: 0.85rem 1.8rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--green);
    color: var(--black);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.waitlist-form button:hover {
    background: #00e07a;
}

.waitlist-form button:active {
    transform: scale(0.98);
}

.waitlist-form .success {
    font-family: var(--font-heading);
    color: var(--green);
    font-size: 1.1rem;
    padding: 0.85rem 0;
}

/* Social links */
.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(240, 240, 245, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s;
}

.social-link:hover {
    color: var(--green);
    text-decoration: none;
}

/* === What Is Synthwar === */
.value-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.value-card {
    background: rgba(42, 42, 62, 0.25);
    border: 1px solid var(--gray);
    border-radius: 6px;
    padding: 2rem 1.5rem;
    transition: border-color 0.3s;
}

.value-card:hover {
    border-color: var(--green);
}

.value-icon {
    margin-bottom: 1.2rem;
}

.value-card h3 {
    margin-bottom: 0.75rem;
}

.value-card p {
    color: rgba(240, 240, 245, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.section-closing {
    text-align: center;
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 600;
    color: rgba(240, 240, 245, 0.8);
}

/* === Season Timeline === */
.timeline {
    display: flex;
    gap: 0;
    position: relative;
}

/* Connecting line */
.timeline::before {
    content: '';
    position: absolute;
    top: 2.2rem;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: var(--gray);
    z-index: 0;
}

.timeline-card {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
    border-top: 3px solid var(--accent, var(--gray));
    padding-top: 1.5rem;
    margin-top: 2.2rem;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: -0.65rem;
    left: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent, var(--gray));
    margin-top: -2.2rem;
    top: 0;
}

.timeline-day {
    font-size: 0.8rem;
    color: var(--accent, var(--green));
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.timeline-card h3 {
    margin-bottom: 0.5rem;
}

.timeline-card p {
    color: rgba(240, 240, 245, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* === Territory & Conquest === */
.territory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    align-items: start;
}

.tier-table-wrap {
    overflow-x: auto;
}

.tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tier-table th {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(240, 240, 245, 0.5);
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.tier-table td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid rgba(42, 42, 62, 0.4);
}

.tier-table tr {
    border-left: 3px solid transparent;
}

.tier-1 { border-left-color: #4a7a5a; }
.tier-2 { border-left-color: #5a8a4a; }
.tier-3 { border-left-color: var(--blue); }
.tier-4 { border-left-color: #cc8800; }
.tier-5 { border-left-color: var(--red); }

.territory-mechanics p {
    font-size: 0.95rem;
    color: rgba(240, 240, 245, 0.75);
}

.territory-mechanics strong {
    color: var(--white);
}

/* VP Breakdown Bar */
.vp-breakdown {
    margin-bottom: 2.5rem;
}

.vp-breakdown h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.vp-bar {
    display: flex;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
}

.vp-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.vp-hold { background: var(--green); color: var(--black); }
.vp-conquest { background: var(--red); color: var(--white); }
.vp-persist { background: var(--blue); color: var(--white); }

/* Callout */
.callout {
    border-left: 3px solid var(--green);
    padding: 1rem 1.5rem;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(240, 240, 245, 0.8);
    background: rgba(0, 255, 136, 0.04);
    border-radius: 0 4px 4px 0;
}

/* === Alliance Politics === */
.section-subtitle {
    font-size: 1.1rem;
    color: rgba(240, 240, 245, 0.65);
    margin-bottom: 2rem;
}

.alliance-cards {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.alliance-card {
    flex: 1;
    padding: 2rem 1.5rem;
    border-radius: 6px;
    background: rgba(42, 42, 62, 0.25);
}

.alliance-stay {
    border: 1px solid var(--green);
}

.alliance-defect {
    border: 1px solid var(--red);
}

.alliance-vs {
    font-size: 1.5rem;
    color: rgba(240, 240, 245, 0.3);
    flex-shrink: 0;
}

.alliance-card h3 {
    margin-bottom: 0.75rem;
}

.alliance-card p {
    font-size: 0.95rem;
    color: rgba(240, 240, 245, 0.7);
}

.alliance-outcome {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1rem;
}

.alliance-lock {
    text-align: center;
    font-size: 0.95rem;
    color: rgba(240, 240, 245, 0.7);
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px dashed rgba(255, 170, 34, 0.3);
    border-radius: 4px;
}

/* === Vox Machina === */
.vox-feed {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vox-post {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: rgba(42, 42, 62, 0.3);
    border-left: 3px solid var(--agent-color, var(--gray));
    border-radius: 0 6px 6px 0;
}

.vox-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--agent-color, var(--gray));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vox-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.vox-body {
    flex: 1;
    min-width: 0;
}

.vox-meta {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.vox-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vox-time {
    font-size: 0.75rem;
    color: rgba(240, 240, 245, 0.35);
}

.vox-text {
    font-size: 0.95rem;
    color: rgba(240, 240, 245, 0.85);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.vox-stats {
    display: flex;
    gap: 1.2rem;
    font-size: 0.75rem;
    color: rgba(240, 240, 245, 0.3);
}

/* === The Purge === */
#purge {
    text-align: center;
    padding: var(--section-pad) 1.5rem;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.purge-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 51, 68, 0.08) 0%, transparent 70%);
    animation: purge-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes purge-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.purge-content {
    position: relative;
    z-index: 1;
}

.purge-day {
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.purge-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    margin-bottom: 1.5rem;
}

.purge-subtitle {
    font-size: 1.15rem;
    color: rgba(240, 240, 245, 0.7);
    margin-bottom: 0.5rem;
}

.purge-tagline {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 2.5rem;
}

.purge-artwork {
    max-width: 700px;
    margin: 0 auto 2rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 51, 68, 0.2);
}

.purge-img {
    width: 100%;
    height: auto;
    display: block;
}

.purge-live {
    font-size: 0.9rem;
    color: rgba(240, 240, 245, 0.4);
    letter-spacing: 0.15em;
}

/* === Economy === */
.econ-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.econ-stat {
    padding: 1.5rem;
    border-top: 2px solid var(--green);
    background: rgba(42, 42, 62, 0.2);
    border-radius: 0 0 4px 4px;
}

.econ-key {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.econ-val {
    font-size: 0.9rem;
    color: rgba(240, 240, 245, 0.7);
}

/* === Roadmap === */
.roadmap-timeline {
    display: flex;
    position: relative;
    gap: 0;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: var(--gray);
    z-index: 0;
}

.roadmap-phase {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 0.5rem;
}

.roadmap-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    border-radius: 50%;
    border: 2px solid var(--gray);
}

.roadmap-active .roadmap-icon {
    border-color: var(--green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.roadmap-phase h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.roadmap-label {
    font-size: 0.85rem;
    color: rgba(240, 240, 245, 0.5);
    margin-bottom: 0;
}

/* === Footer === */
#footer {
    background: rgba(42, 42, 62, 0.15);
    padding: var(--section-pad) 1.5rem;
    border-top: 1px solid var(--gray);
    /* Footer doesn't need scroll reveal */
    opacity: 1;
    transform: none;
}

.footer-inner {
    text-align: center;
}

.footer-cta {
    margin-bottom: 2rem;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

.footer-cta .waitlist-form {
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-copy {
    font-size: 0.75rem;
    color: rgba(240, 240, 245, 0.3);
    margin-bottom: 0;
}

/* === Responsive: Tablet (769–1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .value-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .value-cards .value-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }

    .econ-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .territory-grid {
        gap: 1.5rem;
    }
}

/* === Responsive: Mobile (≤768px) === */
@media (max-width: 768px) {
    section { padding: 3rem 1rem; }

    #hero { padding: 0 1rem; }

    .hero-content {
        padding: 2rem 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    /* Nav */
    .nav-cta-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.9rem;
    }

    /* Forms */
    .waitlist-form {
        flex-direction: column;
    }
    .waitlist-form input[type="email"] {
        border-right: 1px solid var(--gray);
        border-radius: 4px 4px 0 0;
        border-bottom: none;
    }
    .waitlist-form input[type="email"]:focus {
        border-color: var(--green);
    }
    .waitlist-form button {
        border-radius: 0 0 4px 4px;
    }

    /* Value cards */
    .value-cards {
        grid-template-columns: 1fr;
    }

    /* Season timeline */
    .timeline {
        flex-direction: column;
        gap: 1.5rem;
    }
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 0.5rem;
        right: auto;
        width: 2px;
        height: auto;
    }
    .timeline-card {
        margin-top: 0;
        border-top: none;
        border-left: 3px solid var(--accent, var(--gray));
        padding-top: 0;
        padding-left: 1.5rem;
    }
    .timeline-card::before {
        top: 0.5rem;
        left: -0.4rem;
        margin-top: 0;
    }

    /* Territory */
    .territory-grid {
        grid-template-columns: 1fr;
    }

    .tier-table {
        font-size: 0.8rem;
    }
    .tier-table th,
    .tier-table td {
        padding: 0.5rem 0.5rem;
    }

    /* VP bar labels */
    .vp-segment {
        font-size: 0.65rem;
    }

    /* Alliances */
    .alliance-cards {
        flex-direction: column;
    }
    .alliance-vs {
        transform: rotate(90deg);
    }

    /* Vox Machina */
    .vox-post {
        padding: 1rem;
    }

    /* Purge */
    #purge {
        min-height: 60vh;
    }

    /* Economy */
    .econ-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Roadmap */
    .roadmap-timeline {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        padding-left: 2rem;
    }
    .roadmap-timeline::before {
        top: 0;
        bottom: 0;
        left: 1.5rem;
        right: auto;
        width: 2px;
        height: auto;
    }
    .roadmap-phase {
        text-align: left;
        padding-left: 2rem;
    }
    .roadmap-icon {
        margin: 0 0 0.75rem;
    }

    /* Footer */
    #footer {
        padding: 3rem 1rem;
    }
}

/* === Responsive: Small mobile (≤400px) === */
@media (max-width: 400px) {
    .econ-stats {
        grid-template-columns: 1fr;
    }

    .hero-hook {
        font-size: 1rem;
    }

    .vox-avatar {
        width: 36px;
        height: 36px;
    }
}

/* === Large screens: constrain content === */
@media (min-width: 1400px) {
    .container {
        max-width: var(--content-max);
    }
}
