/*
    Garden Party - Whimsical Edition
    A playful and fresh design system for garden weddings.
*/

:root {
    --sky: #e1f5fe;
    --leaf: #f1f8e9;
    --leaf-dark: #81c784;
    --coral: #ef5350;
    --sun: #ffd54f;
    --text: #37474f;
    --white: #ffffff;
    --font-script: 'Grand Hotel', cursive;
    --font-sans: 'Quicksand', sans-serif;
    --transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

.garden-intro.opened {
    transform: scale(1.5) opacity(0);
    pointer-events: none;
    display: none; /* Just to be safe */
}

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

.intro-content {
    text-align: center;
    padding: 2rem;
}

.flower-seal {
    font-size: 3rem;
    color: var(--coral);
    margin-bottom: 2rem;
}

.intro-label {
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--leaf-dark);
    margin-bottom: 1.5rem;
}

.intro-names {
    font-family: var(--font-script);
    font-size: clamp(3rem, 10vw, 5rem);
    color: var(--text);
    margin-bottom: 3rem;
}

.guest-card {
    background: white;
    padding: 2rem;
    border-radius: 30px;
    margin-bottom: 3rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

.guest-card span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--muted);
}

.guest-card h2 {
    font-size: 1.8rem;
    color: var(--coral);
}

.btn-garden {
    background: var(--coral);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(239, 83, 80, 0.3);
}

.btn-garden:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(239, 83, 80, 0.4);
}

/* --- Decorations --- */
.garden-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

.leaf {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--leaf-dark);
    opacity: 0.1;
    border-radius: 0 100%;
}

.leaf-1 { top: 10%; left: -50px; transform: rotate(45deg); }
.leaf-2 { bottom: 10%; right: -50px; transform: rotate(-135deg); }

.butterfly {
    position: absolute;
    color: var(--coral);
    font-size: 1.5rem;
    opacity: 0.4;
}

.butterfly-1 { top: 20%; right: 10%; animation: float 6s infinite ease-in-out; }
.butterfly-2 { bottom: 30%; left: 15%; animation: float 8s infinite ease-in-out reverse; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -50px) rotate(20deg); }
    66% { transform: translate(-20px, -80px) rotate(-10deg); }
}

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

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

.nav-bubble {
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    display: flex;
    gap: 1rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

nav a {
    color: #ccc;
    font-size: 1.2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

nav a.active {
    background: var(--leaf);
    color: var(--leaf-dark);
}

/* --- Music --- */
.music-toggle-btn {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: var(--coral);
  color: white;
}
.music-toggle-btn:hover { transform: scale(1.1); }
.music-toggle-btn svg { width: 20px; height: 20px; }

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: radial-gradient(circle at center, white 0%, var(--leaf) 100%);
}

.garden-frame {
    padding: 2rem 1.5rem;
    border: 2px dashed var(--leaf-dark);
    border-radius: 30px;
    text-align: center;
    position: relative;
    width: 90%;
}

@media (min-width: 768px) {
    .garden-frame { padding: 4rem; border-radius: 50px; }
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4rem;
    color: var(--leaf-dark);
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-script);
    font-size: clamp(3.5rem, 12vw, 6rem);
    color: var(--text);
    line-height: 1;
    margin-bottom: 2rem;
}

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

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 3rem;
}

.hero-dots span {
    width: 8px;
    height: 8px;
    background: var(--sun);
    border-radius: 50%;
}

/* --- Couple --- */
.couple-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.couple-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: white;
    padding: 4rem 2rem;
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
}

.bubble-portrait {
    width: 150px;
    height: 150px;
    background: var(--sky);
    margin: 0 auto 3rem;
    border-radius: 60% 40% 70% 30% / 40% 50% 60% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    animation: morph 8s infinite ease-in-out;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 70% 30% / 40% 50% 60% 70%; }
    50% { border-radius: 30% 60% 40% 70% / 50% 60% 30% 40%; }
}

.couple-card h3 {
    font-family: var(--font-script);
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.leaf-divider { font-size: 1.5rem; color: var(--leaf-dark); margin: 1.5rem 0; }

/* --- Event --- */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 3rem;
}

.event-item {
    background: white;
    padding: 4rem 2rem;
    border-radius: 40px;
    text-align: center;
}

.icon-blob {
    width: 80px;
    height: 80px;
    background: var(--sun);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 2.5rem;
}

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

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

.time-box {
    background: white;
    padding: 1rem 0.5rem;
    border-radius: 15px;
    min-width: 70px;
}

@media (min-width: 768px) {
    .time-box { padding: 2rem; border-radius: 25px; min-width: 100px; }
}

.time-box span {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--coral);
}

@media (min-width: 768px) {
    .time-box span { font-size: 2.5rem; }
}

.time-box label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.5;
}

/* --- Location --- */
.map-card {
    background: white;
    padding: 1.5rem;
    border-radius: 40px;
    overflow: hidden;
}

.map-area {
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.gallery-blob {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%;
    transition: var(--transition);
}

.gallery-blob img { width: 100%; height: 100%; object-fit: cover; }
.gallery-blob:hover { border-radius: 20px; transform: scale(1.05); }

/* --- RSVP --- */
.rsvp-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    text-align: left;
}

.garden-form {
    background: white;
    padding: 4rem;
    border-radius: 40px;
}

.form-row { margin-bottom: 2rem; }
.garden-form input, .garden-form textarea {
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--leaf);
    border: none;
    border-radius: 20px;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    border-radius: 100px;
    background: var(--coral);
    color: white;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.wishes-cloud {
    max-height: 600px;
    overflow-y: auto;
}

.cloud-item {
    background: white;
    padding: 2rem;
    border-radius: 30px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}

.item-head { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.item-head strong { color: var(--coral); font-family: var(--font-script); font-size: 1.4rem; }
.item-head span { font-size: 0.7rem; opacity: 0.5; }

/* --- Footer --- */
.garden-footer {
    padding: 10rem 2rem;
    text-align: center;
}

.quote { font-style: italic; color: var(--muted); margin-bottom: 2rem; }
.garden-footer .names { font-family: var(--font-script); font-size: 3rem; color: var(--coral); margin-bottom: 2rem; }
.copy { font-size: 0.7rem; opacity: 0.4; text-transform: uppercase; letter-spacing: 0.2rem; }

/* --- Animations --- */
.animate-reveal { opacity: 0; transform: translateY(30px); }

/* --- Responsive --- */
@media (max-width: 992px) {
    .event-grid, .rsvp-box { grid-template-columns: 1fr; }
    section { padding: 6rem 1.5rem; }
}

/* ── Responsive Fix ── */
@media (max-width: 600px) {
  /* Countdown */
  .countdown {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
  }
  .time-box {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 60px;
    padding: 1rem 0.5rem !important;
    border-radius: 15px !important;
  }
  .time-box span {
    font-size: clamp(1.5rem, 7vw, 2.5rem) !important;
  }

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

  /* RSVP */
  .rsvp-box {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .garden-form {
    padding: 2rem;
    border-radius: 25px;
  }

  /* Footer */
  .garden-footer {
    padding: 5rem 1.5rem;
  }
  .garden-footer .names {
    font-size: clamp(2rem, 8vw, 3rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .garden-footer .quote {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

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

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