/* ==========================================================================
   Kaito Invites — Tema 24 "Noir Editorial"
   Sibling of tema 18 (same type & palette), re-composed editorial layouts.
   Mobile-first, max 480px column on desktop.
   ========================================================================== */

@font-face {
    font-family: 'Icon Script';
    src: url('../assets/fonts/New-Icon-Script.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Times Now';
    src: url('../assets/fonts/TimesNow-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'Times Now';
    src: url('../assets/fonts/TimesNow-SemiLight.ttf') format('truetype');
    font-weight: 400 600;
    font-display: swap;
}

@font-face {
    font-family: 'Times Now';
    src: url('../assets/fonts/TimesNow-LightItalic.ttf') format('truetype');
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Ovo';
    src: url('../assets/fonts/Ovo-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'The Signature';
    src: url('../assets/fonts/Thesignature.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Upright';
    src: url('../assets/fonts/CormorantUpright-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

:root {
    --black: #000000;
    --ink: #101010;
    --white: #FFFFFF;
    --muted: #A8A8A8;
    --dim: #636363;
    --cream: #E5E0D8;
    --col: 480px;
    --gut: 24px;

    --f-script: 'Icon Script', cursive;
    --f-sign: 'The Signature', cursive;
    --f-serif: 'Times Now', 'Times New Roman', serif;
    --f-body: 'Ovo', Georgia, serif;
    --f-caps: 'Abhaya Libre', Georgia, serif;
    --f-sans: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #050505;
    color: var(--white);
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

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

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure {
    margin: 0;
}

[hidden] {
    display: none !important;
}

.page {
    position: relative;
    max-width: var(--col);
    margin: 0 auto;
    overflow: hidden;
    background: var(--black);
}

.page > section {
    position: relative;
    padding: 90px var(--gut);
}

/* ---------- shared type ---------- */
.caps-label {
    font-family: var(--f-caps);
    font-size: 11px;
    letter-spacing: .3em;
    line-height: 1.5;
    color: var(--muted);
}

.script {
    font-family: var(--f-script);
    font-weight: 400;
    font-size: 50px;
    line-height: 1;
}

.script--sm {
    font-size: 36px;
}

.script--xl {
    font-size: 66px;
}

.signature {
    font-family: var(--f-sign);
    font-size: 34px;
    line-height: 1.15;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 999px;
    background: transparent;
    color: var(--white);
    font-family: var(--f-caps);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.pill:hover,
.pill:focus-visible {
    background: var(--white);
    color: var(--black);
}

.pill--block {
    display: flex;
    width: 100%;
    padding: 0 8px;
    font-size: 11px;
}

.btn-solid,
.btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid var(--white);
    border-radius: 0;
    font-family: var(--f-caps);
    font-size: 12px;
    letter-spacing: .24em;
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.btn-solid {
    background: var(--white);
    color: var(--black);
}

.btn-solid:hover,
.btn-solid:focus-visible {
    background: var(--cream);
}

.btn-line {
    background: transparent;
    color: var(--white);
}

.btn-line:hover,
.btn-line:focus-visible {
    background: var(--white);
    color: var(--black);
}

.btn-solid--wide {
    display: flex;
    width: 100%;
}

/* ---------- reveal on scroll ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 1s ease, transform 1s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   COVER — framed photo, names breaking the frame
   ========================================================================== */
.cover {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--black);
    transition: opacity 1s ease, visibility 1s;
}

.cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cover__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: var(--col);
    height: 100%;
    margin: 0 auto;
    padding: max(34px, 5vh) var(--gut) max(26px, 4vh);
}

.cover__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cover__date {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: .18em;
    line-height: 1.5;
    text-align: right;
    color: var(--cream);
}

.cover__frame {
    position: relative;
    flex: 1;
    min-height: 0;
    margin: 58px 0 30px;
}

.cover__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 40%;
    filter: grayscale(1);
    animation: coverZoom 9s ease-out both;
}

.cover__name {
    position: absolute;
    font-family: var(--f-script);
    font-size: clamp(60px, 19vw, 82px);
    line-height: 1;
    color: var(--white);
    animation: fadeUp 1.2s .3s ease both;
}

.cover__name--a {
    top: -50px;
    left: 6px;
}

.cover__name--b {
    right: 2px;
    bottom: -34px;
    animation-delay: .7s;
}

.cover__and {
    position: absolute;
    right: 20px;
    bottom: 48px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 20px;
    animation: fadeUp 1.2s .5s ease both;
}

.cover__guest {
    margin-top: 14px;
    animation: fadeUp 1.2s .9s ease both;
}

.cover__dear {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--muted);
}

.cover__guest-name {
    font-family: var(--f-serif);
    font-weight: 400;
    font-size: 26px;
    line-height: 1.15;
}

.cover__note {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.cover__action {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    animation: fadeUp 1.2s 1.1s ease both;
}

.cover__line {
    flex: 1;
    height: 1px;
    background: var(--dim);
}

@keyframes coverZoom {
    from {
        transform: scale(1.08);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
}

/* ==========================================================================
   FLOATING CONTROLS
   ========================================================================== */
.menu-btn {
    position: fixed;
    top: 26px;
    right: max(26px, calc(50% - var(--col) / 2 + 26px));
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 30px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-btn span {
    display: block;
    height: 1.5px;
    background: var(--white);
    mix-blend-mode: difference;
}

.menu {
    position: fixed;
    inset: 12px max(9px, calc(50% - var(--col) / 2 + 9px)) auto;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 70px 34px 40px;
    background: rgba(16, 16, 16, .97);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .35s, visibility .35s, transform .35s;
}

.menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.menu a {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 30px;
    color: var(--white);
    text-decoration: none;
    line-height: 1.45;
}

.menu__close {
    position: absolute;
    top: 18px;
    right: 22px;
    border: 0;
    background: none;
    color: var(--white);
    font-family: var(--f-caps);
    font-size: 12px;
    letter-spacing: .2em;
    cursor: pointer;
}

.menu__hint {
    margin-top: 18px;
    color: #929292;
    font-family: var(--f-sans);
    font-size: 10px;
}

.music-btn {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    right: max(20px, calc(50% - var(--col) / 2 + 20px));
    z-index: 99;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
}

.music-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.music-btn.playing i {
    animation: spin 4s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.yt-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   HOME
   ========================================================================== */
.page > .home {
    padding: 0 0 70px;
}

.home__photo {
    width: 100%;
    height: 68vh;
    min-height: 420px;
    object-fit: cover;
    filter: grayscale(1);
}

.home__text {
    margin-top: 28px;
    padding: 0 var(--gut);
}

.home__names {
    margin-top: 8px;
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 46px;
    line-height: 1;
}

.home__names em {
    font-family: var(--f-script);
    font-style: normal;
    font-size: 40px;
    color: var(--cream);
}

.home__vow {
    margin-top: 14px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
    color: var(--cream);
}

/* ==========================================================================
   COUPLE — photos bleed to alternating edges
   ========================================================================== */
.page > .couple {
    padding: 70px 0 80px;
}

.couple__intro {
    padding: 0 var(--gut);
}

.couple__lead {
    margin-top: 10px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 19px;
    line-height: 1.45;
    color: var(--cream);
}

.person {
    margin-top: 48px;
}

.person__media {
    position: relative;
    height: 360px;
}

.person__photo {
    position: absolute;
    top: 0;
    width: 64%;
    height: 336px;
    object-fit: cover;
    filter: grayscale(1);
}

.person__tag {
    position: absolute;
    top: 10px;
    font-family: var(--f-caps);
    font-size: 11px;
    letter-spacing: .4em;
    color: var(--muted);
    white-space: nowrap;
    writing-mode: vertical-rl;
}

.person__script {
    position: absolute;
    bottom: 0;
    font-family: var(--f-script);
    font-size: 62px;
    line-height: 1;
}

.person--groom .person__photo {
    left: 0;
}

.person--groom .person__tag {
    left: calc(64% + 22px);
}

.person--groom .person__script {
    left: 44%;
}

.person--bride .person__photo {
    right: 0;
}

.person--bride .person__tag {
    right: calc(64% + 22px);
    transform: rotate(180deg);
}

.person--bride .person__script {
    left: var(--gut);
}

.person__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 18px;
    padding: 0 var(--gut);
}

.person--bride .person__info {
    align-items: flex-end;
    text-align: right;
}

.person__name {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.05;
}

.person__of {
    margin-top: 6px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--muted);
}

.person__parents {
    font-size: 15px;
    color: var(--cream);
}

.person .pill {
    align-self: flex-start;
    margin-top: 12px;
}

.person--bride .pill {
    align-self: flex-end;
}

.couple__rule {
    display: block;
    width: 48px;
    height: 1px;
    margin: 56px var(--gut) 0;
    background: var(--dim);
}

/* ==========================================================================
   VERSE — quote first, wide photo after
   ========================================================================== */
.page > .verse {
    padding: 60px 0 0;
}

.verse__text {
    padding: 0 var(--gut);
}

.verse__mark {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 120px;
    line-height: .8;
    color: var(--dim);
}

.verse__quote {
    margin-top: 4px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 21px;
    line-height: 1.45;
}

.verse__ref {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-family: var(--f-caps);
    font-size: 12px;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--muted);
}

.verse__dash {
    width: 40px;
    height: 1px;
    background: var(--muted);
}

.verse__img {
    width: 100%;
    height: 260px;
    margin-top: 34px;
    object-fit: cover;
    filter: grayscale(1);
}

/* ==========================================================================
   LOVE STORY — big years, alternating photos
   ========================================================================== */
.story__head .script,
.gift__head .script {
    font-size: 44px;
    white-space: nowrap;
}

.story__head .caps-label,
.gift__head .caps-label {
    white-space: nowrap;
}

.story__head,
.gift__head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.story__head .caps-label,
.gift__head .caps-label {
    order: -1;
}

.story__head {
    margin-bottom: 30px;
}

.story__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.story__row + .story__row {
    margin-top: 40px;
}

.story__row--flip .story__text {
    order: 2;
    align-items: flex-end;
    text-align: right;
}

.story__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.story__date {
    font-family: var(--f-caps);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: .26em;
    text-transform: uppercase;
    color: var(--muted);
}

.story__year {
    display: block;
    margin-bottom: 6px;
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 58px;
    line-height: .9;
    letter-spacing: 0;
    color: var(--dim);
}

.story__body {
    font-size: 14.5px;
    color: var(--cream);
}

.story__img {
    width: 100%;
    height: 200px;
    margin-top: 22px;
    object-fit: cover;
    filter: grayscale(1);
}

.story__row--flip .story__img {
    margin-top: 0;
}

/* ==========================================================================
   COUNTDOWN — full-bleed photo, numbers along the bottom edge
   ========================================================================== */
.page > .countdown-screen {
    height: 460px;
    padding: 0;
}

.cd__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.countdown-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .88));
}

.countdown-screen .signature {
    position: absolute;
    top: 34px;
    left: var(--gut);
    z-index: 1;
    width: 250px;
}

.countdown {
    position: absolute;
    left: var(--gut);
    right: var(--gut);
    bottom: 28px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.countdown div {
    display: flex;
    flex-direction: column;
}

.countdown div + div {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .4);
}

.countdown span {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 44px;
    line-height: 1;
}

.countdown small {
    margin-top: 4px;
    font-family: var(--f-caps);
    font-size: 10px;
    letter-spacing: .26em;
    color: var(--cream);
}

/* ==========================================================================
   EVENT — oversized day, two columns
   ========================================================================== */
.page > .event {
    padding-top: 70px;
}

.event__date {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.event__day {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 150px;
    line-height: .78;
}

.event__dateinfo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 6px;
}

.event__month {
    font-family: var(--f-serif);
    font-size: 30px;
    line-height: 1;
}

.event__year {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 22px;
    line-height: 1.1;
    color: var(--cream);
}

.event__label {
    margin-top: 28px;
}

.event__rule {
    display: block;
    height: 1px;
    margin: 12px 0 24px;
    background: var(--dim);
}

.event__cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.event__block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 14px;
}

.event__block + .event__block {
    padding: 0 0 0 14px;
    border-left: 1px solid var(--dim);
}

.event__block:only-child {
    grid-column: 1 / -1;
    padding: 0;
}

.event__title {
    font-family: var(--f-serif);
    font-weight: 400;
    font-size: 24px;
    line-height: 1.15;
}

.event__time {
    font-size: 15px;
    color: var(--cream);
}

.event__venue {
    margin-top: 6px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 16px;
}

.event__addr {
    flex: 1;
    font-size: 13px;
    color: var(--muted);
}

.event__block .pill {
    margin-top: 12px;
}

.event #save-date {
    margin-top: 34px;
}

.stream {
    display: flex;
    gap: 16px;
    margin-top: 56px;
}

.stream__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.stream__title {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 24px;
    line-height: 1.15;
}

.stream__text .pill {
    align-self: flex-start;
    margin-top: auto;
}

.stream__img {
    flex-shrink: 0;
    width: 140px;
    height: 176px;
    object-fit: cover;
    filter: grayscale(1);
}

.attire {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--dim);
}

.attire__note {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--muted);
}

.swatches {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.swatches i {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.swatches i:nth-child(1) {
    background: var(--cream);
}

.swatches i:nth-child(2) {
    background: #2b2724;
    border: 1px solid var(--dim);
}

.swatches i:nth-child(3) {
    background: #6e5b4d;
}

.swatches i:nth-child(4) {
    background: #b8a596;
}

/* ==========================================================================
   RSVP & WISHES — underline form
   ========================================================================== */
.rsvp__lead {
    margin-top: 6px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 17px;
    color: var(--cream);
}

.rsvp__form {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.rsvp__form label,
.rsvp__label {
    margin: 22px 0 6px;
    font-family: var(--f-caps);
    font-size: 11px;
    letter-spacing: .26em;
    color: var(--muted);
}

.rsvp__form input[type="text"],
.rsvp__form textarea {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--muted);
    border-radius: 0;
    background: transparent;
    color: var(--white);
    font-family: var(--f-serif);
    font-size: 19px;
}

.rsvp__form textarea {
    font-style: italic;
    font-size: 17px;
    resize: vertical;
}

.rsvp__form input:focus,
.rsvp__form textarea:focus {
    outline: 0;
    border-bottom-color: var(--white);
}

.rsvp__choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rsvp__choice label {
    margin: 0;
}

.rsvp__choice input {
    position: absolute;
    opacity: 0;
}

.rsvp__choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--dim);
    color: var(--cream);
    font-family: var(--f-caps);
    font-size: 12px;
    letter-spacing: .2em;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.rsvp__choice input:checked + span {
    border-color: var(--white);
    background: var(--white);
    color: var(--black);
}

.rsvp__choice input:focus-visible + span {
    outline: 1px solid var(--white);
    outline-offset: 2px;
}

.rsvp__guests {
    display: flex;
    flex-direction: column;
}

.rsvp__guests.is-hidden {
    display: none;
}

.stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    border-bottom: 1px solid var(--muted);
}

.stepper button {
    height: 44px;
    border: 0;
    background: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
}

.stepper input {
    width: 100%;
    border: 0;
    background: none;
    color: var(--white);
    font: 300 22px var(--f-serif);
    text-align: center;
    -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.rsvp__form .btn-line {
    margin-top: 28px;
}

.rsvp__status {
    min-height: 1.4em;
    margin-top: 10px;
    text-align: center;
    font-family: var(--f-sans);
    font-size: 12px;
    color: var(--muted);
}

.wishes {
    margin-top: 20px;
}

.wish {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.wish__name {
    font-family: var(--f-serif);
    font-size: 17px;
}

.wish__msg {
    margin-top: 4px;
    color: #d0d0d0;
    font-size: 13.5px;
    word-break: break-word;
}

.wish__date {
    display: block;
    margin-top: 4px;
    color: var(--dim);
    font-family: var(--f-sans);
    font-size: 10px;
}

.wishes__empty {
    margin-top: 16px;
    font-family: var(--f-serif);
    font-style: italic;
    font-size: 15px;
    color: var(--muted);
}

.wishes__pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    font-family: var(--f-sans);
    font-size: 12px;
    color: #c8c8c8;
}

.wishes__pager button {
    min-height: 44px;
    border: 0;
    background: none;
    color: #c8c8c8;
    font: 500 13px var(--f-sans);
    cursor: pointer;
}

.wishes__pager button:disabled {
    opacity: .3;
    cursor: default;
}

/* ==========================================================================
   WEDDING GIFT — ruled list, big numbers
   ========================================================================== */
.page > .gift {
    padding-top: 40px;
}

.gift__lead {
    margin: 10px 0 14px;
    font-size: 13.5px;
    color: var(--muted);
}

.gift__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--dim);
}

.gift__row:last-child {
    border-bottom: 1px solid var(--dim);
}

.gift__info {
    min-width: 0;
}

.gift__meta {
    font-family: var(--f-caps);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
}

.gift__no {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 26px;
    letter-spacing: .06em;
    word-break: break-all;
}

.gift__addr {
    margin-top: 2px;
    font-size: 14px;
    color: var(--cream);
}

.gift__copy {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    border-bottom: 1px solid var(--white);
    background: none;
    color: var(--white);
    font-family: var(--f-caps);
    font-size: 11px;
    letter-spacing: .22em;
    cursor: pointer;
}

/* ==========================================================================
   VIDEO + GALLERY — mosaic
   ========================================================================== */
.page > .gallery {
    padding-top: 30px;
}

.film {
    margin-bottom: 26px;
}

.film__video {
    position: relative;
    margin-top: 12px;
    aspect-ratio: 16 / 9;
}

.film__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.film__poster {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.film__poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.film__poster i {
    position: relative;
    font-size: 46px;
    color: rgba(255, 255, 255, .8);
}

.gallery__source {
    display: none;
}

.gallery__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

/* Editorial rhythm: one wide frame, then two tall ones, repeating */
.gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.gallery__item {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #1a1a1a;
    cursor: zoom-in;
}

.gallery__item:nth-child(3n + 1) {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 10;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter .6s ease, transform .6s ease;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
    filter: grayscale(0);
    transform: scale(1.03);
}

.gallery__item.is-extra {
    display: none;
}

.gallery__grid.is-open .gallery__item.is-extra {
    display: block;
}

.gallery__more {
    margin-top: 14px;
}

.gallery__more[hidden] {
    display: none;
}

.gallery__hint {
    font-family: var(--f-sans);
    font-size: 10px;
    font-weight: 300;
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .94);
}

.lightbox img {
    max-height: 86vh;
    object-fit: contain;
}

.lightbox button {
    position: absolute;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

.lightbox__close {
    top: 14px;
    right: 18px;
}

.lightbox__prev {
    left: 10px;
    top: 50%;
}

.lightbox__next {
    right: 10px;
    top: 50%;
}

/* ==========================================================================
   CLOSING
   ========================================================================== */
.page > .closing {
    padding: 70px 0 30px;
}

.closing__text {
    padding: 0 var(--gut);
}

.closing__msg {
    margin-top: 12px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--cream);
}

.closing__photo {
    width: 100%;
    height: 220px;
    margin-top: 34px;
    object-fit: cover;
    object-position: 50% 60%;
    filter: grayscale(1);
}

.closing__foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-top: 14px;
    padding: 0 var(--gut);
}

.closing__names {
    color: var(--white);
    text-transform: uppercase;
}

.credit {
    font-family: var(--f-sans);
    font-size: 10px;
    color: var(--muted);
}

/* ==========================================================================
   THANK-YOU CARD
   ========================================================================== */
.card-modal {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .8);
}

.card-modal__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.guest-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 300px;
    padding: 40px 26px;
    background: #f6f3ee url('../assets/img/paper.jpg') center / cover;
    color: #000;
    text-align: center;
}

.guest-card__eyebrow {
    font-family: var(--f-body);
    font-size: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.guest-card__names {
    font-family: 'Cormorant Upright', serif;
    font-weight: 600;
    font-size: 21px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.guest-card__to {
    margin-top: 16px;
    font-family: var(--f-body);
    font-size: 13px;
}

.guest-card__thanks {
    margin-top: 16px;
    font-family: 'Cormorant Upright', serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
}

.guest-card__msg {
    font-family: var(--f-sans);
    font-size: 9px;
    letter-spacing: .4px;
}

.card-modal__actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.card-modal__close {
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--white);
    font-family: var(--f-caps);
    font-size: 13px;
    letter-spacing: .2em;
    cursor: pointer;
}

/* ---------- toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 70px;
    z-index: 400;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--white);
    color: var(--black);
    font-family: var(--f-sans);
    font-size: 12px;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   BACKGROUND VIDEO (hero_video_url) — fixed behind the page, B&W
   ========================================================================== */
.bg-video {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #050505;
    pointer-events: none;
}

.bg-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100vw, 177.78vh);
    height: max(100vh, 56.25vw);
    border: 0;
    transform: translate(-50%, -50%);
    filter: grayscale(1) contrast(1.05);
}

.bg-video::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.has-bg-video .page {
    z-index: 1;
    background: transparent;
}



/* ==========================================================================
   INTRO — loader with fast photo flicker and 0-100% counter
   ========================================================================== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--intro-bg);
    color: var(--intro-fg);
    transition: opacity .7s ease, visibility .7s;
    /* failsafe: never block the invitation if the script fails */
    animation: intro-failsafe .01s 9s forwards;
}

.intro.is-done {
    opacity: 0;
    visibility: hidden;
}

@keyframes intro-failsafe {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.intro__photo {
    width: 124px;
    height: 124px;
    margin-bottom: 14px;
    overflow: hidden;
    background: var(--intro-tile);
}

.intro__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro__photo img:not([src]) {
    visibility: hidden;
}

.intro__label {
    margin: 0;
    font-size: 10px;
    letter-spacing: .42em;
    text-indent: .42em;
}

.intro__names {
    margin: 0;
    padding: 0 24px;
    text-align: center;
    line-height: 1.1;
}

.intro__pct {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18vh;
    margin: 0;
    text-align: center;
    font-size: 15px;
    letter-spacing: .3em;
    text-indent: .3em;
    font-variant-numeric: tabular-nums;
}

.intro {
    --intro-bg: #1C1C1C;
    --intro-fg: var(--cream);
    --intro-tile: #2A2A2A;
}

.intro__photo img {
    filter: grayscale(1);
}

.intro__label {
    font-family: var(--f-caps);
    color: var(--muted);
}

.intro__names {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 30px;
    color: var(--white);
}

.intro__pct {
    font-family: var(--f-serif);
    color: var(--cream);
}

/* Home: full-screen photo with the names over it */
.page > .home {
    position: relative;
    padding: 0;
}

.home__photo {
    display: block;
    height: 100vh;
    height: 100svh;
    min-height: 520px;
}

.page > .home::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 70%, rgba(0, 0, 0, .9));
    pointer-events: none;
}

.home__text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    margin-top: 0;
    padding: 0 var(--gut) calc(84px + env(safe-area-inset-bottom));
}

/* Photos start in black & white and bloom into colour as they scroll into view */
.cover__photo, .home__photo, .person__photo, .verse__img, .story__img, .cd__photo, .stream__img, .gallery__item img, .closing__photo {
    transition: filter 1.8s ease;
}

.is-colored {
    filter: grayscale(0) !important;
}
