/* ==========================================================================
   Velin - luxury stationery: vellum over the photo, letterpress names, gold foil that catches the light
   Palette: --inv-primary (foil / ink accent), --inv-accent (light foil), --inv-bg (paper), --inv-text (ink)
   script.js sets --shine (0-100, foil highlight) on <html> and --lift (0-1) on the hero
   ========================================================================== */

.velin {
    --v-script: 'Pinyon Script', cursive;
    --v-ink-soft: color-mix(in srgb, var(--inv-text) 72%, var(--inv-bg));
    --v-line: color-mix(in srgb, var(--inv-primary) 45%, transparent);
    --v-hair: color-mix(in srgb, var(--inv-text) 14%, transparent);
    --v-paper: var(--inv-surface);
    --v-highlight: color-mix(in srgb, var(--inv-bg) 78%, white);
    --v-shadow: 0 1px 1px rgba(20, 14, 8, .04), 0 6px 14px -6px rgba(20, 14, 8, .12), 0 28px 50px -24px rgba(20, 14, 8, .22);
    --v-foil: linear-gradient(105deg,
        var(--inv-primary) 0%, var(--inv-primary) calc(var(--shine, 50) * 1% - 22%),
        var(--inv-accent) calc(var(--shine, 50) * 1% - 8%), color-mix(in srgb, var(--inv-accent) 45%, white) calc(var(--shine, 50) * 1%),
        var(--inv-accent) calc(var(--shine, 50) * 1% + 8%), var(--inv-primary) calc(var(--shine, 50) * 1% + 22%), var(--inv-primary) 100%);
    --kit-radius: 2px;
    --kit-field-bg: transparent;
    --kit-field-border: var(--v-line);
    --kit-button-bg: var(--inv-primary);
    --kit-button-text: var(--inv-bg);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.04rem;
    line-height: 1.7;
    background-color: var(--inv-bg);
    /* Fine paper grain, drawn by the browser (no image file) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    overflow-x: clip;
}
.velin h1, .velin h2, .velin h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.12; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.velin) :is(h1, h2, h3) { margin: 0; }
.velin p { margin: 0 0 .9em; }
.velin a { color: var(--inv-primary); }
.v-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 12px; }
.velin .v-script { font-family: var(--v-script); font-weight: 400; color: var(--inv-primary); }

/* Letterpress: ink pressed into the paper - a light edge under the letters, a faint shade above */
.v-press { text-shadow: 0 1px 0 var(--v-highlight), 0 -1px 0 color-mix(in srgb, var(--inv-text) 10%, transparent); }

/* Gold foil: the highlight moves with --shine */
.v-foil { color: var(--inv-primary); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .v-foil { background: var(--v-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

/* ---------- Section titles ---------- */
.v-title { position: relative; text-align: center; margin: 0 auto clamp(34px, 6vw, 56px); padding-top: .4em; }
.velin .v-title h2 { font-style: italic; font-size: clamp(2.1rem, 7vw, 3.1rem); }
.v-rule { display: block; width: 74px; height: 1px; margin: 18px auto 0; background: var(--inv-primary); position: relative; }
.v-rule::before, .v-rule::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; background: var(--inv-primary); transform: rotate(45deg); }
.v-rule::before { left: -12px; }
.v-rule::after { right: -12px; }

/* ---------- Monogram ---------- */
.v-monogram { position: relative; width: 112px; aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.v-monogram-ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--inv-primary); stroke-width: 1.2; overflow: visible; }
.v-monogram-ring circle + circle { stroke-width: .6; stroke-dasharray: 2 4; }
.v-monogram-letters { display: flex; align-items: baseline; gap: .04em; font-family: var(--inv-font-heading); font-style: italic; font-size: 2.6rem; line-height: 1; padding: 0 .1em; }
.v-monogram-and { font-size: .55em; margin: 0 .04em; }

/* ---------- Navigation ---------- */
.v-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 14px 20px; }
.v-nav .kit-nav-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; padding: 10px 26px;
    background: color-mix(in srgb, var(--inv-bg) 72%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--inv-bg) 60%, transparent);
}
.v-nav a { text-decoration: none; font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--inv-text); padding: 4px 0; border-bottom: 1px solid transparent; }
.v-nav a:hover, .v-nav a.is-current { color: var(--inv-primary); border-bottom-color: var(--inv-primary); }
.v-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.35rem; letter-spacing: .04em; text-transform: none; color: var(--inv-primary); margin-right: auto; border: 0; }
.v-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px clamp(16px, 4vw, 44px); 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(--v-hair); }
.v-nav.is-stuck .kit-nav-links { background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 6px 0; }
.velin .kit-to-top { border-radius: 50%; background: var(--v-paper); border: 1px solid var(--inv-primary); color: var(--inv-primary); box-shadow: var(--v-shadow); }
@media (max-width: 899px) {
    .v-nav { justify-content: flex-end; padding: 12px; }
    .v-nav .kit-nav-toggle {
        width: 44px; height: 44px; border-radius: 50%; color: var(--inv-primary); font-size: 1.2rem;
        background: color-mix(in srgb, var(--inv-bg) 80%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--v-line);
    }
    .v-nav .kit-nav-links { display: none; }
    .v-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; gap: 14px; position: absolute; top: 64px; left: 12px; right: 12px;
        padding: 26px; background: var(--v-paper); border: 1px solid var(--v-line); box-shadow: var(--v-shadow); -webkit-backdrop-filter: none; backdrop-filter: none;
    }
    .v-nav.is-stuck { padding: 6px 12px; }
    .v-nav.is-stuck .kit-nav-toggle { width: 40px; height: 40px; }
}

/* ---------- Hero: the photo under a sheet of vellum ---------- */
.v-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 96px 16px 56px; overflow: hidden; isolation: isolate; }
.v-hero-photo { position: absolute; inset: 0; margin: 0; z-index: -1; }
.v-hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.06 - var(--lift, 0) * .06)); filter: saturate(.9); }
.v-hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--inv-bg) 18%, transparent), transparent 30%, transparent 62%, color-mix(in srgb, var(--inv-bg) 40%, transparent)); }
.v-vellum {
    position: relative; width: min(560px, 100%); text-align: center;
    /* Translucent, slightly frosted paper; it lifts and fades a little as the page scrolls */
    background: color-mix(in srgb, var(--inv-bg) 78%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
    border: 1px solid color-mix(in srgb, var(--inv-bg) 70%, white);
    box-shadow: 0 30px 60px -30px rgba(20, 14, 8, .45);
    transform: translateY(calc(var(--lift, 0) * -60px));
    padding: 14px;
}
.v-vellum-inner { border: 1px solid var(--v-line); padding: clamp(78px, 12vw, 92px) clamp(20px, 6vw, 48px) clamp(34px, 6vw, 48px); }
/* The monogram sits on the top edge of the sheet, like a foil seal */
.v-hero-monogram { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); width: 112px; background: var(--v-paper); border-radius: 50%; box-shadow: 0 8px 22px -10px rgba(20, 14, 8, .45); }
.v-names { font-size: clamp(2.6rem, 10vw, 4.8rem); line-height: 1.02; display: grid; justify-items: center; overflow-wrap: anywhere; }
.v-names .v-and { font-style: italic; font-size: .5em; color: var(--inv-primary); margin: .06em 0 .02em; }
.v-hero-date { font-family: var(--inv-font-heading); font-style: italic; font-size: clamp(1.2rem, 4vw, 1.5rem); margin: 22px 0 2px; }
.v-hero-place { font-size: .76rem; letter-spacing: .3em; text-transform: uppercase; color: var(--v-ink-soft); margin: 0; }
.velin .v-subtitle { max-width: 34ch; margin: 22px auto 0; padding-top: 20px; border-top: 1px solid var(--v-hair); color: var(--v-ink-soft); }
.v-hero:not(:has(.v-hero-photo)) .v-vellum { background: var(--v-paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--v-shadow); }

/* Entrance: the sheet settles onto the photo */
@keyframes v-settle { from { opacity: 0; transform: translateY(26px) rotate(-.6deg); } to { opacity: 1; transform: none; } }
@keyframes v-develop { from { filter: saturate(0) brightness(1.15); } to { filter: saturate(.9); } }
.kit-js .v-vellum-inner { animation: v-settle 1.3s cubic-bezier(.2, .7, .2, 1) .15s both; }
.kit-js .v-hero-photo img { animation: v-develop 2.2s ease both; }

/* ---------- Page body ---------- */
.v-suite { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
.v-section { padding: clamp(64px, 11vw, 120px) 0 0; }
.v-card { position: relative; background: var(--v-paper); box-shadow: var(--v-shadow); padding: clamp(40px, 7vw, 72px) clamp(22px, 6vw, 72px); }
.v-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--v-hair); pointer-events: none; }
.v-section.v-card { margin-top: clamp(64px, 11vw, 120px); }
.v-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.2rem; }

/* Welcome: a letter */
.v-welcome { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.v-welcome h2 { font-size: clamp(2.6rem, 9vw, 3.8rem); line-height: 1.1; margin-bottom: 18px; }
.v-prose { max-width: 56ch; margin: 0 auto; font-size: 1.08rem; }
.v-prose p:first-child::first-letter { font-family: var(--inv-font-heading); font-size: 1.6em; color: var(--inv-primary); }
.v-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }

/* Couple: arched portraits with an offset hairline frame */
.v-couple-grid { display: grid; gap: 54px; justify-items: center; }
.v-person { text-align: center; max-width: 380px; min-width: 0; }
.v-arch { position: relative; width: min(320px, 76vw, 100% - 14px); aspect-ratio: 4 / 5; margin: 0 auto 28px; }
.v-arch::before { content: ""; position: absolute; inset: -12px 12px 12px -12px; border: 1px solid var(--inv-primary); border-radius: 999px 999px 0 0; }
.v-arch img, .v-arch .v-initial { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 0 0; box-shadow: var(--v-shadow); }
.v-initial { display: grid; place-items: center; background: var(--v-paper); font-family: var(--inv-font-heading); font-style: italic; font-size: 7rem; }
.v-person h3 { font-size: 1.7rem; margin-bottom: 10px; }
.v-person p { color: var(--v-ink-soft); }
.v-couple-and { font-family: var(--inv-font-heading); font-style: italic; font-size: 4.4rem; line-height: 1; }
@media (min-width: 760px) {
    .v-couple-grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 30px; }
    .v-couple-and { font-size: 6rem; }
    .v-person:last-child { margin-top: 90px; }
}

/* Family */
.v-family { max-width: 860px; margin-left: auto; margin-right: auto; text-align: center; }
.v-family-list { display: grid; gap: 26px; margin: 30px 0 0; }
.v-family-list dt { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--inv-primary); margin-bottom: 4px; }
.v-family-list dd { margin: 0; font-family: var(--inv-font-heading); font-size: 1.45rem; }
@media (min-width: 640px) { .v-family-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

/* Story: framed works with museum labels */
.v-exhibits { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(56px, 9vw, 96px); }
.v-exhibit { display: grid; gap: 22px; justify-items: center; }
.v-frame {
    margin: 0; width: min(520px, 100%); padding: clamp(14px, 3.6vw, 30px); background: var(--v-paper);
    outline: 6px solid color-mix(in srgb, var(--inv-text) 86%, var(--inv-primary)); outline-offset: -6px;
    box-shadow: inset 0 0 0 1px var(--v-hair), var(--v-shadow), 0 40px 60px -40px rgba(20, 14, 8, .4);
}
.v-frame img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.v-placard { width: min(330px, 100%); background: var(--v-paper); border: 1px solid var(--v-hair); padding: 18px 22px 8px; font-size: .94rem; box-shadow: 0 10px 20px -16px rgba(20, 14, 8, .4); }
.v-placard-no { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); font-size: 1.1rem; margin-bottom: 4px; }
.v-placard h3 { font-size: 1.3rem; margin-bottom: 4px; }
.v-placard-date { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--v-ink-soft); padding-bottom: 10px; border-bottom: 1px solid var(--v-hair); }
@media (min-width: 900px) {
    .v-exhibit { grid-template-columns: minmax(0, 520px) 330px; justify-content: center; align-items: end; gap: 40px; }
    .v-exhibit:nth-child(even) { grid-template-columns: 330px minmax(0, 520px); }
    .v-exhibit:nth-child(even) .v-placard { order: -1; }
    .v-exhibit:not(:has(.v-frame)) { grid-template-columns: 330px; }
}

/* Programme: folded place cards */
.v-placecards { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.v-placecard {
    position: relative; text-align: center; background: var(--v-paper); padding: 46px 24px 30px; box-shadow: var(--v-shadow);
    /* The fold of a tent card: a crease and a softer light on the top flap */
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--inv-text) 5%, transparent), transparent 28px);
}
.v-placecard::before { content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--v-hair) 12%, var(--v-hair) 88%, transparent); }
.v-placecard::after { content: ""; position: absolute; inset: 40px 10px 10px; border: 1px solid var(--v-hair); pointer-events: none; }
.v-placecard > * { position: relative; z-index: 1; }
.v-placecard-time { font-family: var(--inv-font-heading); font-style: italic; font-size: 2.8rem; line-height: 1; margin: 6px 0 14px; }
.v-placecard h3 { font-size: 1.5rem; margin-bottom: 6px; }
.v-placecard-place { font-family: var(--inv-font-heading); font-size: 1.15rem; margin: 14px 0 2px; }
.v-placecard-address { font-size: .9rem; color: var(--v-ink-soft); }
.v-placecard-notes { font-size: .92rem; font-style: italic; color: var(--v-ink-soft); }
.velin .kit-button { border-radius: 0; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; padding: 10px 16px; text-decoration: none; }
.velin .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: engraved numerals between hairlines */
.v-countdown { text-align: center; }
.v-countdown .kit-countdown { gap: 0; border-top: 1px solid var(--v-line); border-bottom: 1px solid var(--v-line); padding: 26px 0; max-width: 720px; margin: 0 auto; }
.v-countdown .kit-countdown-unit { flex: 1 1 0; min-width: 0; padding: 0 8px; }
.v-countdown .kit-countdown-unit + .kit-countdown-unit { border-left: 1px solid var(--v-hair); }
.v-countdown .kit-countdown-value { font-style: italic; font-weight: 400; font-size: clamp(2.2rem, 9vw, 4rem); color: var(--inv-primary); }
.v-countdown .kit-countdown-label { letter-spacing: .26em; }

/* Gallery: an exhibition wall - every photo matted and framed, hung at its own proportions */
.v-wall.kit-gallery { display: block; columns: 2; column-gap: clamp(14px, 3vw, 30px); }
.v-wall.kit-gallery a {
    aspect-ratio: auto; break-inside: avoid; margin-bottom: clamp(14px, 3vw, 30px); border-radius: 0; padding: clamp(8px, 2vw, 16px); background: var(--v-paper);
    outline: 3px solid color-mix(in srgb, var(--inv-text) 86%, var(--inv-primary)); outline-offset: -3px;
    box-shadow: inset 0 0 0 1px var(--v-hair), var(--v-shadow);
}
.v-wall.kit-gallery a:focus-visible { outline-color: var(--inv-primary); }
.v-wall.kit-gallery img { height: auto; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.v-wall.kit-gallery a:hover img { transform: scale(1.025); }
@media (min-width: 760px) { .v-wall.kit-gallery { columns: 3; } }

/* ---------- RSVP: the reply card ---------- */
.v-reply { max-width: 680px; margin: 0 auto; padding-top: 70px; }
.v-reply-monogram { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); width: 100px; background: var(--v-paper); border-radius: 50%; box-shadow: 0 8px 22px -10px rgba(20, 14, 8, .4); }
.v-reply-monogram .v-monogram-letters { font-size: 2.3rem; }
.v-reply-monogram.is-sealed { animation: v-stamp .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes v-stamp { 0% { transform: translateX(-50%) scale(1); } 40% { transform: translateX(-50%) scale(.86); } 100% { transform: translateX(-50%) scale(1); } }
.velin .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.15rem; }
.velin .inv-rsvp__deadline { font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.velin .inv-rsvp__field label, .velin .inv-rsvp__field legend { font-weight: 500; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--v-ink-soft); }
.velin .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .velin .inv-rsvp__field select, .velin .inv-rsvp__field textarea {
    border-width: 0 0 1px; border-radius: 0; padding-left: 2px; padding-right: 2px; font-size: 1.05rem;
}
.velin .inv-rsvp__field textarea { border-width: 1px; padding: 12px; }
.velin .inv-rsvp__choice label { font-family: var(--inv-font-heading); font-size: 1.1rem; }
.velin .inv-rsvp__submit { border-radius: 0; font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 500; }
.velin .inv-rsvp__message { border-radius: 0; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.1rem; }

/* ---------- Info and contact ---------- */
.v-info-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.v-info-item { text-align: center; }
.v-info-item h3 { font-size: 1.35rem; font-style: italic; margin-bottom: 10px; color: var(--inv-primary); }
.v-faq { max-width: 680px; margin: 46px auto 0; text-align: center; }
.v-faq details { text-align: left; border-top: 1px solid var(--v-hair); }
.v-faq details:last-child { border-bottom: 1px solid var(--v-hair); }
.v-faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; font-family: var(--inv-font-heading); font-size: 1.15rem; }
.v-faq summary::-webkit-details-marker { display: none; }
.v-faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--inv-primary); font-size: 1.4rem; transition: transform .3s; }
.v-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.v-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.v-faq details p { color: var(--v-ink-soft); }
.v-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 70px; text-align: center; }
.v-contact-name { font-family: var(--inv-font-heading); font-size: 1.5rem; margin-bottom: 2px; }
.v-contact-person a { text-decoration: none; letter-spacing: .1em; }

/* ---------- Footer ---------- */
.v-footer { text-align: center; padding: clamp(110px, 16vw, 160px) 16px 70px; }
.v-footer-monogram { width: 96px; margin-bottom: 30px; }
.v-footer-monogram .v-monogram-letters { font-size: 2.1rem; }
.v-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.3rem; }
.v-footer-names { font-family: var(--inv-font-heading); font-size: clamp(1.8rem, 6vw, 2.6rem); margin: 8px 0; }
.v-hashtag { font-size: .8rem; letter-spacing: .26em; color: var(--inv-primary); }
.v-footer-thanks { font-size: 2.2rem; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
    .kit-js .v-vellum-inner, .kit-js .v-hero-photo img, .v-reply-monogram.is-sealed { animation: none; }
    .v-vellum, .v-hero-photo img { transform: none; }
}
