:root {
    --navy:     #2F4156;
    --teal:     #567CBD;
    --sky:      #CBD9E6;
    --beige:    #F5EFEB;
    --white:    #FFFFFF;
    --text-dark: #1e2d3d;
    --text-mid:  #567CBD;
    --text-light:#8aa5be;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* prevents orbs / absolute elements from expanding viewport width */
}

body {
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
    max-width: 100%;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, .serif {
    font-family: 'Cormorant Garamond', serif;
}

.label {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: .65rem;
    letter-spacing: .25em;
    text-transform: uppercase;
}

/* ── NAVBAR ── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    background: transparent;
    transition: background .4s, backdrop-filter .4s;
}
.site-nav.scrolled {
    background: rgba(47, 65, 86, .92);
    backdrop-filter: blur(12px);
}
.site-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .65rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color .2s;
}
.site-nav a:hover { color: var(--sky); }

/* ── HERO ── */
#hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--navy);
}

/* Layered background — geometric pattern + gradient */
#hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 30% 60%, rgba(86,124,189,.22) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 75% 25%, rgba(203,217,230,.12) 0%, transparent 65%);
    pointer-events: none;
}

/* ── INVITATION GATE ── */
.invite-gate {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: opacity .8s ease, visibility .8s ease;
}
.invite-gate.dismissed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeUp .9s .2s both;
}

.gate-names {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.05;
    margin: 0;
}

.gate-date {
    color: rgba(203,217,230,.55);
    letter-spacing: .3em;
    margin: 0;
}

.gate-btn {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 2.2rem;
    background: transparent;
    border: 1px solid rgba(203,217,230,.4);
    border-radius: 2px;
    color: var(--sky);
    font-family: 'Jost', sans-serif;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}
.gate-btn:hover {
    background: rgba(203,217,230,.1);
    border-color: var(--sky);
    color: var(--white);
}
.gate-btn i { font-size: 1rem; }

/* Decorative corner lines */
.hero-corner {
    position: absolute;
    width: 120px; height: 120px;
    border-color: rgba(203,217,230,.35);
    border-style: solid;
}
.hero-corner.tl { top: 2.5rem; left: 2.5rem; border-width: 1px 0 0 1px; }
.hero-corner.tr { top: 2.5rem; right: 2.5rem; border-width: 1px 1px 0 0; }
.hero-corner.bl { bottom: 2.5rem; left: 2.5rem; border-width: 0 0 1px 1px; }
.hero-corner.br { bottom: 2.5rem; right: 2.5rem; border-width: 0 1px 1px 0; }

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .18;
    pointer-events: none;
    max-width: 100vw; /* never wider than the viewport */
}
.orb-1 { width:500px; height:500px; background: var(--teal);  top:-10%; left:-15%; }
.orb-2 { width:380px; height:380px; background: var(--sky);   bottom:-5%; right:-8%; }

.hero-content { position: relative; z-index: 2; }

.hero-date-line {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--sky);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp .8s .2s forwards;
}
.hero-date-line span { display: block; height: 1px; width: 40px; background: var(--sky); opacity: .5; }

.hero-names {
    font-size: clamp(3.5rem, 10vw, 7.5rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.0;
    letter-spacing: -.01em;
    opacity: 0;
    animation: fadeUp .9s .4s forwards;
}
.hero-names em {
    display: block;
    font-style: italic;
    color: var(--sky);
}
.hero-amp {
    display: block;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--teal);
    font-style: normal;
    margin: -.2em 0;
}

.hero-sub {
    margin-top: 2rem;
    color: rgba(203,217,230,.7);
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp .8s .65s forwards;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(203,217,230,.5);
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    z-index: 2;
    animation: fadeIn 1s 1.2s both;
}
.scroll-hint i { animation: bounce 2s infinite; }

@keyframes fadeUp  { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:none; } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes bounce  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

/* ── SECTION SHELL ── */
section { padding: 7rem 0; }

.section-label {
    color: var(--teal);
    margin-bottom: .75rem;
}

.section-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--navy);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sky);
    opacity: .6;
}
.divider-icon { color: var(--teal); font-size: 1rem; }

/* ── COUPLE ── */
#couple { background: var(--beige); }

.person-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.person-avatar {
    width: 250px; height: 250px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 3px solid var(--sky);
    box-shadow: 0 8px 40px rgba(47,65,86,.12);
    position: relative;
}

/* placeholder portrait — layered gradient as photo stand-in */
.person-avatar .avatar-placeholder {
    width: 100%; height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 5.5rem;
    line-height: 1;
    user-select: none;
}
.avatar-placeholder.bride { background: linear-gradient(160deg, var(--sky) 0%, var(--teal) 100%); }
.avatar-placeholder.groom { background: linear-gradient(160deg, var(--teal) 0%, var(--navy) 100%); }

.person-name {
    font-size: 2rem;
    font-weight: 400;
    color: var(--navy);
    margin-bottom: .2rem;
}
.person-role { color: var(--teal); }
.person-bio {
    font-size: .92rem;
    color: #6b7d8e;
    line-height: 1.8;
    max-width: 320px;
    margin: 1rem auto 0;
}

.couple-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--teal);
}
.couple-connector i { font-size: 2rem; }
.couple-connector span {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
}

/* ── WEDDING DETAILS ── */
#details { background: var(--navy); color: var(--sky); }
#details .section-title { color: var(--white); }
#details .section-label { color: var(--sky); opacity: .7; }

.detail-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(203,217,230,.15);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: background .25s, transform .25s;
}
.detail-card:hover {
    background: rgba(255,255,255,.09);
    transform: translateY(-4px);
}

.detail-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(86,124,189,.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.3rem;
    color: var(--sky);
}

.detail-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: .5rem;
}
.detail-body { font-size: .88rem; line-height: 1.9; color: rgba(203,217,230,.75); }

.map-btn {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--sky);
    font-size: .65rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid rgba(203,217,230,.35);
    padding-bottom: 2px;
    transition: color .2s, border-color .2s;
}
.map-btn:hover { color: var(--white); border-color: var(--white); }

/* ── TIMELINE ── */
.timeline-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.tl-event {
    text-align: center;
    padding: 2rem 2.5rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(203,217,230,.15);
    border-radius: 4px;
    min-width: 180px;
    flex-shrink: 0;
}
.tl-gap {
    background: transparent;
    border-color: transparent;
    padding: 2rem 1.5rem;
    opacity: .75;
}
.tl-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(86,124,189,.25);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto .9rem;
    font-size: 1.2rem;
    color: var(--sky);
}
.tl-icon-sm { width: 38px; height: 38px; font-size: .95rem; }
.tl-time {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    color: var(--white);
    line-height: 1;
    margin-bottom: .25rem;
}
.tl-label {
    font-size: .65rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: .3rem;
}
.tl-dur { font-size: .78rem; color: rgba(203,217,230,.5); }
.tl-connector {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: 0 .5rem;
    flex-shrink: 0;
}
.tl-line { height: 1px; width: 24px; background: rgba(203,217,230,.25); }
.tl-arrow { color: rgba(203,217,230,.35); font-size: .8rem; }

/* Venue shared block */
.venue-block {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(203,217,230,.18);
    border-radius: 4px;
    margin-bottom: 1.25rem;
}
.venue-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    flex-wrap: wrap;
}
.venue-left { flex: 1; min-width: 200px; }
.venue-right { flex-shrink: 0; }

/* Dress code banner */
.dress-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255,255,255,.04);
    border: 1px dashed rgba(203,217,230,.2);
    border-radius: 4px;
    padding: 1.25rem 2rem;
}

/* Mobile: stack timeline vertically */
@media (max-width: 640px) {
    .timeline-wrapper { flex-direction: column; align-items: center; }
    .tl-event { min-width: 220px; width: 100%; max-width: 300px; }
    .tl-connector { flex-direction: column; padding: .3rem 0; }
    .tl-line { width: 1px; height: 18px; }
    .tl-arrow { transform: rotate(90deg); }
}

/* Countdown */
.countdown-row {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}
.count-block { text-align: center; }
.count-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--white);
    line-height: 1;
}
.count-lbl {
    font-size: .6rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--sky);
    opacity: .65;
    margin-top: .25rem;
}

/* ── GALLERY ── */
#gallery { background: var(--beige); }

.gallery-grid {
    columns: 3;
    column-gap: 1rem;
}
@media (max-width: 768px) { .gallery-grid { columns: 2; } }
@media (max-width: 480px) { .gallery-grid { columns: 1; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item .gallery-overlay {
    position: absolute; inset: 0;
    background: rgba(47,65,86,0);
    display: flex; align-items: center; justify-content: center;
    transition: background .3s;
}
.gallery-item:hover .gallery-overlay { background: rgba(47,65,86,.3); }
.gallery-overlay i {
    color: white; font-size: 1.5rem;
    opacity: 0; transform: scale(.8);
    transition: opacity .3s, transform .3s;
}
.gallery-item:hover .gallery-overlay i { opacity: 1; transform: scale(1); }

/* ── GIFT ── */
#gift { background: var(--white); }

.gift-box {
    background: var(--beige);
    border-radius: 4px;
    padding: 3rem 2.5rem;
    border: 1px solid rgba(203,217,230,.5);
}
.bank-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    background: var(--white);
    border-radius: 3px;
    margin-bottom: .6rem;
    font-size: .88rem;
}
.bank-detail-row .bd-label { color: #8aa5be; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.bank-detail-row .bd-value { font-weight: 500; color: var(--navy); font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; }

.copy-btn {
    background: none;
    border: 1px solid var(--sky);
    color: var(--teal);
    padding: .25rem .7rem;
    border-radius: 2px;
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
}
.copy-btn:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.copy-btn.copied { background: var(--navy); color: var(--white); border-color: var(--navy); }

.gift-note {
    font-size: .83rem;
    color: #8aa5be;
    text-align: center;
    margin-top: 1.25rem;
    font-style: italic;
}

/* ── RSVP ── */
#rsvp { background: var(--sky); }
#rsvp .section-title { color: var(--navy); }
#rsvp .section-label { color: var(--teal); }

.rsvp-card {
    background: var(--white);
    border-radius: 4px;
    padding: 3rem 2.5rem;
    box-shadow: 0 16px 60px rgba(47,65,86,.1);
    max-width: 580px;
    margin: 0 auto;
}

.guest-name-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: var(--beige);
    border-radius: 3px;
}
.guest-name-display p { margin: 0; font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.guest-name-display strong {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--navy);
    margin-top: .2rem;
}

.form-label {
    font-size: .65rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: .4rem;
    font-weight: 500;
}

.form-control, .form-select {
    border: 1px solid var(--sky);
    border-radius: 2px;
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    font-size: .9rem;
    color: var(--navy);
    padding: .65rem 1rem;
    background: var(--beige);
}
.form-control:focus, .form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(86,124,189,.15);
    background: var(--white);
}

.attendance-toggle {
    display: flex;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.att-btn {
    flex: 1;
    padding: .7rem;
    border: 1px solid var(--sky);
    background: var(--beige);
    border-radius: 2px;
    font-size: .65rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-mid);
    font-family: 'Jost', sans-serif;
    font-weight: 500;
}
.att-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.att-btn:not(.active):hover { border-color: var(--teal); color: var(--teal); }

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 2px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: .7rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.btn-submit:hover { background: var(--teal); transform: translateY(-2px); }
.btn-submit:active { transform: none; }

.rsvp-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}
.rsvp-success i { font-size: 3rem; color: var(--teal); margin-bottom: 1rem; }
.rsvp-success h4 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--navy); }
.rsvp-success p { color: #8aa5be; font-size: .9rem; }

/* ── MESSAGE WALL ── */
.message-wall {
    max-width: 580px;
    margin: 2rem auto 0;
}
.message-wall-title {
    text-align: center;
    margin-bottom: 1.5rem;
}
.message-feed {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--sky) transparent;
}
.message-bubble {
    background: var(--white);
    border-radius: 3px;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--teal);
    animation: fadeUp .5s ease both;
}
.message-bubble .mb-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    color: var(--navy);
    font-weight: 600;
}
.message-bubble .mb-status {
    font-size: .6rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--teal);
    margin-left: .5rem;
}
.message-bubble .mb-text {
    font-size: .88rem;
    color: #6b7d8e;
    margin-top: .35rem;
    line-height: 1.7;
}
.message-bubble.declined { border-left-color: var(--sky); opacity: .7; }
.msg-empty {
    text-align: center;
    color: #aabdcc;
    font-size: .85rem;
    font-style: italic;
    padding: 2rem 0;
}

/* ── FOOTER ── */
footer {
    background: var(--navy);
    color: rgba(203,217,230,.55);
    text-align: center;
    padding: 3rem 1rem;
}
footer .footer-names {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: var(--white);
    font-weight: 300;
    margin-bottom: .25rem;
}
footer p { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; }
footer .footer-divider {
    width: 40px; height: 1px;
    background: rgba(203,217,230,.25);
    margin: 1.25rem auto;
}

/* ── MUSIC BUTTON ── */
.music-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(47,65,86,.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203,217,230,.25);
    color: var(--sky);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    z-index: 998;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .4s ease, transform .4s ease, background .2s;
    pointer-events: none;
}
.music-btn.visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.music-btn:hover { background: rgba(47,65,86,1); color: var(--white); }
.music-btn .music-bars {
    display: flex; align-items: flex-end; gap: 2px; height: 14px;
}
.music-btn .music-bars span {
    display: block; width: 3px; background: currentColor; border-radius: 2px;
    animation: bar-bounce 1s ease-in-out infinite;
}
.music-btn .music-bars span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.music-btn .music-bars span:nth-child(2) { height: 12px; animation-delay: .2s; }
.music-btn .music-bars span:nth-child(3) { height: 8px;  animation-delay: .1s; }
.music-btn.muted .music-bars span { animation: none; height: 4px !important; opacity: .4; }
@keyframes bar-bounce {
    0%,100% { transform: scaleY(1); }
    50%      { transform: scaleY(.4); }
}

/* ── UTILITIES ── */
.text-navy { color: var(--navy) !important; }
.text-teal { color: var(--teal) !important; }
.text-sky  { color: var(--sky)  !important; }

/* ── ANIMATIONS (scroll reveal) ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .75s ease, transform .75s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .4s ease, transform .4s ease;
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* Responsive */
@media (max-width: 768px) {
    .hero-corner { width: 60px; height: 60px; }
    section { padding: 5rem 0; }
    .rsvp-card { padding: 2rem 1.5rem; }
    .gift-box  { padding: 2rem 1.5rem; }
}
