/* =========================================================================
   Therese & Alejandro — Wedding Website
   Minimalist, elegant, romantic styling with subtle floral accents.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
    --color-cream: #FAF6EF;
    --color-white: #FFFFFF;
    --color-blush: #F2DCDC;
    --color-blush-soft: #F8EAEA;
    --color-sage: #8FA283;
    --color-sage-dark: #66765C;
    --color-gold: #C6A468;
    --color-gold-soft: #E4D2A8;
    --color-charcoal: #3B3833;
    --color-charcoal-soft: #6B6560;
    --color-error: #B15850;

    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-soft: 0 20px 45px -20px rgba(59, 56, 51, 0.25);
    --shadow-card: 0 30px 60px -25px rgba(59, 56, 51, 0.3);

    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 8px;

    --transition-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
* ,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* The site is in "save the date" mode: a single, non-scrolling screen. */
html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--color-charcoal);
    background: var(--color-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    position: relative;
}

/* ---------- Floral decorations ---------- */
.floral-decor {
    position: absolute;
    width: clamp(90px, 12vw, 170px);
    height: auto;
    color: var(--color-sage);
    opacity: 0.45;
    pointer-events: none;
    z-index: 2;
}

.floral-decor--hero-tl {
    top: 2.5rem;
    left: 1.5rem;
    color: var(--color-white);
    opacity: 0.55;
}

.floral-decor--hero-br {
    bottom: 2.5rem;
    right: 1.5rem;
    color: var(--color-white);
    opacity: 0.55;
    transform: rotate(180deg);
}

.floral-decor--card {
    top: -34px;
    right: -28px;
    width: clamp(70px, 9vw, 120px);
    color: var(--color-gold);
    opacity: 0.55;
    transform: rotate(35deg);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-color: var(--color-sage-dark);
    background-image:
        linear-gradient(160deg, rgba(59, 56, 51, 0.35), rgba(143, 162, 131, 0.55)),
        url('../images/image0.png');
    background-size: cover;
    background-position: center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.4) 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    padding: 2rem 1.5rem;
    max-width: 620px;
    max-height: 100%;
    margin-inline: auto;
    overflow: hidden;
}

.hero__eyebrow {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--color-gold-soft);
    margin-bottom: 1rem;
}

.hero__names {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.6rem, 8vw, 5.75rem);
    line-height: 1.05;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    flex-wrap: wrap;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hero__ampersand {
    font-style: italic;
    font-weight: 400;
    font-size: 0.6em;
    color: var(--color-gold-soft);
}

.hero__subtitle,
.hero__date {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    color: var(--color-blush-soft);
    letter-spacing: 0.04em;
}

/* ---------- Countdown ---------- */
.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 2vw, 1.1rem);
    margin-top: clamp(1.25rem, 3vh, 2rem);
}

.countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.6em;
}

.countdown__value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    color: var(--color-gold-soft);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown__label {
    margin-top: 0.35rem;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.countdown__divider {
    width: 1px;
    height: 1.6rem;
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- Venue ---------- */
.venue {
    margin-top: 0.25rem;
}

.venue__name {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-white);
}

.venue__address {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Spotify corner ---------- */
.spotify-corner {
    position: fixed;
    right: clamp(0.75rem, 3vw, 1.75rem);
    bottom: clamp(0.75rem, 3vh, 1.75rem);
    width: min(320px, 42vw);
    z-index: 3;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    line-height: 0;
}

.spotify-corner iframe {
    display: block;
    width: 100%;
}

/* ---------- Welcome / registration section ---------- */
.welcome {
    position: relative;
    padding: 6rem 1.5rem 7rem;
    background: var(--color-cream);
}

.welcome__inner {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.section-flourish {
    display: inline-block;
    font-size: 1.4rem;
    color: var(--color-gold);
    margin-bottom: 1.25rem;
}

.welcome__heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--color-charcoal);
    margin-bottom: 1rem;
}

.welcome__message {
    font-size: 0.98rem;
    color: var(--color-charcoal-soft);
    max-width: 480px;
    margin: 0 auto 3rem;
    font-weight: 300;
}

/* ---------- Form card ---------- */
.form-card {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 2.75rem 2.5rem;
    text-align: left;
    overflow: hidden;
}

.flash-stack {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.flash {
    font-size: 0.88rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    animation: fadeInUp 400ms ease both;
}

.flash--success {
    background: #EEF4E9;
    color: var(--color-sage-dark);
    border: 1px solid #D3E2C7;
}

.flash--error {
    background: #FBEEEC;
    color: var(--color-error);
    border: 1px solid #F0D3CF;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.4rem;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-charcoal-soft);
    margin-bottom: 0.5rem;
}

.form-input {
    font-family: var(--font-body);
    font-size: 0.98rem;
    color: var(--color-charcoal);
    background: var(--color-cream);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.form-input::placeholder {
    color: #B4ADA3;
    font-weight: 300;
}

.form-input:focus {
    outline: none;
    background: var(--color-white);
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(198, 164, 104, 0.15);
}

.form-input--error {
    border-color: var(--color-error);
    background: #FBF3F2;
}

.form-error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-error);
    animation: fadeInUp 250ms ease both;
}

/* ---------- Checkbox ---------- */
.form-group--checkbox {
    margin-top: 0.4rem;
    margin-bottom: 1.8rem;
}

.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.checkbox-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    border: 1.5px solid var(--color-sage);
    border-radius: 6px;
    position: relative;
    transition: background var(--transition-base), border-color var(--transition-base);
}

.checkbox-box::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 5px;
    height: 9px;
    border-right: 2px solid var(--color-white);
    border-bottom: 2px solid var(--color-white);
    transform: rotate(45deg) scale(0);
    transition: transform 180ms ease;
}

.checkbox-input:checked + .checkbox-box {
    background: var(--color-sage-dark);
    border-color: var(--color-sage-dark);
}

.checkbox-input:checked + .checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-input:focus-visible + .checkbox-box {
    box-shadow: 0 0 0 4px rgba(143, 162, 131, 0.25);
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--color-charcoal-soft);
    line-height: 1.5;
}

/* ---------- Button ---------- */
.btn-continue {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-white);
    background: linear-gradient(120deg, var(--color-sage-dark), var(--color-sage));
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    cursor: pointer;
    box-shadow: 0 15px 30px -12px rgba(102, 118, 92, 0.55);
    transition: transform var(--transition-base), box-shadow var(--transition-base), filter var(--transition-base);
}

.btn-continue:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 20px 35px -12px rgba(102, 118, 92, 0.65);
}

.btn-continue:active {
    transform: translateY(0);
}

.btn-continue:focus-visible {
    outline: 3px solid var(--color-gold-soft);
    outline-offset: 3px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    animation: fadeInUp 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--reveal-delay, 0s);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .form-card {
        padding: 2.25rem 1.75rem;
    }
}

@media (max-width: 640px) {
    .hero__content {
        padding: 1.5rem 1.25rem;
    }

    .welcome {
        padding: 4.5rem 1.25rem 5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-card {
        padding: 2rem 1.4rem;
        border-radius: var(--radius-md);
    }

    .floral-decor {
        width: clamp(70px, 22vw, 110px);
    }

    .floral-decor--hero-tl {
        top: 1.25rem;
        left: 0.75rem;
    }

    .floral-decor--hero-br {
        bottom: 1.25rem;
        right: 0.75rem;
    }

    .floral-decor--card {
        display: none;
    }
}

@media (max-width: 380px) {
    .hero__names {
        gap: 0.2em;
    }

    .countdown {
        gap: 0.5rem;
    }

    .countdown__unit {
        min-width: 2.2em;
    }
}

@media (max-width: 640px) {
    .spotify-corner {
        width: min(280px, 70vw);
        right: 0.75rem;
        bottom: 0.75rem;
    }
}

/* Short viewports (landscape phones, small laptops with a browser chrome
   eating into the height): compress the save-the-date stack so everything
   still fits without scrolling. Placed after the max-width rule above so
   it wins the cascade when a viewport is both narrow and short. */
@media (max-height: 700px) {
    /* Short + wide (landscape phones) is exactly when the centered content
       column and the fixed bottom-right Spotify corner end up in the same
       vertical band. Reserve space on the right so they can't collide. */
    .hero {
        padding-right: min(260px, 30vw);
    }

    .hero__content {
        padding: 1rem 1.5rem;
    }

    .hero__eyebrow {
        margin-bottom: 0.5rem;
    }

    .hero__names {
        font-size: clamp(2rem, 7vw, 3.75rem);
    }

    .hero__date {
        margin-top: 0.6rem;
    }

    .countdown {
        margin-top: 0.75rem;
    }

    .countdown__value {
        font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    }

    .countdown__label {
        font-size: 0.55rem;
    }

    .section-flourish {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .venue__name {
        font-size: 0.75rem;
    }

    .venue__address {
        font-size: 0.7rem;
        margin-top: 0.2rem;
    }

    .spotify-corner {
        width: min(220px, 34vw);
    }

    .spotify-corner iframe {
        height: 80px;
    }
}
