/* ==========================================================================
   Păpădie - a christening as light as a breeze: a dandelion whose seeds fly off as you scroll,
   seeds drifting on the wind across the page, a handwritten name
   Palette: --inv-primary (stem, ink accent), --inv-accent (sky tint), --inv-bg, --inv-text
   script.js adds .is-flying to the dandelion's seeds one by one as the page scrolls
   ========================================================================== */

.papadie {
    --pd-script: 'Corinthia', cursive;
    --pd-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --pd-fluff: color-mix(in srgb, var(--inv-text) 55%, var(--inv-bg));
    --pd-tint: color-mix(in srgb, var(--inv-accent) 45%, var(--inv-bg));
    --pd-card: color-mix(in srgb, var(--inv-surface) 82%, transparent);
    --kit-radius: 16px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: color-mix(in srgb, var(--inv-primary) 24%, transparent);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.03rem;
    line-height: 1.7;
    background: linear-gradient(180deg, var(--pd-tint), var(--inv-bg) 70vh) no-repeat, var(--inv-bg);
    overflow-x: clip;
}
.papadie h1, .papadie h2, .papadie h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.15; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.papadie) :is(h1, h2, h3) { margin: 0; }
:where(.papadie) p { margin: 0 0 .9em; }
.papadie a { color: var(--inv-primary); }
.pd-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.pd-role { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--pd-ink-soft); margin: 0 0 4px; }
.pd-names { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }

/* ---------- Seeds ---------- */
.pd-seed-shape line, .pd-seed-shape path { fill: none; stroke: var(--pd-fluff); stroke-width: 1.1; stroke-linecap: round; }
.pd-seed-shape ellipse { fill: color-mix(in srgb, var(--inv-text) 65%, var(--inv-primary)); }

/* The dandelion */
.pd-dandelion { display: block; width: 100%; height: auto; overflow: visible; }
.pd-stem { fill: none; stroke: color-mix(in srgb, var(--inv-primary) 75%, var(--inv-text)); stroke-width: 3.5; stroke-linecap: round; }
.pd-leaf { fill: color-mix(in srgb, var(--inv-primary) 60%, var(--inv-accent)); }
.pd-head { fill: color-mix(in srgb, var(--inv-primary) 55%, var(--inv-text)); }
.pd-seed { transform-box: view-box; transform-origin: 200px 210px; transform: rotate(var(--a)); transition: transform 3.2s cubic-bezier(.3, .2, .2, 1) var(--d), opacity 3.2s ease var(--d); }
.pd-seed.is-flying { transform: translate(var(--fx), var(--fy)) rotate(calc(var(--a) * .3 + 50deg)); opacity: 0; }
@keyframes pd-breathe { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }
.pd-dandelion { transform-origin: 52% 100%; animation: pd-breathe 4s ease-in-out infinite alternate; }

/* Seeds on the wind */
.pd-wind { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pd-drift { position: absolute; left: -40px; width: 22px; height: 40px; opacity: .55; top: calc(12% + var(--i) * 12%); animation: pd-float calc(16s + var(--i) * 3s) linear infinite; animation-delay: calc(var(--i) * -4.3s); }
.pd-drift:nth-child(even) { width: 16px; height: 30px; opacity: .4; }
@keyframes pd-float {
    0% { transform: translate(0, 0) rotate(20deg); }
    25% { transform: translate(28vw, -6vh) rotate(-10deg); }
    50% { transform: translate(55vw, 4vh) rotate(25deg); }
    75% { transform: translate(82vw, -8vh) rotate(-5deg); }
    100% { transform: translate(110vw, -2vh) rotate(18deg); }
}
.pd-hero, .pd-main, .pd-footer { position: relative; z-index: 1; }
/* The hero sits above the page so its sticky navigation stays on top of the sections */
.pd-hero { z-index: 2; }

/* ---------- Titles ---------- */
.pd-title { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto clamp(26px, 4vw, 44px); text-align: center; }
.pd-title-seed { width: 22px; height: 40px; flex: none; transform: rotate(18deg); }
.pd-title h2 { font-size: clamp(2rem, 6vw, 2.9rem); }

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

/* ---------- Hero ---------- */
.pd-hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 80px 16px 40px; overflow-x: hidden; overflow-x: clip; } /* the flying seeds would widen a phone screen */
.pd-hero-grid { display: grid; gap: 10px; width: min(1080px, 100%); margin: 0 auto; justify-items: center; text-align: center; }
.pd-hero-flower { width: min(300px, 64vw); }
.papadie .pd-name { font-family: var(--pd-script); font-weight: 400; font-size: clamp(6rem, 28vw, 13rem); line-height: .85; color: var(--inv-primary); overflow-wrap: anywhere; margin: 0 0 14px; }
.pd-hero-date { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }
.pd-hero-place { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--pd-ink-soft); margin: 4px 0 0; }
.papadie .pd-subtitle { max-width: 38ch; margin: 20px auto 0; color: var(--pd-ink-soft); font-size: 1.08rem; }
@media (min-width: 900px) {
    .pd-hero-grid { grid-template-columns: .8fr 1.2fr; align-items: center; text-align: left; justify-items: start; gap: 40px; }
    .pd-hero-flower { width: min(380px, 100%); justify-self: center; }
    .papadie .pd-subtitle { margin-left: 0; }
}

/* ---------- Sections ---------- */
.pd-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.pd-section { padding-top: clamp(70px, 11vw, 120px); }
.pd-card { background: var(--pd-card); border-radius: 26px; box-shadow: 0 24px 50px -36px color-mix(in srgb, var(--inv-text) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pd-lead { text-align: center; font-family: var(--inv-font-heading); font-size: 1.2rem; color: var(--pd-ink-soft); max-width: 40ch; margin: 0 auto 26px; }
.pd-wide-photo { margin: 0; border-radius: 32px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.pd-wide-photo img { width: 100%; height: 100%; object-fit: cover; }

.pd-welcome { text-align: center; max-width: 720px; margin: 0 auto; }
.pd-welcome-title { font-size: clamp(2.2rem, 7vw, 3.2rem); color: var(--inv-primary); margin-bottom: 16px; }
.pd-prose { font-size: 1.1rem; }
.pd-quote-author { font-family: var(--inv-font-heading); color: var(--inv-primary); }

/* Child: a wreath of fluff round the photo */
.pd-child { overflow-x: hidden; overflow-x: clip; } /* the turning wreath's square box, at 45deg, is wider than a phone screen */
.pd-child-grid { display: grid; gap: 34px; justify-items: center; text-align: center; }
.pd-wreath { position: relative; margin: 0; width: min(340px, 78vw); aspect-ratio: 1; display: grid; place-items: center; }
.pd-wreath-fluff { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: pd-turn 90s linear infinite; }
@keyframes pd-turn { to { transform: rotate(360deg); } }
.pd-wreath > img, .pd-wreath-initial { position: relative; width: 66%; height: 66%; object-fit: cover; border-radius: 50%; box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.pd-wreath-initial { display: grid; place-items: center; background: var(--inv-surface); font-family: var(--pd-script); font-size: 6rem; color: var(--inv-primary); }
.pd-child-name { font-family: var(--inv-font-heading); font-size: clamp(1.9rem, 6vw, 2.5rem); margin-bottom: 6px; }
.pd-child-born { color: var(--pd-ink-soft); }
.pd-child-born strong { font-weight: 500; color: var(--inv-text); }
.pd-child-message { font-family: var(--inv-font-heading); font-size: 1.2rem; max-width: 38ch; }
@media (min-width: 760px) { .pd-child-grid { grid-template-columns: minmax(0, 360px) 1fr; text-align: left; justify-items: start; align-items: center; gap: 60px; } }

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

/* Programme along a stem */
.pd-stemline { list-style: none; margin: 0 auto; padding: 0; max-width: 680px; position: relative; display: grid; gap: 26px; }
.pd-stemline::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--inv-primary) 55%, var(--inv-accent)); }
.pd-moment { position: relative; padding-left: 52px; }
.pd-bud { position: absolute; left: 6px; top: 28px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pd-tint); border: 2px solid color-mix(in srgb, var(--inv-primary) 55%, var(--inv-accent)); }
.pd-moment-card { padding: 24px 26px 20px; }
.pd-moment-time { font-family: var(--inv-font-heading); font-size: 2.1rem; line-height: 1; color: var(--inv-primary); margin-bottom: 8px; }
.pd-moment-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.pd-moment-place { font-weight: 500; margin: 10px 0 0; }
.pd-moment-address, .pd-moment-notes { color: var(--pd-ink-soft); margin: 0; }
.pd-moment-notes { margin-top: 6px; }
.pd-moment .kit-event-actions { justify-content: flex-start; }
.papadie .kit-button { border-radius: 999px; border: 1px solid var(--kit-field-border); color: var(--inv-primary); background: transparent; font-size: .82rem; font-weight: 400; padding: 9px 16px; text-decoration: none; }
.papadie .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown */
.pd-countdown { text-align: center; }
.pd-countdown .kit-countdown { gap: clamp(10px, 3vw, 24px); }
.pd-countdown .kit-countdown-unit { min-width: 0; }
.pd-countdown .kit-countdown-value { display: grid; place-items: center; width: clamp(70px, 19vw, 112px); aspect-ratio: 1; border-radius: 50%; background: var(--pd-card); box-shadow: 0 0 0 1px var(--kit-field-border), 0 16px 30px -20px color-mix(in srgb, var(--inv-text) 50%, transparent); font-size: clamp(1.8rem, 6vw, 2.6rem); color: var(--inv-primary); }
.pd-countdown .kit-countdown-label { margin-top: 10px; opacity: 1; color: var(--pd-ink-soft); }

/* Gallery */
.pd-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); }
.pd-gallery-grid.kit-gallery a { border-radius: 24px; aspect-ratio: 4 / 5; }
@media (min-width: 760px) { .pd-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP */
.pd-reply { max-width: 700px; margin: 0 auto; padding: clamp(30px, 6vw, 54px); }
.papadie .inv-rsvp__intro { font-family: var(--inv-font-heading); font-size: 1.15rem; }
.papadie .inv-rsvp__deadline { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--inv-primary); }
.papadie .inv-rsvp__choice label { border-radius: 999px; }

/* Info, contact */
.pd-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pd-info-item { padding: 26px 24px 14px; text-align: center; }
.pd-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 8px; }
.pd-faq { max-width: 720px; margin: 40px auto 0; text-align: center; }
.pd-faq details { text-align: left; margin-bottom: 10px; border-radius: 20px; }
.pd-faq summary { cursor: pointer; list-style: none; padding: 16px 50px 16px 22px; position: relative; font-family: var(--inv-font-heading); font-size: 1.12rem; border-radius: inherit; }
.pd-faq summary::-webkit-details-marker { display: none; }
.pd-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--inv-primary); font-size: 1.4rem; transition: transform .3s; }
.pd-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.pd-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.pd-faq details p { padding: 0 22px; color: var(--pd-ink-soft); }
.pd-faq details p:last-child { padding-bottom: 16px; }
.pd-contact { text-align: center; }
.pd-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.pd-contact-person a { text-decoration: none; }

/* Footer */
.pd-footer { text-align: center; padding: clamp(100px, 15vw, 160px) 16px 70px; }
.pd-footer-message { font-family: var(--inv-font-heading); font-size: 1.3rem; color: var(--pd-ink-soft); }
.pd-footer-name { font-family: var(--pd-script); font-size: clamp(4rem, 16vw, 7rem); line-height: 1; color: var(--inv-primary); margin: 4px 0 10px; }
.pd-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .pd-dandelion, .pd-drift, .pd-wreath-fluff { animation: none; }
    .pd-drift { display: none; }
    .pd-seed { transition: none; }
}
