@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,600&family=Outfit:wght@300;400;500&display=swap');

:root {
    --bg: #070709;
    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.45);
    --border: rgba(212, 175, 55, 0.1);
    --accent: #d4af37; /* Sacred Marigold Gold */
    --accent-glow: rgba(212, 175, 55, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Outfit', sans-serif; overflow-x: hidden; }

/* Golden Incense/Diya Particles */
.divya-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.diya-particle {
    position: absolute;
    bottom: -10px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    border-radius: 50%;
    animation: floatUp linear infinite;
    opacity: 0.4;
}
@keyframes floatUp {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-105vh) scale(0.4); opacity: 0; }
}

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; padding: 1rem 2rem; z-index: 100; background: rgba(7,7,9,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-back { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-decoration: none; opacity: 0.7; transition: opacity 0.2s; }
.nav-back:hover { opacity: 1; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 7rem 1.5rem 4rem;
    position: relative; z-index: 1;
}
.hero-glow {
    position: absolute;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.06), transparent 70%);
    pointer-events: none;
}
.hero-eyebrow { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.5rem; }
.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 400; line-height: 1.1; margin-bottom: 1.5rem;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 1rem; font-weight: 300; max-width: 520px; line-height: 1.75; margin-bottom: 3rem; }

/* Glass Panel helper */
.glass-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
}

/* Countdown Card */
.countdown-card {
    width: 100%;
    max-width: 520px;
    padding: 2.2rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    border: 1px solid rgba(212,175,55,0.2);
}
.countdown-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(212,175,55,0.03), transparent);
    pointer-events: none;
}
.countdown-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 400; color: var(--accent); margin-bottom: 0.3rem; }
.countdown-date { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 2rem; }

.timer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.timer-box { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-box span { font-size: 2rem; font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }
.timer-box label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-top: 0.3rem; }

.sync-status { font-size: 0.8rem; font-weight: 300; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--muted); background: rgba(212,175,55,0.05); padding: 0.5rem 1.2rem; border-radius: 100px; border: 1px solid rgba(212,175,55,0.1); }
.pulse-dot { width: 6px; height: 6px; background-color: var(--accent); border-radius: 50%; display: inline-block; box-shadow: 0 0 8px var(--accent); animation: pulseDot 1.5s infinite alternate; }
@keyframes pulseDot { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.4); opacity: 1; } }

/* Events Section */
.calendar-main { max-width: 900px; margin: 0 auto; padding: 4rem 1.5rem; position: relative; z-index: 1; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 400; text-align: center; color: var(--text); margin-bottom: 0.5rem; }
.section-sub { font-size: 0.9rem; font-weight: 300; text-align: center; color: var(--muted); margin-bottom: 3.5rem; }

.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.event-card {
    padding: 2.2rem 1.8rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.event-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212,175,55,0.3);
    background: rgba(255,255,255,0.04);
}
.event-badge {
    position: absolute; top: 1.2rem; right: 1.2rem;
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--muted); border: 1px solid rgba(255,255,255,0.15);
    padding: 0.2rem 0.6rem; border-radius: 4px;
}
.event-badge.gold { border-color: rgba(212,175,55,0.4); color: var(--accent); }
.event-icon { font-size: 2.5rem; margin-bottom: 1.5rem; }
.event-name { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 500; margin-bottom: 0.5rem; }
.event-range { font-size: 0.8rem; color: var(--muted); font-weight: 300; margin-bottom: 1.8rem; }
.event-click-hint { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 400; transition: transform 0.3s; display: block; }
.event-card:hover .event-click-hint { transform: translateX(4px); }

/* Completed event styling */
.event-card.completed { opacity: 0.8; }
.event-card.completed:hover { opacity: 1; }

/* Modal Popup styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.4s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-card {
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid var(--accent);
    border-radius: 28px;
    padding: 3.5rem 2.2rem 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    position: relative;
}
.modal-overlay.active .modal-card { transform: scale(1); }
.modal-close { position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }

.modal-header-icon { font-size: 4.5rem; margin-bottom: 1rem; animation: pulseHeart 1.8s ease infinite alternate; }
.modal-event-name { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; color: var(--accent); margin-bottom: 0.3rem; }
.modal-event-date { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 2.5rem; }

.modal-info-box { text-align: left; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 1.2rem; border-radius: 16px; margin-bottom: 1.5rem; }
.modal-info-box h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; color: var(--accent); margin-bottom: 0.4rem; font-weight: 500; }
.modal-info-box p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); line-height: 1.7; font-weight: 300; }

.sync-action-box { margin-top: 2rem; border-top: 1px solid rgba(212,175,55,0.15); padding-top: 2rem; text-align: center; }

/* Interactive Toggle Switch */
.toggle-container {
    display: inline-flex; align-items: center; gap: 0.8rem; cursor: pointer;
    font-size: 0.95rem; font-weight: 400; color: rgba(255,255,255,0.8);
    position: relative; user-select: none;
}
.toggle-container input { display: none; }
.checkmark {
    width: 20px; height: 20px; border: 2px solid var(--accent);
    border-radius: 4px; display: inline-block; position: relative;
    transition: background 0.3s;
}
.toggle-container input:checked + .checkmark { background: var(--accent); }
.checkmark::after {
    content: ''; position: absolute; display: none;
    left: 6px; top: 2px; width: 4px; height: 9px;
    border: solid #070709; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.toggle-container input:checked + .checkmark::after { display: block; }
.sync-msg { font-size: 0.72rem; color: var(--muted); margin-top: 0.6rem; }

/* Comments Custom Wrapper */
.comments-wrapper { max-width: 720px; margin: 4rem auto 0; padding: 4rem 1.5rem 0; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.comments-header { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; text-align: center; color: var(--accent); margin-bottom: 0.3rem; }
.comments-subheader { font-size: 0.85rem; text-align: center; color: var(--muted); margin-bottom: 2.5rem; }

/* Footer */
.footer { text-align: center; padding: 6rem 1rem 4rem; position: relative; z-index: 1; border-top: 1px solid var(--border); }
.footer-line { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; line-height: 1.7; margin-bottom: 2rem; color: rgba(255,255,255,0.6); }
.footer-line em { color: var(--accent); font-style: italic; }
.footer-back { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-decoration: none; opacity: 0.6; transition: opacity 0.2s; }
.footer-back:hover { opacity: 1; }
