/* ==========================================================================
   Cireș - a spring wedding under the cherry blossom. The names are written by hand above a big photo under an arch,
   and cherry petals drift and tumble across it on the breeze (canvas.ci-flurry, script.js); at a touch a gust sweeps a
   flurry of petals over it. Petals drift across the whole page (canvas.ci-petals), a soft pink light passes over the
   titles, a flowering branch welcomes the guests, the times sit in discs of blossom light, and at the end petals fall
   over the names under a flowering branch.
   Palette: --inv-primary (ink, titles), --inv-accent (the blossom), --inv-bg, --inv-text.
   ========================================================================== */

.cires {
    --ci-script: var(--inv-font-heading), 'Segoe Script', cursive;
    --ci-serif: 'Cormorant Garamond', Georgia, serif;
    --ci-soft: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --ci-line: color-mix(in srgb, var(--inv-primary) 20%, transparent);
    --ci-bloom: var(--inv-accent);
    --ci-warm: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    --ci-pane: color-mix(in srgb, var(--inv-surface) 76%, transparent);
    --ci-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(--ci-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;
}
.cires h1, .cires h2, .cires h3 { font-family: var(--ci-serif); font-weight: 400; line-height: 1.2; }
:where(.cires) :is(h1, h2, h3) { margin: 0; }
:where(.cires) p { margin: 0 0 .9em; }
.cires strong, .cires b { font-weight: 600; }
.cires a { color: var(--inv-primary); }
.ci-kicker { font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.ci-role { font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ci-soft); margin: 0 0 6px; }
.ci-names-line { font-family: var(--ci-serif); font-size: 1.3rem; margin: 0; }
.ci-hero, .ci-main, .ci-footer { position: relative; z-index: 1; }
.ci-hero { z-index: 2; }
.ci-petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* a warm leak of light drifting slowly across the top of the page */
.ci-leak { position: fixed; top: -30vh; left: -20vw; width: 80vw; height: 80vh; z-index: 0; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent); will-change: transform; animation: ci-leak 40s ease-in-out infinite alternate; }
@keyframes ci-leak { from { translate: 0 0; } to { translate: 60vw 10vh; } }

/* Panes */
.ci-pane { background: var(--ci-pane); border: 1px solid var(--ci-line); border-radius: 18px; box-shadow: var(--ci-shadow); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* ---------- Handwriting ---------- */
.ci-word { display: inline-block; white-space: nowrap; }
.ci-letter { display: inline-block; white-space: pre; clip-path: inset(-20% 100% -30% -10%); opacity: 0; }
.ci-hero .ci-letter, .is-visible .ci-letter { animation: ci-write .5s calc(var(--i) * .1s + var(--ci-delay, 0s)) cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes ci-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: a soft pink light passes over them ---------- */
.ci-title { position: relative; margin: 0 auto clamp(36px, 5vw, 52px); text-align: center; }
.ci-title h2 { display: inline-block; font-size: clamp(2.2rem, 5.6vw, 3.1rem); font-style: italic; color: var(--inv-primary); padding: 0 .2em;
    background: linear-gradient(105deg, var(--inv-primary) 0 44%, color-mix(in srgb, var(--inv-accent) 70%, #fff) 50%, var(--inv-primary) 56% 100%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kit-js .ci-title.is-visible h2 { animation: ci-sheen 2.4s ease .3s both; }
/* the background is three times the title's width: at 100% and at 0% only plain ink shows, the light passes between */
@keyframes ci-sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }

/* A little blossom under titles, a flowering branch (welcome, footer) */
.ci-mini { display: block; width: 130px; margin: 8px auto 0; overflow: visible; }
.ci-line { fill: none; stroke: color-mix(in srgb, var(--inv-primary) 55%, var(--inv-bg)); stroke-width: 1.3; stroke-linecap: round; }
.ci-petal-shape { fill: color-mix(in srgb, var(--ci-bloom) 55%, #fff); stroke: color-mix(in srgb, var(--ci-bloom) 80%, var(--inv-primary)); stroke-width: .6; }
.ci-heart { fill: color-mix(in srgb, var(--ci-bloom) 40%, var(--inv-primary)); }
.ci-branch { display: block; width: 170px; margin: 0 auto 10px; overflow: visible; }
.ci-branch .ci-flowers > * { transform-box: fill-box; transform-origin: 50% 50%; }
.kit-js .kit-reveal .ci-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.kit-js .kit-reveal :is(.ci-petal-shape, .ci-heart) { scale: 0; }
.kit-js .kit-reveal.is-visible .ci-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.45, .05, .35, 1) .2s; }
.kit-js .kit-reveal.is-visible :is(.ci-petal-shape, .ci-heart) { scale: 1; transition: scale .9s cubic-bezier(.3, 1.5, .5, 1) 1.3s; }

/* ---------- Navigation ---------- */
.ci-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.ci-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; }
.ci-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; }
.ci-nav a:hover, .ci-nav a.is-current { color: var(--inv-primary); border-bottom-color: var(--ci-bloom); }
.ci-nav .kit-nav-brand { font-family: var(--ci-script); font-size: 2.2rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; border: 0; line-height: 1; }
.ci-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(--ci-line); }
.cires .kit-to-top { border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--ci-line); }
@media (max-width: 899px) {
    .ci-nav { justify-content: flex-end; padding: 12px; }
    .ci-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--ci-pane); color: var(--inv-primary); border: 1px solid var(--ci-line); font-size: 1.2rem; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .ci-nav .kit-nav-links { display: none; }
    .ci-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(--ci-shadow); }
    .ci-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the names, the photo under the blossom ---------- */
.ci-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 84px 0 64px; text-align: center; }
.ci-hero-inner { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ci-hero-inner > :not(.ci-scene) { margin-left: 16px; margin-right: 16px; max-width: calc(100% - 32px); }
.cires .ci-names { font-family: var(--ci-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); }
.ci-and { font-size: .55em; color: var(--ci-bloom); }
.ci-hero .ci-letter { --ci-delay: .4s; }
.ci-scene { position: relative; width: min(820px, 100%); margin: 10px 0 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ci-blossom { position: relative; margin: 0; aspect-ratio: 16 / 10.5; overflow: hidden; border-radius: 260px 260px 18px 18px / 150px 150px 18px 18px; background: var(--ci-warm); box-shadow: var(--ci-shadow); }
.ci-blossom img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ci-flurry { position: absolute; inset: 0; width: 100%; height: 100%; display: block; mix-blend-mode: screen; pointer-events: none; }
.ci-blossom::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--inv-accent) 18%, transparent)); }
.ci-hero-date { font-family: var(--ci-serif); font-size: 1.4rem; margin-top: 26px; margin-bottom: 2px; }
.ci-hero-place { font-size: .74rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--ci-soft); margin: 0; }
.cires .ci-subtitle { width: 44ch; margin-top: 18px; margin-bottom: 0; color: var(--ci-soft); }
@keyframes ci-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.kit-js .ci-hero-inner > :not(.ci-names) { animation: ci-rise 1.1s ease 1.4s both; }
.kit-js .ci-hero-inner > .ci-kicker { animation-delay: .15s; }
.kit-js .ci-hero-inner > .ci-scene { animation: ci-rise 1.4s cubic-bezier(.3, .9, .4, 1) .6s both; }
@media (max-width: 699px) {
    .ci-blossom { aspect-ratio: 4 / 4.6; border-radius: 170px 170px 16px 16px / 120px 120px 16px 16px; margin: 0 16px; }
}

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

/* Couple: arched portraits, warmed by the sun */
.ci-couple-grid { display: grid; gap: 60px; justify-items: center; }
.ci-person { text-align: center; max-width: 380px; display: grid; justify-items: center; }
.ci-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(--ci-warm); box-shadow: var(--ci-shadow); }
.ci-arch img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ci-initial { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--ci-script); font-size: 5rem; color: var(--inv-primary); }
.ci-person h3 { font-size: 1.7rem; margin: 0 0 8px; }
.ci-person p { color: var(--ci-soft); }
.kit-js .ci-person { opacity: 0; translate: 0 24px; }
.kit-js .ci-person.is-visible { opacity: 1; translate: 0 0; transition: opacity 1.1s ease, translate 1.3s ease; }
@media (min-width: 760px) { .ci-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

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

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

/* Programme: the hour in a disc of light */
.ci-moments { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ci-moment { padding: 36px 28px 30px; text-align: center; }
.ci-bloom-time { margin: 0 auto 18px; width: max-content; }
.ci-bloom-time span, .ci-countdown .kit-countdown-value { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; color: var(--inv-primary); font-family: var(--ci-serif);
    background: radial-gradient(circle, color-mix(in srgb, var(--inv-accent) 26%, var(--inv-surface)) 0, color-mix(in srgb, var(--inv-accent) 10%, var(--inv-surface)) 55%, transparent 72%);
    box-shadow: 0 0 34px -6px var(--ci-warm); animation: ci-breathe 5s ease-in-out infinite; animation-delay: var(--ci-delay, 0s); }
@keyframes ci-breathe { 0%, 100% { box-shadow: 0 0 30px -8px var(--ci-warm); } 50% { box-shadow: 0 0 46px -2px var(--ci-warm); } }
.ci-bloom-time span { width: 92px; font-size: 1.35rem; }
.ci-moment:nth-child(2) { --ci-delay: -1.6s; }
.ci-moment:nth-child(3) { --ci-delay: -3.2s; }
.ci-moment h3 { font-size: 1.5rem; margin: 6px 0 6px; }
.ci-moment-place { font-weight: 600; margin: 12px 0 0; }
.ci-moment-address, .ci-moment-notes { color: var(--ci-soft); margin: 0; }
.ci-moment-notes { font-style: italic; margin-top: 6px; }
.ci-moment .kit-event-actions { justify-content: center; margin-top: 16px; }
.cires .kit-button { border-radius: 999px; border: 1px solid var(--ci-line); background: var(--inv-surface); color: var(--inv-primary); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.cires .kit-button:hover { border-color: var(--ci-bloom); box-shadow: 0 0 16px var(--ci-warm); }
.kit-js .ci-moment { opacity: 0; translate: 0 22px; }
.kit-js .ci-moment.is-visible { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }

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

/* Gallery: a sheen of soft light passes over each photo on hover */
.ci-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 22px); }
@media (min-width: 760px) { .ci-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ci-gallery-grid.kit-gallery a { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; box-shadow: var(--ci-shadow); }
.ci-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; }
.ci-gallery-grid.kit-gallery a:hover::after { translate: 100% 0; }
.kit-js .ci-gallery .ci-gallery-grid a { opacity: 0; translate: 0 24px; }
.kit-js .ci-gallery.is-visible .ci-gallery-grid a { opacity: 1; translate: 0 0; transition: opacity .9s ease, translate 1.1s ease; }
.kit-js .ci-gallery.is-visible .ci-gallery-grid a:nth-child(3n+2) { transition-delay: .12s; }
.kit-js .ci-gallery.is-visible .ci-gallery-grid a:nth-child(3n) { transition-delay: .24s; }

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

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

/* ---------- Footer: a flowering branch, petals falling over the names ---------- */
.ci-footer { position: relative; text-align: center; padding: clamp(90px, 12vw, 140px) 16px 60px; overflow: hidden; isolation: isolate; }
.ci-footer-branch { width: 220px; margin-bottom: 18px; }
.ci-flurry--footer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.ci-footer-message { font-family: var(--ci-serif); font-style: italic; font-size: 1.25rem; color: var(--ci-soft); max-width: 38ch; margin: 0 auto 8px; }
.cires .ci-footer-names { font-family: var(--ci-script); font-size: clamp(3.6rem, 12vw, 5.6rem); line-height: 1.1; color: var(--inv-primary); margin: 6px 0 12px; }
.ci-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .ci-letter { animation: none !important; clip-path: none; opacity: 1; }
    .ci-leak, .ci-bloom-time span, .ci-countdown .kit-countdown-value { animation: none; }
    .kit-js .kit-reveal .ci-line { stroke-dashoffset: 0; transition: none; }
    .kit-js .kit-reveal :is(.ci-petal-shape, .ci-heart) { scale: 1; transition: none; }
    .kit-js .ci-title.is-visible h2 { animation: none; }
    .kit-js .ci-person { opacity: 1; translate: 0 0; transition: none; }
    .kit-js .ci-chapter, .kit-js .ci-moment, .kit-js .ci-gallery .ci-gallery-grid a { opacity: 1; translate: 0 0; transition: none; }
    .kit-js .ci-hero-inner > * { animation: none; }
}
