/* ==========================================================================
   Foișor - a garden wedding, painted in watercolour: the photo in an arched garden window wrapped in a garland of
   daisies (a touch makes butterflies rise from the flowers and petals rain down). Petals drift across the page on
   a summer breeze, a little butterfly opens its wings above every title, the gazebo covered in roses says hello,
   the couple are introduced either side of the painted bride and groom, the family sits beside the robin at the
   bird bath, the story's photos are held in a white frame with butterflies, every moment has a corner of flowers,
   the days left sit in rings of daisy petals, the photos are arched windows and at the end the bride and groom walk
   off together beside a bouquet of poppies.
   Palette: --inv-primary (the ink), --inv-accent (the soft colour), --inv-bg, --inv-text.
   The watercolours (assets/art, Pixabay, see LICENSES.md) came transparent; on the dark palette (.fo-dark, set by
   script.js) they get back a sheet of watercolour paper. script.js draws the drifting petals (canvas.fo-air)
   ========================================================================== */

.foisor {
    --fo-soft: color-mix(in srgb, var(--inv-text) 64%, var(--inv-bg));
    --fo-line: color-mix(in srgb, var(--inv-primary) 18%, transparent);
    --fo-paper: color-mix(in srgb, #fffdf6 90%, var(--inv-accent));
    --fo-hand: "Allura", "Great Vibes", cursive;
    --fo-wing: #e99a45;
    --fo-shadow: 0 1px 2px color-mix(in srgb, var(--inv-text) 8%, transparent), 0 24px 48px -30px color-mix(in srgb, var(--inv-text) 50%, transparent);
    --kit-radius: 12px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--fo-line);
    font-family: var(--inv-font-body);
    font-weight: 400;
    font-size: 1.02rem;
    line-height: 1.75;
    background: var(--inv-bg);
    overflow-x: clip;
}
.foisor h1, .foisor h2, .foisor h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.12; }
:where(.foisor) :is(h1, h2, h3) { margin: 0; }
:where(.foisor) p { margin: 0 0 .9em; }
.foisor strong { font-weight: 700; }
.foisor a { color: var(--inv-primary); }
.fo-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.fo-role { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fo-soft); margin: 0 0 4px; }
.fo-names-line { display: block; font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }
.fo-hero, .fo-main, .fo-footer { position: relative; z-index: 1; }
.fo-card { position: relative; background: var(--inv-surface); border-radius: 18px; box-shadow: var(--fo-shadow), 0 0 0 1px var(--fo-line); }
.fo-air { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- The watercolours ---------- */
.fo-art { position: relative; display: block; }
.fo-art img { display: block; width: 100%; height: auto; }
.fo-dark .fo-art img { background: radial-gradient(closest-side, var(--fo-paper) 54%, color-mix(in srgb, var(--fo-paper) 40%, transparent) 78%, transparent 100%); }
/* the garland and the frame are already light: they only need a soft glow on the dark palette */
.fo-dark .fo-garland img, .fo-dark .fo-snap-frame img, .fo-dark .fo-moment-corner img, .fo-dark .fo-reply-corner img { background: none; filter: drop-shadow(0 0 14px rgba(255, 250, 235, .18)); }

/* ---------- The arched garden window round the photo, wrapped in daisies ---------- */
.fo-arch { position: relative; margin: 0; aspect-ratio: 3 / 4; }
.fo-arch-photo { position: absolute; inset: 0; overflow: hidden; border-radius: 999px 999px 10px 10px; background: var(--fo-paper);
    box-shadow: 0 0 0 8px var(--inv-surface), 0 0 0 9px var(--fo-line), 0 30px 50px -26px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.fo-arch-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fo-garland { position: absolute; z-index: 2; width: 66%; pointer-events: none; }
.fo-garland--top { left: -17%; top: 2%; }
.fo-garland--bottom { right: -17%; bottom: -8%; rotate: 180deg; }
.kit-js .fo-arch--hero .fo-arch-photo { animation: fo-rise 1.3s cubic-bezier(.3, 1.1, .5, 1) .1s both; }
.kit-js .fo-arch--hero .fo-garland--top img { animation: fo-grow-a 1.6s cubic-bezier(.3, 1, .4, 1) .7s both; }
.kit-js .fo-arch--hero .fo-garland--bottom img { animation: fo-grow-a 1.6s cubic-bezier(.3, 1, .4, 1) 1s both; }
@keyframes fo-rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
/* the garland grows out of its corner, along the frame */
@keyframes fo-grow-a { from { clip-path: inset(0 100% 100% 0); } to { clip-path: inset(0 0 0 0); } }

/* the butterflies that rise from the flowers at a touch */
.fo-flutter { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.fo-flutter i { position: absolute; left: calc(14% + var(--b) * 17%); top: 62%; width: 22px; height: 18px; opacity: 0; }
.fo-flutter s { position: absolute; top: 0; width: 50%; height: 100%; background: radial-gradient(ellipse 70% 60% at 60% 35%, color-mix(in srgb, var(--fo-wing) 70%, #fff), var(--fo-wing)); border-radius: 60% 40% 50% 60% / 55% 50% 60% 45%; }
.fo-flutter s:first-child { left: 0; transform-origin: 100% 50%; }
.fo-flutter s:last-child { right: 0; transform-origin: 0 50%; }
.fo-scene.is-fluttering .fo-flutter i { animation: fo-rise-fly 2.6s cubic-bezier(.3, .6, .5, 1) 1 both; animation-delay: calc(var(--b) * .12s); }
.fo-scene.is-fluttering .fo-flutter s { animation: fo-flap .22s ease-in-out 12 alternate; }
@keyframes fo-rise-fly {
    0% { opacity: 0; translate: 0 0; rotate: 0deg; }
    12% { opacity: 1; }
    100% { opacity: 0; translate: calc((var(--b) - 2) * 50px) -260px; rotate: calc((var(--b) - 2) * 14deg); }
}
@keyframes fo-flap { from { rotate: y 0deg; } to { rotate: y 70deg; } }

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

/* ---------- Hero: the arched window and the names ---------- */
.fo-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 110px 16px 70px; overflow: hidden; overflow: clip; }
.fo-glow { position: absolute; left: -20%; top: -20%; width: min(1100px, 170vw); aspect-ratio: 1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 85%, transparent), transparent 72%); }
.fo-dark .fo-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 18%, transparent), transparent 72%); }
.fo-hero-inner { position: relative; z-index: 1; width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 46px; text-align: center; }
.fo-scene { position: relative; width: min(250px, 62vw); margin: 0 8%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fo-hero-text { display: grid; justify-items: center; width: 100%; min-width: 0; }
.foisor .fo-names { display: grid; justify-items: center; font-family: var(--inv-font-heading); font-weight: 400; font-size: clamp(2.8rem, 12vw, 5rem); line-height: 1.02; color: var(--inv-primary); overflow-wrap: anywhere; text-wrap: balance; margin: 0 0 18px; }
.fo-and { font-family: var(--fo-hand); font-size: .8em; line-height: .9; color: var(--fo-soft); }
.fo-hero-date { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.4rem; margin: 0 0 4px; }
.fo-hero-place { font-size: .7rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--fo-soft); margin: 0; }
.foisor .fo-subtitle { max-width: 44ch; margin: 16px auto 0; color: var(--fo-soft); }
@keyframes fo-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.kit-js .fo-hero-text > * { animation: fo-up 1.1s ease .8s both; }
.kit-js .fo-hero-text > :nth-child(n+3) { animation-delay: 1.15s; }
@media (min-width: 900px) {
    .fo-hero { padding-top: 140px; }
    .fo-hero-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 70px; text-align: left; align-items: center; }
    .fo-hero-text { justify-items: start; order: -1; }
    .foisor .fo-names { justify-items: start; }
    .foisor .fo-subtitle { margin-left: 0; }
    .fo-scene { width: min(320px, 27vw); margin: 30px clamp(50px, 5vw, 70px) 40px clamp(50px, 5vw, 70px); }
}

/* ---------- Sections ---------- */
.fo-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.fo-section { padding-top: clamp(84px, 11vw, 128px); overflow-x: clip; }
.fo-title { margin: 0 auto clamp(26px, 4vw, 42px); text-align: center; }
.fo-title h2 { font-size: clamp(2.1rem, 6vw, 3rem); color: var(--inv-primary); text-wrap: balance; }
/* the butterfly: two pairs of wings on a thin body, opening as the title comes into view */
.fo-fly { position: relative; display: block; width: 40px; height: 30px; margin: 0 auto 10px; perspective: 120px; }
.fo-fly i { position: absolute; top: 0; width: 20px; height: 30px;
    background: radial-gradient(ellipse 60% 44% at 50% 30%, color-mix(in srgb, var(--fo-wing) 50%, #fff) 0 34%, var(--fo-wing) 62%, #a8551f 68%, transparent 72%),
        radial-gradient(ellipse 46% 34% at 54% 78%, var(--fo-wing) 0 66%, transparent 70%); }
.fo-fly i:nth-child(1) { right: 50%; transform-origin: 100% 50%; }
.fo-fly i:nth-child(2) { left: 50%; transform-origin: 0 50%; }
.fo-fly b { position: absolute; left: 50%; top: 5px; width: 3px; height: 21px; margin-left: -1.5px; border-radius: 3px; background: color-mix(in srgb, var(--inv-text) 70%, transparent); }
.kit-js .fo-title .fo-fly i { rotate: y 80deg; }
.kit-js .fo-title.is-visible .fo-fly i { rotate: y 0deg; transition: rotate 1s cubic-bezier(.3, 1.4, .5, 1) .2s; animation: fo-rest 5s ease-in-out 1.6s infinite; }
@keyframes fo-rest { 0%, 86%, 100% { rotate: y 0deg; } 90% { rotate: y 60deg; } 94% { rotate: y 0deg; } 97% { rotate: y 45deg; } }

/* Welcome, from the gazebo */
.fo-welcome { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 860px; margin: 0 auto; }
.fo-welcome p { font-size: 1.03rem; }
.fo-hello { width: min(280px, 70vw); }
.kit-js .fo-welcome .fo-hello img { opacity: 0; translate: 0 24px; transition: opacity 1s ease, translate 1.3s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .fo-welcome.is-visible .fo-hello img { opacity: 1; translate: 0 0; }
.foisor .fo-welcome-title { font-family: var(--fo-hand); font-weight: 400; font-size: clamp(3rem, 11vw, 4.2rem); line-height: 1.1; color: var(--inv-primary); margin-bottom: 8px; }
.fo-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }
@media (min-width: 760px) {
    .fo-welcome { grid-template-columns: auto minmax(0, 1fr); gap: 50px; text-align: left; align-items: center; }
    .fo-hello { width: 320px; }
}

/* The couple either side of the painted bride and groom */
.fo-couple-grid { display: grid; gap: 22px; justify-items: center; max-width: 980px; margin: 0 auto; }
.fo-person { width: 100%; max-width: 420px; padding: 30px 26px 24px; text-align: center; }
.fo-person-photo { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--inv-surface), 0 0 0 5px var(--fo-line); }
.fo-person-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fo-person h3 { font-size: 1.7rem; color: var(--inv-primary); margin-bottom: 8px; }
.fo-person p { color: var(--fo-soft); }
.fo-person p:last-child { margin-bottom: 0; }
.fo-pair { width: min(220px, 56vw); }
.kit-js .fo-couple-grid .fo-person { opacity: 0; translate: 0 20px; transition: opacity .7s ease, translate .9s ease; }
.kit-js .fo-couple-grid .fo-person--2 { transition-delay: .3s; }
.kit-js .fo-couple-grid .fo-pair img { opacity: 0; translate: 0 18px; transition: opacity .9s ease .15s, translate 1.2s cubic-bezier(.3, 1.2, .5, 1) .15s; }
.kit-js .fo-couple-grid.is-visible .fo-person { opacity: 1; translate: 0 0; }
.kit-js .fo-couple-grid.is-visible .fo-pair img { opacity: 1; translate: 0 0; }
@media (min-width: 900px) {
    .fo-couple-grid { grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); align-items: center; gap: 26px; }
    .fo-pair { width: 240px; }
}

/* Family, beside the robin at the bird bath */
.fo-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.25rem; color: var(--fo-soft); max-width: 40ch; margin: 0 auto 22px; }
.fo-family-row { display: grid; gap: 20px; justify-items: center; max-width: 760px; margin: 0 auto; }
.fo-robin { width: min(190px, 50vw); }
.fo-family-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; width: 100%; max-width: 440px; }
.fo-family-list .fo-card { padding: 20px 22px; text-align: center; }
.kit-js .fo-family .fo-robin img { opacity: 0; translate: -24px -12px; transition: opacity .8s ease, translate 1.1s cubic-bezier(.3, 1.3, .5, 1); }
.kit-js .fo-family.is-visible .fo-robin img { opacity: 1; translate: 0 0; }
@media (min-width: 760px) {
    .fo-family-row { grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 46px; }
    .fo-robin { width: 220px; }
    .fo-family-list .fo-card { text-align: left; }
}

/* The story in chapters: every photo held in the white frame with butterflies */
.fo-chapters { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; display: grid; gap: clamp(40px, 7vw, 70px); }
.fo-chapter { display: grid; gap: 24px; justify-items: center; text-align: center; }
.fo-snap { position: relative; margin: 0; width: min(340px, 100%); aspect-ratio: 1; filter: drop-shadow(0 20px 26px color-mix(in srgb, var(--inv-text) 30%, transparent)); }
.fo-snap-photo { position: absolute; inset: 12%; overflow: hidden; background: var(--fo-paper); }
.fo-snap-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fo-snap-frame { position: absolute; inset: 0; }
.fo-chapter-text { max-width: 46ch; }
.fo-chapter-text h3 { font-size: clamp(1.6rem, 4.6vw, 2rem); color: var(--inv-primary); margin-bottom: 8px; }
.fo-chapter-text p { color: var(--fo-soft); }
.kit-js .fo-chapter .fo-snap { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate 1s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .fo-chapter.is-visible .fo-snap { opacity: 1; translate: 0 0; }
@media (min-width: 760px) {
    .fo-chapter { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; text-align: left; }
    .fo-chapter:nth-child(even) .fo-snap { order: 2; }
}

/* The day: cards with a corner of flowers and butterflies */
.fo-moments { list-style: none; margin: 0 auto; padding: 0; max-width: 960px; display: grid; gap: 30px 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.fo-moment { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 44px clamp(20px, 5vw, 32px) 24px; text-align: center; }
.fo-moment-corner { position: absolute; right: -10px; top: -20px; width: 86px; pointer-events: none; scale: -1 1; }
.fo-moment-time { font-family: var(--inv-font-heading); font-style: italic; font-size: 2.1rem; line-height: 1; color: var(--inv-primary); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.fo-moment h3 { font-size: clamp(1.4rem, 4vw, 1.6rem); margin-bottom: 4px; }
.fo-moment-place { font-weight: 700; margin: 0; }
.fo-moment-address, .fo-moment-notes { color: var(--fo-soft); margin: 0; }
.fo-moment-notes { font-style: italic; margin-top: 6px; }
.fo-moment .kit-event-actions { margin-top: 14px; justify-content: center; }
.kit-js .fo-moment { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .9s ease; }
.kit-js .fo-moment.is-visible { opacity: 1; translate: 0 0; }
.kit-js .fo-moment .fo-moment-corner img { clip-path: inset(0 0 100% 100%); }
.kit-js .fo-moment.is-visible .fo-moment-corner img { clip-path: inset(0 0 0 0); transition: clip-path 1.4s ease .4s; }
.foisor .kit-button { border-radius: 999px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-size: .74rem; font-weight: 700; letter-spacing: .08em; padding: 8px 18px; text-decoration: none; }
.foisor .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: each number in a ring of white daisy petals round a soft yellow heart */
.fo-countdown { text-align: center; }
.fo-countdown .kit-countdown { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px clamp(12px, 3.6vw, 28px); margin-top: 36px; }
.fo-countdown .kit-countdown-unit { position: relative; width: clamp(76px, 20vw, 108px); min-width: 0; aspect-ratio: 1; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: none; isolation: isolate; }
/* the petals: fifteen white ellipses drawn round the middle (an inline SVG) */
.fo-countdown .kit-countdown-unit::before { content: ""; position: absolute; inset: 0; z-index: -2;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23fffefa' stroke='%23d9d2c0' stroke-width='1.2'%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%280 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%2824 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%2848 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%2872 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%2896 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28120 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28144 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28168 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28192 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28216 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28240 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28264 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28288 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28312 50 50%29'/%3E%3Cellipse cx='50' cy='22' rx='9' ry='21' transform='rotate%28336 50 50%29'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
    filter: drop-shadow(0 8px 10px rgba(60, 60, 30, .2)); }
.fo-countdown .kit-countdown-unit::after { content: ""; position: absolute; inset: 24%; z-index: -1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff2b8, #f2c94c 70%, #d9a92e); box-shadow: inset 0 -3px 6px rgba(150, 100, 0, .25); }
.fo-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-weight: 500; font-size: clamp(1.2rem, 4.6vw, 1.7rem); line-height: 1; color: #4a3608; font-variant-numeric: tabular-nums; }
.fo-countdown .kit-countdown-label { opacity: 1; color: #6b5212; font-size: .44rem; font-weight: 700; letter-spacing: .06em; margin-top: 1px; }
.kit-js .fo-countdown .kit-countdown-unit { opacity: 0; scale: .5; rotate: -40deg; transition: opacity .5s ease, scale 1s cubic-bezier(.3, 1.5, .5, 1), rotate 1.4s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .fo-countdown .kit-countdown-unit:nth-child(2) { transition-delay: .12s; }
.kit-js .fo-countdown .kit-countdown-unit:nth-child(3) { transition-delay: .24s; }
.kit-js .fo-countdown .kit-countdown-unit:nth-child(4) { transition-delay: .36s; }
.kit-js .fo-countdown.is-visible .kit-countdown-unit { opacity: 1; scale: 1; rotate: 0deg; }

/* Gallery: tall arched windows, the middle one of every row a little higher */
.fo-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 30px); }
.fo-gallery-grid.kit-gallery a { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 8px 8px; background: var(--fo-paper);
    box-shadow: 0 0 0 5px var(--inv-surface), 0 0 0 6px var(--fo-line), 0 22px 34px -20px color-mix(in srgb, var(--inv-text) 55%, transparent); transition: translate .5s ease; }
.fo-gallery-grid.kit-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s ease; }
.fo-gallery-grid.kit-gallery a:hover img { scale: 1.05; }
.kit-js .fo-gallery .fo-gallery-grid a { opacity: 0; translate: 0 30px; transition: opacity .8s ease, translate 1s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .fo-gallery.is-visible .fo-gallery-grid a { opacity: 1; translate: 0 0; }
.kit-js .fo-gallery.is-visible .fo-gallery-grid a:nth-child(2) { transition-delay: .12s; }
.kit-js .fo-gallery.is-visible .fo-gallery-grid a:nth-child(3) { transition-delay: .24s; }
.kit-js .fo-gallery.is-visible .fo-gallery-grid a:nth-child(4) { transition-delay: .36s; }
.kit-js .fo-gallery.is-visible .fo-gallery-grid a:nth-child(n+5) { transition-delay: .48s; }
@media (min-width: 760px) {
    .fo-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; padding-top: 30px; }
    .fo-gallery-grid.kit-gallery a:nth-child(3n+2) { margin-top: -30px; margin-bottom: 30px; }
}

/* RSVP: a card with flowers and butterflies in its top corner and daisies in the opposite one */
.fo-reply { max-width: 700px; margin: 0 auto; padding: clamp(46px, 6vw, 60px) clamp(24px, 6vw, 56px) clamp(32px, 5vw, 48px); }
.fo-reply-corner { position: absolute; left: -8px; top: -14px; width: clamp(90px, 24vw, 130px); pointer-events: none; }
.kit-js .fo-reply .fo-reply-corner img { clip-path: inset(0 100% 100% 0); }
.kit-js .fo-reply.is-visible .fo-reply-corner img { clip-path: inset(0 0 0 0); transition: clip-path 1.6s ease .3s; }
.foisor .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.15rem; }
.foisor .inv-rsvp__deadline { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--inv-primary); }
.fo-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.fo-info-item { padding: 30px 24px 20px; text-align: center; }
.fo-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 8px; }
.fo-faq { max-width: 720px; margin: 46px auto 0; text-align: center; display: grid; gap: 12px; }
.fo-faq details { text-align: left; }
.fo-faq summary { cursor: pointer; list-style: none; padding: 17px 56px 17px 22px; position: relative; font-weight: 700; font-size: 1rem; }
.fo-faq summary::-webkit-details-marker { display: none; }
/* a little daisy that turns when the answer opens */
.fo-faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; transition: rotate .7s ease;
    background: radial-gradient(circle, #f2c94c 0 26%, transparent 28%), repeating-conic-gradient(var(--inv-primary) 0 18deg, transparent 18deg 30deg); opacity: .8; }
.fo-faq details[open] summary::after { rotate: 120deg; }
.fo-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; border-radius: 18px; }
.fo-faq details p { padding: 0 22px; color: var(--fo-soft); }
.fo-faq details p:last-child { padding-bottom: 16px; }
.fo-contact { text-align: center; }
.fo-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.fo-contact-person a { text-decoration: none; }

/* ---------- Footer: the couple walking off together, beside the poppies ---------- */
.fo-footer { text-align: center; padding: clamp(90px, 13vw, 140px) 16px 40px; overflow: hidden; overflow: clip; }
.fo-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.2rem; color: var(--fo-soft); max-width: 38ch; margin: 0 auto 6px; }
.foisor .fo-footer-names { font-family: var(--fo-hand); font-size: clamp(3.2rem, 12vw, 4.8rem); line-height: 1.1; color: var(--inv-primary); margin: 4px 0 10px; }
.fo-hashtag { letter-spacing: .1em; color: var(--inv-primary); }
.fo-farewell { position: relative; width: min(480px, 100%); margin: 30px auto 0; display: grid; grid-template-columns: 1.1fr .8fr; align-items: end; }
.fo-leaving { width: 100%; z-index: 1; }
.fo-poppies { width: 118%; margin-left: -18%; z-index: 2; }
.kit-js .fo-footer .fo-farewell .fo-art img { opacity: 0; translate: 0 30px; transition: opacity 1s ease, translate 1.3s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .fo-footer .fo-farewell .fo-poppies img { transition-delay: .3s; }
.kit-js .fo-footer.is-visible .fo-farewell .fo-art img { opacity: 1; translate: 0 0; }
.kit-js .fo-footer.is-visible .fo-poppies { transform-origin: 50% 100%; animation: fo-breeze 5s ease-in-out 1.6s infinite; }
@keyframes fo-breeze { 0%, 100% { rotate: 0deg; } 50% { rotate: 2deg; } }

@media (prefers-reduced-motion: reduce) {
    .kit-js .fo-arch--hero .fo-arch-photo, .kit-js .fo-arch--hero .fo-garland img, .kit-js .fo-hero-text > *, .kit-js .fo-footer.is-visible .fo-poppies { animation: none; }
    .kit-js .fo-title .fo-fly i, .kit-js .fo-title.is-visible .fo-fly i { rotate: y 0deg; transition: none; animation: none; }
    .kit-js .fo-welcome .fo-hello img, .kit-js .fo-couple-grid .fo-person, .kit-js .fo-couple-grid .fo-pair img, .kit-js .fo-family .fo-robin img, .kit-js .fo-chapter .fo-snap,
    .kit-js .fo-moment, .kit-js .fo-countdown .kit-countdown-unit, .kit-js .fo-gallery .fo-gallery-grid a, .kit-js .fo-footer .fo-farewell .fo-art img { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; transition: none; }
    .kit-js .fo-moment .fo-moment-corner img, .kit-js .fo-reply .fo-reply-corner img { clip-path: none; transition: none; }
}
