/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #efe0d9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.invite {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(90, 60, 60, 0.18);
}

/* ===== SECTION (each panel is one section) ===== */
.section {
    position: relative;
    width: 100%;
    line-height: 0; /* collapse whitespace around img */
}

.section-bg {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

/* ===== OVERLAY (absolutely positioned blocks) ===== */
.overlay {
    position: absolute;
    left: 0;
    width: 100%;
    line-height: 1.5;
    text-align: center;
    z-index: 2;
}

/* Script headings (Great Vibes) */
.script-title {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: min(9.2vw, 44px);
    color: #453833;
    line-height: 1.25;
}

/* ============================================================
   SECTION 1 — LEFT PANEL  (image ratio 394 x 1458)
   ============================================================ */

/* --- Names --- */
.names-block {
    top: 1.3%;
    padding: 0 8%;
}

.name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: min(10.5vw, 50px);
    color: #453833;
    letter-spacing: 0.14em;
    line-height: 1.12;
    text-transform: uppercase;
    text-indent: 0.14em; /* compensate letter-spacing for true centering */
}

.name-and {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: min(7.8vw, 37px);
    color: #b8515e;
    margin: -1.5% 0;
    line-height: 1.15;
}

.wedding-date {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: min(5.2vw, 25px);
    color: #5a4a44;
    letter-spacing: 0.22em;
    margin-top: 1.5%;
}

.heart-dot {
    color: #c25b66;
    font-size: 0.62em;
    vertical-align: 0.15em;
}

/* --- Photo inside the oval frame --- */
.photo-oval {
    top: 24.4%;
    left: 29.4%;
    width: 41.2%;
    height: 14.05%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-oval img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-oval span,
.photo-heart span {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: min(4.8vw, 23px);
    color: #b3a396;
    letter-spacing: 2px;
    line-height: 1;
}

/* --- Music toggle (harp cupid) --- */
.music-toggle {
    position: absolute;
    left: 47%;
    top: 37.4%;
    width: 51%;
    height: 12.6%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

.music-label {
    position: absolute;
    left: 0;
    bottom: 2%;
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    font-family: 'Great Vibes', cursive;
    font-size: min(5vw, 24px);
    color: #8f6a60;
    line-height: 1;
    transform: rotate(-7deg);
    transition: color 0.3s ease;
}

.music-arrow {
    width: min(7.5vw, 36px);
    height: auto;
    color: #a4796e;
    margin-bottom: 0.35em;
}

.music-toggle.playing .music-label {
    color: #b8515e;
}

.music-note {
    position: absolute;
    font-size: min(4.6vw, 22px);
    color: #b8515e;
    opacity: 0;
    pointer-events: none;
    line-height: 1;
}

.note-1 { right: 30%; top: 4%; }
.note-2 { right: 12%; top: -4%; }

.music-toggle.playing .note-1 {
    animation: float-note 2.4s ease-in-out infinite;
}

.music-toggle.playing .note-2 {
    animation: float-note 2.4s ease-in-out 1.2s infinite;
}

@keyframes float-note {
    0%   { opacity: 0; transform: translateY(6px) rotate(-6deg); }
    30%  { opacity: 0.9; }
    100% { opacity: 0; transform: translateY(-14px) rotate(8deg); }
}

/* no-file shake feedback */
.music-toggle.shake .music-label {
    animation: shake-label 0.5s ease;
}

@keyframes shake-label {
    0%, 100% { transform: rotate(-7deg) translateX(0); }
    25% { transform: rotate(-7deg) translateX(-3px); }
    75% { transform: rotate(-7deg) translateX(3px); }
}

/* --- Greeting --- */
.greeting-block {
    top: 50.2%;
    padding: 0 9%;
}

.greeting-block .script-title {
    margin-bottom: 2.5%;
}

.greeting-text {
    font-size: min(3.4vw, 16px);
    font-weight: 400;
    color: #5a4a44;
    line-height: 1.8;
}

.flourish-heart {
    margin-top: 3%;
    font-size: min(5.5vw, 26px);
    color: #b8515e;
    opacity: 0.85;
    line-height: 1;
}

/* --- Calendar (on the dusty-rose band) --- */
.calendar-block {
    top: 79.6%;
    padding: 0 10%;
}

.calendar-month {
    font-family: 'Cormorant Garamond', serif;
    font-size: min(4.9vw, 23px);
    font-weight: 500;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    color: #fdf6f4;
    margin-bottom: 3%;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
    align-items: center;
}

.calendar-weekdays {
    font-family: 'Great Vibes', cursive;
    font-size: min(4.6vw, 22px);
    color: #f3d9d9;
    margin-bottom: 1%;
}

.calendar-dates {
    font-family: 'Cormorant Garamond', serif;
    font-size: min(5.4vw, 26px);
    font-weight: 500;
    color: #fdf6f4;
}

.day-selected {
    position: relative;
    width: 1.65em;
    height: 1.65em;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1.5px solid rgba(253, 246, 244, 0.9);
    border-radius: 50%;
}

.day-selected::after {
    content: '♥';
    position: absolute;
    bottom: -0.55em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.42em;
    color: #fdf6f4;
    background: transparent;
    line-height: 1;
}

/* ============================================================
   SECTION 2 — RIGHT PANEL  (image ratio 520 x 1329)
   ============================================================ */

/* --- Location --- */
.location-block {
    top: 37.6%;
    padding: 0 10%;
}

.location-block .script-title {
    margin-bottom: 2%;
}

.loc-address {
    font-size: min(3.4vw, 16px);
    color: #5a4a44;
    margin-bottom: 0.5%;
}

.loc-venue {
    font-size: min(3.7vw, 17px);
    font-weight: 600;
    color: #453833;
    margin-bottom: 4.5%;
}

.map-btn {
    display: inline-block;
    padding: min(2.6vw, 12px) min(6.5vw, 32px);
    background: #fffdfc;
    color: #b8515e;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: min(2.9vw, 14px);
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    border: 1px solid rgba(184, 81, 94, 0.35);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(122, 62, 62, 0.14);
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.map-btn:hover {
    background: #fff5f4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 62, 62, 0.2);
}

/* --- Countdown --- */
.countdown-block {
    top: 59%;
    padding: 0 6%;
}

.cd-title {
    margin-bottom: 4%;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: min(2vw, 10px);
}

.time-unit-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: min(13vw, 62px);
}

.time-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: min(9.5vw, 46px);
    font-weight: 500;
    color: #453833;
    line-height: 1;
}

.time-label {
    font-size: min(2.1vw, 10px);
    font-weight: 500;
    letter-spacing: 0.18em;
    color: #5a4a44;
    margin-top: 6px;
}

.time-sep {
    position: relative;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(184, 81, 94, 0.55) 20%, rgba(184, 81, 94, 0.55) 80%, transparent);
    align-self: stretch;
}

.time-sep::after {
    content: '♥';
    position: absolute;
    bottom: -0.2em;
    left: 50%;
    transform: translateX(-50%);
    font-size: min(2.4vw, 11px);
    color: #c25b66;
    background: transparent;
    line-height: 1;
}

/* --- Photo inside the heart frame --- */
.photo-heart {
    top: 83.6%;
    left: 35.4%;
    width: 30%;
    height: 11.2%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-heart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Countdown finished message */
.cd-done {
    font-family: 'Great Vibes', cursive;
    font-size: min(8vw, 38px);
    color: #b8515e;
    width: 100%;
    text-align: center;
    line-height: 1.3;
}
