/* ==========================================================================
   Petale - a warm, delicate wedding: rose petals falling through the page, carried sideways
   by the breeze of the scroll; handwritten names, rounded frames on pastel blocks
   Palette: --inv-primary (ink accent), --inv-accent (petal tint), --inv-bg, --inv-text
   script.js sets --gust (px) on .pt-wind while the page scrolls
   ========================================================================== */

.petale {
    --pt-script: 'Imperial Script', cursive;
    --pt-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --pt-tint: color-mix(in srgb, var(--inv-accent) 38%, var(--inv-bg));
    --pt-line: color-mix(in srgb, var(--inv-primary) 24%, transparent);
    --pt-card: color-mix(in srgb, var(--inv-surface) 90%, transparent);
    --pt-shadow: 0 24px 50px -34px color-mix(in srgb, var(--inv-primary) 55%, transparent);
    --kit-radius: 16px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--pt-line);
    font-family: var(--inv-font-body);
    font-size: 1.02rem;
    line-height: 1.7;
    background: var(--inv-bg);
    overflow-x: clip;
}
.petale h1, .petale h2, .petale 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(.petale) :is(h1, h2, h3) { margin: 0; }
:where(.petale) p { margin: 0 0 .9em; }
.petale a { color: var(--inv-primary); }
.pt-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.pt-role { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--pt-ink-soft); margin: 0 0 4px; }
.pt-names-line { font-family: var(--inv-font-heading); font-size: 1.4rem; margin: 0; }

/* ---------- Petals ---------- */
.pt-petal { display: block; overflow: visible; }
.pt-petal-body { fill: color-mix(in srgb, var(--inv-accent) 85%, var(--inv-primary)); }
.pt-petal-crease { fill: none; stroke: color-mix(in srgb, var(--inv-primary) 30%, transparent); stroke-width: 1; stroke-linecap: round; }
.pt-air { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pt-wind { position: absolute; inset: -10% -20%; transform: translateX(calc(var(--gust, 0) * 1px)) skewX(calc(var(--gust, 0) * -.08deg)); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.pt-fall { position: absolute; top: -60px; left: var(--x); width: var(--s); animation: pt-fall var(--d) linear infinite; animation-delay: var(--delay); }
.pt-fall .pt-petal { animation: pt-spin calc(var(--d) / 3) ease-in-out infinite alternate; transform: rotate(var(--r)); }
.pt-tone-1 .pt-petal-body { fill: var(--inv-accent); }
.pt-tone-2 .pt-petal-body { fill: color-mix(in srgb, var(--inv-accent) 55%, white); }
@keyframes pt-fall {
    0% { transform: translate(0, 0); opacity: 0; }
    8% { opacity: .9; }
    25% { transform: translate(40px, 30vh); }
    50% { transform: translate(-20px, 60vh); }
    75% { transform: translate(50px, 90vh); }
    100% { transform: translate(10px, 125vh); opacity: .7; }
}
@keyframes pt-spin { from { transform: rotate(var(--r)) rotateX(0deg); } to { transform: rotate(calc(var(--r) + 120deg)) rotateX(60deg); } }
.pt-hero, .pt-main, .pt-footer { position: relative; z-index: 1; }
/* The hero sits above the page so its sticky navigation stays on top of the sections */
.pt-hero { z-index: 2; }

/* ---------- Titles ---------- */
.pt-title { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto clamp(26px, 4vw, 44px); text-align: center; }
.pt-title-petal { width: 20px; transform: rotate(-24deg); flex: none; }
.pt-title h2 { font-size: clamp(2.1rem, 6vw, 3rem); }

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

/* ---------- Hero ---------- */
.pt-hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 84px clamp(16px, 4vw, 40px) 50px; }
.pt-hero-grid { display: grid; gap: 34px; width: min(1120px, 100%); margin: 0 auto; justify-items: center; text-align: center; }
/* The photo in a rounded frame, set on a pastel block offset behind it */
.pt-hero-photo { position: relative; margin: 0; width: min(440px, 84vw); aspect-ratio: 4 / 5; }
.pt-hero-photo::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border-radius: 200px 200px 28px 28px; background: var(--pt-tint); z-index: -1; }
.pt-hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 200px 200px 28px 28px; box-shadow: var(--pt-shadow); }
.petale .pt-names { font-family: var(--pt-script); font-size: clamp(4.4rem, 15vw, 8rem); line-height: .95; color: var(--inv-primary); display: grid; justify-items: center; overflow-wrap: anywhere; }
.pt-and { font-family: var(--inv-font-heading); font-style: italic; font-size: .32em; color: var(--pt-ink-soft); margin: .1em 0; }
.pt-hero-date { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 18px 0 2px; }
.pt-hero-place { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--pt-ink-soft); margin: 0; }
.petale .pt-subtitle { max-width: 38ch; margin: 18px auto 0; color: var(--pt-ink-soft); font-size: 1.08rem; }
@media (min-width: 900px) {
    .pt-hero-grid { grid-template-columns: .95fr 1.05fr; align-items: center; gap: 70px; }
}
@keyframes pt-bloom { from { opacity: 0; transform: scale(.94); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.kit-js .pt-names { animation: pt-bloom 1.6s ease .2s both; }

/* ---------- Sections ---------- */
.pt-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.pt-section { padding-top: clamp(70px, 11vw, 120px); }
.pt-card { background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 24px; box-shadow: var(--pt-shadow); }
.pt-block { background: var(--pt-tint); border-radius: 36px; padding: clamp(34px, 6vw, 64px); text-align: center; max-width: 820px; margin: 0 auto; }
.pt-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.2rem; color: var(--pt-ink-soft); max-width: 40ch; margin: 0 auto 26px; }

.pt-welcome-title { font-family: var(--pt-script); font-size: clamp(3rem, 10vw, 4.6rem); color: var(--inv-primary); margin-bottom: 12px; font-weight: 400; }
.pt-block p { font-size: 1.1rem; }
.pt-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }

/* Couple: two portraits at the same height */
.pt-couple-grid { display: grid; gap: 40px; justify-items: center; }
.pt-person { text-align: center; max-width: 380px; }
.pt-portrait { margin: 0 auto 20px; width: min(300px, 70vw); aspect-ratio: 4 / 5; border-radius: 999px; overflow: hidden; border: 8px solid var(--inv-surface); box-shadow: 0 0 0 1px var(--pt-line), var(--pt-shadow); }
.pt-portrait img, .pt-initial { width: 100%; height: 100%; object-fit: cover; }
.pt-initial { display: grid; place-items: center; background: var(--pt-tint); font-family: var(--pt-script); font-size: 6rem; color: var(--inv-primary); }
.pt-person h3 { font-size: 1.7rem; margin-bottom: 8px; }
.pt-person p { color: var(--pt-ink-soft); }
@media (min-width: 760px) { .pt-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

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

/* Story */
.pt-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 7vw, 70px); }
.pt-chapter { display: grid; gap: 24px; align-items: center; }
.pt-chapter-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; box-shadow: var(--pt-shadow); }
.pt-chapter-photo img { width: 100%; height: 100%; object-fit: cover; }
.pt-chapter-text h3 { font-size: 1.9rem; margin-bottom: 8px; }
.pt-chapter-text p:not(.pt-kicker) { color: var(--pt-ink-soft); }
@media (min-width: 900px) {
    .pt-chapter { grid-template-columns: 1fr 1fr; gap: 56px; }
    .pt-chapter:nth-child(even) .pt-chapter-photo { order: 2; }
}

/* Programme */
.pt-moments { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pt-moment { position: relative; padding: 30px 26px 24px; text-align: center; overflow: hidden; }
.pt-moment-petal { position: absolute; right: 18px; top: 16px; width: 22px; transform: rotate(30deg); opacity: .8; }
.pt-moment-time { font-family: var(--inv-font-heading); font-size: 2.4rem; line-height: 1; color: var(--inv-primary); margin-bottom: 10px; }
.pt-moment h3 { font-size: 1.5rem; margin-bottom: 4px; }
.pt-moment-place { font-weight: 500; margin: 12px 0 0; }
.pt-moment-address, .pt-moment-notes { color: var(--pt-ink-soft); margin: 0; }
.pt-moment-notes { font-style: italic; margin-top: 6px; }
.petale .kit-button { border-radius: 999px; border: 1px solid var(--pt-line); color: var(--inv-primary); background: transparent; font-size: .8rem; padding: 9px 16px; text-decoration: none; }
.petale .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown */
.pt-countdown { text-align: center; }
.pt-countdown .kit-countdown { gap: clamp(10px, 3vw, 24px); }
.pt-countdown .kit-countdown-unit { min-width: 0; }
.pt-countdown .kit-countdown-value { display: grid; place-items: center; width: clamp(70px, 19vw, 112px); aspect-ratio: 1; border-radius: 50%; background: var(--pt-tint); font-family: var(--inv-font-heading); font-size: clamp(1.8rem, 6vw, 2.6rem); color: var(--inv-primary); }
.pt-countdown .kit-countdown-label { margin-top: 10px; opacity: 1; color: var(--pt-ink-soft); }

/* Gallery: an even grid, every photo the same shape */
.pt-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); }
.pt-gallery-grid.kit-gallery a { border-radius: 24px; aspect-ratio: 4 / 5; box-shadow: var(--pt-shadow); }
@media (min-width: 760px) { .pt-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

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

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

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

@media (prefers-reduced-motion: reduce) {
    .pt-fall, .pt-fall .pt-petal, .kit-js .pt-names { animation: none; }
    .pt-fall { display: none; }
    .pt-wind { transition: none; }
}
