/* ---- CSS Variables ---- */
:root {
    --bg-white: #ffffff;
    --gold: #D4AF37;
    --gold-light: rgba(212, 175, 55, 0.2);
    --text-dark: #2a2a2a;
    --text-light: #555555;
    --ivory: #FFFFF0;
    --beige: #F5F5DC;
    
    --font-heading: 'Cinzel', serif;
    --font-script: 'Great Vibes', cursive;
    --font-text: 'Montserrat', sans-serif;
}

/* ---- Reset & Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ---- Custom Cursor ---- */
#cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-light) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: multiply;
    transition: width 0.3s, height 0.3s;
}

/* ---- Loader ---- */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--beige);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ---- Scroll Progress ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gold);
    width: 0%;
    z-index: 1000;
}

/* ---- Particles Container ---- */
#particles-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.petal, .sparkle {
    position: absolute;
    top: -10%;
    pointer-events: none;
}

.petal {
    width: 15px;
    height: 15px;
    background: var(--ivory);
    border-radius: 15px 0 15px 0;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
    animation: fall linear infinite;
    opacity: 0.7;
}

.sparkle {
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold);
    animation: floatUp linear infinite;
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(110vh) rotate(360deg); }
}

@keyframes floatUp {
    0% { transform: translateY(110vh) scale(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ---- Global Styles & Typography ---- */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
}

.card-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.heart {
    font-size: 1.5rem;
    margin: 1rem 0;
    animation: pulse 2s infinite;
}

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

/* ---- Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-line {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}
.reveal-line.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Hero Section ---- */
.hero-content {
    text-align: center;
}

.names {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    letter-spacing: 2px;
}

.profession {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.script-title {
    font-family: var(--font-script);
    font-size: 4rem;
    color: var(--gold);
    margin: 2rem 0;
    font-weight: 400;
}

.invitation-text {
    max-width: 500px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-light);
}

.save-the-date {
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--gold);
}

.save-the-date h3 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.date-highlight {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 0.5rem;
}

/* ---- Wedding Details ---- */
.detail-item {
    margin-bottom: 2rem;
}

.detail-label {
    font-family: var(--font-heading);
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1.1rem;
    color: var(--text-light);
}

.location-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    text-decoration: none;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 30px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--gold);
    color: var(--bg-white);
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ---- Poem Section ---- */
.poem-tamil {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gold-light);
}

.poem-line {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.author {
    margin-top: 1rem;
    font-style: italic;
    color: var(--gold);
    font-weight: 500;
}

.poem-meaning h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.poem-meaning p {
    font-style: italic;
    color: var(--text-light);
}

/* ---- Countdown Section ---- */
.countdown-target {
    font-family: var(--font-heading);
    color: var(--text-light);
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.countdown-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.countdown-box {
    background: var(--bg-white);
    border: 1px solid var(--gold-light);
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
    border-radius: 10px;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

.countdown-box:hover {
    transform: translateY(-5px);
}

.countdown-box span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
}

.countdown-box p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* ---- Gallery Section ---- */
.masonry-grid {
    display: column;
    column-count: 3;
    column-gap: 1.5rem;
    max-width: 1000px;
    width: 100%;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.grid-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: color 0.3s;
}

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

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

/* ---- Closing Section ---- */
#closing {
    text-align: center;
    min-height: 50vh;
    padding-bottom: 4rem;
}

.closing-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.closing-names h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 2px;
}

.closing-date {
    margin-top: 2rem;
    letter-spacing: 3px;
    color: var(--text-light);
    text-transform: uppercase;
}

/* ---- Scroll to Top ---- */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-white);
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover {
    background: var(--gold);
    color: var(--bg-white);
    transform: translateY(-5px);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .names { font-size: 2rem; }
    .script-title { font-size: 3rem; }
    .section-title { font-size: 2rem; }
    .masonry-grid { column-count: 2; }
    .card-glass { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
    .names { font-size: 1.5rem; }
    .script-title { font-size: 2.5rem; }
    .masonry-grid { column-count: 1; }
    .countdown-container { gap: 1rem; }
    .countdown-box { width: 70px; height: 70px; }
    .countdown-box span { font-size: 1.5rem; }
    .countdown-box p { font-size: 0.6rem; }
}
