/* ==========================================================================
   Aurora - a winter night under the northern lights. Over a dark photo, curtains of light ripple slowly across the
   sky (canvas.au-sky, script.js), rays flickering, stars twinkling; the names are written letter by letter, as if by
   hand, glowing in the light. At a touch the aurora flares and a wave runs along it. Every title writes itself over a
   shimmering line of aurora light, portraits and story photos fade into the dark, the days left sit in turning rings
   of light, and the aurora lights up again at the end.
   Palette (dark): --inv-primary (the names, near white), --inv-accent (the aurora), --inv-bg, --inv-text.
   script.js derives two more aurora colours from the accent (its hue turned either way).
   ========================================================================== */

.aurora {
    --au-glow: color-mix(in srgb, var(--inv-accent) 55%, transparent);
    --au-line: color-mix(in srgb, var(--inv-primary) 22%, transparent);
    --au-muted: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --au-surface: color-mix(in srgb, var(--inv-accent) 7%, var(--inv-bg));
    --au-band: linear-gradient(90deg, transparent, var(--inv-accent) 22%, color-mix(in srgb, var(--inv-accent) 40%, var(--inv-primary)) 50%, var(--inv-accent) 78%, transparent);
    --kit-radius: 4px;
    --kit-field-bg: color-mix(in srgb, var(--inv-text) 6%, transparent);
    --kit-field-border: var(--au-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.02rem;
    line-height: 1.85;
    letter-spacing: .01em;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.aurora h1, .aurora h2, .aurora h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1; }
:where(.aurora) :is(h1, h2, h3) { margin: 0; }
.aurora strong { font-weight: 600; }
.aurora a { color: var(--inv-primary); }
.au-kicker { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--au-muted); margin: 0 0 10px; }
.au-stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora > header, .aurora > main, .aurora > footer { position: relative; z-index: 1; }

/* ---------- Handwriting ---------- */
.au-word { display: inline-block; white-space: nowrap; }
.au-letter { display: inline-block; white-space: pre; clip-path: inset(-20% 100% -30% -10%); opacity: 0; }
.au-hero .au-letter, .is-visible .au-letter { animation: au-write .5s calc(var(--i) * .11s + var(--au-delay, 0s)) cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes au-write {
    0% { clip-path: inset(-20% 100% -30% -10%); opacity: 0; filter: blur(3px); }
    30% { opacity: 1; }
    92% { clip-path: inset(-20% -30% -30% -10%); opacity: 1; filter: none; }
    /* once written, the mask opens far beyond the letter so its glow is never cut into a box */
    100% { clip-path: inset(-500% -500% -500% -500%); opacity: 1; filter: none; }
}
/* the line of aurora light under the names and titles: drawn from left to right, then shimmering */
.au-stroke { display: block; height: 2px; width: 180px; margin: 6px auto 0; background: var(--au-band); background-size: 200% 100%; border-radius: 2px; box-shadow: 0 0 12px var(--au-glow); clip-path: inset(0 100% 0 0); }
.is-visible .au-stroke { animation: au-underline 1.1s 1s ease-out forwards, au-shimmer 6s 2s linear infinite; }
.au-stroke--hero { width: min(420px, 70vw); animation: au-underline 1.4s 2.6s ease-out forwards, au-shimmer 6s 4s linear infinite; }
@keyframes au-underline { to { clip-path: inset(0 0 0 0); } }
@keyframes au-shimmer { from { background-position: 0% 0; } to { background-position: -200% 0; } }

/* ---------- The sky ---------- */
.au-sky { position: absolute; left: 0; width: 100%; pointer-events: none; mix-blend-mode: screen; filter: blur(1.5px); }
.au-sky--hero { top: 0; height: 78%; z-index: -1; }
.au-sky--footer { top: 0; height: 100%; z-index: -1; opacity: .85; }

/* ---------- Navigation ---------- */
.au-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; }
.au-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; }
.au-nav a { text-decoration: none; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--au-muted); padding: 4px 0; }
.au-nav a:hover, .au-nav a.is-current { color: var(--inv-primary); text-shadow: 0 0 10px var(--au-glow); }
.au-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 2.2rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; }
.au-nav.is-stuck { padding: 8px clamp(16px, 4vw, 44px); justify-content: flex-end; background: color-mix(in srgb, var(--inv-bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--au-line); }
.aurora .kit-to-top { background: var(--inv-primary); color: var(--inv-bg); }
@media (max-width: 899px) {
    .au-nav { justify-content: flex-end; padding: 10px 14px; }
    .au-nav .kit-nav-toggle { margin-left: auto; font-size: 1.5rem; color: var(--inv-primary); }
    .au-nav .kit-nav-links { display: none; }
    .au-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(--au-line); }
}

/* ---------- Hero ---------- */
.au-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 100px 20px 80px; text-align: center; overflow: clip; isolation: isolate; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.au-hero-photo { position: absolute; inset: 0; margin: 0; z-index: -3; }
.au-hero-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: saturate(.75) contrast(1.05); }
.au-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, color-mix(in srgb, var(--inv-bg) 55%, transparent), transparent 40%), radial-gradient(ellipse at 50% 55%, transparent 25%, var(--inv-bg) 88%); }
.au-hero-content { position: relative; z-index: 1; max-width: 900px; }
/* a soft shade behind the text, so it reads on any photo */
.au-hero-content::before { content: ""; position: absolute; inset: -12% -18%; z-index: -1; background: radial-gradient(ellipse 50% 50% at 50% 55%, color-mix(in srgb, var(--inv-bg) 62%, transparent), transparent 100%); pointer-events: none; }
.au-names { font-size: clamp(5rem, 16vw, 10.5rem); color: var(--inv-primary); line-height: .95; text-shadow: 0 0 28px var(--au-glow), 0 0 2px color-mix(in srgb, var(--inv-primary) 60%, transparent); }
.au-name { display: inline-block; }
.au-and { display: inline-block; font-size: .5em; margin: 0 .15em; color: var(--inv-accent); vertical-align: middle; }
@media (max-width: 640px) { .au-name, .au-and { display: block; } .au-and { margin: -.1em 0; } }
.au-hero .au-letter { --au-delay: .8s; }
.au-subtitle { max-width: 520px; margin: 28px auto 0; color: color-mix(in srgb, var(--inv-text) 86%, var(--inv-bg)); text-shadow: 0 1px 12px var(--inv-bg); opacity: 0; animation: au-fade 1.4s 3.2s forwards; }
.au-hero-date { margin: 22px 0 0; font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; line-height: 2.1; opacity: 0; animation: au-fade 1.4s 3.6s forwards; }
@keyframes au-fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.au-section { max-width: 1040px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.au-welcome, .au-family, .au-countdown, .au-contact { text-align: center; }
.au-title { margin-bottom: 34px; text-align: center; }
.au-title h2 { font-size: clamp(3.6rem, 9vw, 5.4rem); color: var(--inv-primary); text-shadow: 0 0 22px color-mix(in srgb, var(--inv-accent) 30%, transparent); }
.au-prose { max-width: 620px; margin: 0 auto; font-size: 1.06rem; text-align: center; }
.au-prose p { margin: 0 0 1.1em; }
.au-quote-author { font-style: italic; color: var(--au-muted); }
.au-lead { color: var(--au-muted); margin: 0 0 24px; }
/* a soft band of aurora light behind the welcome */
.au-welcome { position: relative; isolation: isolate; }
.au-welcome::before { content: ""; position: absolute; left: 10%; right: 10%; top: 30%; height: 120px; z-index: -1; background: var(--au-band); background-size: 200% 100%; filter: blur(60px); opacity: .22; border-radius: 50%; animation: au-shimmer 14s linear infinite; }

/* Couple: portraits fading into the dark, rimmed with light */
.au-couple-grid { display: grid; gap: 56px; }
@media (min-width: 760px) { .au-couple-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.au-person { text-align: center; }
.au-portrait { position: relative; margin: 0 auto 18px; width: min(320px, 78vw); aspect-ratio: 4 / 5; -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%); }
.au-portrait img, .au-initial { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.9); }
.au-portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 45%); mix-blend-mode: screen; pointer-events: none; }
.au-initial { display: grid; place-items: center; background: var(--au-surface); font-family: var(--inv-font-heading); font-size: 7rem; color: var(--inv-primary); }
.au-person h3 { font-size: 3.2rem; color: var(--inv-primary); margin-bottom: 6px; }
.au-person p { color: var(--au-muted); max-width: 380px; margin: 0 auto; }
.kit-js .au-person { opacity: 0; translate: 0 24px; }
.kit-js .au-person.is-visible { opacity: 1; translate: 0 0; transition: opacity 1.2s ease, translate 1.4s ease; }

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

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

/* Events: dark glass, a line of aurora light on top */
.au-event-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.au-event { position: relative; padding: 34px 24px 30px; text-align: center; background: color-mix(in srgb, var(--au-surface) 80%, transparent); border: 1px solid var(--au-line); border-radius: 6px; overflow: hidden; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.au-event::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--au-band); background-size: 200% 100%; box-shadow: 0 0 16px var(--au-glow); animation: au-shimmer 8s linear infinite; }
.au-event-time { font-family: var(--inv-font-heading); font-size: 3.6rem; line-height: 1; color: var(--inv-primary); margin: 0 0 4px; }
.au-event h3 { font-family: var(--inv-font-body); font-weight: 400; font-size: .9rem; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 8px; }
.au-event-place { margin: 12px 0 0; }
.au-event-address, .au-event-notes { margin: 2px 0 0; color: var(--au-muted); font-size: .92rem; }
.aurora .kit-event-actions { justify-content: center; margin-top: 16px; }
.aurora .kit-button { border-radius: 999px; border: 1px solid var(--au-line); background: transparent; color: var(--inv-primary); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.aurora .kit-button:hover { border-color: var(--inv-accent); box-shadow: 0 0 14px var(--au-glow); }
.kit-js .au-event { opacity: 0; translate: 0 22px; }
.kit-js .au-event.is-visible { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }

/* Countdown: rings of light turning slowly */
.au-countdown .kit-countdown { gap: clamp(12px, 4vw, 40px); margin-top: 14px; }
.au-countdown .kit-countdown-unit { position: relative; width: clamp(80px, 20vw, 120px); min-width: 0; aspect-ratio: 1; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; }
.au-countdown .kit-countdown-unit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px;
    background: conic-gradient(from var(--au-turn, 0deg), transparent, var(--inv-accent), color-mix(in srgb, var(--inv-accent) 30%, var(--inv-primary)), transparent 60%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    filter: drop-shadow(0 0 6px var(--au-glow)); animation: au-turn 9s linear infinite; }
.au-countdown .kit-countdown-unit:nth-child(2)::before { animation-delay: -2s; }
.au-countdown .kit-countdown-unit:nth-child(3)::before { animation-delay: -4s; }
.au-countdown .kit-countdown-unit:nth-child(4)::before { animation-delay: -6s; }
@property --au-turn { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes au-turn { to { --au-turn: 360deg; } }
.au-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1; color: var(--inv-primary); text-shadow: 0 0 16px var(--au-glow); }
.au-countdown .kit-countdown-label { font-size: .56rem; letter-spacing: .22em; color: var(--au-muted); opacity: 1; }

/* Gallery: photos fading in from the dark */
.au-gallery-grid.kit-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .au-gallery-grid.kit-gallery { grid-template-columns: repeat(3, 1fr); } }
.au-gallery-grid.kit-gallery a { aspect-ratio: 3 / 4; border-radius: 4px; }
.au-gallery-grid.kit-gallery img { filter: brightness(.82) saturate(.9); transition: filter .6s ease, scale 1.2s ease; }
.au-gallery-grid.kit-gallery a:hover img { filter: none; scale: 1.03; }
.kit-js .au-gallery .au-gallery-grid a { opacity: 0; }
.kit-js .au-gallery.is-visible .au-gallery-grid a { opacity: 1; transition: opacity 1.2s ease; }
.kit-js .au-gallery.is-visible .au-gallery-grid a:nth-child(3n+2) { transition-delay: .15s; }
.kit-js .au-gallery.is-visible .au-gallery-grid a:nth-child(3n) { transition-delay: .3s; }

/* RSVP */
.au-rsvp-card { position: relative; max-width: 660px; margin: 0 auto; padding: clamp(26px, 5vw, 50px); border: 1px solid var(--au-line); border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--inv-bg) 70%, var(--au-surface)); text-align: center; }
.au-rsvp-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--au-band); background-size: 200% 100%; box-shadow: 0 0 16px var(--au-glow); animation: au-shimmer 8s linear infinite; }
.aurora .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .aurora .inv-rsvp__field select, .aurora .inv-rsvp__field textarea { color: var(--inv-text); background: color-mix(in srgb, var(--inv-text) 6%, transparent); border-color: var(--au-line); }
.aurora .inv-rsvp__field select option { background: var(--inv-bg); }
.aurora .inv-rsvp__submit { border-radius: 999px; background: var(--inv-primary); color: var(--inv-bg); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; box-shadow: 0 0 22px var(--au-glow); }
.aurora input[type=radio], .aurora input[type=checkbox] { accent-color: var(--inv-accent); }

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

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

/* Footer: the aurora again, above the names */
.au-footer { position: relative; padding: 150px 22px 70px; text-align: center; overflow: hidden; isolation: isolate; }
.au-footer-message { margin: 0 0 4px; color: var(--au-muted); }
.au-footer-names { font-family: var(--inv-font-heading); font-size: clamp(4rem, 12vw, 7rem); line-height: 1.05; color: var(--inv-primary); margin: 0 0 12px; text-shadow: 0 0 26px var(--au-glow); }
.au-hashtag { margin: 0 0 8px; letter-spacing: .12em; }

@media (prefers-reduced-motion: reduce) {
    .au-letter, .au-stroke, .au-subtitle, .au-hero-date { animation: none !important; clip-path: none; opacity: 1; }
    .au-welcome::before, .au-event::before, .au-rsvp-card::before, .au-countdown .kit-countdown-unit::before { animation: none; }
    .kit-js .au-person, .kit-js .au-story-item, .kit-js .au-event, .kit-js .au-gallery .au-gallery-grid a { opacity: 1; translate: 0 0; transition: none; }
}
