/* ==========================================================================
   Glicină - a spring wedding under a wisteria pergola: clusters of florets hang over the opening and from the
   top corners of the screen, swaying on their own and swinging when the guest scrolls
   Palette: --inv-primary (the bloom), --inv-accent (leaves), --inv-bg (paper), --inv-text
   script.js swings the clusters with the scroll's speed
   ========================================================================== */

.glicina {
    --gl-ink-soft: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --gl-tint: color-mix(in srgb, var(--inv-primary) 9%, var(--inv-bg));
    --gl-line: color-mix(in srgb, var(--inv-primary) 26%, transparent);
    --gl-card: color-mix(in srgb, var(--inv-surface) 88%, transparent);
    --gl-shadow: 0 26px 60px -34px color-mix(in srgb, var(--inv-primary) 55%, transparent);
    --gl-leaf: color-mix(in srgb, var(--inv-accent) 85%, var(--inv-text));
    --gl-gust: 0deg;
    --kit-radius: 14px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--gl-line);
    font-family: var(--inv-font-body);
    font-size: 1.02rem;
    line-height: 1.72;
    background:
        radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--inv-primary) 10%, transparent), transparent 70%) no-repeat,
        var(--inv-bg);
    overflow-x: clip;
}
.glicina h1, .glicina h2, .glicina 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(.glicina) :is(h1, h2, h3) { margin: 0; }
:where(.glicina) p { margin: 0 0 .9em; }
.glicina a { color: var(--inv-primary); }
.gl-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.gl-role { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gl-ink-soft); margin: 0 0 4px; }
.gl-names-line { font-family: var(--inv-font-heading); font-size: 1.45rem; margin: 0; }

/* ---------- The wisteria ---------- */
.gl-defs { position: absolute; }
.gl-bloom-top { stop-color: var(--inv-primary); }
.gl-bloom-mid { stop-color: color-mix(in srgb, var(--inv-primary) 62%, white); }
.gl-bloom-tip { stop-color: color-mix(in srgb, var(--inv-primary) 22%, white); }
.gl-raceme { display: block; width: 100%; height: auto; overflow: visible; }
.gl-floret { fill: url(#gl-bloom); stroke: color-mix(in srgb, var(--inv-primary) 30%, transparent); stroke-width: .4; }
.gl-floret--back { opacity: .55; }
.gl-raceme-stem { fill: none; stroke: var(--gl-leaf); stroke-width: 1; opacity: .35; }
.gl-swing--back { opacity: .6; filter: saturate(.8); }
.gl-leaf { fill: var(--gl-leaf); opacity: .85; }
/* .gl-swing hangs from its top and follows the scroll (--gl-gust); .gl-sway is the cluster's own breeze */
.gl-swing { display: block; transform-origin: 50% 0; transform: rotate(calc(var(--gl-gust) * (.6 + var(--s, 1) * .5))); }
.gl-sway { display: block; transform-origin: 50% 0; animation: gl-sway calc(5s + var(--i, 0) * .37s) ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -.9s); }
@keyframes gl-sway { from { transform: rotate(-2.6deg); } to { transform: rotate(2.6deg); } }

.gl-canopy { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; }
.gl-canopy .gl-swing { position: absolute; top: 0; left: var(--x); width: calc(46px * var(--s)); margin-left: calc(-23px * var(--s)); }
.gl-beam {
    position: absolute; left: -2%; right: -2%; top: -10px; height: 34px;
    /* a leafy vine: two offset rows of leaves along a thin branch */
    background:
        radial-gradient(ellipse 15px 8px at 50% 55%, var(--gl-leaf) 62%, transparent 66%) 0 6px / 38px 28px repeat-x,
        radial-gradient(ellipse 13px 7px at 50% 45%, color-mix(in srgb, var(--gl-leaf) 75%, var(--inv-bg)) 62%, transparent 66%) 19px 14px / 38px 24px repeat-x,
        linear-gradient(var(--gl-leaf), var(--gl-leaf)) 0 17px / 100% 2px no-repeat;
}

/* Clusters hanging from the top corners of the screen, all the way down */
.gl-corners { position: fixed; inset: 0 0 auto; height: 0; z-index: 0; pointer-events: none; }
.gl-corner { width: min(26vw, 260px); opacity: .55; }
.gl-corner .gl-beam { display: none; }
.gl-corner--left { left: -20px; right: auto; }
.gl-corner--right { left: auto; right: -20px; }
.gl-corner .gl-swing { width: calc(34px * var(--s)); margin-left: calc(-17px * var(--s)); }
@media (max-width: 759px) { .gl-corner { width: 34vw; opacity: .4; } .gl-corner .gl-swing { width: calc(22px * var(--s)); margin-left: calc(-11px * var(--s)); } }
.gl-hero, .gl-main, .gl-footer { position: relative; z-index: 1; }
/* The hero sits above the page so its sticky navigation stays on top of the sections */
.gl-hero { z-index: 2; }

/* ---------- Titles ---------- */
.gl-title { margin: 0 auto clamp(30px, 5vw, 50px); text-align: center; }
.gl-title h2 { font-size: clamp(2.2rem, 6.4vw, 3.2rem); color: var(--inv-text); }
.gl-twig { position: relative; display: block; width: 120px; height: 62px; margin: 8px auto 0; }
.gl-twig-branch { position: absolute; left: 0; right: 0; top: 4px; height: 2px; border-radius: 2px; background: var(--gl-leaf); opacity: .7; }
.gl-twig-branch::before, .gl-twig-branch::after { content: ""; position: absolute; top: -6px; width: 14px; height: 8px; border-radius: 0 100% 0 100%; background: var(--gl-leaf); }
.gl-twig-branch::before { left: 2px; } .gl-twig-branch::after { right: 2px; transform: scaleX(-1); }
.gl-twig .gl-swing { position: absolute; top: 4px; left: calc(50% + var(--n) * 30px); width: calc(34px * var(--s)); margin-left: calc(-17px * var(--s)); }

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

/* ---------- Hero ---------- */
.gl-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: clamp(200px, 30vw, 250px) clamp(16px, 4vw, 40px) 60px; overflow: hidden; }
.gl-hero-canopy .gl-swing { width: calc(clamp(34px, 6vw, 70px) * var(--s)); margin-left: calc(clamp(34px, 6vw, 70px) * var(--s) / -2); }
.gl-hero-grid { position: relative; display: grid; gap: 36px; width: min(1120px, 100%); margin: 0 auto; justify-items: center; text-align: center; }
/* The photo under an arch, like the opening of the pergola */
.gl-hero-photo { position: relative; margin: 0; width: min(420px, 82vw); aspect-ratio: 4 / 5; }
.gl-hero-photo::before { content: ""; position: absolute; inset: -12px; border-radius: 220px 220px 22px 22px; border: 1px solid var(--gl-line); }
.gl-hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 210px 210px 14px 14px; box-shadow: var(--gl-shadow); }
.glicina .gl-names { font-family: var(--inv-font-heading); font-weight: 400; font-size: clamp(3.4rem, 11vw, 6.4rem); line-height: 1; color: var(--inv-text); display: grid; justify-items: center; overflow-wrap: anywhere; }
.gl-and { font-family: var(--inv-font-script, 'Petit Formal Script'), cursive; font-size: .42em; color: var(--inv-primary); margin: .15em 0 .05em; }
.gl-hero-date { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.4rem; margin: 20px 0 2px; }
.gl-hero-place { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gl-ink-soft); margin: 0; }
.glicina .gl-subtitle { max-width: 38ch; margin: 18px auto 0; color: var(--gl-ink-soft); font-size: 1.06rem; }
@media (min-width: 900px) {
    .gl-hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 70px; }
}
@keyframes gl-bloom-in { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.kit-js .gl-names { animation: gl-bloom-in 1.4s ease .3s both; }
/* The clusters unfurl downwards when the page opens */
@keyframes gl-unfurl { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -10% 0); } }
.kit-js .gl-hero-canopy .gl-sway { animation: gl-unfurl 1.8s cubic-bezier(.3, .7, .3, 1) calc(var(--i) * .06s) both, gl-sway calc(5s + var(--i) * .37s) ease-in-out calc(1.8s + var(--i) * -.9s) infinite alternate; }

/* ---------- Sections ---------- */
.gl-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.gl-section { padding-top: clamp(76px, 11vw, 124px); }
.gl-card { background: var(--gl-card); border: 1px solid var(--gl-line); border-radius: 22px; box-shadow: var(--gl-shadow); }
.gl-block { position: relative; background: var(--gl-tint); border-radius: 260px 260px 32px 32px; padding: clamp(70px, 10vw, 110px) clamp(28px, 6vw, 70px) clamp(40px, 6vw, 64px); text-align: center; max-width: 780px; margin: 0 auto; }
.gl-lead { text-align: center; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.22rem; color: var(--gl-ink-soft); max-width: 40ch; margin: 0 auto 26px; }
.glicina .gl-welcome-title { font-family: var(--inv-font-heading); font-style: italic; font-size: clamp(2.5rem, 7.6vw, 3.6rem); color: var(--inv-primary); margin-bottom: 14px; }
.gl-block p { font-size: 1.08rem; }
.gl-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }

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

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

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

/* Programme: a small cluster hangs from the top of each card */
.gl-moments { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.gl-moment { position: relative; padding: 36px 26px 24px; text-align: center; }
.gl-moment-bloom { position: absolute; right: 26px; top: -2px; width: 26px; }
.gl-moment-time { font-family: var(--inv-font-heading); font-size: 2.5rem; line-height: 1; color: var(--inv-primary); margin-bottom: 10px; }
.gl-moment h3 { font-size: 1.5rem; margin-bottom: 4px; }
.gl-moment-place { font-weight: 500; margin: 12px 0 0; }
.gl-moment-address, .gl-moment-notes { color: var(--gl-ink-soft); margin: 0; }
.gl-moment-notes { font-style: italic; margin-top: 6px; }
.glicina .kit-button { border-radius: 999px; border: 1px solid var(--gl-line); color: var(--inv-primary); background: transparent; font-size: .8rem; padding: 9px 16px; text-decoration: none; }
.glicina .kit-button:hover { background: var(--inv-primary); color: var(--inv-surface); }

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

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

/* RSVP: clusters hang from the card's top edge */
.gl-reply { position: relative; max-width: 700px; margin: 0 auto; padding: clamp(90px, 12vw, 120px) clamp(24px, 6vw, 54px) clamp(30px, 6vw, 54px); }
.gl-reply-canopy .gl-swing { width: calc(40px * var(--s)); margin-left: calc(-20px * var(--s)); }
.gl-reply-canopy .gl-beam { display: none; }
.glicina .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.15rem; }
.glicina .inv-rsvp__deadline { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-primary); }
.glicina .inv-rsvp__choice label { border-radius: 999px; }

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

/* Footer */
.gl-footer { position: relative; text-align: center; padding: clamp(190px, 22vw, 240px) 16px 70px; overflow: hidden; }
.gl-footer-canopy { top: clamp(40px, 6vw, 70px); }
.gl-footer-canopy .gl-swing { width: calc(clamp(30px, 5vw, 54px) * var(--s)); margin-left: calc(clamp(30px, 5vw, 54px) * var(--s) / -2); }
.gl-footer-canopy .gl-beam { left: 16%; right: 16%; }
.gl-welcome-canopy { top: 34px; left: 32%; right: 32%; }
.gl-welcome-canopy .gl-beam { display: none; }
.gl-welcome-canopy .gl-swing { width: calc(34px * var(--s)); margin-left: calc(-17px * var(--s)); }
.gl-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.32rem; color: var(--gl-ink-soft); }
.gl-footer-names { font-family: var(--inv-font-heading); font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1.05; color: var(--inv-primary); margin: 6px 0 10px; }
.gl-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .gl-sway, .kit-js .gl-hero-canopy .gl-sway, .kit-js .gl-names { animation: none; }
}
@media (max-width: 599px) { .gl-block { padding-top: 120px; } .gl-welcome-canopy { left: 24%; right: 24%; top: 40px; } }
