/*
    Romantic Floral - Luxury Botanical Edition
    A premium design system for digital invitations.
*/

:root {
    --primary-color: #2d4a3e; /* Forest Green */
    --secondary-color: #e8d5c4; /* Pale Sand */
    --accent-color: #a67c52; /* Bronze Gold */
    --bg-light: #fdfaf7;
    --text-muted: #5a7a6c;
    --font-cursive: 'Great Vibes', cursive;
    --font-serif: 'Libre Baskerville', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--primary-color);
    background-color: var(--bg-light);
    line-height: 1.7;
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* --- Intro / Cover --- */
.intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: var(--secondary-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.5s cubic-bezier(0.8, 0, 0.2, 1);
}

.intro.opened {
    transform: translateY(-100%);
}

.intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(45, 74, 62, 0.05) 0%, transparent 70%);
}

.floral-ornament {
    position: absolute;
    width: 300px;
    height: 300px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 50 Q70 10 90 50 T50 90 T10 50 T50 10" fill="none" stroke="%232d4a3e" stroke-width="0.5" opacity="0.2"/></svg>');
    background-size: contain;
    z-index: 0;
}

.top-left { top: -50px; left: -50px; transform: rotate(-15deg); }
.bottom-right { bottom: -50px; right: -50px; transform: rotate(165deg); }

.intro-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.intro-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 2rem;
}

.intro-names {
    font-family: var(--font-cursive);
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 400;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.guest-card {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 100px 100px 0 0;
    border: 1px solid rgba(166, 124, 82, 0.2);
}

.guest-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: var(--text-muted);
}

.guest-name {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-top: 0.5rem;
}

.intro-footer {
    margin-top: 4rem;
}

.intro-date {
    font-size: 1.1rem;
    letter-spacing: 0.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.7;
}

.btn-enter {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(45, 74, 62, 0.2);
}

.btn-enter:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(166, 124, 82, 0.3);
}

/* --- Floating Nav --- */
.floating-nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    transition: var(--transition);
    opacity: 0;
}

.floating-nav.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.nav-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    border: 1px solid rgba(45, 74, 62, 0.1);
}

.nav-links {
    position: relative;
    padding: 0.8rem 1.5rem;
    display: flex;
    gap: 1.2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.nav-links a.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* --- Music Player --- */
.music-player {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    cursor: pointer;
}

.player-disc {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.music-player.playing .player-disc {
    animation: rotateDisc 4s infinite linear;
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Sections Common --- */
section {
    padding: 6rem 1.5rem;
}

@media (min-width: 992px) {
    section { padding: 10rem 2rem; }
}

.wrapper {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.section-title-box {
    margin-bottom: 6rem;
}

.title {
    font-family: var(--font-cursive);
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 400;
}

.subtitle {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.1rem;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    position: relative;
    padding: 0;
}

.hero-box {
    background: white;
    padding: 3rem 1.5rem;
    border-radius: 100px 100px 0 0;
    box-shadow: 0 30px 60px rgba(45, 74, 62, 0.1);
    border: 1px solid rgba(166, 124, 82, 0.2);
    max-width: 600px;
    width: 90%;
}

@media (min-width: 768px) {
    .hero-box { padding: 6rem 4rem; border-radius: 200px 200px 0 0; }
}

.hero-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.hero-names {
    font-family: var(--font-cursive);
    font-size: clamp(3rem, 10vw, 5rem);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.hero-divider .line {
    width: 50px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

.hero-date {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    animation: bounce 2s infinite;
    opacity: 0.5;
}

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

/* --- Couple --- */
.couple-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.couple-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.couple-img-wrapper {
    position: relative;
    width: 280px;
    height: 380px;
    margin: 0 auto 3rem;
}

.img-frame {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-color);
    z-index: 0;
}

.couple-placeholder {
    width: 100%;
    height: 100%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
    border-radius: 140px 140px 0 0;
    overflow: hidden;
}

.couple-card h3 {
    font-family: var(--font-cursive);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.parents {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.couple-heart {
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.3;
}

/* --- Event --- */
.event {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.event .title {
    color: var(--secondary-color);
}

.timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .timer { gap: 2rem; margin-bottom: 6rem; }
}

.timer-item span {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

@media (min-width: 768px) {
    .timer-item span { font-size: 3.5rem; }
}

.timer-item label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    opacity: 0.6;
}

.event-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 4rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 5rem 3rem;
    border: 1px solid rgba(232, 213, 196, 0.1);
    position: relative;
    border-radius: 20px;
    transition: var(--transition);
}

.event-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
}

.event-header {
    margin-bottom: 3rem;
}

.event-header i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.event-header h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    letter-spacing: 0.2rem;
}

.event-body .event-date {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-body .event-time {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.event-divider {
    width: 40px;
    height: 1px;
    background: var(--accent-color);
    margin: 2rem auto;
    opacity: 0.3;
}

.event-venue {
    font-weight: 300;
    opacity: 0.8;
}

/* --- Location --- */
.location-card {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(45, 74, 62, 0.1);
    border: 1px solid rgba(166, 124, 82, 0.1);
}

.location-details {
    padding: 5rem 2rem;
}

.location-details i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.location-details h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.address {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-location {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 3rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-location:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* --- Gallery --- */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.gallery-photo {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 20px;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-photo:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* --- RSVP --- */
.rsvp {
    background-color: var(--secondary-color);
}

.rsvp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.botanical-form {
    text-align: left;
    background: white;
    padding: 4rem;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(45, 74, 62, 0.05);
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid rgba(166, 124, 82, 0.1);
    border-radius: 15px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: white;
}

.btn-submit {
    width: 100%;
    padding: 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--accent-color);
    transform: scale(1.02);
}

.wishes-list {
    text-align: left;
}

.wishes-scroll {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 2rem;
}

.wishes-scroll::-webkit-scrollbar {
    width: 3px;
}

.wishes-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-color);
}

.wish-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(166, 124, 82, 0.1);
    position: relative;
}

.wish-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.wish-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--primary-color);
}

.wish-time {
    font-size: 0.7rem;
    opacity: 0.5;
}

.wish-msg {
    font-style: italic;
    color: var(--text-muted);
}

.wish-flower {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    padding: 0 10px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

/* --- Footer --- */
.main-footer {
    padding: 12rem 2rem;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.footer-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.7;
}

.footer-names {
    font-family: var(--font-cursive);
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--accent-color);
    margin-bottom: 4rem;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .rsvp-layout {
        grid-template-columns: 1fr;
    }
}

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

    .timer {
        gap: 1rem;
    }

    .timer-item span {
        font-size: 2.5rem;
    }

    .event-card {
        padding: 4rem 2rem;
    }
}

/* ── Responsive Fix ── */
@media (max-width: 600px) {
  /* Countdown */
  .timer {
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
  }
  .timer-item {
    flex: 1 1 calc(50% - 0.8rem);
    min-width: 60px;
  }
  .timer-item span {
    font-size: clamp(1.8rem, 8vw, 2rem) !important;
  }

  /* Event boxes */
  .event-boxes {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .event-card {
    padding: 3rem 1.5rem;
    border-radius: 15px;
  }

  /* RSVP layout */
  .rsvp-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .botanical-form {
    padding: 2rem;
    border-radius: 20px;
  }

  /* Footer */
  .main-footer {
    padding: 5rem 1.5rem 8rem !important; /* Add extra bottom padding for fixed navigation safety */
  }
  .footer-quote {
    font-size: clamp(1rem, 4vw, 1.5rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .footer-names {
    font-size: clamp(2rem, 8vw, 3rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Couple */
  .couple-card {
    min-width: unset;
    width: 100%;
  }

  /* Section padding */
  section {
    padding: 4rem 1.5rem;
  }
}

/* Height-based scaling for short viewports (eg. small phones or mock frames) */
@media (max-height: 720px) {
  .cover-content {
    padding: 1rem;
  }
  .cover-subtitle {
    margin-bottom: 1rem;
  }
  .cover-names {
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .guest-reveal {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
  .guest-name {
    font-size: 1.4rem;
  }
  .cover-footer {
    margin-top: 2rem;
  }
  .cover-date {
    margin-bottom: 1rem;
  }
  .hero-box {
    padding: 2.5rem 1.25rem;
  }
  .hero-names {
    font-size: clamp(2.5rem, 8vw, 3.8rem);
    margin: 1rem 0;
  }
  .hero-date {
    font-size: 1rem;
  }
}

