/* ==========================================================================
   Seră - a winter garden under glass: the photo is behind the misted pane of a greenhouse window, wiped by the
   guest's finger (it mists over again, drops run down the glass); shadows of fronds sway across the page, ferns
   unfurl above the titles, cards like panes of glass, arched windows in wrought iron, glass cloches, a growing plant
   Palette: --inv-primary (the green of the leaves, or orchid, terracotta, lamplight), --inv-accent (brass, sage),
   --inv-bg, --inv-text. script.js draws the mist on canvas.sr-fog
   ========================================================================== */

.sera {
    --sr-script: 'Love Light', 'Segoe Script', cursive;
    --sr-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --sr-line: color-mix(in srgb, var(--inv-primary) 24%, transparent);
    --sr-iron: color-mix(in srgb, var(--inv-text) 80%, var(--inv-primary));
    --sr-glass: color-mix(in srgb, var(--inv-surface) 62%, transparent);
    --sr-shadow: 0 1px 2px color-mix(in srgb, var(--inv-text) 10%, transparent), 0 26px 50px -36px color-mix(in srgb, var(--inv-primary) 70%, transparent);
    --sr-terracotta: color-mix(in srgb, #B5653F 82%, var(--inv-text));
    --kit-radius: 6px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--sr-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.04rem;
    line-height: 1.75;
    background:
        radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--inv-primary) 10%, transparent), transparent 75%),
        var(--inv-bg);
    overflow-x: clip;
}
.sera h1, .sera h2, .sera h3 { font-family: var(--inv-font-heading); font-weight: 300; line-height: 1.2; }
:where(.sera) :is(h1, h2, h3) { margin: 0; }
:where(.sera) p { margin: 0 0 .9em; }
.sera strong, .sera b { font-weight: 500; }
.sera a { color: var(--inv-primary); }
.sr-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.sr-role { font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--sr-ink-soft); margin: 0 0 6px; }
.sr-names-line { font-family: var(--inv-font-heading); font-size: 1.3rem; margin: 0; }
.sr-hero, .sr-main, .sr-footer { position: relative; z-index: 1; }
.sr-hero { z-index: 2; }

/* ---------- Shadows of fronds at the edges of the page ---------- */
.sr-leaves { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; filter: blur(1.4px); opacity: .07; }
.sr-leaf { position: absolute; width: clamp(220px, 30vw, 420px); overflow: visible; transform-origin: 50% 100%; animation: sr-sway 9s ease-in-out infinite alternate; }
.sr-leaf-1 { left: -6%; top: -8%; rotate: 128deg; }
.sr-leaf-2 { right: -7%; top: 20%; rotate: -112deg; animation-delay: -3s; animation-duration: 11s; }
.sr-leaf-3 { left: -9%; bottom: -14%; rotate: 52deg; animation-delay: -6s; }
.sr-leaf-rib { fill: none; stroke: var(--inv-primary); stroke-width: 3; }
.sr-leaf-blade { fill: none; stroke: var(--inv-primary); stroke-width: 6; stroke-linecap: round; }
.sr-leaf-thin { stroke-width: 4; }
@keyframes sr-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@media (max-width: 699px) { .sr-leaf-2 { right: -26%; } .sr-leaf-1 { left: -22%; } .sr-leaf-3 { left: -26%; } }

/* ---------- Panes of glass in thin iron frames ---------- */
.sr-pane { position: relative; background: var(--sr-glass); border: 1px solid color-mix(in srgb, var(--sr-iron) 40%, transparent); border-radius: 6px; box-shadow: var(--sr-shadow), inset 0 0 0 5px color-mix(in srgb, var(--inv-surface) 40%, transparent), inset 0 0 0 6px var(--sr-line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
/* a streak of light on the glass */
.sr-pane::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, white 22%, transparent) 38%, transparent 46%, transparent 58%, color-mix(in srgb, white 12%, transparent) 62%, transparent 66%); }

/* Arched windows: the portraits and the photos */
.sr-arch, .sr-arch-frame { position: relative; margin: 0; overflow: hidden; border-radius: 50% 50% 4px 4px / 38% 38% 4px 4px; border: 6px solid var(--sr-iron); box-shadow: var(--sr-shadow), inset 0 0 0 1px color-mix(in srgb, white 30%, transparent); background: var(--sr-glass); }
.sr-arch img, .sr-arch-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sr-arch::after, .sr-arch-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, white 20%, transparent) 42%, transparent 50%); }

/* ---------- The fern that unfurls ---------- */
.sr-fern { display: block; width: 150px; margin: 0 auto 4px; overflow: visible; }
.sr-fern-small { width: 138px; margin-bottom: 6px; }
.sr-fern-stem { fill: none; stroke: var(--inv-primary); stroke-width: 1.5; stroke-linecap: round; }
.sr-fern-leaf { fill: color-mix(in srgb, var(--inv-primary) 82%, var(--inv-accent)); transform-box: fill-box; transform-origin: 0% 50%; }
.kit-js .sr-fern-stem { stroke-dasharray: 1; stroke-dashoffset: 1; }
.kit-js .sr-fern-leaf { opacity: 0; scale: .1; }
.kit-js .is-visible .sr-fern-stem { animation: sr-draw 1.6s cubic-bezier(.4, .1, .3, 1) forwards; }
.kit-js .is-visible .sr-fern-leaf { animation: sr-open .7s cubic-bezier(.3, 1.4, .5, 1) calc(.2s + var(--i) * .11s) forwards; }
@keyframes sr-draw { to { stroke-dashoffset: 0; } }
@keyframes sr-open { to { opacity: 1; scale: 1; } }

/* ---------- Titles ---------- */
.sr-title { margin: 0 auto clamp(30px, 4.5vw, 46px); text-align: center; }
.sr-title h2 { font-size: clamp(2rem, 5.6vw, 2.9rem); letter-spacing: -.005em; }

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

/* ---------- Hero: the misted greenhouse window ---------- */
.sr-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 86px 16px 64px; text-align: center; }
.sr-hero-inner { width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.sr-window { --w: min(430px, 82vw); position: relative; width: var(--w); aspect-ratio: 3 / 4; margin: 8px 0 0; overflow: hidden; isolation: isolate;
    border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px; border: 8px solid var(--sr-iron); background: color-mix(in srgb, var(--inv-primary) 30%, var(--inv-bg));
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--inv-text) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--sr-iron) 60%, transparent), 0 0 0 7px color-mix(in srgb, var(--inv-bg) 50%, transparent), 0 0 0 8px var(--sr-line);
    cursor: crosshair; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.sr-window-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sr-fog { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.sr-frame { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.sr-frame-bars path { fill: none; stroke: var(--sr-iron); stroke-width: 5; vector-effect: non-scaling-stroke; }
.sr-hint { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; white-space: nowrap; font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
    color: var(--inv-text); background: color-mix(in srgb, var(--inv-surface) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; transition: opacity .8s; }
.sr-window.is-touched .sr-hint { opacity: 0; }
html:not(.kit-js) .sr-hint { display: none; }
.sera .sr-names { font-family: var(--sr-script); font-weight: 400; font-size: clamp(4rem, 14vw, 7rem); line-height: 1; color: var(--inv-primary); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .22em; overflow-wrap: anywhere; margin: 22px 0 0; }
.sr-and { font-family: var(--inv-font-heading); font-style: italic; font-size: .34em; color: var(--inv-accent); }
.sr-hero-date { font-family: var(--inv-font-heading); font-size: 1.36rem; margin: 10px 0 2px; }
.sr-hero-place { font-size: .74rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--sr-ink-soft); margin: 0; }
.sera .sr-subtitle { max-width: 42ch; margin: 20px auto 0; color: var(--sr-ink-soft); }
@keyframes sr-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.kit-js .sr-hero-inner > * { animation: sr-rise 1.1s ease .9s both; }
.kit-js .sr-hero-inner > .sr-kicker { animation-delay: .1s; }
.kit-js .sr-hero-inner > .sr-window { animation-delay: .25s; }
.kit-js .sr-hero-inner > :nth-child(n+4) { animation-delay: 1.2s; }
@media (min-width: 1000px) and (max-height: 900px) { .sr-window { --w: 380px; } }

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

/* Couple: arched windows */
.sr-couple-grid { display: grid; gap: 60px; justify-items: center; }
.sr-person { text-align: center; max-width: 380px; display: grid; justify-items: center; }
.sr-person .sr-arch { width: min(270px, 68vw); aspect-ratio: 3 / 4; margin-bottom: 24px; }
.sr-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--sr-script); font-size: 5rem; color: var(--inv-primary); }
.sr-person h3 { font-size: 1.6rem; margin: 0 0 8px; }
.sr-person p { color: var(--sr-ink-soft); }
@media (min-width: 760px) { .sr-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

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

/* Story */
.sr-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(56px, 8vw, 86px); }
.sr-chapter { display: grid; gap: 30px; align-items: center; }
.sr-chapter-photo { aspect-ratio: 4 / 4.4; width: min(440px, 100%); justify-self: center; border-radius: 50% 50% 4px 4px / 43% 43% 4px 4px; }
.sr-chapter-text h3 { font-size: 1.8rem; margin-bottom: 8px; }
.sr-chapter-text p:not(.sr-kicker) { color: var(--sr-ink-soft); }
@media (min-width: 900px) {
    .sr-chapter { grid-template-columns: 1fr 1fr; gap: 60px; }
    .sr-chapter:nth-child(even) .sr-chapter-photo { order: 2; }
}

/* Programme: the hour in a round brass window */
.sr-moments { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.sr-moment { padding: 36px 28px 30px; text-align: center; }
.sr-porthole { margin: 0 auto 18px; width: max-content; }
.sr-porthole span { display: grid; place-items: center; width: 90px; aspect-ratio: 1; border-radius: 50%; font-family: var(--inv-font-heading); font-size: 1.24rem; color: var(--inv-primary);
    background: radial-gradient(circle at 34% 28%, color-mix(in srgb, white 45%, transparent), transparent 40%), color-mix(in srgb, var(--inv-surface) 70%, transparent);
    box-shadow: 0 0 0 3px var(--inv-accent), 0 0 0 7px color-mix(in srgb, var(--inv-accent) 30%, transparent), 0 0 0 8px color-mix(in srgb, var(--inv-accent) 70%, transparent), 0 10px 20px -10px color-mix(in srgb, var(--inv-text) 40%, transparent); }
.sr-moment h3 { font-size: 1.45rem; margin: 6px 0 6px; }
.sr-moment-place { font-weight: 500; margin: 12px 0 0; }
.sr-moment-address, .sr-moment-notes { color: var(--sr-ink-soft); margin: 0; }
.sr-moment-notes { font-style: italic; margin-top: 6px; }
.sera .kit-button { border-radius: 999px; border: 1px solid var(--sr-line); color: var(--inv-primary); background: transparent; font-size: .8rem; font-weight: 400; padding: 9px 16px; text-decoration: none; }
.sera .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: under glass cloches */
.sr-countdown { text-align: center; }
.sr-countdown .kit-countdown { gap: clamp(8px, 2.6vw, 24px); align-items: end; }
.sr-countdown .kit-countdown-unit { min-width: 0; position: relative; }
.sr-countdown .kit-countdown-value { position: relative; display: grid; place-items: center; width: clamp(68px, 19vw, 116px); aspect-ratio: 4 / 4.6; margin: 0 auto; padding-top: 12%;
    font-family: var(--inv-font-heading); font-size: clamp(1.3rem, 5vw, 2.3rem); color: var(--inv-primary);
    border-radius: 50% 50% 6px 6px / 62% 62% 6px 6px; border: 1px solid color-mix(in srgb, var(--sr-iron) 30%, transparent); border-bottom: 0;
    background: linear-gradient(105deg, transparent 18%, color-mix(in srgb, white 34%, transparent) 26%, transparent 34%), radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--inv-primary) 10%, transparent), transparent 70%), color-mix(in srgb, var(--inv-surface) 50%, transparent);
    box-shadow: inset 0 -10px 18px -12px color-mix(in srgb, var(--inv-primary) 30%, transparent); }
/* the knob on top and the wooden base */
.sr-countdown .kit-countdown-value::before { content: ""; position: absolute; top: -9px; left: 50%; width: 14px; height: 10px; margin-left: -7px; border-radius: 50% 50% 3px 3px; background: var(--inv-accent); }
.sr-countdown .kit-countdown-value::after { content: ""; position: absolute; bottom: -7px; left: -10%; right: -10%; height: 7px; border-radius: 3px; background: color-mix(in srgb, var(--inv-accent) 70%, var(--inv-text)); }
.sr-countdown .kit-countdown-label { margin-top: 16px; opacity: 1; color: var(--sr-ink-soft); }

/* Gallery: arched panes */
.sr-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.sr-gallery-grid.kit-gallery a { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 50% 50% 4px 4px / 37% 37% 4px 4px; border: 4px solid var(--sr-iron); box-shadow: var(--sr-shadow); }
.sr-gallery-grid.kit-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .3, 1); }
.sr-gallery-grid.kit-gallery a:hover img { transform: scale(1.05); }
@media (min-width: 760px) { .sr-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP */
.sr-reply { max-width: 700px; margin: 0 auto; padding: clamp(40px, 6vw, 60px) clamp(24px, 6vw, 56px); }
.sera .inv-rsvp__intro { font-family: var(--inv-font-heading); font-size: 1.16rem; }
.sera .inv-rsvp__deadline { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.sera .inv-rsvp__choice label { border-radius: 999px; }

/* Info, contact */
.sr-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.sr-info-item { padding: 34px 26px 18px; text-align: center; }
.sr-info-item h3 { font-size: 1.36rem; color: var(--inv-primary); margin-bottom: 8px; }
.sr-faq { max-width: 720px; margin: 44px auto 0; text-align: center; }
.sr-faq details { text-align: left; border-bottom: 1px solid var(--sr-line); }
.sr-faq details:first-of-type { border-top: 1px solid var(--sr-line); }
.sr-faq summary { cursor: pointer; list-style: none; padding: 16px 44px 16px 6px; position: relative; font-family: var(--inv-font-heading); font-size: 1.16rem; }
.sr-faq summary::-webkit-details-marker { display: none; }
.sr-faq summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 14px; height: 14px; border-radius: 0 50% 0 50%; background: var(--sr-line); border: 1px solid var(--inv-primary); transform: translateY(-50%) rotate(0deg); transition: background .3s, transform .45s; }
.sr-faq details[open] summary::after { background: var(--inv-primary); transform: translateY(-50%) rotate(90deg); }
.sr-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.sr-faq details p { padding: 0 6px; color: var(--sr-ink-soft); }
.sr-faq details p:last-child { padding-bottom: 16px; }
.sr-contact { text-align: center; }
.sr-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.sr-contact-person a { text-decoration: none; }

/* Footer: a plant grows from its pot */
.sr-footer { text-align: center; padding: clamp(110px, 15vw, 170px) 16px 70px; }
.sr-pot { display: block; width: 170px; margin: 0 auto 24px; overflow: visible; }
.sr-stem { fill: none; stroke: var(--inv-primary); stroke-width: 2.4; stroke-linecap: round; }
.sr-plant-leaf { fill: color-mix(in srgb, var(--inv-primary) 85%, var(--inv-accent)); transform-box: fill-box; transform-origin: 50% 100%; }
.sr-plant-leaf:nth-of-type(odd) { fill: color-mix(in srgb, var(--inv-primary) 70%, var(--inv-accent)); }
.sr-pot-body { fill: var(--sr-terracotta); }
.sr-pot-rim { fill: color-mix(in srgb, var(--sr-terracotta) 88%, white); }
.sr-pot-shade { fill: color-mix(in srgb, black 18%, transparent); }
.kit-js .sr-stem { stroke-dasharray: 1; stroke-dashoffset: 1; }
.kit-js .sr-plant-leaf { opacity: 0; scale: .1; }
.kit-js .is-visible .sr-stem { animation: sr-draw 1.8s cubic-bezier(.4, .1, .3, 1) .2s forwards; }
.kit-js .is-visible .sr-plant-leaf { animation: sr-open .9s cubic-bezier(.3, 1.4, .5, 1) calc(1.2s + var(--i) * .14s) forwards; }
.sr-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.26rem; color: var(--sr-ink-soft); }
.sr-footer-names { font-family: var(--sr-script); font-size: clamp(3.4rem, 11vw, 5.4rem); line-height: 1.05; color: var(--inv-primary); margin: 6px 0 10px; }
.sr-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .kit-js .sr-hero-inner > * { animation: none; }
    .sr-leaf { animation: none; }
    .kit-js .sr-fern-stem, .kit-js .sr-stem { stroke-dashoffset: 0; animation: none !important; }
    .kit-js .sr-fern-leaf, .kit-js .sr-plant-leaf { opacity: 1; scale: 1; animation: none !important; }
}
