/* ==========================================================================
   Verighete - wedding rings: two interlocked rings turn in 3D above the names and with the page as the guest
   scrolls, a glint of light circling each band; small sparks twinkle over the page; round gold frames; the rings
   draw close and join at the end
   Palette: --inv-primary (the deep metal tone, titles), --inv-accent (the light metal tone), --inv-bg, --inv-text
   script.js places the sparks and sets --vr-scroll (how far the rings have turned) on <body>
   ========================================================================== */

@property --vr-glint { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.verighete {
    --vr-script: 'Bonheur Royale', 'Segoe Script', cursive;
    --vr-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --vr-gold: color-mix(in srgb, var(--inv-primary) 45%, var(--inv-accent));
    --vr-gold-light: color-mix(in srgb, var(--inv-accent) 55%, white);
    --vr-gold-deep: color-mix(in srgb, var(--inv-primary) 85%, black);
    --vr-metal: conic-gradient(from var(--vr-glint), #fff 0deg, var(--vr-gold-light) 14deg, var(--vr-gold) 50deg, var(--vr-gold-deep) 110deg, var(--vr-gold) 170deg, var(--vr-gold-light) 210deg, var(--vr-gold) 260deg, var(--vr-gold-deep) 320deg, var(--vr-gold-light) 350deg, #fff 360deg);
    --vr-line: color-mix(in srgb, var(--vr-gold) 55%, transparent);
    --vr-card: color-mix(in srgb, var(--inv-surface) 88%, transparent);
    --vr-shadow: 0 26px 60px -36px color-mix(in srgb, var(--inv-primary) 55%, transparent);
    --kit-radius: 4px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--vr-line);
    font-family: var(--inv-font-body);
    font-size: 1rem;
    line-height: 1.75;
    background:
        radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--inv-accent) 24%, transparent), transparent 70%),
        var(--inv-bg);
    overflow-x: clip;
}
.verighete h1, .verighete h2, .verighete h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.15; }
:where(.verighete) :is(h1, h2, h3) { margin: 0; }
:where(.verighete) p { margin: 0 0 .9em; }
.verighete a { color: var(--inv-primary); }
.vr-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.vr-role { font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--vr-ink-soft); margin: 0 0 6px; }
.vr-names-line { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }

/* ---------- The rings ---------- */
.vr-rings { --s: 70px; --band: calc(var(--s) * .12); display: block; position: relative; width: calc(var(--s) * 1.62); height: var(--s); margin: 0 auto; perspective: calc(var(--s) * 8); }
.vr-rings-turn, .vr-rings-sway { display: block; position: absolute; inset: 0; transform-style: preserve-3d; }
.vr-rings-turn { transform: rotateY(calc(var(--vr-scroll, 0) * 1deg)); }
.vr-rings-sway { animation: vr-sway 10s ease-in-out infinite; }
.vr-ring {
    position: absolute; top: 0; width: var(--s); height: var(--s); border-radius: 50%;
    background: var(--vr-metal);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--band) - 1px), #000 calc(100% - var(--band)));
    mask: radial-gradient(farthest-side, transparent calc(100% - var(--band) - 1px), #000 calc(100% - var(--band)));
    animation: vr-glint 5s linear infinite;
    transition: translate 1.8s cubic-bezier(.2, .8, .2, 1);
}
/* Tilted in opposite directions about the horizontal axis: the planes cross along a horizontal line, so one band
   passes in front of the other at the top and behind it at the bottom, as interlocked rings do */
.vr-ring-a { left: 0; transform: rotateX(48deg); }
.vr-ring-b { left: calc(var(--s) * .62); transform: rotateX(-48deg); animation-delay: -2.5s; }
@keyframes vr-glint { to { --vr-glint: 360deg; } }
@keyframes vr-sway { 0%, 100% { transform: rotateX(8deg) rotateY(-24deg); } 50% { transform: rotateX(-6deg) rotateY(24deg); } }
.vr-rings-hero { --s: clamp(64px, 14vw, 92px); margin-bottom: 26px; filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--inv-primary) 30%, transparent)); }
.vr-rings-small { --s: 24px; margin: 0; }
.vr-rings-footer { --s: 74px; margin-bottom: 26px; }
/* At the end the rings start apart and come together when the footer reaches the screen */
.kit-js .vr-rings-footer .vr-ring-a { translate: calc(var(--s) * -.6) 0; }
.kit-js .vr-rings-footer .vr-ring-b { translate: calc(var(--s) * .6) 0; }
.kit-js .vr-footer.is-visible .vr-rings-footer .vr-ring { translate: 0 0; }

/* Sparks: four-pointed stars that twinkle */
.vr-sparks { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.vr-spark { position: absolute; width: 14px; height: 14px; background: var(--vr-gold); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; filter: drop-shadow(0 0 4px var(--vr-gold-light)); animation: vr-twinkle 4s ease-in-out infinite; }
.vr-spark.is-once { animation-iteration-count: 1; animation-duration: 1.4s; }
@keyframes vr-twinkle { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

.vr-card { background: var(--vr-card); border: 1px solid var(--vr-line); border-radius: 4px; box-shadow: var(--vr-shadow); outline: 1px solid color-mix(in srgb, var(--vr-gold) 30%, transparent); outline-offset: -7px; }

/* ---------- Titles ---------- */
.vr-title { margin: 0 auto clamp(28px, 4.5vw, 46px); text-align: center; }
.vr-title-mark { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.vr-title-mark > span:not(.vr-rings) { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, var(--vr-gold)); }
.vr-title-mark > span:last-child { transform: scaleX(-1); }
.vr-title h2 { font-size: clamp(2rem, 5.6vw, 2.9rem); }

/* ---------- Navigation ---------- */
.vr-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.vr-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; }
.vr-nav a { text-decoration: none; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--inv-text); padding: 6px 0; border-bottom: 1px solid transparent; }
.vr-nav a:hover, .vr-nav a.is-current { color: var(--inv-primary); border-bottom-color: currentColor; }
.vr-nav .kit-nav-brand { font-family: var(--vr-script); font-size: 1.9rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; border: 0; line-height: 1; }
.vr-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(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--vr-line); }
.verighete .kit-to-top { border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--vr-line); }
@media (max-width: 899px) {
    .vr-nav { justify-content: flex-end; padding: 12px; }
    .vr-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--vr-line); font-size: 1.2rem; }
    .vr-nav .kit-nav-links { display: none; }
    .vr-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: 6px; background: var(--inv-surface); box-shadow: var(--vr-shadow);
    }
    .vr-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the rings, the names in calligraphy, a wide photo in a double gold frame ---------- */
.vr-hero { position: relative; z-index: 2; padding: clamp(96px, 12vw, 130px) 16px 0; text-align: center; }
.vr-hero-text { max-width: 760px; margin: 0 auto; }
.verighete .vr-names { font-family: var(--vr-script); font-weight: 400; font-size: clamp(3.8rem, 13vw, 7rem); line-height: 1; color: var(--inv-primary); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .25em; overflow-wrap: anywhere; margin: 4px 0 6px; }
.vr-and { font-family: var(--inv-font-heading); font-size: .36em; color: var(--vr-gold); }
.vr-hero-date { display: flex; align-items: center; justify-content: center; gap: 16px; font-family: var(--inv-font-heading); font-size: clamp(1.05rem, 3.6vw, 1.25rem); letter-spacing: .08em; margin: 14px 0 4px; }
.vr-hero-date::before, .vr-hero-date::after { content: ""; flex: none; width: clamp(24px, 8vw, 70px); height: 1px; background: var(--vr-gold); }
.vr-hero-place { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--vr-ink-soft); margin: 0; }
.vr-hero-photo { margin: clamp(36px, 6vw, 56px) auto 0; width: min(1040px, calc(100% - 20px)); aspect-ratio: 4 / 5; outline: 1px solid var(--vr-line); outline-offset: 10px; box-shadow: var(--vr-shadow); }
.vr-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.verighete .vr-subtitle { max-width: 44ch; margin: 34px auto 0; font-family: var(--inv-font-heading); font-size: 1.2rem; color: var(--vr-ink-soft); }
@media (min-width: 700px) { .vr-hero-photo { aspect-ratio: 16 / 8; } }
@keyframes vr-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.kit-js .vr-hero-text > *, .kit-js .vr-hero-photo { animation: vr-in 1.2s ease both; }
.kit-js .vr-hero-text > :nth-child(2) { animation-delay: .2s; }
.kit-js .vr-hero-text > :nth-child(3) { animation-delay: .4s; }
.kit-js .vr-hero-text > :nth-child(n+4) { animation-delay: .6s; }
.kit-js .vr-hero-photo { animation-delay: .8s; }

/* ---------- Sections ---------- */
.vr-main { width: min(1060px, 100%); margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.vr-section { padding-top: clamp(80px, 11vw, 124px); }
.vr-welcome { text-align: center; max-width: 720px; margin: 0 auto; }
.verighete .vr-welcome-title { font-family: var(--vr-script); font-size: clamp(3rem, 9vw, 4.2rem); color: var(--inv-primary); margin-bottom: 10px; }
.vr-welcome p { font-size: 1.08rem; }
.vr-quote-author { font-family: var(--inv-font-heading); color: var(--inv-primary); }
.vr-lead { text-align: center; font-family: var(--inv-font-heading); font-size: 1.22rem; color: var(--vr-ink-soft); max-width: 40ch; margin: 0 auto 26px; }

/* Couple: round portraits in a gold band whose glint circles them */
.vr-couple-grid { display: grid; gap: 50px; justify-items: center; }
.vr-person { text-align: center; max-width: 380px; }
.vr-portrait { position: relative; margin: 0 auto 26px; width: min(250px, 62vw); aspect-ratio: 1; padding: 12px; }
.vr-portrait::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--vr-metal); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); animation: vr-glint 6s linear infinite; }
.vr-portrait img, .vr-initial { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vr-initial { display: grid; place-items: center; background: color-mix(in srgb, var(--inv-accent) 20%, var(--inv-bg)); font-family: var(--vr-script); font-size: 5.5rem; color: var(--inv-primary); }
.vr-person:nth-child(2) .vr-portrait::before { animation-delay: -3s; }
.vr-person h3 { font-size: 1.6rem; margin: 6px 0 8px; }
.vr-person p { color: var(--vr-ink-soft); }
@media (min-width: 760px) { .vr-couple-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

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

/* Story */
.vr-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(46px, 7vw, 76px); }
.vr-chapter { display: grid; gap: 28px; align-items: center; }
.vr-chapter-photo { margin: 0 10px; aspect-ratio: 4 / 3; outline: 1px solid var(--vr-line); outline-offset: 8px; box-shadow: var(--vr-shadow); }
.vr-chapter-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vr-chapter-text h3 { font-size: 1.85rem; margin-bottom: 8px; }
.vr-chapter-text p:not(.vr-kicker) { color: var(--vr-ink-soft); }
@media (min-width: 900px) {
    .vr-chapter { grid-template-columns: 1fr 1fr; gap: 62px; }
    .vr-chapter:nth-child(even) .vr-chapter-photo { order: 2; }
}

/* Programme */
.vr-moments { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.vr-moment { padding: 34px 28px 28px; text-align: center; }
.vr-moment-time { font-family: var(--inv-font-heading); font-size: 2.4rem; line-height: 1; color: var(--inv-primary); margin-bottom: 12px; }
.vr-moment h3 { font-size: 1.45rem; margin-bottom: 6px; }
.vr-moment-place { font-weight: 600; margin: 12px 0 0; }
.vr-moment-address, .vr-moment-notes { color: var(--vr-ink-soft); margin: 0; }
.vr-moment-notes { font-style: italic; margin-top: 6px; }
.verighete .kit-button { border-radius: 2px; border: 1px solid var(--vr-line); color: var(--inv-primary); background: transparent; font-size: .74rem; letter-spacing: .08em; padding: 9px 16px; text-decoration: none; }
.verighete .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: every number inside a gold ring */
.vr-countdown { text-align: center; }
.vr-countdown .kit-countdown { gap: clamp(8px, 3vw, 26px); }
.vr-countdown .kit-countdown-unit { min-width: 0; }
.vr-countdown .kit-countdown-value { position: relative; display: grid; place-items: center; width: clamp(70px, 19vw, 112px); aspect-ratio: 1; font-family: var(--inv-font-heading); font-size: clamp(1.7rem, 6vw, 2.5rem); color: var(--inv-primary); }
.vr-countdown .kit-countdown-value::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--vr-metal); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: vr-glint 7s linear infinite; }
.vr-countdown .kit-countdown-unit:nth-child(2) .kit-countdown-value::before { animation-delay: -1.75s; }
.vr-countdown .kit-countdown-unit:nth-child(3) .kit-countdown-value::before { animation-delay: -3.5s; }
.vr-countdown .kit-countdown-unit:nth-child(4) .kit-countdown-value::before { animation-delay: -5.25s; }
.vr-countdown .kit-countdown-label { margin-top: 10px; opacity: 1; color: var(--vr-ink-soft); }

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

/* RSVP */
.vr-reply { max-width: 700px; margin: 0 auto; padding: clamp(34px, 6vw, 58px); }
.verighete .inv-rsvp__intro { font-family: var(--inv-font-heading); font-size: 1.12rem; }
.verighete .inv-rsvp__deadline { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }

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

/* Footer */
.vr-footer { position: relative; z-index: 1; text-align: center; padding: clamp(100px, 15vw, 160px) 16px 70px; }
.vr-footer-message { font-family: var(--inv-font-heading); font-size: 1.25rem; color: var(--vr-ink-soft); }
.vr-footer-names { font-family: var(--vr-script); font-size: clamp(3.2rem, 11vw, 5.4rem); line-height: 1.05; color: var(--inv-primary); margin: 6px 0 10px; }
.vr-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .vr-ring, .vr-rings-sway, .vr-portrait::before, .vr-countdown .kit-countdown-value::before, .vr-spark,
    .kit-js .vr-hero-text > *, .kit-js .vr-hero-photo { animation: none; }
    .vr-ring { transition: none; }
    .vr-spark { opacity: .7; transform: scale(.7) rotate(45deg); }
}
