:root {
    --primary-green: #8FB185; /* Lightened green for dark mode readability */
    --light-green: #1E2B1E;   /* Darkened for icon backgrounds */
    --soft-earth: #121412;    /* Dark fall back */
    --accent-gold: #DAB68B;
    --text-dark: #F5F7F5;     /* Main text is now light */
    --text-medium: #AABFA6;   /* Secondary text */
    --white: #ffffff;
    --glass-bg: rgba(20, 24, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--soft-earth);
    background-image: url('bg-1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Better for margin: auto vertical buffering */
    justify-content: center;
    position: relative;
    padding: 1rem;
}

/* Background Animations & Layers */
.bg-gradient {
    position: fixed; /* Changed from absolute to fixed to prevent scrollbar expansion */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(30, 43, 30, 0.7) 0%, rgba(20, 24, 20, 0.3) 50%),
                radial-gradient(circle at 80% 20%, rgba(198, 168, 124, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(74, 103, 65, 0.05) 0%, transparent 40%);
    z-index: -3;
    animation: slowRotate 40s linear infinite;
}

@keyframes slowRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.leaf-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"><path d="M60 20 C75 10 100 10 110 35 C120 60 100 85 60 110 C20 85 0 60 10 35 C20 10 45 10 60 20 Z" fill="none" stroke="rgba(255,255,255,0.015)" stroke-width="1"/></svg>');
    background-size: 180px;
    z-index: -2;
}

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Darkening tint for dark mode */
    z-index: -1;
}

/* Main Container - Glassmorphism */
.container {
    width: 100%;
    max-width: 960px;
    margin: auto; /* Automatically centers the container vertically without top clipping */
    background: linear-gradient(145deg, rgba(20, 24, 20, 0.7), rgba(10, 12, 10, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 4rem 3rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Animations */
.fade-in {
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.header {
    margin-bottom: 2vh;
}

.logo {
    max-width: clamp(100px, 12vh, 180px); /* scales logo with height */
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

/* Text Content */
.tagline {
    font-size: clamp(0.7rem, 1.5vh, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 1.5vh;
}

.main-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 6vh, 4rem);
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 1.5vh;
    line-height: 1.15;
    text-shadow: 0 4px 15px rgba(143, 177, 133, 0.2);
}

.subheading {
    font-size: clamp(0.9rem, 2vh, 1.25rem);
    color: var(--text-medium);
    max-width: 650px;
    margin: 0 auto 3vh;
    line-height: 1.6;
}

/* Countdown */
.countdown {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4vh;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 35, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 1.5vh 0.8rem;
    width: clamp(70px, 12vw, 120px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.time-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.time-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(143, 177, 133, 0.4);
    background: rgba(35, 42, 35, 0.7);
}

.time-num {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vh, 3.5rem);
    font-weight: 600;
    color: var(--primary-green);
    line-height: 1;
    margin-bottom: 0.5vh;
    text-shadow: 0 2px 10px rgba(143, 177, 133, 0.3);
}

.time-label {
    font-size: clamp(0.6rem, 1.2vh, 0.85rem);
    font-weight: 500;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Subscription Form */
.subscription-form {
    display: flex;
    justify-content: center;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    gap: 0.75rem;
    position: relative;
}

.email-input {
    flex: 1;
    padding: clamp(0.7rem, 2vh, 1.1rem) 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    background: rgba(20, 24, 20, 0.6);
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.8vh, 1.05rem);
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
    min-width: 0; /* Prevents overflow in flexbox */
}

.email-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.email-input:focus {
    border-color: var(--primary-green);
    background: rgba(30, 35, 30, 0.8);
    box-shadow: 0 0 15px rgba(143, 177, 133, 0.2), inset 0 2px 10px rgba(0,0,0,0.3);
}

.notify-btn {
    padding: clamp(0.7rem, 2vh, 1.1rem) 2.2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-green), #A3C49A);
    color: #121412;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.8vh, 1.05rem);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(143, 177, 133, 0.3);
    white-space: nowrap;
}

.notify-btn:hover {
    background: linear-gradient(135deg, #A3C49A, var(--primary-green));
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(143, 177, 133, 0.4);
}

.notify-btn i {
    transition: transform 0.3s ease;
}

.notify-btn:hover i {
    transform: translateX(5px);
}

.success-msg {
    margin-top: 1.2rem;
    color: var(--primary-green);
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.success-msg.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Footer / Contact */
.footer {
    margin-top: 3vh;
    padding-top: 2vh;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: clamp(0.7rem, 1.4vh, 0.85rem);
    font-weight: 500;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 40px;
    background: rgba(30, 35, 30, 0.5);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.08);
}

.contact-item:hover {
    background: rgba(45, 55, 45, 0.8);
    color: var(--primary-green);
    border-color: rgba(143, 177, 133, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-green);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-green);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.contact-item:hover .icon-circle {
    background: var(--primary-green);
    color: #121412;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 3.5rem 2.5rem;
        border-radius: 28px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1.5rem;
    }

    .container {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
    }

    .countdown {
        gap: 0.75rem;
        flex-wrap: wrap; /* allow wrapping on very small screens */
    }

    .time-box {
        padding: 1.2rem 0.5rem;
        border-radius: 16px;
    }

    .time-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .subscription-form {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .email-input {
        text-align: center;
        width: 100%;
        border-radius: 30px;
    }
    
    .notify-btn {
        width: 100%;
        border-radius: 30px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .contact-item {
        justify-content: center;
        padding: 0.6rem;
    }
    
    .logo {
        max-width: 160px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .time-box {
        width: calc(50% - 0.5rem); /* two columns on very small screens */
    }
}

/* Prevent scrolling on Desktop / Laptop screens, fallback to scroll on short mobile */
@media (min-width: 901px) {
    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: clamp(1rem, 4vh, 4rem) clamp(1rem, 4vw, 3rem);
    }
}
