/* ═══════════════════════════════════════════════════════════
   TANYA & ANDREW — 9 APRIL 2027
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
    --bg:          #FAF6F1;   /* champagne white */
    --bg-warm:     #F2EAE2;   /* warm champagne */
    --ink:         #1A1A18;
    --muted:       #7A7570;
    --sage:        #7A9B72;   /* Andrew — sage green */
    --blush:       #C4958A;   /* Tanya — rose gold / blush */
    --bg-blush:    #F5EAE6;   /* pale blush for section backgrounds */
    --rule:        #DDD0C8;   /* rose gold–tinted dividers */

    --script:      'Birthstone Bounce', cursive;
    --serif:       'Cormorant Garamond', Georgia, serif;
    --sans:        'Montserrat', sans-serif;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    font-size: 18px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
html::-webkit-scrollbar { display: none; } /* Chrome/Safari */
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* ─── NAV ────────────────────────────────────────────────── */
#nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    transition: background 0.35s, box-shadow 0.35s;
}
#nav.scrolled {
    background: var(--bg);
    box-shadow: 0 1px 0 var(--rule);
}
.nav-inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}
#nav a {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    transition: color 0.2s;
}
#nav a:hover,
#nav a.active { color: var(--sage); }
#nav a.active { border-bottom: 1px solid var(--sage); padding-bottom: 1px; }
.nav-monogram img {
    height: 2.8rem;
    width: auto;
    display: block;
    object-fit: unset;
}

/* ─── HERO ───────────────────────────────────────────────── */
#welcome {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 5rem;
    position: relative;
}
.welcome-content { max-width: 680px; }

.welcome-script-img {
    display: block;
    width: clamp(260px, 60vw, 480px);
    height: auto;
    margin: 0 auto 0.25rem;
}
.welcome-of {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

#welcome h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 5.5vw, 3rem);
    letter-spacing: 0.45em;
    line-height: 1.1;
    margin-bottom: 2rem;
}
.small-and {
    font-size: 0.45em;
    letter-spacing: 0.3em;
    font-style: italic;
    font-weight: 300;
}

.sage-rule {
    width: 3rem;
    height: 1px;
    background: linear-gradient(to right, var(--sage), var(--blush));
    margin: 0 auto 1.5rem;
}

.welcome-meta {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 2.2;
}

/* Countdown */
.countdown-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
}
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3.5rem;
}
.countdown-unit span {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--blush);
}
.countdown-unit label {
    font-family: var(--sans);
    font-size: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(196, 149, 138, 0.6);
    margin-top: 0.5rem;
}
.countdown-sep {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    line-height: 1;
    color: rgba(196, 149, 138, 0.3);
    padding-top: 0.05em;
}

.scroll-hint {
    display: block;
    text-align: center;
    font-size: 1.6rem;
    color: var(--rule);
    text-decoration: none;
    padding: 1.5rem 0 2rem;
    animation: bob 2s ease-in-out infinite;
    transition: color 0.2s;
}
.scroll-hint:hover { color: var(--blush); }
#welcome .scroll-hint {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

/* ─── PHOTOS ─────────────────────────────────────────────── */
#photos { line-height: 0; }
.photos-grid {
    display: grid;
    grid-template-columns: 1fr 420px 1fr;
    grid-template-rows: 420px;
    gap: 3px;
}
.photo-slot {
    background: var(--bg-warm);
    position: relative;
    overflow: hidden;
}
.photo-slot img { position: relative; z-index: 1; }
.photo-square img { object-position: center; }

/* ─── SECTION SHARED ─────────────────────────────────────── */
.section-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 6rem 2rem;
    text-align: center;
}
.section-tag {
    display: block;
    font-family: var(--sans);
    font-size: 0.57rem;
    font-weight: 400;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 1.25rem;
}
.section-inner h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}
.section-lede {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 560px;
    margin: -1.75rem auto 3.5rem;
    line-height: 1.85;
}
.bg-warm  { background: var(--bg-warm); }
.bg-blush { background: var(--bg-blush); }

/* ─── VENUE HEADING ─────────────────────────────────────── */
.venue-primary,
.venue-secondary,
.venue-tertiary {
    display: block;
    line-height: 1.3;
}
.venue-primary  { font-size: 1em; }
.venue-secondary { font-size: 0.72em; margin-top: 0.2em; }
.venue-tertiary {
    font-size: 0.45em;
    letter-spacing: 0.45em;
    color: var(--blush);
    margin-top: 0.5em;
    font-weight: 400;
}

/* ─── SCHEDULE SECTION ───────────────────────────────────── */
#schedule {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#schedule .section-inner { padding: 3rem 2rem 0; }
#schedule .section-inner h2 { margin-bottom: 1.5rem; }

/* ─── TIMELINE ───────────────────────────────────────────── */
.timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 540px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: var(--rule);
    transform: translateX(-50%);
}
.tl-event {
    display: grid;
    grid-template-columns: 1fr 32px 1fr;
    align-items: start;
    padding: 1.25rem 0;
}
/* Odd events: time left, detail right */
.tl-event:nth-child(odd) .tl-time   { text-align: right; order: 1; }
.tl-event:nth-child(odd) .tl-spine  { order: 2; }
.tl-event:nth-child(odd) .tl-detail { text-align: left; order: 3; }
/* Even events: detail left, time right */
.tl-event:nth-child(even) .tl-detail { text-align: right; order: 1; }
.tl-event:nth-child(even) .tl-spine  { order: 2; }
.tl-event:nth-child(even) .tl-time   { text-align: left; order: 3; }

.tl-time {
    font-family: var(--sans);
    font-size: 0.58rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.4rem;
}
.tl-time span { font-size: 0.85em; }

.tl-spine {
    display: flex;
    justify-content: center;
    padding-top: 0.2rem;
    position: relative;
    z-index: 1;
}
.tl-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid var(--sage);
    background: var(--bg-warm);
}

.tl-detail h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}
.tl-detail p {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--muted);
}

/* ─── CARDS ──────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
    text-align: left;
}
.card {
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}
.card-icon {
    font-size: 1.3rem;
    color: var(--sage);
    margin-bottom: 1rem;
}
.card h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
}
.card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.85;
    font-style: italic;
}
.card a {
    color: var(--ink);
    text-underline-offset: 3px;
    transition: color 0.2s;
    white-space: nowrap;
}
.card a:hover { color: var(--blush); }

/* ─── RSVP ───────────────────────────────────────────────── */
.rsvp-deadline {
    font-family: var(--sans);
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}
.rsvp-deadline span { color: var(--blush); }

.rsvp-form {
    max-width: 480px;
    margin: 0 auto 2rem;
    text-align: left;
}
.form-field { margin-bottom: 2rem; }
.form-field > label {
    display: block;
    font-family: var(--serif);
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    color: var(--ink);
}
.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--rule);
    padding: 0.4rem 0;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
    -webkit-appearance: none;
}
.form-field input[type="text"]:focus,
.form-field textarea:focus { border-color: var(--sage); }
.form-field textarea { resize: vertical; min-height: 72px; }
::placeholder { color: var(--rule); }

.radio-group { display: flex; gap: 2.5rem; }
.radio-label {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.radio-label input[type="radio"] { accent-color: var(--sage); width: 14px; height: 14px; }

.rsvp-submit {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--ink);
    border: none;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: background 0.25s;
    margin-top: 0.5rem;
    display: block;
}
.rsvp-submit:hover { background: var(--blush); }

.rsvp-thankyou {
    display: none;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
}
.rsvp-thankyou.visible { display: block; }


.rsvp-note {
    margin-top: 3rem;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--muted);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.85;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
}

/* ─── SCRIPT HEADINGS (gifts, footer) ───────────────────── */
.script-lg {
    display: block;
    font-family: var(--script);
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
    background: var(--ink);
    color: var(--bg);
    padding: 4.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
footer .script-lg { color: var(--bg); margin-bottom: 0; }
.footer-detail {
    font-family: var(--sans);
    font-size: 0.58rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(196, 149, 138, 0.7);
}
.footer-email {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sage);
    text-decoration: none;
    border-bottom: 1px solid rgba(122, 155, 114, 0.4);
    padding-bottom: 2px;
    margin-top: 0.5rem;
    transition: color 0.2s, border-color 0.2s;
}
.footer-email:hover {
    color: var(--bg);
    border-color: rgba(250, 246, 241, 0.7);
}

/* ─── PASSWORD OVERLAY ───────────────────────────────────── */
#auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-box {
    text-align: center;
    max-width: 360px;
    width: 100%;
}
.auth-logo {
    width: clamp(180px, 50vw, 280px);
    height: auto;
    margin: 0 auto 1rem;
}
.auth-meta {
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2.5rem;
}
.auth-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
#auth-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--ink);
    text-align: center;
    letter-spacing: 0.2em;
    outline: none;
    transition: border-color 0.2s;
}
#auth-input:focus { border-color: var(--sage); }
#auth-input::placeholder { color: var(--rule); letter-spacing: 0.2em; }
#auth-submit {
    font-family: var(--sans);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--ink);
    border: none;
    padding: 0.85rem 2.5rem;
    cursor: pointer;
    transition: background 0.2s;
}
#auth-submit:hover { background: var(--sage); }
.auth-error {
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--blush);
    min-height: 1em;
}

/* ─── VERSION TAG ────────────────────────────────────────── */
#version {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-family: var(--sans);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    color: transparent;
    user-select: none;
    z-index: 9999;
    transition: color 0.3s;
}
#version:hover { color: var(--muted); }

/* ─── REVEAL ANIMATION ───────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
/* ─── NAV BURGER ─────────────────────────────────────────── */
.nav-burger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    padding: 0;
}

@media (max-width: 720px) {
    .nav-burger { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        gap: 0;
        margin-left: 0;
        padding: 0.5rem 0 1rem;
        box-shadow: 0 4px 16px rgba(0,0,0,0.06);
        border-top: 1px solid var(--rule);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.75rem 2rem; width: 100%; text-align: center; }
    #nav { position: fixed; }
}

@media (max-width: 720px) {
    .photos-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 280px 280px;
    }
    .photo-square { grid-column: span 2; }

    .cards-grid { grid-template-columns: 1fr; }

    .timeline::before { left: 16px; }
    .tl-event {
        grid-template-columns: 32px 1fr;
        padding: 1.5rem 0;
    }
    .tl-event:nth-child(odd) .tl-time,
    .tl-event:nth-child(even) .tl-time   { display: none; }
    .tl-event:nth-child(odd) .tl-spine,
    .tl-event:nth-child(even) .tl-spine  { order: 1; justify-content: flex-start; padding-left: 10px; }
    .tl-event:nth-child(odd) .tl-detail,
    .tl-event:nth-child(even) .tl-detail { order: 2; text-align: left; }

    .section-inner { padding: 4rem 1.5rem; }
    .section-inner h2 { margin-bottom: 2rem; }
}

@media (max-width: 480px) {
    .photos-grid { grid-template-columns: 1fr; grid-template-rows: 260px 340px 260px; }
    .photo-slot:last-child { grid-column: auto; }
    .countdown-wrap { gap: 0.5rem; }
    .countdown-sep { display: none; }
    .countdown-unit { min-width: 3rem; }
    #schedule { min-height: unset; }
    .radio-group { flex-direction: column; gap: 1rem; }
    .rsvp-submit { width: 100%; text-align: center; }
}
