/* ==========================================================================
   Confetti - confetti showers on opening and on every RSVP, chunky type, split-flap countdown
   Palette: --inv-primary (main colour), --inv-accent (second colour), --inv-bg, --inv-text
   ========================================================================== */

.confetti {
    --cf-dots:
        radial-gradient(circle, #FF5A5F 0 3px, transparent 4px) 0 0 / 90px 90px,
        radial-gradient(circle, #FFB400 0 3px, transparent 4px) 45px 30px / 110px 110px,
        radial-gradient(circle, #00A699 0 3px, transparent 4px) 20px 60px / 130px 130px,
        radial-gradient(circle, #7B61FF 0 3px, transparent 4px) 70px 10px / 150px 150px;
    --cf-tint: color-mix(in srgb, var(--inv-primary) 10%, var(--inv-bg));
    --cf-line: color-mix(in srgb, var(--inv-text) 14%, transparent);
    --cf-ink-soft: color-mix(in srgb, var(--inv-text) 74%, var(--inv-bg));
    --kit-radius: 14px;
    --kit-field-bg: #fff;
    --kit-field-border: var(--cf-line);
    font-family: var(--inv-font-body);
    font-size: 1.06rem;
    background: var(--inv-bg);
    overflow-x: clip;
}
.confetti h1, .confetti h2, .confetti h3 { font-family: var(--inv-font-heading); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.confetti) :is(h1, h2, h3) { margin: 0; }
.cf-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 8px; }
.cf-h2 { font-size: clamp(2.4rem, 6.4vw, 4rem); margin: 0 0 30px !important; }
.cf-h2--big { font-size: clamp(3rem, 9vw, 5.6rem); color: var(--inv-primary); }
.cf-sticker { display: inline-block; margin: 0 0 16px; padding: 8px 18px; border-radius: 999px; background: var(--inv-accent); color: #1a1a1a; font-weight: 700; }
.cf-sticker--tilt { transform: rotate(-4deg); }

/* ---------- Falling confetti (script.js) ---------- */
.cf-layer { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; }
.cf-piece { position: absolute; width: 9px; height: 14px; border-radius: 2px; }
.cf-piece--round { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Navigation ---------- */
.cf-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 18px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; }
.cf-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.cf-nav a { text-decoration: none; font-weight: 700; font-size: .9rem; color: var(--inv-text); padding: 8px 14px; border-radius: 999px; }
.cf-nav a:hover, .cf-nav a.is-current { background: var(--inv-primary); color: #fff; }
.cf-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-left: 0; }
.cf-nav .kit-nav-brand:hover { background: none; color: var(--inv-primary); }
.cf-nav.is-stuck { align-items: center; padding: 6px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 92%, transparent); box-shadow: 0 3px 0 var(--inv-accent); }
.confetti .kit-to-top { border-radius: 14px; background: var(--inv-primary); color: #fff; border: 0; transform: rotate(-6deg); }
@media (max-width: 899px) {
    .cf-nav { padding: 10px 12px; }
    .cf-nav .kit-nav-toggle { color: var(--inv-primary); font-size: 1.4rem; margin-left: auto; }
    .cf-nav .kit-nav-links { display: none; }
    .cf-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 56px; left: 12px; right: 12px;
        padding: 14px; background: #fff; border-radius: 22px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .3);
    }
}

/* ---------- Hero ---------- */
.cf-hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 100px clamp(20px, 5vw, 60px) 70px; background: var(--cf-dots), var(--inv-bg); }
.cf-hero-grid { display: grid; gap: 40px; align-items: center; max-width: 1140px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .cf-hero-grid { grid-template-columns: 1.15fr 1fr; gap: 60px; } }
.cf-hero-text { text-align: center; }
@media (min-width: 900px) { .cf-hero-text { text-align: left; } }
.confetti .cf-title { font-size: clamp(3.8rem, 12vw, 8rem); color: var(--inv-primary); margin: 0 0 20px; }
.cf-subtitle { font-size: 1.2rem; color: var(--cf-ink-soft); max-width: 28em; margin: 0 0 26px; }
@media (max-width: 899px) { .cf-subtitle { margin-left: auto; margin-right: auto; } }
.cf-when { display: inline-grid; gap: 2px; margin: 0; padding: 14px 24px; border-radius: 18px; background: var(--inv-text); color: var(--inv-bg); font-weight: 700; }
.cf-when span + span { font-weight: 400; opacity: .8; }
.cf-hero-visual { position: relative; width: min(420px, 78vw); margin: 0 auto; }
.cf-hero-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden; border: 8px solid #fff; transform: rotate(3deg); box-shadow: 14px 14px 0 var(--inv-accent); }
.cf-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.cf-burst {
    position: absolute; left: -12%; bottom: -8%; width: 40%; aspect-ratio: 1; display: grid; place-content: center; text-align: center;
    background: var(--inv-primary); color: #fff; font-weight: 700; font-size: .9rem;
    clip-path: polygon(50% 0, 61% 18%, 82% 10%, 80% 32%, 100% 40%, 84% 55%, 96% 75%, 74% 76%, 70% 98%, 52% 85%, 32% 100%, 28% 78%, 6% 78%, 16% 58%, 0 42%, 20% 32%, 16% 10%, 38% 18%);
    animation: cf-spin 14s linear infinite;
}
.cf-burst strong { font-family: var(--inv-font-heading); font-size: 2.6rem; line-height: 1; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cf-burst { animation: none; } }

/* ---------- Sections ---------- */
.cf-section { max-width: 1080px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; text-align: center; }
.cf-prose { max-width: 640px; margin: 0 auto; font-size: 1.2rem; line-height: 1.75; }
.cf-prose p { margin: 0 0 1em; }

/* Celebrant on a zigzag band */
.cf-band { position: relative; background: var(--cf-tint); }
.cf-band::before, .cf-band::after { content: ""; position: absolute; left: 0; right: 0; height: 18px; background: linear-gradient(135deg, var(--inv-bg) 12px, transparent 0) 0 0 / 24px 18px, linear-gradient(-135deg, var(--inv-bg) 12px, transparent 0) 0 0 / 24px 18px; }
.cf-band::before { top: 0; }
.cf-band::after { bottom: 0; transform: scaleY(-1); }
.cf-band-inner { max-width: 1000px; margin: 0 auto; padding: clamp(70px, 10vw, 110px) 22px; }
.cf-celebrant-grid { display: grid; gap: 40px; align-items: center; justify-items: center; text-align: center; }
@media (min-width: 760px) { .cf-celebrant-grid { grid-template-columns: auto 1fr; text-align: left; justify-items: start; } }
.cf-portrait { margin: 0; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 8px solid #fff; box-shadow: -12px 12px 0 var(--inv-primary); display: grid; place-items: center; background: #fff; }
.cf-portrait img { width: 100%; height: 100%; object-fit: cover; }
.cf-initial { font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.cf-celebrant-grid p:not(.cf-sticker) { font-size: 1.12rem; line-height: 1.75; color: var(--cf-ink-soft); }

/* Theme */
.cf-theme { background: var(--cf-dots); border-radius: 40px; }

/* Events: bold rows */
.cf-event-list { display: grid; gap: 18px; max-width: 820px; margin: 0 auto; text-align: left; }
.cf-event { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding: 26px; border-radius: 26px; background: #fff; border: 3px solid var(--inv-text); box-shadow: 8px 8px 0 var(--inv-primary); }
.cf-event:nth-child(even) { box-shadow: 8px 8px 0 var(--inv-accent); }
.cf-event-time { font-family: var(--inv-font-heading); font-weight: 800; font-size: 2.4rem; color: var(--inv-primary); margin: 0; }
.cf-event h3 { font-size: 1.6rem; margin-bottom: 6px; }
.cf-event-place { font-weight: 500; margin: 8px 0 2px; }
.cf-event-notes { color: var(--cf-ink-soft); margin: 4px 0 0; }
@media (max-width: 560px) { .cf-event { grid-template-columns: 1fr; } }
.confetti .kit-event-actions { justify-content: flex-start; margin-top: 14px; }
.confetti .kit-button { border-radius: 999px; border: 2px solid var(--inv-text); color: var(--inv-text); background: transparent; font-weight: 700; }
.confetti .kit-button:hover { background: var(--inv-text); color: var(--inv-bg); }

/* Countdown: split-flap board */
.cf-countdown .kit-countdown { gap: clamp(6px, 2vw, 14px); }
.cf-countdown .kit-countdown-unit { gap: 8px; }
.cf-countdown .kit-countdown-value {
    position: relative; display: block; min-width: clamp(70px, 18vw, 120px); padding: 16px 10px; border-radius: 12px;
    background: linear-gradient(180deg, #2a2a30 0 50%, #1c1c21 50%); color: #fff;
    font-family: var(--inv-font-heading); font-weight: 800; font-size: clamp(2.2rem, 8vw, 4rem); box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .6);
}
.cf-countdown .kit-countdown-value::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(0, 0, 0, .6); }
.cf-countdown .kit-countdown-label { font-weight: 700; color: var(--inv-primary); }

/* Gallery */
.cf-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 760px) { .cf-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.cf-gallery-grid a { border-radius: 22px; border: 3px solid var(--inv-text); }
.cf-gallery-grid a:nth-child(3n + 1) { transform: rotate(-2deg); }
.cf-gallery-grid a:nth-child(3n + 3) { transform: rotate(2deg); }

/* RSVP: a card with a dashed "cut here" edge */
.cf-rsvp-card { max-width: 680px; margin: 0 auto; padding: clamp(36px, 6vw, 56px) clamp(20px, 6vw, 50px); background: #fff; border-radius: 30px; border: 3px dashed var(--inv-primary); outline: 10px solid var(--cf-tint); }
.confetti .inv-rsvp { text-align: left; }
.confetti .inv-rsvp__intro { text-align: center; color: var(--cf-ink-soft); }
.confetti .inv-rsvp__deadline { text-align: center; font-weight: 700; color: var(--inv-primary); }
.confetti .inv-rsvp__choice label { font-weight: 700; border-radius: 999px; }
.confetti .inv-rsvp__field > label, .confetti .inv-rsvp__field legend { font-weight: 700; }
.confetti .inv-rsvp__submit { border-radius: 999px; font-family: var(--inv-font-heading); font-weight: 800; font-size: 1.2rem; padding: 15px 30px; box-shadow: 5px 5px 0 var(--inv-accent); }

/* Info */
.cf-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); text-align: left; }
.cf-info-item { padding: 26px; border-radius: 24px; background: var(--cf-tint); }
.cf-info-item h3 { font-size: 1.4rem; margin-bottom: 10px; }
.cf-info-item p { margin: 0 0 .6em; line-height: 1.7; }
.cf-faq { max-width: 680px; margin: 50px auto 0; text-align: left; }
.cf-faq > .cf-kicker { text-align: center; margin-bottom: 14px; }
.cf-faq details { background: #fff; border: 3px solid var(--inv-text); border-radius: 20px; padding: 14px 20px; margin-bottom: 10px; }
.cf-faq summary { cursor: pointer; list-style: none; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.cf-faq summary::-webkit-details-marker { display: none; }
.cf-faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--inv-primary); transition: transform .3s; }
.cf-faq details[open] summary::after { transform: rotate(45deg); }
.cf-faq details p { margin: 10px 0 0; color: var(--cf-ink-soft); }

/* Contact */
.cf-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.cf-contact-person { min-width: 230px; padding: 22px 26px; border-radius: 22px; background: #fff; border: 3px solid var(--inv-text); }
.cf-contact-name { font-family: var(--inv-font-heading); font-weight: 800; font-size: 1.5rem; margin: 0 0 6px; }
.cf-contact-person a { color: var(--inv-primary); font-weight: 700; text-decoration: none; }

/* Footer */
.cf-footer { text-align: center; padding: 80px 22px 70px; background: var(--cf-dots), var(--inv-text); color: var(--inv-bg); }
.cf-footer-title { font-family: var(--inv-font-heading); font-weight: 800; font-size: clamp(2.8rem, 9vw, 5rem); color: var(--inv-accent); margin: 0 0 12px; }
.cf-footer-message { font-size: 1.2rem; margin: 0 0 8px; }
.cf-hashtag { font-weight: 700; margin: 0 0 14px; }
.cf-footer .cf-kicker { color: var(--inv-bg); opacity: .8; }

/* Keep body text readable over the confetti dots */
.cf-subtitle, .cf-theme .cf-prose { background: var(--inv-bg); box-shadow: 0 0 22px 16px var(--inv-bg); border-radius: 18px; }
