/* ==========================================================================
   Regal - classic and solemn, every section inside an engraved baroque frame
   Signature: SVG acanthus corners + double rules around each section; the
   scrolls draw themselves (stroke-dashoffset) when the frame is revealed;
   calligraphic names under an engraved crown.
   Palette: --inv-primary (bordeaux / royal blue / black), --inv-accent (gold), --inv-bg, --inv-text
   ========================================================================== */

.regal {
    --rg-script: "Pinyon Script", cursive;
    --rg-ink: var(--inv-accent);
    --rg-muted: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --rg-rule: color-mix(in srgb, var(--inv-accent) 70%, transparent);
    --rg-paper: color-mix(in srgb, #fff 55%, var(--inv-bg));
    --kit-radius: 2px;
    font-family: var(--inv-font-body);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--inv-text);
    background:
        radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--inv-accent) 10%, transparent), transparent 60%),
        var(--inv-bg);
    overflow-x: clip;
}
.regal h1, .regal h2, .regal h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.1; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.regal) :is(h1, h2, h3) { margin: 0; }
.rg-kicker { font-size: .74rem; letter-spacing: .32em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }

/* ---------- Engraving ---------- */
.rg-line { fill: none; stroke: var(--rg-ink); stroke-width: 1.4; stroke-linecap: round; }
.rg-hatch { fill: none; stroke: var(--rg-ink); stroke-width: .8; opacity: .8; }
.rg-leaf { fill: color-mix(in srgb, var(--rg-ink) 18%, transparent); stroke: var(--rg-ink); stroke-width: 1; }
.rg-dot { fill: var(--rg-ink); }

/* Frame: double rule + four mirrored corners */
.rg-frame { position: relative; padding: clamp(46px, 7vw, 76px) clamp(22px, 6vw, 70px); }
.rg-frame::before, .rg-frame::after { content: ""; position: absolute; pointer-events: none; border: 1px solid var(--rg-rule); }
.rg-frame::before { inset: 16px; }
.rg-frame::after { inset: 22px; border-width: 3px; border-style: double; opacity: .55; }
.rg-corner { position: absolute; width: clamp(64px, 11vw, 110px); height: auto; z-index: 1; }
.rg-corner--tl { top: 4px; left: 4px; }
.rg-corner--tr { top: 4px; right: 4px; scale: -1 1; }
.rg-corner--bl { bottom: 4px; left: 4px; scale: 1 -1; }
.rg-corner--br { bottom: 4px; right: 4px; scale: -1 -1; }
.rg-frame-inner { position: relative; z-index: 2; }
.rg-frame.kit-reveal .rg-line { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 2.2s ease .2s; }
.rg-frame.kit-reveal .rg-leaf, .rg-frame.kit-reveal .rg-hatch, .rg-frame.kit-reveal .rg-dot { opacity: 0; transition: opacity 1s ease 1.4s; }
.rg-frame.is-visible .rg-line { stroke-dashoffset: 0; }
.rg-frame.is-visible .rg-leaf, .rg-frame.is-visible .rg-dot { opacity: 1; }
.rg-frame.is-visible .rg-hatch { opacity: .8; }
.rg-frame.kit-reveal::before, .rg-frame.kit-reveal::after { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s ease; }
.rg-frame.is-visible::before, .rg-frame.is-visible::after { clip-path: inset(0 0 0 0); }
html:not(.kit-js) .rg-frame .rg-line { stroke-dashoffset: 0; }
html:not(.kit-js) .rg-frame .rg-leaf, html:not(.kit-js) .rg-frame .rg-dot, html:not(.kit-js) .rg-frame .rg-hatch { opacity: 1; }
html:not(.kit-js) .rg-frame::before, html:not(.kit-js) .rg-frame::after { clip-path: none; }

.rg-title { text-align: center; margin-bottom: 30px; }
.rg-title h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--inv-primary); }
.rg-flourish { display: block; width: 200px; margin: 10px auto 0; }
.rg-crown { display: block; width: 90px; margin: 0 auto 14px; }

/* ---------- Navigation ---------- */
.rg-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 16px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; }
.rg-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 20px; }
.rg-nav a { text-decoration: none; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-text); padding: 6px 0; }
.rg-nav a:hover, .rg-nav a.is-current { color: var(--inv-primary); }
.rg-nav .kit-nav-brand { font-family: var(--rg-script); font-size: 1.8rem; letter-spacing: 0; text-transform: none; color: var(--inv-primary); margin-right: auto; }
.rg-nav.is-stuck { align-items: center; padding: 6px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 95%, transparent); box-shadow: 0 1px 0 var(--rg-rule); }
.regal .kit-to-top { background: var(--inv-primary); color: var(--inv-bg); }
@media (max-width: 899px) {
    .rg-nav { padding: 10px 12px; }
    .rg-nav .kit-nav-toggle { color: var(--inv-primary); font-size: 1.5rem; margin-left: auto; }
    .rg-nav .kit-nav-links { display: none; }
    .rg-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: 1px solid var(--rg-rule); }
}

/* ---------- Hero ---------- */
.rg-hero { min-height: 100svh; display: grid; align-items: center; padding: 100px clamp(20px, 5vw, 64px) 70px; }
.rg-hero-grid { width: min(1140px, 100%); margin: 0 auto; display: grid; gap: 50px; align-items: center; }
@media (min-width: 900px) { .rg-hero-grid { grid-template-columns: .9fr 1.1fr; } }
.rg-hero-photo { width: min(460px, 90vw); margin: 0 auto; }
.rg-frame--photo { padding: 36px; background: var(--rg-paper); box-shadow: 0 30px 60px -40px rgba(40, 20, 10, .45); }
.rg-frame--photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.rg-cartouche { text-align: center; }
.regal .rg-names { font-family: var(--rg-script); font-size: clamp(3.6rem, 9vw, 6.6rem); line-height: 1.05; color: var(--inv-primary); }
.rg-names span { display: block; }
.rg-names em { display: block; font-style: normal; font-family: var(--inv-font-heading); font-size: .4em; color: var(--inv-accent); margin: .1em 0; }
.rg-subtitle { max-width: 440px; margin: 20px auto 0; font-style: italic; color: var(--rg-muted); }
.rg-hero-date { display: inline-flex; flex-direction: column; gap: 2px; margin: 26px 0 0; padding: 12px 34px; border-top: 1px solid var(--rg-rule); border-bottom: 1px solid var(--rg-rule); }
.rg-hero-date strong { font-family: var(--inv-font-heading); font-weight: 400; font-size: 1.4rem; color: var(--inv-primary); }
.rg-hero-date span { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.rg-section { max-width: 1080px; margin: 0 auto; padding: clamp(30px, 5vw, 60px) 16px; }
.rg-welcome, .rg-family, .rg-countdown, .rg-contact { text-align: center; }
.rg-prose { max-width: 640px; margin: 0 auto; font-size: 1.06rem; text-align: center; }
.rg-prose p { margin: 0 0 1em; }
.rg-prose p:first-child::first-letter { font-family: var(--inv-font-heading); font-size: 2.6em; line-height: .8; color: var(--inv-primary); }
.rg-quote-author { font-style: italic; }
.rg-lead { font-style: italic; color: var(--rg-muted); margin: 0 0 22px; }

/* Couple */
.rg-couple-grid { display: grid; gap: 50px; }
@media (min-width: 760px) { .rg-couple-grid { grid-template-columns: 1fr 1fr; gap: 60px; } }
.rg-person { text-align: center; }
.rg-portrait { margin: 0 auto 20px; width: min(260px, 70vw); padding: 8px; border: 1px solid var(--rg-rule); outline: 1px solid var(--rg-rule); outline-offset: 5px; }
.rg-portrait img, .rg-initial { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.rg-initial { display: grid; place-items: center; background: var(--rg-paper); font-family: var(--rg-script); font-size: 6rem; color: var(--inv-primary); }
.regal .rg-person h3 { font-family: var(--rg-script); font-size: 2.6rem; color: var(--inv-primary); margin-bottom: 6px; }
.rg-person p { color: var(--rg-muted); max-width: 380px; margin: 0 auto; }

/* Family */
.rg-family-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin: 0; }
.rg-family-list dt { font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-accent); }
.rg-family-list dd { margin: 6px 0 0; font-family: var(--inv-font-heading); font-size: 1.35rem; }

/* Story */
.rg-story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 50px; }
.rg-story-item { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .rg-story-item { grid-template-columns: 1fr 1fr; gap: 50px; } .rg-story-item:nth-child(even) .rg-story-photo { order: 2; } }
.rg-story-photo { margin: 0; padding: 8px; border: 1px solid var(--rg-rule); }
.rg-story-photo img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.rg-story-text h3 { font-size: 1.8rem; color: var(--inv-primary); margin-bottom: 8px; }
.rg-story-text p { margin: 0 0 .6em; }

/* Events */
.rg-event-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.rg-event { padding: 26px 20px; text-align: center; border: 1px solid var(--rg-rule); background: var(--rg-paper); }
.rg-event-time { font-family: var(--inv-font-heading); font-size: 2.4rem; color: var(--inv-primary); margin: 0; line-height: 1; }
.rg-event h3 { font-size: 1.4rem; margin: 10px 0 4px; }
.rg-event-place { font-weight: 700; margin: 10px 0 0; }
.rg-event-address, .rg-event-notes { color: var(--rg-muted); margin: 4px 0 0; font-size: .92rem; }
.regal .kit-event-actions { justify-content: center; margin-top: 14px; }
.regal .kit-button { border-radius: 0; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; }
.regal .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown */
.rg-countdown .kit-countdown { gap: clamp(10px, 3vw, 34px); margin-top: 10px; }
.rg-countdown .kit-countdown-value { color: var(--inv-primary); font-size: clamp(2.4rem, 7vw, 4rem); }
.rg-countdown .kit-countdown-unit + .kit-countdown-unit { border-left: 1px solid var(--rg-rule); padding-left: clamp(10px, 3vw, 34px); }

/* Gallery */
.rg-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .rg-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.rg-gallery-grid a { aspect-ratio: 4 / 5; padding: 6px; border: 1px solid var(--rg-rule); border-radius: 0; background: var(--rg-paper); }

/* RSVP */
.rg-rsvp-card { max-width: 660px; margin: 0 auto; text-align: center; }
.regal .inv-rsvp__submit { border-radius: 0; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }

/* Info */
.rg-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.rg-info-item { text-align: center; padding: 10px 14px; }
.rg-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 6px; }
.rg-info-item p { margin: 0 0 .5em; color: var(--rg-muted); }
.rg-faq { max-width: 700px; margin: 40px auto 0; text-align: center; }
.rg-faq details { text-align: left; border-bottom: 1px solid var(--rg-rule); padding: 14px 4px; }
.rg-faq summary { cursor: pointer; list-style: none; font-family: var(--inv-font-heading); font-size: 1.2rem; }
.rg-faq summary::-webkit-details-marker { display: none; }
.rg-faq summary::before { content: "❦"; color: var(--inv-accent); margin-right: 12px; }
.rg-faq details p { margin: 8px 0 0 30px; color: var(--rg-muted); }

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

/* Footer */
.rg-footer { padding: 60px 22px 70px; text-align: center; }
.rg-footer-message { font-style: italic; color: var(--rg-muted); margin: 0 0 4px; }
.rg-footer-names { font-family: var(--rg-script); font-size: clamp(3rem, 8vw, 4.6rem); color: var(--inv-primary); margin: 0 0 8px; line-height: 1.1; }
.rg-hashtag { letter-spacing: .12em; color: var(--inv-accent); margin: 0 0 8px; }
@media (max-width: 899px) { .rg-cartouche { order: -1; } }
