/* ==========================================================================
   Carusel - modern Scandinavian christening: a crib mobile whose shapes swing on their threads,
   rounded type, photos cut into circles, arches and rounded squares
   Palette: --inv-primary (deep tone), --inv-accent (soft tone), --inv-bg, --inv-text
   script.js sets --push (deg) on <html>: extra swing from the scroll, fading back to rest
   ========================================================================== */

.carusel {
    --c-t1: var(--inv-primary);
    --c-t2: var(--inv-accent);
    --c-t3: color-mix(in srgb, var(--inv-primary) 45%, var(--inv-accent));
    --c-t4: color-mix(in srgb, var(--inv-accent) 55%, var(--inv-bg));
    --c-tint: color-mix(in srgb, var(--inv-accent) 28%, var(--inv-bg));
    --c-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --c-wood: color-mix(in srgb, var(--inv-text) 35%, var(--inv-accent));
    --kit-radius: 18px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: color-mix(in srgb, var(--inv-primary) 25%, transparent);
    font-family: var(--inv-font-body);
    font-size: 1.04rem;
    line-height: 1.65;
    background: var(--inv-bg);
    overflow-x: clip;
}
.carusel h1, .carusel h2, .carusel h3 { font-family: var(--inv-font-heading); font-weight: 700; line-height: 1.05; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.carusel) :is(h1, h2, h3) { margin: 0; }
:where(.carusel) p { margin: 0 0 .9em; }
.carusel a { color: var(--inv-primary); }
.c-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 12px; }
.c-role { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink-soft); margin: 0 0 4px; }
.c-names { font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.4rem; line-height: 1.2; margin: 0; }

/* ---------- Shapes ---------- */
.c-shape { display: block; overflow: visible; fill: var(--c-t1); }
.c-shape--star { fill: var(--c-t2); }
.c-shape--cloud { fill: var(--c-t4); }
.c-shape--sun { fill: var(--c-t3); }
.c-shape--rainbow { fill: none; }
.c-rays path { fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; }
.c-shape--sun, .c-tone-3 { color: var(--c-t3); }
.c-arc { fill: none; stroke: var(--c-t1); stroke-width: 12; stroke-linecap: round; }
.c-arc--2 { stroke: var(--c-t2); }
.c-tone-1 { fill: var(--c-t1); color: var(--c-t1); }
.c-tone-2 { fill: var(--c-t2); color: var(--c-t2); }
.c-tone-3 { fill: var(--c-t3); }
.c-tone-4 { fill: var(--c-t4); color: var(--c-t4); }
.c-tone-2 .c-arc, .c-tone-4 .c-arc { stroke: var(--c-t3); }

/* ---------- The mobile ---------- */
.c-mobile { display: block; width: min(460px, 100%); height: auto; overflow: visible; margin: 0 0 6px -10px; }
.c-hook, .c-thread { stroke: color-mix(in srgb, var(--inv-text) 45%, transparent); stroke-width: 1.5; }
.c-bar { fill: var(--c-wood); }
.c-hang { transform: rotate(calc(var(--push, 0) * 1deg * (1 + var(--i) * .15))); transition: transform 1.4s cubic-bezier(.3, 1.5, .5, 1); }
.c-swing { animation: c-swing 5s ease-in-out infinite alternate; }
.c-hang:nth-child(odd) .c-swing { animation-direction: alternate-reverse; }
.c-mobile path, .c-mobile circle { filter: drop-shadow(0 4px 3px color-mix(in srgb, var(--inv-text) 18%, transparent)); }
@keyframes c-swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

/* ---------- Titles ---------- */
.c-title { display: flex; align-items: center; gap: 14px; margin: 0 0 clamp(24px, 4vw, 40px); }
.c-title-shape { width: 46px; height: 46px; flex: none; }
.c-title h2 { font-size: clamp(2.1rem, 6.5vw, 3.2rem); }

/* ---------- Navigation ---------- */
.c-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: flex-end; padding: 16px clamp(16px, 4vw, 40px); }
.c-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.c-nav a { text-decoration: none; font-size: .86rem; font-weight: 600; color: var(--inv-text); padding: 7px 14px; border-radius: 999px; }
.c-nav a:hover, .c-nav a.is-current { background: var(--c-tint); color: var(--inv-primary); }
.c-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-weight: 800; font-size: 1.5rem; color: var(--inv-primary); margin-right: auto; padding: 0; }
.c-nav .kit-nav-brand:hover { background: none; }
.c-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--inv-bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 20px -16px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.carusel .kit-to-top { border-radius: 50%; background: var(--inv-primary); color: var(--inv-bg); border: 0; }
@media (max-width: 899px) {
    .c-nav { padding: 12px; }
    .c-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--c-tint); color: var(--inv-primary); border: 0; font-size: 1.2rem; }
    .c-nav .kit-nav-links { display: none; }
    .c-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; align-items: stretch; gap: 4px; position: absolute; top: 66px; left: 12px; right: 12px;
        padding: 16px; background: var(--inv-surface); border-radius: 24px; box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--inv-text) 50%, transparent);
    }
    .c-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero ---------- */
.c-hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 70px clamp(16px, 4vw, 40px) 50px; }
.c-hero-grid { display: grid; gap: 34px; width: min(1180px, 100%); margin: 0 auto; }
.c-name { font-weight: 800; font-size: clamp(4rem, 17vw, 9rem); line-height: .92; color: var(--inv-primary); letter-spacing: -.01em; overflow-wrap: anywhere; margin-bottom: 18px; }
.c-hero-date { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.c-hero-date span { background: var(--c-tint); padding: 6px 14px; border-radius: 999px; font-weight: 600; }
.carusel .c-subtitle { max-width: 38ch; font-size: 1.12rem; color: var(--c-ink-soft); margin: 0; }
.c-hero-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: 999px 999px 32px 32px; overflow: hidden; background: var(--c-tint); }
.c-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
    .c-hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 60px; }
    .c-hero-photo { max-height: 80vh; justify-self: end; width: 100%; }
}
@keyframes c-drop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.kit-js .c-mobile { animation: c-drop 1.2s cubic-bezier(.3, 1.4, .5, 1) .1s both; }

/* ---------- Sections ---------- */
.c-main { width: min(1180px, 100%); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.c-section { padding-top: clamp(70px, 10vw, 110px); }
.c-block { border-radius: 36px; padding: clamp(30px, 6vw, 60px); }
.c-block--tint { background: var(--c-tint); }
.c-lead { font-size: 1.2rem; max-width: 46ch; color: var(--c-ink-soft); }

.c-welcome { max-width: 780px; }
.c-welcome-title { font-size: clamp(2.6rem, 9vw, 4.4rem); color: var(--inv-primary); margin-bottom: 16px; }
.c-prose { font-size: 1.15rem; }
.c-quote-author { font-weight: 600; color: var(--inv-primary); }

/* Child: round photo with a birth-date sticker */
.c-child .c-block { display: grid; gap: 40px; justify-items: center; }
.c-child-photo { position: relative; margin: 0; width: min(320px, 70vw); aspect-ratio: 1; }
.c-child-photo img, .c-child-initial { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.c-child-initial { display: grid; place-items: center; background: var(--inv-surface); font-family: var(--inv-font-heading); font-weight: 800; font-size: 7rem; color: var(--inv-primary); }
.c-sticker {
    position: absolute; right: -6%; bottom: 2%; width: 128px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; gap: 2px;
    background: var(--inv-primary); color: var(--inv-bg); font-size: .72rem; line-height: 1.25; padding: 14px; transform: rotate(-10deg);
    box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--inv-text) 70%, transparent);
}
.c-sticker strong { font-family: var(--inv-font-heading); font-size: 1rem; line-height: 1.1; }
.c-child-name { font-family: var(--inv-font-heading); font-weight: 800; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.05; margin-bottom: 12px; }
.c-child-message { font-size: 1.2rem; max-width: 40ch; }
@media (min-width: 760px) { .c-child .c-block { grid-template-columns: minmax(0, 340px) 1fr; justify-items: start; align-items: center; gap: 70px; } }

/* Family */
.c-family-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.c-person { background: var(--inv-surface); border-radius: 28px; padding: 28px 26px; box-shadow: 0 1px 0 color-mix(in srgb, var(--inv-text) 6%, transparent); }
.c-person--godparents { background: var(--c-tint); }
.c-person-shape { width: 52px; height: 52px; margin-bottom: 16px; }
.c-godparent-photo { margin: 0 0 16px; width: 110px; aspect-ratio: 1; }
.c-godparent-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Programme */
.c-moments { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.c-moment { position: relative; border-radius: 32px; padding: 30px 28px 26px; background: var(--c-tint); overflow: hidden; }
.c-moment--2 { background: color-mix(in srgb, var(--c-t3) 22%, var(--inv-bg)); }
.c-moment--3 { background: var(--inv-surface); }
.c-moment-shape { position: absolute; right: -14px; top: -14px; width: 120px; height: 120px; opacity: .9; }
.c-moment > *:not(.c-moment-shape) { position: relative; }
.c-moment-time { font-family: var(--inv-font-heading); font-weight: 800; font-size: 2.8rem; line-height: 1; color: var(--inv-primary); margin-bottom: 10px; }
.c-moment h3 { font-size: 1.7rem; margin-bottom: 4px; max-width: 80%; }
.c-moment-date { font-weight: 600; color: var(--c-ink-soft); }
.c-moment-place { font-weight: 600; margin: 12px 0 0; }
.c-moment-address, .c-moment-notes { color: var(--c-ink-soft); margin: 0; }
.c-moment-notes { margin-top: 8px; }
.c-moment .kit-event-actions { justify-content: flex-start; }
.carusel .kit-button { border-radius: 999px; border: 0; background: var(--inv-primary); color: var(--inv-bg); font-weight: 600; font-size: .86rem; padding: 10px 18px; text-decoration: none; }
.carusel .kit-button:hover { background: var(--inv-text); }

/* Countdown: numbers in coloured shapes */
.c-countdown { text-align: center; }
.c-countdown .kit-countdown { gap: clamp(10px, 3vw, 24px); }
.c-countdown .kit-countdown-unit { min-width: 0; }
.c-countdown .kit-countdown-value {
    display: grid; place-items: center; width: clamp(70px, 19vw, 120px); aspect-ratio: 1; border-radius: 50%;
    background: var(--c-t2); color: var(--inv-text); font-weight: 800; font-size: clamp(1.8rem, 6vw, 2.8rem);
}
.c-countdown .kit-countdown-unit:nth-child(2) .kit-countdown-value { border-radius: 999px 999px 18px 18px; background: var(--c-t4); }
.c-countdown .kit-countdown-unit:nth-child(3) .kit-countdown-value { border-radius: 26px; background: var(--c-tint); }
.c-countdown .kit-countdown-unit:nth-child(4) .kit-countdown-value { border-radius: 18px 18px 999px 999px; background: var(--c-t4); }
.c-countdown .kit-countdown-label { margin-top: 10px; font-weight: 600; opacity: 1; color: var(--c-ink-soft); }

/* Gallery: circles, arches and rounded squares */
.c-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 22px); }
.c-gallery-grid.kit-gallery a { aspect-ratio: 1; border-radius: 28px; }
.c-gallery-grid.kit-gallery a:nth-child(3n + 1) { border-radius: 50%; }
.c-gallery-grid.kit-gallery a:nth-child(3n + 2) { border-radius: 999px 999px 28px 28px; }
@media (min-width: 760px) { .c-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP */
.c-reply { max-width: 760px; margin: 0 auto; background: var(--inv-surface); box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--inv-text) 60%, transparent); border: 2px solid var(--c-tint); }
.carusel .inv-rsvp__intro, .carusel .inv-rsvp__deadline { text-align: left; }
.carusel .inv-rsvp__intro { font-size: 1.15rem; }
.carusel .inv-rsvp__deadline { font-weight: 600; color: var(--inv-primary); }
.carusel .inv-rsvp__choice label { border-radius: 999px; font-weight: 600; }
.carusel .inv-rsvp__submit { font-family: var(--inv-font-heading); font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; }

/* Info, contact */
.c-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.c-info-item { border-radius: 28px; padding: 28px 26px 16px; background: var(--c-tint); }
.c-info-item--2 { background: color-mix(in srgb, var(--c-t3) 20%, var(--inv-bg)); }
.c-info-item--3 { background: var(--inv-surface); }
.c-info-item h3 { font-size: 1.5rem; color: var(--inv-primary); margin-bottom: 8px; }
.c-faq { max-width: 760px; margin-top: 44px; }
.c-faq details { background: var(--inv-surface); border-radius: 22px; margin-bottom: 10px; }
.c-faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative; font-weight: 600; font-size: 1.08rem; border-radius: inherit; }
.c-faq summary::-webkit-details-marker { display: none; }
.c-faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; display: grid; place-items: center; background: var(--c-tint); color: var(--inv-primary); font-size: 1.2rem; transition: transform .3s; }
.c-faq details[open] summary::after { transform: rotate(45deg); }
.c-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.c-faq details p { padding: 0 22px; color: var(--c-ink-soft); }
.c-faq details p:last-child { padding-bottom: 18px; }
.c-contact-list { display: flex; flex-wrap: wrap; gap: 20px 60px; }
.c-contact-person a { font-weight: 600; text-decoration: none; }

/* Footer */
.c-footer { text-align: center; margin-top: clamp(90px, 12vw, 130px); padding: 50px 16px 70px; }
.c-footer-shapes { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.c-footer-shapes .c-shape { width: 42px; height: 42px; }
.c-footer-message { font-size: 1.25rem; color: var(--c-ink-soft); }
.c-footer-name { font-family: var(--inv-font-heading); font-weight: 800; font-size: clamp(3rem, 12vw, 5.6rem); line-height: 1; color: var(--inv-primary); margin: 8px 0 14px; }
.c-hashtag { font-weight: 600; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .c-swing, .kit-js .c-mobile { animation: none; }
    .c-hang { transform: none; transition: none; }
}
