/* ==========================================================================
   MODERN CSS RESET & VARIABLES
   ========================================================================== */
:root {
    --primary: #8888ca;
    --primary-glow: #6366f1;
    --secondary: #E94560;
    --accent: #f59e0b;
    --bg-dark: #030014;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   DYNAMIC BACKGROUND & STARS
   ========================================================================== */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background:
            radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.15), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(233, 69, 96, 0.15), transparent 25%);
    pointer-events: none;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Static Twinkling Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: var(--opacity); transform: scale(1); box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* Shooting Stars - Bright Streaks */
.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(-45deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    border-radius: 999px;
    filter: drop-shadow(0 0 6px rgba(105, 155, 255, 0.8));
    animation: shoot 2s ease-out forwards;
    width: 0;
    opacity: 0;
    z-index: -1;
}

@keyframes shoot {
    0% {
        width: 0;
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    15% {
        width: 150px;
    }
    100% {
        width: 0;
        opacity: 0;
        transform: translateX(-800px) translateY(800px) rotate(-45deg);
    }
}

/* ==========================================================================
   TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-cheekiverse {
    background: linear-gradient(to right, #4cc9f0, #a855f7, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Content Section below the fold */
#manifesto-content {
    max-width: 1200px;
    padding: 0 24px;
    position: relative;
    z-index: 20;
    margin: 100vh auto 96px; /* Push below hero (100vh) and center horizontally (auto) */
    background: linear-gradient(to bottom, rgba(15, 5, 25, 75%), #0f0519 10%, #0f0519);
    border-radius: 32px;
    opacity: 0; /* Hidden initially */
    pointer-events: none; /* Prevent interaction when hidden */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center content */
    min-height: 100vh; /* Ensure full viewport height */
}

/* ==========================================================================
   HEADER
   ========================================================================== */
header {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--secondary);
    font-size: 1.2em;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 80px 0 60px;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

/* Lead Capture Card */
.lead-capture {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 36px 24px; /* Default padding for smaller screens */
    margin: auto 24px 32px 24px; /* Default margin for smaller screens */
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {
    .lead-capture {
        padding: 36px 120px; /* Desktop padding */
        margin: auto 124px 32px 124px; /* Desktop margin */
    }
}

.lead-capture::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(136, 136, 202, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.lead-capture h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.lead-capture p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1rem;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(136, 136, 202, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-color: var(--primary-glow);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background-size: 200% auto;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary-glow);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cf-turnstile {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.success-message {
    display: none;
    margin-top: 16px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    color: #34d399;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==========================================================================
   BENTO GRID FEATURES
   ========================================================================== */
.bento-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: auto; /* Allow mouse interaction */
}

.overlay-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; /* Text sits here */
    text-align: center;
    width: 100%;
    pointer-events: none;
    mix-blend-mode: exclusion; /* Better visibility on dark/light */
    display: grid;
    place-items: center;
}

.overlay-text > * {
    grid-area: 1 / 1;
}

#text-phase-2 {
    letter-spacing: 0.05em;
}

/* Replay Button */
#replay-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#replay-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px; /* Increased padding */
    min-height: 250px; /* Ensure a minimum height for all cards */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.card-wide {
    grid-column: span 2;
}

.card-tall {
    grid-row: span 2;
    background: linear-gradient(180deg, rgba(233, 69, 96, 0.05) 0%, rgba(233, 69, 96, 0) 100%);
}

.card-wide svg,
.card-tall svg {
    width: 100%;
    height: auto;
    margin-top: 32px;
}

.bento-icon {
    width: 64px; /* Larger icon container */
    height: 64px; /* Larger icon container */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px; /* Slightly larger border-radius */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px; /* Increased margin */
    font-size: 32px; /* Larger icon */
    color: var(--primary);
}

.card-tall .bento-icon {
    color: var(--secondary);
    background: rgba(233, 69, 96, 0.1);
}

.bento-card h3 {
    font-size: 1.8rem; /* Larger heading */
    margin-bottom: 16px; /* Increased margin */
}

.bento-card p {
    color: var(--text-muted);
    font-size: 1.1rem; /* Larger paragraph text */
}

.grid-decoration {
    position: absolute;
    bottom: 0;
    right: 0;
    opacity: 0.1;
    font-size: 10rem; /* Larger decoration */
    transform: translate(20%, 20%);
    pointer-events: none;
}

/* ==========================================================================
   COMMUNITY SECTION & FOOTER
   ========================================================================== */
.community-cta {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(180deg, transparent 0%, rgba(88, 101, 242, 0.05) 100%);
    border-top: 1px solid var(--glass-border);
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #5865F2;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-discord:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.3);
}

footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================================================
   THANK YOU PAGE STYLES
   ========================================================================== */
.thank-you-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.success-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 60px 40px;
    border-radius: 32px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.success-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.success-icon {
    font-size: 40px;
    color: var(--accent);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
}

.success-card h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.success-card p.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Benefits Grid (Horizontal Row of 3) */
.benefits-grid {
    display: grid;
    /* Use minmax(0, 1fr) to prevent grid blowout on smaller content */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    text-align: left;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: 20px;
    transition: transform 0.2s, background-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.benefit-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--primary-glow);
}

.benefit-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 700;
}

.benefit-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.btn-return {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 8px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-return:hover {
    color: var(--text-main);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
    }

    .hero-content p {
        margin: 0 auto 40px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .card-wide, .card-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    /* Stack benefits vertically only on mobile devices */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .success-card {
        padding: 40px 24px;
    }

    .success-card h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.5rem; }
    .container { padding: 0 20px; }
    .lead-capture {
        padding: 24px;
        margin: auto 16px 32px 16px; /* Further reduced margins for maximum width */
    }
    .lead-capture h3 {
        font-size: 1.5rem; /* Slightly larger for impact */
    }
    .lead-capture p {
        margin-bottom: 20px;
        font-size: 0.9rem;
    }
    .lead-capture input[type="email"] {
        width: 100%;
        font-size: 16px; /* Prevent iOS zoom on focus */
        padding: 14px 16px;
    }
    .lead-capture .btn-primary {
        width: 100%;
        font-size: 1rem;
        padding: 14px;
    }
    .cf-turnstile {
        transform: scale(0.85); /* Scale down slightly if needed to fit narrow screens */
        transform-origin: center;
        margin-top: 12px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
}
