/*
    Ocean Breeze - Serene Coastal Edition
    A fluid and refreshing design system inspired by the sea.
*/

:root {
    --sea-foam: #e0f2f1;
    --sea-deep: #00695c;
    --cyan: #00bcd4;
    --sand: #fffbf2;
    --text: #263238;
    --muted: #546e7a;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* --- Ocean Background --- */
.ocean-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #b2ebf2 0%, #ffffff 100%);
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 200%;
    height: 150px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2300bcd4" fill-opacity="0.1" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,144C672,139,768,181,864,197.3C960,213,1056,203,1152,181.3C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') repeat-x;
    animation: waveMove 10s linear infinite;
}

.wave-2 { bottom: -30px; opacity: 0.5; animation-delay: -5s; animation-duration: 15s; }

@keyframes waveMove {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

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

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

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

.shell-icon {
    font-size: 3rem;
    color: var(--cyan);
    margin-bottom: 2rem;
}

.intro-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--sea-deep);
    letter-spacing: 0.2rem;
    margin-bottom: 1.5rem;
}

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

.guest-card {
    background: white;
    padding: 3rem;
    border-radius: 50px 50px 0 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    margin-bottom: 4rem;
}

.guest-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2rem; opacity: 0.5; }
.guest-name { font-family: var(--font-serif); font-size: 2.2rem; margin-top: 0.5rem; color: var(--sea-deep); }

.btn-coastal {
    background: var(--sea-deep);
    color: white;
    border: none;
    padding: 1.2rem 3.5rem;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.btn-coastal:hover { transform: scale(1.05); box-shadow: 0 10px 30px rgba(0, 105, 92, 0.3); }

/* --- 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-ocean {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    display: flex;
    gap: 1.2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

nav a {
    color: #b0bec5;
    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(--sea-foam); color: var(--sea-deep); }

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

.wave-visual { display: flex; align-items: center; gap: 4px; height: 20px; }
.wave-visual span { width: 3px; background: var(--sea-deep); height: 100%; border-radius: 10px; }
.music-toggle.playing span { animation: waveStretch 0.6s infinite alternate ease-in-out; }
@keyframes waveStretch { from { height: 5px; } to { height: 20px; } }

/* --- Sections --- */
section { padding: 6rem 1.5rem; position: relative; }
@media (min-width: 992px) {
    section { padding: 10rem 2rem; }
}
.container { max-width: 1200px; margin: 0 auto; text-align: center; }
.section-title h2 { font-family: var(--font-serif); font-size: 3.5rem; color: var(--sea-deep); margin-bottom: 1.5rem; }
.title-waves { width: 60px; height: 4px; background: var(--cyan); border-radius: 2px; margin: 0 auto 6rem; }

/* --- Hero --- */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0; }
.coastal-frame {
    background: white;
    padding: 3rem 1.5rem;
    border-radius: 60px 60px 0 60px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.03);
    width: 90%;
    max-width: 600px;
}

@media (min-width: 768px) {
    .coastal-frame { padding: 6rem 4rem; border-radius: 100px 100px 0 100px; }
}

.hero-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.4rem; color: var(--cyan); margin-bottom: 2rem; }
.hero-title { font-family: var(--font-serif); font-size: clamp(3rem, 8vw, 4.5rem); margin-bottom: 2rem; }
.hero-title .and { font-family: var(--font-sans); font-weight: 200; font-size: 0.6em; color: var(--muted); }
.wave-divider { color: var(--cyan); margin: 2rem 0; width: 100px; margin-left: auto; margin-right: auto; }
.hero-date { font-weight: 700; letter-spacing: 0.2rem; color: var(--sea-deep); }

/* --- Couple --- */
.couple-grid { display: flex; justify-content: center; gap: 5rem; flex-wrap: wrap; }
.couple-card { flex: 1; min-width: 300px; }
.portrait-container {
    width: 180px;
    height: 240px;
    margin: 0 auto 3rem;
    position: relative;
}

.portrait-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--sea-foam);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 70%;
    animation: liquid 8s infinite alternate;
}

@keyframes liquid {
    from { border-radius: 40% 60% 70% 30% / 40% 50% 60% 70%; }
    to { border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%; }
}

.avatar { position: relative; z-index: 1; font-size: 5rem; color: var(--sea-deep); opacity: 0.3; top: 50%; transform: translateY(-50%); }
.couple-card h3 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--sea-deep); margin-bottom: 1.5rem; }
.parents { color: var(--muted); font-size: 0.95rem; }

/* --- Event --- */
.countdown-ocean { display: flex; justify-content: center; gap: 1rem; margin-bottom: 4rem; }
@media (min-width: 768px) {
    .countdown-ocean { gap: 3rem; margin-bottom: 8rem; }
}
.timer-unit span { display: block; font-size: 2rem; font-weight: 700; color: var(--sea-deep); line-height: 1; }
@media (min-width: 768px) {
    .timer-unit span { font-size: 4rem; }
}
.timer-unit label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1rem; color: var(--cyan); }

.event-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 4rem; }
.event-item {
    background: white;
    padding: 6rem 3rem;
    border-radius: 60px 0 60px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.02);
}

.event-item i { font-size: 3rem; color: var(--cyan); margin-bottom: 3rem; display: block; }
.event-item h3 { font-family: var(--font-serif); font-size: 2.2rem; margin-bottom: 2.5rem; }
.details .date { font-size: 1.4rem; font-weight: 700; color: var(--sea-deep); }
.details .line { width: 40px; height: 1px; background: var(--sea-foam); margin: 2rem auto; }

/* --- Location --- */
.map-card { background: white; border-radius: 60px; overflow: hidden; box-shadow: 0 40px 80px rgba(0,0,0,0.05); }
.map-wrap { border-bottom: 1px solid var(--sea-foam); }
.map-details { padding: 5rem 2rem; }
.map-details p { font-size: 1.2rem; margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- Gallery --- */
.ocean-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.gallery-card { border-radius: 20px; overflow: hidden; }
.img-box { aspect-ratio: 1; overflow: hidden; }
.img-box img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); filter: sepia(0.2); }
.gallery-card:hover img { transform: scale(1.1) rotate(2deg); filter: sepia(0); }

/* --- RSVP --- */
.rsvp-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; text-align: left; }
@media (min-width: 768px) { .rsvp-layout { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.coastal-form { background: white; padding: 4rem; border-radius: 50px 0 50px 0; }
.coastal-form label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15rem; color: var(--sea-deep); margin-bottom: 1rem; }
.coastal-form input, .coastal-form textarea {
    width: 100%;
    padding: 1.2rem 2rem;
    background: var(--sand);
    border: none;
    border-radius: 15px;
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

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

.wishes-scroll { max-height: 600px; overflow-y: auto; padding-right: 2rem; }
.wish-card { background: white; padding: 2.5rem; border-radius: 30px 30px 0 30px; margin-bottom: 2.5rem; position: relative; }
.wish-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.wish-header strong { font-family: var(--font-serif); font-size: 1.4rem; color: var(--sea-deep); }
.wish-header span { font-size: 0.7rem; opacity: 0.4; }
.wish-wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: var(--cyan); opacity: 0.1; }

/* --- Footer --- */
.ocean-footer { padding: 12rem 2rem; text-align: center; }
.quote { font-family: var(--font-serif); font-style: italic; font-size: 1.8rem; margin-bottom: 4rem; color: var(--muted); }
.names { font-family: var(--font-serif); font-size: 3.5rem; color: var(--sea-deep); margin-bottom: 4rem; }
.copy { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.3rem; opacity: 0.3; }

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

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

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

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

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

  /* Footer */
  .ocean-footer {
    padding: 5rem 1.5rem;
  }
  .quote {
    font-size: clamp(1rem, 4vw, 1.8rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .names {
    font-size: clamp(2rem, 8vw, 3.5rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

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

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