/* ==========================================================================
   Împreună - a wedding anniversary, painted in watercolour: the photo in an oval frame of the anniversary's own metal
   under a garland of linked hearts (silver for 25 years, pearl for 30, ruby roses for 40, gold for 50, following the
   palette), and the years together as a big number that counts up. Petals drift down the page, two rings roll in and
   link above every title, the owls on their branch say hello, the couple's portrait sits in the same oval frame, the
   theme is a handwritten letter sealed with a heart, every moment has a couple in love, the days left sit in
   lockets, and at the end the tree of hearts stands with two pebbles side by side at its foot.
   Palette: --inv-primary (the ink), --inv-accent (the metal), --inv-bg, --inv-text.
   The watercolours (assets/art, Pixabay, see LICENSES.md) come with their own transparency; on the dark palette
   (.im-dark, set by script.js) they get a soft halo of light. script.js draws the petals (canvas.im-petals)
   ========================================================================== */

.impreuna {
    --im-script: 'Great Vibes', 'Segoe Script', cursive;
    --im-soft: color-mix(in srgb, var(--inv-text) 64%, var(--inv-bg));
    --im-line: color-mix(in srgb, var(--inv-primary) 18%, transparent);
    --im-metal: color-mix(in srgb, var(--inv-accent) 85%, var(--inv-primary));
    --im-metal-light: color-mix(in srgb, var(--inv-accent) 60%, #fff);
    --im-paper: color-mix(in srgb, #fffcf6 92%, var(--inv-accent));
    --im-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: 10px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--im-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.02rem;
    line-height: 1.76;
    background: var(--inv-bg);
    overflow-x: clip;
}
.impreuna h1, .impreuna h2, .impreuna h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.2; }
:where(.impreuna) :is(h1, h2, h3) { margin: 0; }
:where(.impreuna) p { margin: 0 0 .9em; }
.impreuna strong { font-weight: 500; }
.impreuna a { color: var(--inv-primary); }
.im-kicker { font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.im-role { font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--im-soft); margin: 0 0 4px; }
.im-names { font-family: var(--inv-font-heading); font-size: 1.2rem; margin: 0; }
.im-hero, .im-main, .im-footer { position: relative; z-index: 1; }
.im-card { position: relative; background: var(--inv-surface); border-radius: 12px; box-shadow: var(--im-shadow), 0 0 0 1px var(--im-line); }
.im-petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- The watercolours ---------- */
.im-art { position: relative; display: block; }
.im-art img { display: block; width: 100%; height: auto; }
.im-dark .im-art img { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--inv-accent) 30%, transparent)); }

/* ---------- Navigation ---------- */
.im-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.im-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.im-nav .kit-nav-links a { font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--inv-text); padding: 6px 0; border-bottom: 1px solid transparent; }
.im-nav .kit-nav-links a:hover, .im-nav .kit-nav-links a.is-current { border-color: var(--inv-primary); color: var(--inv-primary); }
.im-nav .kit-nav-brand { font-family: var(--im-script); font-size: 2rem; line-height: 1; color: var(--inv-primary); text-decoration: none; }
.im-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px 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(--im-line); }
.impreuna .kit-to-top { background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--im-line); }
@media (max-width: 899px) {
    .im-nav { justify-content: flex-end; padding: 12px; }
    .im-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--im-line); font-size: 1.2rem; }
    .im-nav .kit-nav-links { display: none; }
    .im-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: 14px; background: var(--inv-surface); box-shadow: var(--im-shadow);
    }
    .im-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the frame and the years ---------- */
.im-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 130px 16px 56px; overflow: hidden; overflow: clip;
    background: radial-gradient(ellipse 70% 50% at 50% 30%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%); }
.im-hero-inner { position: relative; z-index: 1; width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 26px; text-align: center; }
.im-portrait-hero { position: relative; width: min(330px, 78vw); padding-top: 18px; }
.kit-js .im-frame--hero { animation: im-in 1.2s cubic-bezier(.3, 1.2, .5, 1) .1s both; }
@keyframes im-in { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

/* the oval frame of the anniversary's metal */
.im-frame { position: relative; margin: 0; }
.im-frame-metal { display: block; padding: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--im-metal-light), var(--im-metal) 40%, var(--im-metal-light) 60%, color-mix(in srgb, var(--im-metal) 80%, #000) 100%);
    box-shadow: var(--im-shadow), inset 0 0 0 1px rgba(255, 255, 255, .5); }
.im-frame-metal img, .im-initial { display: block; width: 100%; aspect-ratio: .8; object-fit: cover; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.im-initial { display: grid; place-items: center; font-family: var(--im-script); font-size: 5rem; color: var(--inv-primary); background: var(--im-paper); }
.im-garland { position: absolute; left: -14%; right: -14%; top: -10%; z-index: 2; }
.kit-js .im-garland img { animation: im-garland 1.2s ease .8s both; }
@keyframes im-garland { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }

/* the years together, counting up */
.im-years { position: absolute; right: -12%; bottom: 4%; z-index: 3; width: clamp(92px, 26vw, 120px); aspect-ratio: 1; margin: 0; display: grid; place-content: center; text-align: center; border-radius: 50%;
    background: var(--inv-surface); box-shadow: 0 0 0 4px var(--im-metal), 0 0 0 5px var(--im-line), var(--im-shadow); }
.im-years strong { display: block; font-family: var(--inv-font-heading); font-weight: 400; font-size: clamp(2.2rem, 8vw, 2.9rem); line-height: 1; color: var(--inv-primary); font-variant-numeric: tabular-nums; }
.im-years span { display: block; max-width: 9ch; margin: 2px auto 0; font-size: .58rem; font-weight: 500; letter-spacing: .1em; line-height: 1.3; text-transform: uppercase; color: var(--im-soft); }
.kit-js .im-years { animation: im-pop .8s cubic-bezier(.3, 1.6, .5, 1) 1.2s both; }
@keyframes im-pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

.im-hero-text { display: grid; justify-items: center; width: 100%; min-width: 0; }
.impreuna .im-name { font-family: var(--im-script); font-weight: 400; font-size: clamp(3.4rem, 13vw, 5.6rem); line-height: 1.12; color: var(--inv-primary); overflow-wrap: anywhere; margin: 0 0 10px; }
.im-hero-date { font-family: var(--inv-font-heading); font-size: 1.3rem; margin: 0 0 4px; }
.im-hero-place { font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--im-soft); margin: 0; }
.impreuna .im-subtitle { max-width: 44ch; margin: 16px auto 0; color: var(--im-soft); }
@keyframes im-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.kit-js .im-hero-text > * { animation: im-up 1s ease .8s both; }
.kit-js .im-hero-text > :nth-child(n+3) { animation-delay: 1.1s; }
@media (min-width: 900px) {
    .im-hero { padding-top: 150px; }
    .im-hero-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 80px; text-align: left; align-items: center; }
    .im-hero-text { justify-items: start; order: -1; }
    .impreuna .im-subtitle { margin-left: 0; }
    .im-portrait-hero { width: min(360px, 30vw); }
}

/* ---------- Sections ---------- */
.im-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.im-section { padding-top: clamp(84px, 11vw, 128px); }
.im-title { margin: 0 auto clamp(26px, 4vw, 42px); text-align: center; }
.im-title h2 { font-size: clamp(1.9rem, 5.4vw, 2.5rem); color: var(--inv-primary); text-wrap: balance; }
.im-rings { position: relative; display: block; width: 52px; height: 30px; margin: 0 auto 12px; }
.im-rings i { position: absolute; top: 3px; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--im-metal); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), 0 1px 2px rgba(0, 0, 0, .15); }
.im-rings i:first-child { left: 6px; }
.im-rings i:last-child { right: 6px; border-color: color-mix(in srgb, var(--im-metal) 75%, var(--inv-primary)); }
.kit-js .im-title .im-rings i:first-child { translate: -30px 0; rotate: -200deg; opacity: 0; transition: translate 1s cubic-bezier(.3, 1.3, .5, 1) .2s, rotate 1s ease .2s, opacity .3s ease .2s; }
.kit-js .im-title .im-rings i:last-child { translate: 30px 0; rotate: 200deg; opacity: 0; transition: translate 1s cubic-bezier(.3, 1.3, .5, 1) .2s, rotate 1s ease .2s, opacity .3s ease .2s; }
.kit-js .im-title.is-visible .im-rings i { translate: 0 0; rotate: 0deg; opacity: 1; }

/* Welcome, with the owls */
.im-welcome { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 820px; margin: 0 auto; }
.im-welcome p { font-size: 1.04rem; }
.im-owls { width: min(190px, 48vw); }
.kit-js .im-welcome .im-owls img { opacity: 0; translate: 0 22px; transition: opacity .9s ease, translate 1s ease; }
.kit-js .im-welcome.is-visible .im-owls img { opacity: 1; translate: 0 0; }
.impreuna .im-welcome-title { font-family: var(--im-script); font-weight: 400; font-size: clamp(2.8rem, 9vw, 4rem); line-height: 1.15; color: var(--inv-primary); margin-bottom: 12px; }
.im-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }
@media (min-width: 760px) {
    .im-welcome { grid-template-columns: auto minmax(0, 1fr); gap: 50px; text-align: left; align-items: center; }
    .im-owls { width: 220px; }
}

/* The couple */
.im-host-grid { display: grid; gap: 56px; justify-items: center; text-align: center; max-width: 900px; margin: 0 auto; }
.im-portrait { position: relative; width: min(240px, 60vw); padding-top: 14px; }
.im-host-name { font-family: var(--inv-font-heading); font-size: 1.7rem; color: var(--inv-primary); margin-bottom: 4px; }
.im-host-age { font-size: .76rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--im-soft); }
.im-host-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.06rem; max-width: 38ch; margin-left: auto; margin-right: auto; }
@media (min-width: 760px) {
    .im-host-grid { grid-template-columns: auto minmax(0, 1fr); gap: 110px; text-align: left; align-items: center; }
    .im-portrait { width: 250px; }
    .im-host-message { margin-left: 0; }
}

/* The theme on a handwritten letter sealed with a heart */
.im-letter { position: relative; max-width: 600px; margin: 0 auto; padding: 50px clamp(26px, 6vw, 54px) 36px; text-align: center; color: #3b302a;
    background: linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(0, 0, 0, .04) 100%), var(--im-paper); border-radius: 4px; box-shadow: var(--im-shadow), 0 0 0 1px rgba(0, 0, 0, .04); }
.im-letter::before { content: ""; position: absolute; left: 50%; top: -18px; width: 40px; height: 36px; margin-left: -20px; background: var(--inv-primary); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25));
    clip-path: path('M20 36C8 27 0 20 0 11A10 10 0 0 1 20 5A10 10 0 0 1 40 11C40 20 32 27 20 36Z'); }
.im-letter h3 { font-family: var(--im-script); font-size: clamp(2.2rem, 7vw, 3rem); line-height: 1.15; color: #6a3d34; margin-bottom: 10px; }
.im-letter p { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.08rem; }
.kit-js .im-theme .im-letter { opacity: 0; translate: 0 24px; transition: opacity .7s ease, translate .9s ease; }
.kit-js .im-theme.is-visible .im-letter { opacity: 1; translate: 0 0; }

/* Programme: a couple in love for every moment */
.im-moments { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 30px; }
.im-moment-card { display: grid; gap: 4px 26px; justify-items: center; text-align: center; padding: 26px clamp(20px, 5vw, 36px) 24px; }
.im-moment-card::after { content: ""; position: absolute; inset: 6px; border: 1px solid color-mix(in srgb, var(--im-metal) 55%, transparent); border-radius: 8px; pointer-events: none; }
.im-moment-art { width: min(130px, 38vw); }
.kit-js .im-moment .im-moment-card { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .9s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .im-moment.is-visible .im-moment-card { opacity: 1; translate: 0 0; }
.im-moment-time { font-family: var(--inv-font-heading); font-size: 1.5rem; line-height: 1.1; color: var(--inv-primary); margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.im-moment-text h3 { font-size: clamp(1.3rem, 4vw, 1.5rem); margin-bottom: 4px; }
.im-moment-place { font-weight: 500; margin: 0; }
.im-moment-address, .im-moment-notes { color: var(--im-soft); margin: 0; }
.im-moment-notes { font-style: italic; margin-top: 6px; }
.im-moment .kit-event-actions { margin-top: 14px; justify-content: center; }
@media (min-width: 760px) {
    .im-moment-card { grid-template-columns: 140px minmax(0, 1fr); text-align: left; align-items: center; justify-items: start; padding: 30px 36px 26px; }
    .im-moment:nth-child(even) .im-moment-card { grid-template-columns: minmax(0, 1fr) 140px; }
    .im-moment:nth-child(even) .im-moment-art { order: 2; }
    .im-moment-art { width: 140px; }
    .im-moment .kit-event-actions { justify-content: flex-start; }
}
.impreuna .kit-button { border-radius: 999px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-size: .78rem; font-weight: 500; padding: 8px 18px; text-decoration: none; }
.impreuna .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: in lockets */
.im-countdown { text-align: center; }
.im-countdown .kit-countdown { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px clamp(8px, 2.6vw, 24px); margin-top: 44px; }
.im-countdown .kit-countdown-unit { position: relative; width: clamp(76px, 20vw, 108px); min-width: 0; aspect-ratio: .86; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, var(--inv-surface) 0 56%, transparent 57%), linear-gradient(135deg, var(--im-metal-light), var(--im-metal) 45%, var(--im-metal-light) 60%, color-mix(in srgb, var(--im-metal) 80%, #000));
    box-shadow: var(--im-shadow); transform-origin: 50% -26px; animation: im-swing 5s ease-in-out infinite; }
.im-countdown .kit-countdown-unit::before { content: ""; position: absolute; left: 50%; top: -14px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 3px solid var(--im-metal); }
.im-countdown .kit-countdown-unit::after { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1.5px; height: 26px; margin-bottom: 12px; background: var(--im-metal); }
.im-countdown .kit-countdown-unit:nth-child(2) { animation-delay: -1.2s; }
.im-countdown .kit-countdown-unit:nth-child(3) { animation-delay: -2.4s; }
.im-countdown .kit-countdown-unit:nth-child(4) { animation-delay: -3.6s; }
@keyframes im-swing { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.im-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-size: clamp(1.3rem, 5vw, 1.9rem); line-height: 1; color: var(--inv-primary); font-variant-numeric: tabular-nums; }
.im-countdown .kit-countdown-label { opacity: 1; color: var(--im-soft); font-size: .5rem; font-weight: 500; letter-spacing: .1em; margin-top: 2px; }

/* Gallery: photos in thin metal frames */
.im-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 26px); }
.im-gallery-grid.kit-gallery a { position: relative; aspect-ratio: 4 / 5; padding: 6px; border-radius: 4px; background: linear-gradient(135deg, var(--im-metal-light), var(--im-metal) 45%, var(--im-metal-light) 60%, color-mix(in srgb, var(--im-metal) 80%, #000)); box-shadow: var(--im-shadow); }
.im-gallery-grid.kit-gallery a:nth-child(3n+2) { border-radius: 50% / 40%; }
.im-gallery-grid.kit-gallery a:nth-child(3n+2) img { border-radius: 50% / 40%; }
.im-gallery-grid.kit-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
@media (min-width: 760px) { .im-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP, info, contact */
.im-reply { max-width: 700px; margin: 0 auto; padding: clamp(40px, 6vw, 56px) clamp(24px, 6vw, 56px) clamp(32px, 5vw, 48px); }
.impreuna .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.06rem; }
.impreuna .inv-rsvp__deadline { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.im-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.im-info-item { padding: 30px 24px 20px; text-align: center; }
.im-info-item h3 { font-size: 1.26rem; color: var(--inv-primary); margin-bottom: 8px; }
.im-faq { max-width: 720px; margin: 46px auto 0; text-align: center; display: grid; gap: 12px; }
.im-faq details { text-align: left; }
.im-faq summary { cursor: pointer; list-style: none; padding: 17px 52px 17px 22px; position: relative; font-weight: 500; font-size: 1.02rem; }
.im-faq summary::-webkit-details-marker { display: none; }
.im-faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; border: 2.5px solid var(--im-metal); transition: scale .4s ease; }
.im-faq details[open] summary::after { scale: 1.2; background: color-mix(in srgb, var(--im-metal) 30%, transparent); }
.im-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; border-radius: 12px; }
.im-faq details p { padding: 0 22px; color: var(--im-soft); }
.im-faq details p:last-child { padding-bottom: 16px; }
.im-contact { text-align: center; }
.im-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.im-contact-person a { text-decoration: none; }

/* ---------- Footer: the tree of hearts ---------- */
.im-footer { text-align: center; padding: clamp(90px, 13vw, 140px) 16px 70px; overflow: hidden; overflow: clip; }
.im-finale { width: min(320px, 78vw); margin: 0 auto 20px; }
.kit-js .im-footer .im-tree img { opacity: 0; translate: 0 20px; }
.kit-js .im-footer.is-visible .im-tree img { animation: im-in 1.6s ease .1s both; }
.im-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.16rem; color: var(--im-soft); max-width: 36ch; margin: 0 auto 6px; }
.impreuna .im-footer-name { font-family: var(--im-script); font-size: clamp(3rem, 11vw, 4.6rem); line-height: 1.15; color: var(--inv-primary); margin: 4px 0 10px; }
.im-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .kit-js .im-frame--hero, .kit-js .im-garland img, .kit-js .im-years, .kit-js .im-hero-text > *, .im-countdown .kit-countdown-unit { animation: none; }
    .kit-js .im-title .im-rings i, .kit-js .im-welcome .im-owls img, .kit-js .im-theme .im-letter, .kit-js .im-moment .im-moment-card { opacity: 1; translate: 0 0; rotate: 0deg; transition: none; }
    .kit-js .im-footer .im-tree img { opacity: 1; translate: 0 0; animation: none; }
}
