/* ==========================================================================
   Nuptial - dark and romantic, handwritten through drifting fog
   Signature: on a dark photo, fog drifts slowly across the hero while the names are
   written letter by letter, each letter sliding out from under an invisible pen, then
   a nib stroke underlines them. Every section title writes itself the same way when it
   scrolls into view, and the fog returns at the footer.
   Palette (dark): --inv-primary (rose / silver / champagne), --inv-accent (deep tone), --inv-bg, --inv-text
   ========================================================================== */

.nuptial {
    --np-line: color-mix(in srgb, var(--inv-primary) 32%, transparent);
    --np-muted: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --np-surface: color-mix(in srgb, var(--inv-accent) 22%, var(--inv-bg));
    --kit-radius: 2px;
    font-family: var(--inv-font-body);
    font-size: 1rem;
    line-height: 1.85;
    letter-spacing: .01em;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.nuptial h1, .nuptial h2, .nuptial h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.nuptial) :is(h1, h2, h3) { margin: 0; }
.np-kicker { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--np-muted); margin: 0 0 10px; }

/* ---------- Handwriting ---------- */
.np-word { display: inline-block; white-space: nowrap; }
.np-letter { display: inline-block; white-space: pre; clip-path: inset(-20% 100% -30% -10%); opacity: 0; }
.np-hero .np-letter, .is-visible .np-letter { animation: np-write .5s calc(var(--i) * .11s + var(--np-delay, 0s)) cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes np-write {
    0% { clip-path: inset(-20% 100% -30% -10%); opacity: 0; filter: blur(3px); }
    30% { opacity: 1; }
    100% { clip-path: inset(-20% -30% -30% -10%); opacity: 1; filter: none; }
}
.np-stroke { display: block; height: 14px; width: 180px; margin: 4px auto 0; background: currentColor; color: var(--inv-primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 14'%3E%3Cpath d='M2 9 C40 3 70 12 100 7 S150 2 178 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 14'%3E%3Cpath d='M2 9 C40 3 70 12 100 7 S150 2 178 6' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    clip-path: inset(0 100% 0 0); }
.is-visible .np-stroke { animation: np-underline 1s 1s ease-out forwards; }
.np-stroke--hero { width: min(420px, 70vw); animation: np-underline 1.4s 2.6s ease-out forwards; }
@keyframes np-underline { to { clip-path: inset(0 0 0 0); } }

/* ---------- Fog ---------- */
.np-fog { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.np-fog span { position: absolute; left: -50%; width: 200%; height: 60%; background:
    radial-gradient(ellipse 22% 50% at 20% 50%, color-mix(in srgb, var(--inv-text) 30%, transparent), transparent 70%),
    radial-gradient(ellipse 18% 40% at 55% 60%, color-mix(in srgb, var(--inv-text) 22%, transparent), transparent 70%),
    radial-gradient(ellipse 26% 46% at 85% 40%, color-mix(in srgb, var(--inv-text) 26%, transparent), transparent 70%);
    filter: blur(24px); animation: np-drift 70s linear infinite alternate; opacity: .8; }
.np-fog span:nth-child(1) { bottom: -8%; }
.np-fog span:nth-child(2) { bottom: 18%; animation-duration: 95s; animation-direction: alternate-reverse; opacity: .55; }
.np-fog span:nth-child(3) { top: -10%; animation-duration: 120s; opacity: .4; }
@keyframes np-drift { from { translate: -18% 0; } to { translate: 18% 0; } }

/* ---------- Navigation ---------- */
.np-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 18px clamp(16px, 4vw, 44px); display: flex; align-items: center; justify-content: center; }
.np-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; }
.np-nav a { text-decoration: none; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--np-muted); padding: 4px 0; }
.np-nav a:hover, .np-nav a.is-current { color: var(--inv-primary); }
.np-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 2rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; }
.np-nav.is-stuck { padding: 8px clamp(16px, 4vw, 44px); justify-content: flex-end; background: color-mix(in srgb, var(--inv-bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--np-line); }
.nuptial .kit-to-top { background: var(--inv-primary); color: var(--inv-bg); }
@media (max-width: 899px) {
    .np-nav { justify-content: flex-end; padding: 10px 14px; }
    .np-nav .kit-nav-toggle { margin-left: auto; font-size: 1.5rem; color: var(--inv-primary); }
    .np-nav .kit-nav-links { display: none; }
    .np-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 14px; position: absolute; top: 58px; left: 12px; right: 12px; padding: 24px; background: var(--inv-bg); border: 1px solid var(--np-line); }
}

/* ---------- Hero ---------- */
.np-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 100px 20px 80px; text-align: center; overflow: clip; isolation: isolate; }
.np-hero-photo { position: absolute; inset: 0; margin: 0; z-index: -2; }
.np-hero-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .38; filter: grayscale(.4) contrast(1.05); }
.np-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 45%, transparent 20%, var(--inv-bg) 85%); }
.np-hero-content { position: relative; z-index: 1; max-width: 900px; }
.np-names { font-size: clamp(5rem, 16vw, 10.5rem); color: var(--inv-primary); line-height: .9; }
.np-name { display: inline-block; }
.np-and { display: inline-block; font-size: .5em; margin: 0 .15em; color: var(--inv-text); vertical-align: middle; }
@media (max-width: 640px) { .np-name, .np-and { display: block; } .np-and { margin: -.1em 0; } }
.np-hero .np-letter { --np-delay: .6s; }
.np-subtitle { max-width: 520px; margin: 28px auto 0; color: var(--np-muted); opacity: 0; animation: np-fade 1.4s 3.2s forwards; }
.np-hero-date { margin: 22px 0 0; font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; line-height: 2.1; opacity: 0; animation: np-fade 1.4s 3.6s forwards; }
@keyframes np-fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.np-section { max-width: 1040px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.np-welcome, .np-family, .np-countdown, .np-contact { text-align: center; }
.np-title { margin-bottom: 34px; text-align: center; }
.np-title h2 { font-size: clamp(3.6rem, 9vw, 5.4rem); color: var(--inv-primary); }
.np-title .np-stroke { margin-top: -4px; }
.np-prose { max-width: 620px; margin: 0 auto; font-size: 1.06rem; text-align: center; }
.np-prose p { margin: 0 0 1.1em; }
.np-quote-author { font-style: italic; color: var(--np-muted); }
.np-lead { color: var(--np-muted); margin: 0 0 24px; }

/* Couple: portraits fading into the dark */
.np-couple-grid { display: grid; gap: 56px; }
@media (min-width: 760px) { .np-couple-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.np-person { text-align: center; }
.np-portrait { margin: 0 auto 18px; width: min(340px, 82vw); aspect-ratio: 4 / 5; -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
.np-portrait img, .np-initial { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-initial { display: grid; place-items: center; background: var(--np-surface); font-family: var(--inv-font-heading); font-size: 7rem; color: var(--inv-primary); }
.np-person h3 { font-size: 3.2rem; color: var(--inv-primary); margin-bottom: 6px; }
.np-person p { color: var(--np-muted); max-width: 380px; margin: 0 auto; }

/* Family */
.np-family-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 56px; margin: 0; }
.np-family-list dt { font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--np-muted); }
.np-family-list dd { margin: 0; font-family: var(--inv-font-heading); font-size: 2.3rem; color: var(--inv-primary); line-height: 1.2; }

/* Story */
.np-story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 70px; }
.np-story-item { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .np-story-item { grid-template-columns: 1fr 1fr; gap: 56px; } .np-story-item:nth-child(even) .np-story-photo { order: 2; } }
.np-story-photo { margin: 0; aspect-ratio: 4 / 3; -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 50%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 50%, transparent 100%); }
.np-story-photo img { width: 100%; height: 100%; object-fit: cover; }
.np-story-text h3 { font-size: 2.8rem; color: var(--inv-primary); margin-bottom: 8px; }
.np-story-text p { margin: 0 0 .6em; color: var(--np-muted); }

/* Events */
.np-event-list { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--np-line); border-bottom: 1px solid var(--np-line); }
.np-event { padding: 34px 24px; text-align: center; }
.np-event + .np-event { border-left: 1px solid var(--np-line); }
@media (max-width: 820px) { .np-event + .np-event { border-left: 0; border-top: 1px solid var(--np-line); } }
.np-event-time { font-family: var(--inv-font-heading); font-size: 3.6rem; line-height: 1; color: var(--inv-primary); margin: 0 0 4px; }
.np-event h3 { font-family: var(--inv-font-body); font-size: .9rem; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 8px; }
.np-event-place { margin: 12px 0 0; }
.np-event-address, .np-event-notes { margin: 2px 0 0; color: var(--np-muted); font-size: .92rem; }
.nuptial .kit-event-actions { justify-content: center; margin-top: 16px; }
.nuptial .kit-button { border-radius: 0; border: 1px solid var(--np-line); background: transparent; color: var(--inv-primary); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.nuptial .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown */
.np-countdown .kit-countdown { gap: clamp(12px, 4vw, 44px); margin-top: 8px; }
.np-countdown .kit-countdown-unit { min-width: 0; background: none; }
.np-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-size: clamp(4rem, 12vw, 6.4rem); line-height: 1; color: var(--inv-primary); }
.np-countdown .kit-countdown-label { font-size: .66rem; letter-spacing: .26em; color: var(--np-muted); }

/* Gallery: photos fading into the dark */
.np-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .np-gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.np-gallery-grid a { aspect-ratio: 3 / 4; border-radius: 0; }
.np-gallery-grid img { filter: grayscale(.25) brightness(.85); transition: filter .6s ease; }
.np-gallery-grid a:hover img { filter: none; }

/* RSVP */
.np-rsvp-card { max-width: 660px; margin: 0 auto; padding: clamp(26px, 5vw, 50px); border: 1px solid var(--np-line); background: color-mix(in srgb, var(--inv-bg) 70%, var(--np-surface)); text-align: center; }
.nuptial .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .nuptial .inv-rsvp__field select, .nuptial .inv-rsvp__field textarea { color: var(--inv-text); background: color-mix(in srgb, var(--inv-text) 6%, transparent); border-color: var(--np-line); }
.nuptial .inv-rsvp__field select option { background: var(--inv-bg); }
.nuptial .inv-rsvp__submit { border-radius: 0; background: var(--inv-primary); color: var(--inv-bg); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; }

/* Info */
.np-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.np-info-item { padding: 26px; text-align: center; border: 1px solid var(--np-line); }
.np-info-item h3 { font-size: 2.4rem; color: var(--inv-primary); margin-bottom: 6px; }
.np-info-item p { margin: 0 0 .5em; color: var(--np-muted); }
.np-faq { max-width: 700px; margin: 50px auto 0; text-align: center; }
.np-faq details { text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--np-line); }
.np-faq summary { cursor: pointer; }
.np-faq details p { margin: 8px 0 0; color: var(--np-muted); }

/* Contact */
.np-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 64px; }
.np-contact-name { font-family: var(--inv-font-heading); font-size: 2.8rem; color: var(--inv-primary); margin: 0; line-height: 1.1; }
.np-contact-person a { color: var(--inv-text); text-decoration: none; letter-spacing: .08em; }

/* Footer */
.np-footer { position: relative; padding: 90px 22px 70px; text-align: center; overflow: hidden; isolation: isolate; border-top: 1px solid var(--np-line); }
.np-fog--footer { z-index: -1; }
.np-footer-message { margin: 0 0 4px; color: var(--np-muted); }
.np-footer-names { font-family: var(--inv-font-heading); font-size: clamp(4rem, 12vw, 7rem); line-height: 1; color: var(--inv-primary); margin: 0 0 12px; }
.np-hashtag { margin: 0 0 8px; letter-spacing: .12em; }

@media (prefers-reduced-motion: reduce) {
    .np-letter, .np-stroke, .np-subtitle, .np-hero-date { animation: none !important; clip-path: none; opacity: 1; }
    .np-fog span { animation: none; }
}
.nuptial input[type=radio], .nuptial input[type=checkbox] { accent-color: var(--inv-primary); }
.np-story-photo img, .np-portrait img { filter: brightness(.88); }
