/* ==========================================================================
   CSS Design Tokens & Core Settings
   ========================================================================== */

:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.4);
    --accent-color: #ffffff;
    
    --font-display: 'Syne', sans-serif;
    --font-number: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    
    --cursor-size: 40px;
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none; /* Hide default cursor to use custom magnetic cursor */
}

/* ==========================================================================
   Custom Cursor
   ========================================================================== */

#custom-cursor {
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

#custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

/* Hover States for Cursor */
body.hovering #custom-cursor {
    width: 65px;
    height: 65px;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.8);
}

body.clicking #custom-cursor {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Background Canvas & Ambient Effects
   ========================================================================== */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: auto;
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-color: #ffffff;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    animation: floatingGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -200px;
    animation: floatingGlow 20s infinite alternate-reverse ease-in-out;
}

@keyframes floatingGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 80px) scale(1.1); }
}

/* ==========================================================================
   Layout Wrapper
   ========================================================================== */

.app-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    box-sizing: border-box;
}

/* ==========================================================================
   Header Styling
   ========================================================================== */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    position: relative;
}

.logo-dot {
    display: block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.header-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-color);
    animation: statusPulse 2s infinite ease-out;
}

.status-text {
    font-family: var(--font-number);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 4rem auto;
    width: 100%;
}

/* Hero Title & Text Reveal Animations */
.hero-section {
    margin-bottom: 3.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2em 0.5em;
    margin-bottom: 2rem;
}

.hero-title .word {
    display: inline-block;
    white-space: nowrap;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) skewY(5deg);
    animation: charReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Character Stagger Delay */
.hero-title .char:nth-child(1) { animation-delay: 0.1s; }
.hero-title .char:nth-child(2) { animation-delay: 0.15s; }
.hero-title .char:nth-child(3) { animation-delay: 0.2s; }
.hero-title .char:nth-child(4) { animation-delay: 0.25s; }
.hero-title .char:nth-child(5) { animation-delay: 0.3s; }
.hero-title .char:nth-child(6) { animation-delay: 0.35s; }

.hero-title .word:nth-child(2) .char:nth-child(1) { animation-delay: 0.45s; }
.hero-title .word:nth-child(2) .char:nth-child(2) { animation-delay: 0.5s; }
.hero-title .word:nth-child(2) .char:nth-child(3) { animation-delay: 0.55s; }
.hero-title .word:nth-child(2) .char:nth-child(4) { animation-delay: 0.6s; }

@keyframes charReveal {
    to {
        opacity: 1;
        transform: translateY(0) skewY(0);
    }
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Countdown Component
   ========================================================================== */

.countdown-section {
    width: 100%;
    max-width: 700px;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 2rem 3rem;
    border-radius: 16px;
    backdrop-filter: blur(15px);
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
}

.time-num {
    font-family: var(--font-number);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text-color);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.time-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.countdown-divider {
    font-family: var(--font-number);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
    padding-bottom: 1rem;
}

/* ==========================================================================
   Subscription Form Component
   ========================================================================== */

.subscription-section {
    width: 100%;
    max-width: 480px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
    position: relative;
}

.subscribe-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.35rem;
    width: 100%;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.subscribe-form:focus-within {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.03);
}

.input-group {
    flex-grow: 1;
    position: relative;
    padding-left: 1rem;
}

.subscribe-form input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 0.6rem 0.5rem;
}

.subscribe-form input::placeholder {
    color: #444444;
    font-weight: 500;
    transition: var(--transition-fast);
}

.subscribe-form input:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
}

.magnetic-btn {
    position: relative;
    background-color: var(--accent-color);
    border: none;
    color: var(--bg-color);
    font-family: var(--font-number);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    cursor: none;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
}

.btn-hover-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: #000000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    transition: width 0.4s ease-out, height 0.4s ease-out;
}

.magnetic-btn:hover {
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

.magnetic-btn:hover .btn-hover-bg {
    width: 300px;
    height: 300px;
}

/* Form Message (Success/Error) */
.form-message {
    font-size: 0.8rem;
    margin-top: 1rem;
    min-height: 1.2rem;
    letter-spacing: 0.05em;
    transition: var(--transition-fast);
    opacity: 0;
    transform: translateY(-5px);
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    color: #ffffff;
    font-weight: 500;
}

.form-message.error {
    color: #ff3333;
}

/* ==========================================================================
   Footer Styling
   ========================================================================== */

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
}

.copyright {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.social-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.social-link {
    text-decoration: none;
    font-family: var(--font-number);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    transition: var(--transition-fast);
    display: inline-block;
    padding: 0.25rem 0.5rem;
}

.social-link:hover {
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Responsive Adaptation
   ========================================================================== */

@media (max-width: 768px) {
    .app-container {
        padding: 2rem;
    }
    
    .site-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .countdown-container {
        padding: 1.5rem 1.5rem;
        gap: 0.75rem;
    }
    
    .countdown-item {
        width: 65px;
    }
    
    .main-content {
        margin: 2.5rem 0;
    }
    
    .site-footer {
        flex-direction: column-reverse;
        gap: 1.5rem;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Disable custom cursor on mobile touch screens for better UX */
    #custom-cursor, #custom-cursor-dot {
        display: none;
    }
    
    html, body {
        cursor: auto;
    }
}
