/* ==========================================================================
   Invits - greenery and violet: a round medallion whose text turns slowly
   Signature: the names sit in a coloured medallion over a garden photo; around
   it, the invitation text (announcement, date, place) is set on a circle and
   rotates slowly like a living seal. Every moment of the day gets its own small
   turning medallion; titles sit between leaf sprigs.
   Palette: --inv-primary (violet / garden / plum), --inv-accent (leaf), --inv-bg, --inv-text
   ========================================================================== */

.invits {
    --iv-leaf: var(--inv-accent);
    --iv-soft: color-mix(in srgb, var(--inv-primary) 7%, var(--inv-bg));
    --iv-muted: color-mix(in srgb, var(--inv-text) 64%, var(--inv-bg));
    --iv-sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 20'%3E%3Cpath d='M2 10 H58' stroke='black' stroke-width='1.6'/%3E%3Cg%3E%3Cellipse cx='14' cy='6' rx='6' ry='2.6' transform='rotate(-25 14 6)'/%3E%3Cellipse cx='14' cy='14' rx='6' ry='2.6' transform='rotate(25 14 14)'/%3E%3Cellipse cx='28' cy='6' rx='6' ry='2.6' transform='rotate(-25 28 6)'/%3E%3Cellipse cx='28' cy='14' rx='6' ry='2.6' transform='rotate(25 28 14)'/%3E%3Cellipse cx='42' cy='6' rx='6' ry='2.6' transform='rotate(-25 42 6)'/%3E%3Cellipse cx='42' cy='14' rx='6' ry='2.6' transform='rotate(25 42 14)'/%3E%3Cellipse cx='54' cy='10' rx='5' ry='2.6'/%3E%3C/g%3E%3C/svg%3E");
    --kit-radius: 999px;
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.invits h1, .invits h2, .invits h3 { font-family: var(--inv-font-heading); font-weight: 600; line-height: 1.1; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.invits) :is(h1, h2, h3) { margin: 0; }
.iv-kicker { font-size: .72rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; margin: 0 0 6px; }

/* ---------- Medallion ---------- */
.iv-medallion { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.iv-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: iv-turn 60s linear infinite; }
@keyframes iv-turn { to { rotate: 360deg; } }
.iv-ring-edge { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .8; }
.iv-ring-edge--dashed { stroke-dasharray: 3 5; opacity: .6; }
.iv-ring-text { fill: currentColor; font-family: var(--inv-font-body); font-size: 13.5px; font-weight: 500; letter-spacing: .12em; }
.iv-ring-text--small { font-size: 9px; }
.iv-medallion-core { position: relative; text-align: center; padding: 0 16%; }

/* ---------- Navigation ---------- */
.iv-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 16px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; }
.iv-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 18px; }
.iv-nav a { text-decoration: none; font-size: .86rem; font-weight: 400; color: #fff; padding: 4px 0; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.iv-nav a:hover, .iv-nav a.is-current { color: color-mix(in srgb, var(--iv-leaf) 60%, #fff); }
.iv-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 1.6rem; font-weight: 700; margin-right: auto; }
.iv-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 95%, transparent); box-shadow: 0 1px 0 color-mix(in srgb, var(--inv-primary) 18%, transparent); }
.iv-nav.is-stuck a { color: var(--iv-muted); text-shadow: none; }
.iv-nav.is-stuck a:hover, .iv-nav.is-stuck a.is-current, .iv-nav.is-stuck .kit-nav-brand { color: var(--inv-primary); }
.invits .kit-to-top { background: var(--inv-primary); color: #fff; }
@media (max-width: 899px) {
    .iv-nav { padding: 10px 12px; }
    .iv-nav .kit-nav-toggle { color: #fff; font-size: 1.5rem; margin-left: auto; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
    .iv-nav.is-stuck .kit-nav-toggle { color: var(--inv-primary); text-shadow: none; }
    .iv-nav .kit-nav-links { display: none; }
    .iv-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 12px; position: absolute; top: 58px; left: 12px; right: 12px; padding: 22px; background: var(--inv-bg); border-radius: 20px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3); }
    .iv-nav.is-open a { color: var(--inv-text); text-shadow: none; }
}

/* ---------- Hero ---------- */
.iv-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 90px 18px 60px; overflow: hidden; isolation: isolate; background: #2E3B2A; }
.iv-hero-photo { position: absolute; inset: 0; z-index: -2; }
.iv-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.iv-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .05), rgba(0, 0, 0, .35)); }
.iv-hero-inner { display: grid; justify-items: center; gap: 22px; }
.iv-medallion--hero { width: min(470px, 88vw); color: #fff; }
.iv-medallion--hero::before { content: ""; position: absolute; inset: 13%; border-radius: 50%; background: color-mix(in srgb, var(--inv-primary) 88%, transparent); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.iv-medallion--hero::after { content: ""; position: absolute; inset: 1%; border-radius: 50%; background: color-mix(in srgb, var(--inv-primary) 35%, transparent); backdrop-filter: blur(2px); z-index: -1; }
.iv-medallion--hero .iv-ring { color: #fff; }
.iv-medallion--hero .iv-kicker { color: rgba(255, 255, 255, .85); }
.iv-names { font-size: clamp(2.6rem, 8vw, 3.8rem); color: #fff; line-height: 1; }
.iv-names span { display: block; }
.iv-names em { display: block; font-style: italic; font-size: .55em; margin: .1em 0; opacity: .85; }
.iv-hero-date { margin: 10px 0 0; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.iv-subtitle { max-width: 520px; margin: 0; padding: 10px 22px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--inv-text); text-align: center; font-size: .96rem; }

/* ---------- Sections ---------- */
.iv-section { max-width: 1040px; margin: 0 auto; padding: clamp(64px, 9vw, 100px) 22px; }
.iv-welcome, .iv-family, .iv-countdown, .iv-contact { text-align: center; }
.iv-title { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 30px; text-align: center; }
.iv-title h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--inv-primary); }
.iv-sprig { flex: none; width: 56px; height: 20px; background: var(--iv-leaf); -webkit-mask: var(--iv-sprig) center / contain no-repeat; mask: var(--iv-sprig) center / contain no-repeat; }
.iv-sprig--r { scale: -1 1; }
.iv-prose { max-width: 620px; margin: 0 auto; font-size: 1.06rem; text-align: center; }
.iv-prose p { margin: 0 0 1em; }
.iv-quote-author { font-style: italic; }
.iv-lead { color: var(--iv-muted); margin: 0 0 22px; }

/* Couple: round portraits in a dashed ring */
.iv-couple-grid { display: grid; gap: 50px; }
@media (min-width: 760px) { .iv-couple-grid { grid-template-columns: 1fr 1fr; gap: 60px; } }
.iv-person { text-align: center; }
.iv-portrait { margin: 0 auto 20px; width: min(260px, 66vw); aspect-ratio: 1; padding: 12px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--inv-primary) 50%, transparent); }
.iv-portrait img, .iv-initial { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.iv-initial { display: grid; place-items: center; background: var(--iv-soft); font-family: var(--inv-font-heading); font-size: 5rem; color: var(--inv-primary); }
.iv-person h3 { font-size: 1.8rem; color: var(--inv-primary); margin-bottom: 6px; }
.iv-person p { color: var(--iv-muted); max-width: 380px; margin: 0 auto; }

/* Family */
.iv-family-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0; }
.iv-family-list div { min-width: 220px; padding: 18px 26px; border-radius: 999px; background: var(--iv-soft); }
.iv-family-list dt { font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.iv-family-list dd { margin: 4px 0 0; font-family: var(--inv-font-heading); font-size: 1.35rem; }

/* Story */
.iv-story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 60px; }
.iv-story-item { display: grid; gap: 30px; align-items: center; }
@media (min-width: 760px) { .iv-story-item { grid-template-columns: 300px 1fr; gap: 56px; } .iv-story-item:nth-child(even) { grid-template-columns: 1fr 300px; } .iv-story-item:nth-child(even) .iv-story-photo { order: 2; } }
.iv-story-photo { margin: 0 auto; width: min(300px, 76vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.iv-story-photo img { width: 100%; height: 100%; object-fit: cover; }
.iv-story-text h3 { font-size: 1.7rem; color: var(--inv-primary); margin-bottom: 8px; }
.iv-story-text p { margin: 0 0 .6em; }

/* Events with their own small turning medallion */
.iv-event-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.iv-event { padding: 26px 22px 28px; text-align: center; border-radius: 26px; background: var(--iv-soft); }
.iv-event-badge { position: relative; display: grid; place-items: center; width: 110px; height: 110px; margin: 0 auto 12px; color: var(--inv-primary); }
.iv-event-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: iv-turn 40s linear infinite; }
.iv-event:nth-child(even) .iv-event-badge svg { animation-direction: reverse; }
.iv-event-badge span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--inv-primary); color: #fff; font-family: var(--inv-font-heading); font-size: 1.6rem; }
.iv-event-time { font-family: var(--inv-font-heading); font-size: 2.2rem; color: var(--inv-primary); margin: 0; line-height: 1; }
.iv-event h3 { font-size: 1.4rem; margin: 6px 0 4px; }
.iv-event-place { font-weight: 500; margin: 10px 0 0; }
.iv-event-address, .iv-event-notes { color: var(--iv-muted); margin: 4px 0 0; font-size: .92rem; }
.invits .kit-event-actions { justify-content: center; margin-top: 14px; }
.invits .kit-button { border-radius: 999px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; }
.invits .kit-button:hover { background: var(--inv-primary); color: #fff; }

/* Countdown */
.iv-countdown .kit-countdown { gap: clamp(8px, 2.5vw, 22px); margin-top: 12px; }
.iv-countdown .kit-countdown-unit { width: clamp(76px, 18vw, 116px); aspect-ratio: 1; min-width: 0; align-content: center; border-radius: 50%; background: var(--inv-primary); color: #fff; box-shadow: 0 0 0 6px var(--inv-bg), 0 0 0 7px color-mix(in srgb, var(--inv-primary) 40%, transparent); }
.iv-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-size: clamp(1.8rem, 5.5vw, 2.8rem); }
.iv-countdown .kit-countdown-label { font-size: clamp(.56rem, 1.6vw, .7rem); opacity: .85; }

/* Gallery */
.iv-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 760px) { .iv-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.iv-gallery-grid a { aspect-ratio: 1; border-radius: 50%; }
.iv-gallery-grid a:nth-child(3n+2) { border-radius: 24px; }

/* RSVP */
.iv-rsvp-card { max-width: 660px; margin: 0 auto; padding: clamp(28px, 5vw, 50px); border-radius: 28px; background: #fff; box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--inv-primary) 45%, #000); text-align: center; }
.invits .inv-rsvp__submit { border-radius: 999px; font-weight: 500; }

/* Info */
.iv-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.iv-info-item { padding: 24px; border-radius: 24px; background: var(--iv-soft); text-align: center; }
.iv-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 6px; }
.iv-info-item p { margin: 0 0 .5em; }
.iv-faq { max-width: 700px; margin: 44px auto 0; text-align: center; }
.iv-faq details { text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--inv-primary) 18%, transparent); padding: 14px 4px; }
.iv-faq summary { cursor: pointer; list-style: none; font-weight: 500; }
.iv-faq summary::-webkit-details-marker { display: none; }
.iv-faq summary::before { content: "❀"; color: var(--iv-leaf); margin-right: 10px; }
.iv-faq details p { margin: 8px 0 0 26px; color: var(--iv-muted); }

/* Contact */
.iv-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 60px; }
.iv-contact-name { font-family: var(--inv-font-heading); font-size: 1.8rem; color: var(--inv-primary); margin: 0 0 2px; }
.iv-contact-person a { color: var(--inv-text); text-decoration: none; }

/* Footer */
.iv-footer { padding: 60px 22px; text-align: center; background: var(--inv-primary); color: #fff; }
.iv-footer-message { margin: 0 0 4px; opacity: .85; }
.iv-footer-names { font-family: var(--inv-font-heading); font-size: clamp(2.6rem, 7vw, 3.8rem); margin: 0 0 6px; }
.iv-hashtag { margin: 0 0 6px; letter-spacing: .06em; }
.iv-footer .iv-kicker { color: rgba(255, 255, 255, .75); }

@media (prefers-reduced-motion: reduce) { .iv-ring, .iv-event-badge svg { animation: none; } }
.invits textarea { border-radius: 22px; }
@media (max-width: 480px) { .iv-medallion-core { padding: 0 20%; } .iv-hero-date { font-size: .66rem; letter-spacing: .12em; } }
