/* ==========================================================================
   Lan - a summer wedding in the countryside. The names are written by hand above a big photo under an arch; in front
   of it a field of wheat sways in the wind (canvas.ln-field, script.js), gusts running across it in waves and seed
   fluff drifting; at a touch a strong gust sweeps across. Wisps of fluff float across the page (canvas.ln-fluff),
   titles sit over two ears of wheat, a sheaf tied with a ribbon welcomes the guests, the times sit in rings of grain,
   and the field sways again under the names at the end.
   Palette: --inv-primary (ink, titles), --inv-accent (the wheat), --inv-bg, --inv-text.
   ========================================================================== */

.lan {
    --ln-script: var(--inv-font-heading), 'Segoe Script', cursive;
    --ln-soft: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --ln-line: color-mix(in srgb, var(--inv-primary) 20%, transparent);
    --ln-wheat: var(--inv-accent);
    --ln-warm: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    --ln-pane: color-mix(in srgb, var(--inv-surface) 76%, transparent);
    --ln-shadow: 0 1px 2px color-mix(in srgb, var(--inv-text) 8%, transparent), 0 30px 60px -40px color-mix(in srgb, var(--inv-accent) 80%, transparent);
    --kit-radius: 14px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--ln-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--inv-text);
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-accent) 16%, var(--inv-bg)) 0, var(--inv-bg) 80vh), var(--inv-bg);
    overflow-x: clip;
}
.lan h1, .lan h2, .lan h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.2; }
:where(.lan) :is(h1, h2, h3) { margin: 0; }
:where(.lan) p { margin: 0 0 .9em; }
.lan strong, .lan b { font-weight: 600; }
.lan a { color: var(--inv-primary); }
.ln-kicker { font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.ln-role { font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ln-soft); margin: 0 0 6px; }
.ln-names-line { font-family: var(--inv-font-heading); font-size: 1.9rem; line-height: 1.25; margin: 0; }
/* the script has no italic: titles stay upright */
.lan :is(h2, h3) { font-style: normal !important; }
.ln-hero, .ln-main, .ln-footer { position: relative; z-index: 1; }
.ln-hero { z-index: 2; }
.ln-fluff { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Panes */
.ln-pane { background: var(--ln-pane); border: 1px solid var(--ln-line); border-radius: 18px; box-shadow: var(--ln-shadow); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* ---------- Handwriting ---------- */
.ln-word { display: inline-block; white-space: nowrap; }
.ln-letter { display: inline-block; white-space: pre; clip-path: inset(-20% 100% -30% -10%); opacity: 0; }
.ln-hero .ln-letter, .is-visible .ln-letter { animation: ln-write .5s calc(var(--i) * .1s + var(--ln-delay, 0s)) cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes ln-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; }
}

/* ---------- Titles over two ears of wheat ---------- */
.ln-title { position: relative; margin: 0 auto clamp(36px, 5vw, 52px); text-align: center; }
.ln-title h2 { display: inline-block; font-size: clamp(3rem, 8vw, 4.4rem); color: var(--inv-primary); padding: 0 .2em; line-height: 1.1; }
.ln-sprig { display: block; width: 150px; margin: 2px auto 0; overflow: visible; }
.ln-line { fill: none; stroke: color-mix(in srgb, var(--ln-wheat) 75%, var(--inv-primary)); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ln-dot { fill: var(--ln-wheat); }
.kit-js .kit-reveal .ln-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.kit-js .kit-reveal .ln-dot { opacity: 0; }
.kit-js .kit-reveal.is-visible .ln-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.45, .05, .35, 1) .3s; }
.kit-js .kit-reveal.is-visible .ln-dot { opacity: 1; transition: opacity .6s ease 1.6s; }
.ln-sheaf { display: block; width: 90px; margin: 0 auto 10px; overflow: visible; }

/* ---------- Navigation ---------- */
.ln-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.ln-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; }
.ln-nav a { text-decoration: none; font-size: .76rem; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--inv-text); padding: 6px 0; border-bottom: 1px solid transparent; }
.ln-nav a:hover, .ln-nav a.is-current { color: var(--inv-primary); border-bottom-color: var(--ln-wheat); }
.ln-nav .kit-nav-brand { font-family: var(--ln-script); font-size: 2.2rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; border: 0; line-height: 1; }
.ln-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--inv-bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--ln-line); }
.lan .kit-to-top { border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--ln-line); }
@media (max-width: 899px) {
    .ln-nav { justify-content: flex-end; padding: 12px; }
    .ln-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--ln-pane); color: var(--inv-primary); border: 1px solid var(--ln-line); font-size: 1.2rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .ln-nav .kit-nav-links { display: none; }
    .ln-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 12px; position: absolute; top: 66px; left: 12px; right: 12px; padding: 24px; border-radius: 18px; background: var(--inv-surface); box-shadow: var(--ln-shadow); }
    .ln-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the names, the photo, the field in front ---------- */
.ln-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 84px 0 64px; text-align: center; }
.ln-hero-inner { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ln-hero-inner > :not(.ln-scene) { margin-left: 16px; margin-right: 16px; max-width: calc(100% - 32px); }
.lan .ln-names { font-family: var(--ln-script); font-weight: 400; font-size: clamp(4.4rem, 15vw, 8.4rem); line-height: .95; color: var(--inv-primary); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .2em; overflow-wrap: anywhere; margin: 0 0 4px;
    text-shadow: 0 0 30px color-mix(in srgb, var(--inv-accent) 35%, transparent); }
.ln-and { font-size: .55em; color: var(--ln-wheat); }
.ln-hero .ln-letter { --ln-delay: .4s; }
.ln-scene { position: relative; width: min(820px, 100%); margin: 10px 0 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the field stands in front of the bottom of the photo and reaches past its sides (the hero clips it at the screen edge) */
.ln-hero { overflow-x: clip; }
.ln-field--hero { position: absolute; left: -9%; right: -9%; bottom: -4%; width: 118%; height: 42%; pointer-events: none;
    -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000 78%, transparent); -webkit-mask-composite: source-in;
    mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent), linear-gradient(180deg, #000 78%, transparent); mask-composite: intersect; }
.ln-meadow { position: relative; margin: 0; aspect-ratio: 16 / 10.5; overflow: hidden; border-radius: 260px 260px 18px 18px / 150px 150px 18px 18px; background: var(--ln-warm); box-shadow: var(--ln-shadow); }
.ln-meadow img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ln-meadow::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--inv-accent) 18%, transparent)); }
.ln-hero-date { font-family: 'Lora', serif; font-size: 1.3rem; margin-top: 30px; margin-bottom: 2px; }
.ln-hero-place { font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--ln-soft); margin: 0; }
.lan .ln-subtitle { width: 44ch; margin-top: 18px; margin-bottom: 0; color: var(--ln-soft); }
@keyframes ln-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.kit-js .ln-hero-inner > :not(.ln-names) { animation: ln-rise 1.1s ease 1.4s both; }
.kit-js .ln-hero-inner > .ln-kicker { animation-delay: .15s; }
.kit-js .ln-hero-inner > .ln-scene { animation: ln-rise 1.4s cubic-bezier(.3, .9, .4, 1) .6s both; }
@media (max-width: 699px) {
    .ln-meadow { aspect-ratio: 4 / 4.6; border-radius: 170px 170px 16px 16px / 120px 120px 16px 16px; margin: 0 16px; }
}

/* ---------- Sections ---------- */
.ln-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.ln-section { padding-top: clamp(80px, 11vw, 128px); }
.ln-welcome { text-align: center; max-width: 720px; margin: 0 auto; }
.ln-welcome p { font-size: 1.1rem; }
.lan .ln-welcome-title { font-family: var(--ln-script); font-size: clamp(3.4rem, 9vw, 4.6rem); line-height: 1.05; color: var(--inv-primary); margin-bottom: 12px; }
.ln-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }
.ln-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.22rem; color: var(--ln-soft); max-width: 40ch; margin: 0 auto 26px; }

/* Couple: arched portraits, warmed by the sun */
.ln-couple-grid { display: grid; gap: 60px; justify-items: center; }
.ln-person { text-align: center; max-width: 380px; display: grid; justify-items: center; }
.ln-arch { margin: 0 0 22px; width: min(270px, 66vw); aspect-ratio: 3 / 4; border-radius: 999px 999px 16px 16px / 40% 40% 16px 16px; overflow: hidden; background: var(--ln-warm); box-shadow: var(--ln-shadow); }
.ln-arch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ln-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--ln-script); font-size: 5rem; color: var(--inv-primary); }
.ln-person h3 { font-size: 1.7rem; margin: 0 0 8px; }
.ln-person p { color: var(--ln-soft); }
.kit-js .ln-person { opacity: 0; translate: 0 24px; }
.kit-js .ln-person.is-visible { opacity: 1; translate: 0 0; transition: opacity 1.1s ease, translate 1.3s ease; }
@media (min-width: 760px) { .ln-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Family */
.ln-family-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); text-align: center; }
.ln-family-item { padding: 28px 24px; }

/* Story */
.ln-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(60px, 8vw, 90px); }
.ln-chapter { display: grid; gap: 28px; align-items: center; }
.ln-chapter-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; box-shadow: var(--ln-shadow); }
.ln-chapter-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ln-chapter-text h3 { font-size: 1.9rem; font-style: italic; margin-bottom: 8px; }
.ln-chapter-text p:not(.ln-kicker) { color: var(--ln-soft); }
.kit-js .ln-chapter { opacity: 0; translate: 0 22px; }
.kit-js .ln-chapter.is-visible { opacity: 1; translate: 0 0; transition: opacity 1s ease, translate 1.2s ease; }
@media (min-width: 900px) {
    .ln-chapter { grid-template-columns: 1fr 1fr; gap: 58px; }
    .ln-chapter:nth-child(even) .ln-chapter-photo { order: 2; }
}

/* Programme: the hour in a disc of light */
.ln-moments { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ln-moment { padding: 36px 28px 30px; text-align: center; }
.ln-ring-time { margin: 0 auto 18px; width: max-content; }
.ln-ring-time span, .ln-countdown .kit-countdown-value { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; color: var(--inv-primary); font-family: var(--inv-font-heading);
    background: radial-gradient(circle, var(--inv-surface) 0 60%, transparent 61%);
    box-shadow: 0 10px 26px -16px var(--ln-warm); }
/* a ring of grains round each number, turning very slowly */
.ln-ring-time span::before, .ln-countdown .kit-countdown-value::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px dotted color-mix(in srgb, var(--ln-wheat) 80%, transparent); animation: ln-turn 40s linear infinite; animation-delay: var(--ln-delay, 0s); }
@keyframes ln-turn { to { rotate: 360deg; } }
.ln-ring-time span { width: 92px; font-size: 1.35rem; }
.ln-moment:nth-child(2) { --ln-delay: -1.6s; }
.ln-moment:nth-child(3) { --ln-delay: -3.2s; }
.ln-moment h3 { font-size: 1.5rem; margin: 6px 0 6px; }
.ln-moment-place { font-weight: 600; margin: 12px 0 0; }
.ln-moment-address, .ln-moment-notes { color: var(--ln-soft); margin: 0; }
.ln-moment-notes { font-style: italic; margin-top: 6px; }
.ln-moment .kit-event-actions { justify-content: center; margin-top: 16px; }
.lan .kit-button { border-radius: 999px; border: 1px solid var(--ln-line); background: var(--inv-surface); color: var(--inv-primary); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.lan .kit-button:hover { border-color: var(--ln-wheat); box-shadow: 0 0 16px var(--ln-warm); }
.kit-js .ln-moment { opacity: 0; translate: 0 22px; }
.kit-js .ln-moment.is-visible { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }

/* Countdown */
.ln-countdown { text-align: center; }
.ln-countdown .kit-countdown { gap: clamp(16px, 4vw, 40px); margin-top: 22px; }
.ln-countdown .kit-countdown-unit { min-width: 0; background: none; padding: 0; }
.ln-countdown .kit-countdown-value { width: clamp(62px, 16.5vw, 108px); font-size: clamp(1.7rem, 5.6vw, 2.5rem); }
.ln-countdown .kit-countdown-unit:nth-child(2) .kit-countdown-value { --ln-delay: -1.2s; }
.ln-countdown .kit-countdown-unit:nth-child(3) .kit-countdown-value { --ln-delay: -2.4s; }
.ln-countdown .kit-countdown-unit:nth-child(4) .kit-countdown-value { --ln-delay: -3.6s; }
.ln-countdown .kit-countdown-label { margin-top: 10px; font-size: .62rem; letter-spacing: .2em; color: var(--ln-soft); opacity: 1; }

/* Gallery: a sheen of summer light passes over each photo on hover */
.ln-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 22px); }
@media (min-width: 760px) { .ln-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ln-gallery-grid.kit-gallery a { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; box-shadow: var(--ln-shadow); }
.ln-gallery-grid.kit-gallery a::after { content: ""; position: absolute; inset: -20% -60%; pointer-events: none; translate: -100% 0; mix-blend-mode: screen;
    background: linear-gradient(110deg, transparent 40%, color-mix(in srgb, var(--inv-accent) 55%, #fff) 50%, transparent 60%); opacity: .6; transition: translate 1.3s ease; }
.ln-gallery-grid.kit-gallery a:hover::after { translate: 100% 0; }
.kit-js .ln-gallery .ln-gallery-grid a { opacity: 0; translate: 0 24px; }
.kit-js .ln-gallery.is-visible .ln-gallery-grid a { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }
.kit-js .ln-gallery.is-visible .ln-gallery-grid a:nth-child(3n+2) { transition-delay: .12s; }
.kit-js .ln-gallery.is-visible .ln-gallery-grid a:nth-child(3n) { transition-delay: .24s; }

/* RSVP */
.ln-reply { max-width: 720px; margin: 0 auto; padding: clamp(28px, 5vw, 52px); text-align: center; }
.lan .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.2rem; }
.lan .inv-rsvp__deadline { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.lan .inv-rsvp__submit { border-radius: 999px; letter-spacing: .16em; text-transform: uppercase; box-shadow: 0 10px 30px -14px var(--ln-warm); }
.lan input[type=radio], .lan input[type=checkbox] { accent-color: var(--inv-primary); }

/* Info, FAQ, contact */
.ln-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); text-align: center; }
.ln-info-item { padding: 28px 24px; }
.ln-info-item h3 { font-size: 1.45rem; font-style: italic; color: var(--inv-primary); margin-bottom: 8px; }
.ln-info-item p { color: var(--ln-soft); }
.ln-faq { max-width: 720px; margin: 50px auto 0; text-align: center; }
.ln-faq details { text-align: left; border-bottom: 1px solid var(--ln-line); }
.ln-faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 4px; position: relative; font-weight: 400; }
.ln-faq summary::-webkit-details-marker { display: none; }
.ln-faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: radial-gradient(circle, var(--ln-wheat) 0 35%, transparent 40%); box-shadow: 0 0 0 1px var(--ln-wheat); transition: box-shadow .4s ease; }
.ln-faq details[open] summary::after { box-shadow: 0 0 0 1px var(--ln-wheat), 0 0 14px 3px var(--ln-warm); }
.ln-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.ln-faq details p { padding: 0 4px; color: var(--ln-soft); }
.ln-contact { text-align: center; }
.ln-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 64px; }
.ln-contact-person a { text-decoration: none; }

/* ---------- Footer: the field again ---------- */
.ln-footer { position: relative; text-align: center; padding: clamp(80px, 12vw, 130px) 16px 0; overflow: hidden; }
.ln-field--footer { display: block; width: 100%; height: 170px; margin-top: 24px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ln-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.25rem; color: var(--ln-soft); max-width: 38ch; margin: 0 auto 8px; }
.lan .ln-footer-names { font-family: var(--ln-script); font-size: clamp(3.6rem, 12vw, 5.6rem); line-height: 1.1; color: var(--inv-primary); margin: 6px 0 12px; }
.ln-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .ln-letter { animation: none !important; clip-path: none; opacity: 1; }
    .ln-ring-time span::before, .ln-countdown .kit-countdown-value::before { animation: none; }
    .kit-js .kit-reveal .ln-line { stroke-dashoffset: 0; transition: none; }
    .kit-js .kit-reveal .ln-dot { opacity: 1; }
    .kit-js .ln-person { opacity: 1; translate: 0 0; transition: none; }
    .kit-js .ln-chapter, .kit-js .ln-moment, .kit-js .ln-gallery .ln-gallery-grid a { opacity: 1; translate: 0 0; transition: none; }
    .kit-js .ln-hero-inner > * { animation: none; }
}
