/* ==========================================================================
   Larg - a birthday by the sea. Over the hero photo the sun glitters on the water (canvas.lg-sea, script.js):
   tiny sparks flashing on the crests, finer towards the horizon and thicker on the sun's path; a touch sends a ripple
   across them. The age and the name are written slowly by hand (Fraunces), every title has a wave that draws itself,
   the portrait sits in a porthole, the theme on a horizon with rocking waves, and the sea glitters again at the end.
   Palette: --inv-primary (titles), --inv-accent (the sea), --inv-bg, --inv-text. Light by default, "luna" is dark.
   The hero keeps white lettering on any palette, since it sits on the photo.
   ========================================================================== */

.larg {
    --lg-ink: #FFFFFF;
    --lg-line: color-mix(in srgb, var(--inv-primary) 18%, transparent);
    --lg-muted: color-mix(in srgb, var(--inv-text) 72%, var(--inv-bg));
    --lg-surface: color-mix(in srgb, var(--inv-accent) 6%, var(--inv-bg));
    --lg-sea-top: color-mix(in srgb, var(--inv-accent) 55%, var(--inv-bg));
    --lg-sea-deep: color-mix(in srgb, var(--inv-accent) 85%, var(--inv-primary));
    --kit-radius: 8px;
    --kit-field-bg: color-mix(in srgb, var(--inv-bg) 70%, #fff);
    --kit-field-border: var(--lg-line);
    font-family: var(--inv-font-body);
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.larg h1, .larg h2, .larg h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.15; }
:where(.larg) :is(h1, h2, h3) { margin: 0; }
.larg strong { font-weight: 600; }
.larg a { color: var(--inv-accent); }
.lg-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--lg-muted); margin: 0 0 10px; }

/* ---------- Handwriting ---------- */
.lg-word { display: inline-block; white-space: nowrap; }
.lg-letter { display: inline-block; white-space: pre; clip-path: inset(-25% 100% -35% -10%); opacity: 0; }
.lg-hero .lg-letter, .is-visible .lg-letter { animation: lg-write .55s calc(var(--i) * .1s + var(--lg-delay, 0s)) cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes lg-write {
    0% { clip-path: inset(-25% 100% -35% -10%); opacity: 0; }
    30% { opacity: 1; }
    92% { clip-path: inset(-25% -30% -35% -10%); opacity: 1; }
    100% { clip-path: inset(-500% -500% -500% -500%); opacity: 1; }
}
/* the small wave under each title, drawn from left to right */
.lg-wave { display: block; width: 150px; height: 14px; margin: 8px auto 0; overflow: visible; }
.lg-wave path { fill: none; stroke: var(--inv-accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-visible .lg-wave path { animation: lg-draw 1.6s .9s ease-in-out forwards; }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }

/* ---------- Navigation ---------- */
.lg-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; }
.lg-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; }
.lg-nav a { text-decoration: none; font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: color-mix(in srgb, var(--lg-ink) 82%, transparent); padding: 4px 0; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.lg-nav a:hover, .lg-nav a.is-current { color: var(--lg-ink); }
.lg-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 1.9rem; font-weight: 300; letter-spacing: 0; text-transform: none; margin-right: auto; }
.lg-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(8px); border-bottom: 1px solid var(--lg-line); }
.lg-nav.is-stuck a { color: var(--lg-muted); text-shadow: none; }
.lg-nav.is-stuck a:hover, .lg-nav.is-stuck a.is-current, .lg-nav.is-stuck .kit-nav-brand { color: var(--inv-primary); }
.larg .kit-to-top { background: var(--inv-primary); color: var(--inv-bg); }
@media (max-width: 899px) {
    .lg-nav { justify-content: flex-end; padding: 10px 14px; }
    .lg-nav .kit-nav-toggle { margin-left: auto; font-size: 1.5rem; color: var(--lg-ink); }
    .lg-nav.is-stuck .kit-nav-toggle { color: var(--inv-primary); }
    .lg-nav .kit-nav-links { display: none; }
    .lg-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(--lg-line); border-radius: 10px; }
    .lg-nav.is-open .kit-nav-links a { color: var(--inv-text); text-shadow: none; }
}

/* ---------- Hero ---------- */
.lg-hero { position: relative; min-height: 100svh; display: grid; align-content: start; justify-items: center; padding: clamp(110px, 17vh, 170px) 20px 80px; text-align: center; overflow: clip; isolation: isolate; cursor: pointer; -webkit-tap-highlight-color: transparent; color: var(--lg-ink); }
.lg-hero-photo { position: absolute; inset: 0; margin: 0; z-index: -3; }
.lg-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.lg-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(8, 18, 30, .5), rgba(8, 18, 30, .12) 45%, transparent 60%, rgba(8, 18, 30, .3)); }
.lg-sea--hero { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.lg-hero-content { position: relative; z-index: 1; max-width: 860px; }
.lg-hero-content::before { content: ""; position: absolute; inset: -14% -20%; z-index: -1; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(8, 18, 30, .38), transparent 100%); pointer-events: none; }
.lg-hero .lg-kicker { color: color-mix(in srgb, var(--lg-ink) 86%, transparent); text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.lg-age { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 12px; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); opacity: 0; animation: lg-rise 1.6s .3s cubic-bezier(.2, .7, .2, 1) forwards; }
.lg-age-number { font-family: var(--inv-font-heading); font-weight: 300; font-size: clamp(6rem, 20vw, 11rem); line-height: .9; letter-spacing: -.02em; }
.lg-age-years { font-size: .8rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; }
@keyframes lg-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
.lg-name { font-style: italic; font-weight: 400; font-size: clamp(3.4rem, 10vw, 6rem); line-height: 1.1; margin-top: 4px; text-shadow: 0 2px 22px rgba(0, 0, 0, .35); }
.lg-hero .lg-letter { --lg-delay: 1.2s; }
.lg-subtitle { max-width: 520px; margin: 18px auto 0; font-size: 1.06rem; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); opacity: 0; animation: lg-fade 1.2s 2.4s forwards; }
.lg-hero-date { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px; margin: 20px 0 0; font-size: .78rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); opacity: 0; animation: lg-fade 1.2s 2.8s forwards; }
.lg-hero-date { flex-direction: column; gap: 4px; }
.lg-dot { display: none; }
@keyframes lg-fade { to { opacity: 1; } }
/* on wide screens the text sits on the left, so the photo's subject (often in the middle) stays in view */
@media (min-width: 900px) {
    .lg-hero { justify-items: start; text-align: left; padding-left: clamp(40px, 8vw, 130px); padding-top: clamp(120px, 20vh, 200px); }
    .lg-hero-content { max-width: min(520px, 38vw); }
    .lg-hero-content::before { inset: -20% -30% -20% -40%; }
    .lg-age { justify-content: flex-start; }
    .lg-hero-date { align-items: flex-start; }
    .lg-subtitle { margin-left: 0; }
}

/* ---------- Sections ---------- */
.lg-section { max-width: 1040px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.lg-welcome, .lg-countdown, .lg-contact { text-align: center; }
.lg-title { margin-bottom: 36px; text-align: center; }
.lg-title h2 { font-size: clamp(2.6rem, 6.5vw, 3.8rem); font-style: italic; color: var(--inv-primary); }
.lg-prose { max-width: 620px; margin: 0 auto; font-size: 1.08rem; text-align: center; }
.lg-prose p { margin: 0 0 1.1em; }
.lg-quote-author { font-style: italic; color: var(--lg-muted); }

/* Celebrant: the portrait in a porthole */
.lg-celebrant-grid { display: grid; gap: 40px; align-items: center; justify-items: center; }
@media (min-width: 760px) { .lg-celebrant-grid { grid-template-columns: auto 1fr; gap: 64px; justify-items: start; } }
.lg-porthole { position: relative; margin: 0; width: min(310px, 72vw); aspect-ratio: 1; }
.lg-porthole-ring { position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, #fff 55%, var(--inv-accent)), color-mix(in srgb, var(--inv-primary) 70%, var(--inv-accent)) 70%);
    box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--inv-primary) 60%, transparent), inset 0 2px 3px rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .25); }
.lg-porthole-ring i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, color-mix(in srgb, var(--inv-primary) 40%, #ccc) 70%); box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    transform: rotate(var(--a)) translateY(calc(min(310px, 72vw) / -2 + 11px)); }
.lg-porthole-glass { position: absolute; inset: 22px; border-radius: 50%; overflow: hidden; background: var(--lg-surface); box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--inv-primary) 50%, transparent); }
.lg-porthole-glass .kit-photo { position: absolute; inset: 0; }
/* a glint sliding across the glass from time to time */
.lg-porthole-glass::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .38) 45%, transparent 55%); background-size: 300% 100%; background-position: 100% 0; pointer-events: none; }
.is-visible .lg-porthole-glass::after { animation: lg-glint 7s 1.5s ease-in-out infinite; }
@keyframes lg-glint { 0%, 70% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
.lg-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--inv-font-heading); font-style: italic; font-size: 6rem; color: var(--inv-primary); }
.lg-celebrant-text { max-width: 520px; text-align: center; }
@media (min-width: 760px) { .lg-celebrant-text { text-align: left; } }
.lg-celebrant-name { font-family: var(--inv-font-heading); font-size: clamp(2rem, 4.6vw, 2.8rem); line-height: 1.2; color: var(--inv-primary); margin: 0 0 4px; }
.lg-celebrant-age { margin: 0 0 16px; font-size: .78rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--lg-muted); }
.lg-celebrant-age span { font-family: var(--inv-font-heading); font-weight: 300; font-size: 2.4rem; letter-spacing: 0; color: var(--inv-accent); vertical-align: middle; margin-right: 6px; }
.lg-celebrant-text p:not(.lg-celebrant-name):not(.lg-celebrant-age) { margin: 0 0 .8em; }

/* Theme: on a horizon, waves rocking below */
.lg-horizon { position: relative; isolation: isolate; overflow: hidden; padding: clamp(80px, 11vw, 130px) 22px clamp(130px, 16vw, 190px); display: grid; place-items: center;
    background: linear-gradient(180deg, var(--inv-bg), color-mix(in srgb, var(--inv-accent) 12%, var(--inv-bg)) 55%, var(--lg-sea-top) 78%, var(--lg-sea-deep)); }
.lg-swell { position: absolute; left: 0; bottom: 0; width: 100%; height: clamp(90px, 14vw, 150px); z-index: -1; overflow: hidden; }
.lg-swell path { transform-box: view-box; }
.lg-swell-1 { fill: color-mix(in srgb, var(--inv-accent) 40%, var(--inv-bg)); opacity: .7; animation: lg-swell 18s linear infinite; --lg-p: -900px; }
.lg-swell-2 { fill: color-mix(in srgb, var(--inv-accent) 70%, var(--inv-primary)); opacity: .6; animation: lg-swell 26s linear infinite reverse; --lg-p: -1200px; }
.lg-swell-3 { fill: var(--lg-sea-deep); animation: lg-swell 14s linear infinite; --lg-p: -720px; }
@keyframes lg-swell { from { transform: translateX(0); } to { transform: translateX(var(--lg-p)); } }
.lg-theme-card { position: relative; max-width: 600px; padding: clamp(28px, 5vw, 48px); text-align: center; background: color-mix(in srgb, var(--inv-bg) 90%, transparent); border: 1px solid var(--lg-line); border-radius: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--inv-primary) 45%, transparent); }
.lg-theme-card h2 { font-size: clamp(2rem, 5vw, 2.9rem); font-style: italic; color: var(--inv-primary); margin-bottom: 12px; }
.lg-theme-card p:not(.lg-kicker) { margin: 0 0 .8em; }

/* Events */
.lg-event-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.lg-event { position: relative; padding: 34px 26px 30px; text-align: center; background: var(--lg-surface); border: 1px solid var(--lg-line); border-radius: 14px; overflow: hidden; }
/* a thin band of sea along the bottom of each card */
.lg-event::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--lg-sea-top), var(--lg-sea-deep), var(--lg-sea-top)); background-size: 200% 100%; animation: lg-tide 9s ease-in-out infinite alternate; }
@keyframes lg-tide { to { background-position: 100% 0; } }
.lg-event-time { font-family: var(--inv-font-heading); font-weight: 300; font-size: 3rem; line-height: 1.05; margin: 0 0 6px; color: var(--inv-primary); }
.lg-event h3 { font-family: var(--inv-font-body); font-weight: 600; font-size: .9rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.lg-event-place { margin: 12px 0 0; font-weight: 500; }
.lg-event-address, .lg-event-notes { margin: 2px 0 0; color: var(--lg-muted); font-size: .94rem; }
.larg .kit-event-actions { justify-content: center; margin-top: 16px; }
.larg .kit-button { border-radius: 999px; border: 1px solid var(--lg-line); background: transparent; color: var(--inv-primary); font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.larg .kit-button:hover { border-color: var(--inv-accent); color: var(--inv-accent); }
.kit-js .lg-event { opacity: 0; translate: 0 22px; }
.kit-js .lg-event.is-visible { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }

/* Countdown */
.lg-countdown .kit-countdown { gap: clamp(14px, 5vw, 48px); margin-top: 10px; }
.lg-countdown .kit-countdown-unit { min-width: 0; background: none; padding: 0 0 8px; border-bottom: 1px solid var(--lg-line); }
.lg-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-weight: 300; font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 1.05; color: var(--inv-primary); }
.lg-countdown .kit-countdown-label { font-size: .62rem; letter-spacing: .22em; color: var(--lg-muted); opacity: 1; }

/* Gallery */
.lg-gallery-grid.kit-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .lg-gallery-grid.kit-gallery { grid-template-columns: repeat(3, 1fr); } }
.lg-gallery-grid.kit-gallery a { aspect-ratio: 4 / 5; border-radius: 14px; }
.lg-gallery-grid.kit-gallery img { transition: scale 1s ease; }
.lg-gallery-grid.kit-gallery a:hover img { scale: 1.04; }
.kit-js .lg-gallery .lg-gallery-grid a { opacity: 0; translate: 0 18px; }
.kit-js .lg-gallery.is-visible .lg-gallery-grid a { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1s ease; }
.kit-js .lg-gallery.is-visible .lg-gallery-grid a:nth-child(3n+2) { transition-delay: .12s; }
.kit-js .lg-gallery.is-visible .lg-gallery-grid a:nth-child(3n) { transition-delay: .24s; }

/* RSVP */
.lg-rsvp-card { position: relative; max-width: 660px; margin: 0 auto; padding: clamp(26px, 5vw, 50px); border: 1px solid var(--lg-line); border-radius: 16px; background: var(--lg-surface); text-align: center; }
.larg .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .larg .inv-rsvp__field select, .larg .inv-rsvp__field textarea { color: var(--inv-text); background: var(--inv-bg); border-color: var(--lg-line); }
.larg .inv-rsvp__field select option { background: var(--inv-bg); }
.larg .inv-rsvp__submit { border-radius: 999px; background: var(--inv-primary); color: var(--inv-bg); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; font-size: .8rem; }
.larg input[type=radio], .larg input[type=checkbox] { accent-color: var(--inv-accent); }

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

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

/* Footer: the name over the sea, glittering again */
.lg-footer { position: relative; padding: 90px 22px 0; text-align: center; overflow: hidden; isolation: isolate; }
.lg-footer-message { margin: 0 0 6px; color: var(--lg-muted); }
.lg-footer-name { font-family: var(--inv-font-heading); font-style: italic; font-size: clamp(3rem, 9vw, 5rem); line-height: 1.2; color: var(--inv-primary); margin: 0 0 10px; }
.lg-hashtag { margin: 0 0 8px; letter-spacing: .1em; }
.lg-footer > .lg-kicker { margin-bottom: 0; }
.lg-footer-sea { position: relative; height: clamp(170px, 22vw, 260px); margin: 40px -22px 0; background: linear-gradient(180deg, var(--lg-sea-top), var(--lg-sea-deep) 75%); }
.lg-footer-sea::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: color-mix(in srgb, #fff 50%, var(--lg-sea-top)); }
.lg-sea--footer { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-footer { display: flex; flex-direction: column; }
.lg-footer-sea { order: 10; }

@media (prefers-reduced-motion: reduce) {
    .lg-letter, .lg-age, .lg-subtitle, .lg-hero-date { animation: none !important; clip-path: none; opacity: 1; }
    .lg-wave path { animation: none !important; stroke-dashoffset: 0; }
    .lg-swell path, .lg-event::after, .lg-porthole-glass::after { animation: none !important; }
    .kit-js .lg-event, .kit-js .lg-gallery .lg-gallery-grid a { opacity: 1; translate: 0 0; transition: none; }
}
