/* css/style.css */

:root {
    /* Color Palette */
    --primary-green: #1A472A;
    --bg-dark: rgba(15, 43, 25, 0.5);
    --card-bg: rgba(22, 61, 36, 0.5);
    --gold-accent: #D4AF37;
    --white: #FFFFFF;
    --text-light: #E8F0EA;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', 'Source Sans Pro', sans-serif;

    /* Spacing */
    --spacing-1: 0.5rem;
    --spacing-2: 1rem;
    --spacing-3: 1.5rem;
    --spacing-4: 2rem;
    --spacing-5: 3rem;
    --spacing-6: 5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-light);
    background-color: #0f2b19;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 1; /* Establish stacking context */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../assets/images/nepali_mandala_bg.png?v=2');
    background-repeat: repeat;
    background-size: 600px;
    opacity: 0.08;
    z-index: -1; 
    pointer-events: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold-accent);
    margin-bottom: var(--spacing-3);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--gold-accent);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--gold-accent);
    color: #000;
}

.btn-primary:hover {
    background-color: #e5be42;
    color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--gold-accent);
    border: 2px solid var(--gold-accent);
}

.btn-secondary:hover {
    background-color: var(--gold-accent);
    color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-waitlist {
    background-color: var(--gold-accent);
    color: #000;
    width: 100%;
}

.btn-waitlist:hover {
    background-color: #e5be42;
    color: #000;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Initial Stop Animations for Buttons and Image */
.animate-initial {
    animation: emphasisPulse 1.5s ease-in-out 2;
}

@keyframes emphasisPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.animate-initial-image {
    animation: imageFloatOnce 3s ease-in-out 1;
}

@keyframes imageFloatOnce {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }

    60% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* Sections */
section {
    padding: var(--spacing-5) 0;
}


/* Header / Navigation */
.top-nav {
    padding: var(--spacing-3) 0;
    position: absolute;
    /* Float above the hero */
    width: 100%;
    z-index: 10;
}

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

.nav-brand-wrap {
    display: flex; 
    align-items: center; 
    gap: 1.5rem;
}

.nav-logo {
    display: flex; 
    align-items: center;
}

.brand-logo {
    width: 100px; 
    filter: brightness(0) invert(1);
}

.social-links {
    display: flex; 
    gap: 1rem; 
    border-left: 1px solid rgba(212,175,55,0.3); 
    padding-left: 1.5rem;
}

.social-link {
    color: var(--gold-accent);
    font-size: 1.5rem;
    /* Increased size for icons */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.social-link:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    background-color: transparent;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--spacing-6);
    padding-bottom: var(--spacing-4);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom, rgba(15, 43, 25, 0.2), rgba(15, 43, 25, 0.4)), url('../assets/images/himalayas_millet_bg.png?v=2');
    background-size: cover;
    background-position: center top;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    opacity: 0.15;
    pointer-events: none;
}

.hero-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: var(--spacing-4);
    width: 100%;
    z-index: 3;
    position: relative;
}

.hero h1 {
    color: var(--gold-accent);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-3);
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-4);
    opacity: 0.9;
    text-align: center;
}

.hero .cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
}

.hero-content {
    flex: 1;
    z-index: 2;
    width: 100%;
    /* Clean backdrop glow behind the text container */
    background: radial-gradient(ellipse at center, rgba(15, 43, 25, 0.9) 0%, rgba(15, 43, 25, 0.4) 50%, rgba(15, 43, 25, 0) 80%);
    padding: 3rem 2rem;
    border-radius: 60px;
}

.hero-image {
    flex: 1;
    display: flex;
    /* Show image globally */
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 100%;
    margin-top: 4rem; /* Added to provide clearance from absolute navigation */
}

.hero-image img {
    max-width: 300px; 
    max-height: 440px;
    height: auto;
    width: auto;
}

/* Product Info Section */
.product-info {
    background-color: var(--card-bg);
    /* Use lighter card-bg to contrast with hero */
    position: relative;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.product-info h2 {
    font-size: 2rem;
    position: relative;
    z-index: 1;
    margin-bottom: var(--spacing-5);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
    position: relative;
    z-index: 1;
}

.product-card {
    background: var(--bg-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: var(--spacing-5);
    border-radius: 12px;
    transition: transform 0.4s ease;
    text-align: left;
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card h3 {
    font-size: 1.8rem;
    color: var(--gold-accent);
    margin-bottom: var(--spacing-2);
}

/* Sections General additions */
.the-offer {
    background-color: var(--card-bg); 
    text-align: center; 
    border-radius: 12px; 
    margin: 2rem auto 0 auto; 
    max-width: 1000px; 
    padding: var(--spacing-4);
}

.testimonials {
    padding: var(--spacing-4) 0;
}


.how-it-works {
    padding: var(--spacing-4) 0 var(--spacing-6) 0; 
    text-align: center; 
    background-color: var(--bg-dark);
}

.how-it-works .section-title {
    margin-bottom: 5rem; /* Large enough gap for the icon negative margins */
}

.steps-container {
    position: relative; 
    max-width: 1000px; 
    margin: 0 auto 4rem auto;
}

.steps-grid {
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 3rem 2rem; 
    position: relative; 
    z-index: 1;
}

.step-card {
    flex: 1; 
    min-width: 250px; 
    background-color: var(--card-bg); 
    padding: 2.5rem 1.5rem; 
    border-radius: 12px; 
    border: 1px solid rgba(212,175,55,0.2); 
    position: relative; 
    transition: transform 0.3s ease;
}

.step-icon {
    background: linear-gradient(135deg, var(--gold-accent), #B8860B);
    color: var(--bg-dark);
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 2rem; 
    margin: -4.5rem auto 1.5rem auto; 
    border: 4px solid var(--card-bg);
}

.badges {
    display: flex; 
    justify-content: center; 
    gap: 2rem; 
    margin: 1rem 0; 
    align-items: center;
}

.badge-card {
    padding: 1rem; 
    border: 1px solid rgba(212,175,55,0.3); 
    border-radius: 8px;
}

.badge-card img {
    height: 60px; 
    max-width: 100%; 
    object-fit: contain; 
    margin-bottom: 0.5rem;
}

.about-short {
    background-color: var(--card-bg); 
    padding: var(--spacing-5) 0; 
    margin-top: 3rem;
}

.about-container {
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    gap: 3rem;
}

.about-text {
    flex: 1; 
    min-width: 300px;
}

.about-image {
    flex: 1; 
    min-width: 300px; 
    text-align: center;
}

.about-image img {
    width: 100%; 
    height: auto; 
    border-radius: 8px; 
    border: 1px dashed var(--gold-accent);
}

/* Review Submission Section */
.review-submission {
    background-color: var(--card-bg); 
    padding: var(--spacing-5) 0; 
    margin-top: 3rem; 
    border-top: 1px solid rgba(212,175,55,0.2);
}

.review-container {
    max-width: 600px;
    text-align: center;
    margin: 0 auto;
}

.review-form {
    margin-top: 2rem;
}

.review-message {
    margin-top: 1rem;
    font-weight: bold;
    color: var(--gold-accent);
}

.btn-full {
    width: 100%;
}

/* Waitlist Section */
.waitlist-section {
    background-color: var(--bg-dark);
    padding-top: var(--spacing-4);
}


.form-group {
    margin-bottom: var(--spacing-3);
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-1);
    font-weight: 600;
    color: var(--gold-accent);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-light);
}

.form-control::placeholder {
    color: rgba(232, 240, 234, 0.5);
}

/* Footer */
footer {
    background-color: rgba(6, 17, 9, 0.5);
    color: var(--text-light);
    padding: var(--spacing-5) 0;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: var(--gold-accent);
}

.footer-links {
    margin: var(--spacing-3) 0;
    display: flex;
    justify-content: center;
    gap: var(--spacing-4);
    flex-wrap: wrap;
}

.compliance-text {
    opacity: 0.7;
    margin-top: var(--spacing-4);
    font-size: 0.8rem;
}

/* Responsible Drinking */
.responsible-drinking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--spacing-4);
}

.drinkaware-logo {
    height: 40px;
}

/* Age Gate Mod */
#age-gate-overlay h1 {
    color: var(--gold-accent);
    margin-bottom: 2rem;
}

/* Responsive Utilities */
.d-none {
    display: none !important;
}

/* Base Mobile Overrides (Up to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-2);
    }

    .hero {
        padding-top: var(--spacing-6);
        text-align: center;
        min-height: 0;
    }

    .hero h1 {
        font-size: 2rem;
        text-align: center;
    }

    .hero-container {
        flex-direction: column-reverse;
        gap: var(--spacing-2);
    }

    .hero-image {
        margin-bottom: var(--spacing-4);
    }
    
    .hero-image img {
        max-width: 200px;
    }

    .hero p {
        font-size: 1rem;
        text-align: center;
    }

    .hero .cta-group {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-2);
    }

    .btn {
        width: 100%;
    }

    .product-info h2 {
        font-size: 1.5rem;
    }

    .product-card h3 {
        font-size: 1.3rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        margin-top: 3rem;
    }

    .step-icon {
        margin-top: -3.5rem; /* Still overlap slightly, but controlled */
    }

    .about-short .container {
        flex-direction: column;
        gap: 2rem;
    }

    .about-text, .about-image {
        min-width: 100%;
        text-align: center;
    }

    .badges {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Tablet / Desktop (768px and up) */
@media (min-width: 768px) {
    .d-md-block {
        display: block !important;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-container {
        flex-direction: row;
        text-align: left;
    }

    .hero h1 {
        font-size: 3rem;
        text-align: left;
    }

    .hero-bg-anim {
        width: 50%;
    }

    .hero p {
        text-align: left;
        font-size: 1.2rem;
    }

    .hero-image img {
        max-width: 300px;
        max-height: 440px;
    }

    .hero .cta-group {
        flex-direction: row;
        gap: var(--spacing-3);
    }

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

/* Large Desktop (1024px and up) */
@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

/* Exit Intent Popup */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-4);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.exit-popup-content {
    background-color: var(--card-bg);
    color: var(--text-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: var(--spacing-5);
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(-20px);
    animation: slideDown 0.4s forwards ease-out;
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.exit-popup-close:hover {
    opacity: 1;
    color: var(--gold-accent);
}

.exit-popup-content h2 {
    color: var(--gold-accent);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.exit-popup-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.exit-subscribe-link {
    display: block;
    color: var(--text-light);
    text-decoration: underline;
    opacity: 0.7;
    margin-top: 1rem;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}

.exit-subscribe-link:hover {
    opacity: 1;
    color: var(--gold-accent);
}

/* --- STAR RATING --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 5px;
    margin-top: 5px;
}

.star-rating input[type="radio"] {
    display: none !important;
}

.star-rating label {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    margin: 0;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: var(--gold-accent);
}

.star-rating label:active {
    transform: scale(0.9);
}

/* --- PAYPAL MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-container {
    background: var(--card-bg);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold-accent);
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.modal-pricing-summary {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.summary-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold-accent);
    margin-top: 0.5rem;
}

.summary-item span:first-child {
    color: var(--text-light);
    opacity: 0.8;
}

.text-free {
    color: #4ade80;
    font-weight: 600;
}

.paypal-button-wrap {
    min-height: 150px;
}

.payment-status-message {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    display: none;
}

/* Success Modal Image Scaling */
.success-image {
    max-width: 95px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

/* Notification Modal specific overrides */
#notification-modal .modal-container {
    animation: modalSlideUp 0.4s ease-out;
}

#notification-icon {
    animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* --- GLOBAL MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2147483647; /* Maximum possible z-index */
}

.modal-container {
    background: var(--primary-green);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--gold-accent);
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- IMAGE SLIDER --- */
.image-slider {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px dashed var(--gold-accent);
    position: relative;
    background-color: rgba(0,0,0,0.2);
}

.slider-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.45, 0.05, 0.55, 0.95);
    width: 100%;
}

.slider-track img {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    object-fit: cover;
    aspect-ratio: 16 / 9; /* Maintain a consistent aspect ratio */
}

@media (max-width: 767px) {
    .slider-track img {
        aspect-ratio: 4 / 3;
    }
}