/* ==========================================================================
   Absolvire - a graduation party, painted in watercolour on a school desk: the photo framed like a diploma with a
   red wax seal, beside the pile of books with the cap, the rolled diploma and the fountain pen; mortarboards tossed
   into the air now and then (and at every touch). The owl in its glasses welcomes the guests, the graduate's portrait
   sits beside the old school backpack, the theme is handwritten on a notebook page, the programme is on index cards
   held by paper clips, the days left are chalked on the blackboard, the photos are pinned with washi tape like in a
   yearbook, and at the end the caps fly up one last time.
   Palette: --inv-primary (the ink), --inv-accent (the gilt), --inv-bg, --inv-text.
   The desk things (assets/art, Pixabay, see LICENSES.md) are watercolours made transparent; on the dark palette
   (.ab-dark, set by script.js) they get back a sheet of paper. script.js tosses the caps (canvas.ab-caps)
   ========================================================================== */

.absolvire {
    --ab-script: 'Imperial Script', 'Segoe Script', cursive;
    --ab-hand: 'Kalam', 'Segoe Print', cursive;
    --ab-soft: color-mix(in srgb, var(--inv-text) 64%, var(--inv-bg));
    --ab-line: color-mix(in srgb, var(--inv-primary) 18%, transparent);
    --ab-paper: color-mix(in srgb, #fffcf4 92%, var(--inv-accent));
    --ab-gold: color-mix(in srgb, var(--inv-accent) 80%, #9a7428);
    --ab-wax: color-mix(in srgb, #a3202c 82%, var(--inv-primary));
    --ab-cap: color-mix(in srgb, #1c2233 82%, var(--inv-primary));
    --ab-board: color-mix(in srgb, #24382f 86%, var(--inv-primary));
    --ab-grid: color-mix(in srgb, var(--inv-primary) 7%, transparent);
    --ab-shadow: 0 1px 2px color-mix(in srgb, var(--inv-text) 8%, transparent), 0 24px 48px -30px color-mix(in srgb, var(--inv-text) 50%, transparent);
    --kit-radius: 10px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: var(--ab-line);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.03rem;
    line-height: 1.74;
    background: var(--inv-bg);
    overflow-x: clip;
}
.absolvire h1, .absolvire h2, .absolvire h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.22; }
:where(.absolvire) :is(h1, h2, h3) { margin: 0; }
:where(.absolvire) p { margin: 0 0 .9em; }
.absolvire strong { font-weight: 500; }
.absolvire a { color: var(--inv-primary); }
.ab-kicker { font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.ab-role { font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ab-soft); margin: 0 0 4px; }
.ab-names { font-family: var(--inv-font-heading); font-size: 1.16rem; margin: 0; }
.ab-hero, .ab-main, .ab-footer { position: relative; }
.ab-card { position: relative; background: var(--inv-surface); border-radius: 8px; box-shadow: var(--ab-shadow), 0 0 0 1px var(--ab-line); }

/* ---------- The watercolours ---------- */
.ab-art { position: relative; display: block; }
.ab-art img { display: block; width: 100%; height: auto; }
.ab-dark .ab-art img { background: radial-gradient(closest-side, var(--ab-paper) 54%, color-mix(in srgb, var(--ab-paper) 40%, transparent) 78%, transparent 100%); }

/* ---------- Navigation ---------- */
.ab-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.ab-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.ab-nav .kit-nav-links a { font-size: .74rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--inv-text); padding: 6px 0; border-bottom: 1px solid transparent; }
.ab-nav .kit-nav-links a:hover, .ab-nav .kit-nav-links a.is-current { border-color: var(--inv-primary); color: var(--inv-primary); }
.ab-nav .kit-nav-brand { font-family: var(--ab-script); font-size: 2rem; line-height: 1; color: var(--inv-primary); text-decoration: none; }
.ab-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--inv-bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--ab-line); }
.absolvire .kit-to-top { background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--ab-line); }
@media (max-width: 899px) {
    .ab-nav { justify-content: flex-end; padding: 12px; }
    .ab-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--ab-line); font-size: 1.2rem; }
    .ab-nav .kit-nav-links { display: none; }
    .ab-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: 12px; background: var(--inv-surface); box-shadow: var(--ab-shadow);
    }
    .ab-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero: the desk on squared paper ---------- */
.ab-hero { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 120px 16px 56px; overflow: hidden; overflow: clip;
    background-image: linear-gradient(var(--ab-grid) 1px, transparent 1px), linear-gradient(90deg, var(--ab-grid) 1px, transparent 1px); background-size: 26px 26px; background-position: center top; }
.ab-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--inv-bg)); pointer-events: none; }
.ab-caps { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.ab-hero-inner { position: relative; z-index: 2; width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 26px; text-align: center; }
.ab-desk { position: relative; width: min(460px, 94vw); display: grid; grid-template-columns: 58% minmax(0, 1fr); align-items: end; }
.ab-diploma--hero { grid-column: 1; grid-row: 1; z-index: 1; rotate: -2deg; }
.ab-cap { grid-column: 2; grid-row: 1; margin-left: -16%; margin-bottom: -4%; z-index: 2; }
.kit-js .ab-cap img { animation: ab-in 1.2s cubic-bezier(.3, 1.2, .5, 1) .4s both; }
.kit-js .ab-diploma--hero { animation: ab-drop 1.1s cubic-bezier(.3, 1.3, .5, 1) .1s both; }
@keyframes ab-in { from { opacity: 0; translate: 30px 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes ab-drop { from { opacity: 0; translate: 0 -20px; rotate: -8deg; } to { opacity: 1; translate: 0 0; rotate: -2deg; } }

/* the diploma frame and its wax seal */
.ab-diploma { position: relative; margin: 0; }
.ab-diploma-frame { display: block; padding: 12px; background: var(--ab-paper); border-radius: 3px;
    box-shadow: inset 0 0 0 3px var(--ab-paper), inset 0 0 0 4px var(--ab-gold), inset 0 0 0 7px var(--ab-paper), inset 0 0 0 8px color-mix(in srgb, var(--ab-gold) 70%, transparent), var(--ab-shadow), 0 0 0 1px var(--ab-line); }
.ab-diploma-frame img, .ab-initial { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1px; }
.ab-initial { display: grid; place-items: center; font-family: var(--ab-script); font-size: 5rem; color: var(--inv-primary); background: color-mix(in srgb, var(--ab-paper) 80%, var(--inv-accent)); }
.ab-seal { position: absolute; right: -9%; bottom: -7%; width: clamp(62px, 18vw, 82px); aspect-ratio: 1; z-index: 2; }
.ab-seal i { position: absolute; top: 52%; width: 26%; height: 70%; background: linear-gradient(90deg, color-mix(in srgb, var(--ab-wax) 80%, #000), var(--ab-wax) 50%, color-mix(in srgb, var(--ab-wax) 80%, #000)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); }
.ab-seal i:first-child { left: 22%; rotate: 16deg; }
.ab-seal i:nth-child(2) { right: 22%; rotate: -14deg; }
.ab-seal b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--ab-script); font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.2rem); line-height: 1; color: color-mix(in srgb, var(--ab-wax) 30%, #ffe2d6);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .35);
    background: radial-gradient(circle at 38% 34%, color-mix(in srgb, var(--ab-wax) 70%, #fff 30%), var(--ab-wax) 46%, color-mix(in srgb, var(--ab-wax) 75%, #000) 100%);
    clip-path: polygon(50% 0, 60% 6%, 72% 3%, 79% 13%, 91% 15%, 92% 28%, 100% 38%, 95% 50%, 100% 62%, 92% 72%, 91% 85%, 79% 87%, 72% 97%, 60% 94%, 50% 100%, 40% 94%, 28% 97%, 21% 87%, 9% 85%, 8% 72%, 0 62%, 5% 50%, 0 38%, 8% 28%, 9% 15%, 21% 13%, 28% 3%, 40% 6%);
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.kit-js .ab-seal { animation: ab-stamp .7s cubic-bezier(.3, 1.6, .5, 1) 1.2s both; }
@keyframes ab-stamp { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }

.ab-hero-text { display: grid; justify-items: center; width: 100%; min-width: 0; }
.absolvire .ab-name { font-family: var(--ab-script); font-weight: 400; font-size: clamp(3.4rem, 13vw, 5.8rem); line-height: 1.12; color: var(--inv-primary); overflow-wrap: anywhere; margin: 0 0 8px; }
.ab-hero-date { font-family: var(--inv-font-heading); font-size: 1.28rem; margin: 0 0 4px; }
.ab-hero-place { font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--ab-soft); margin: 0; }
.absolvire .ab-subtitle { max-width: 44ch; margin: 16px auto 0; color: var(--ab-soft); }
@keyframes ab-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.kit-js .ab-hero-text > * { animation: ab-up 1s ease .8s both; }
.kit-js .ab-hero-text > :nth-child(n+3) { animation-delay: 1.1s; }
@media (min-width: 900px) {
    .ab-hero { padding-top: 150px; }
    .ab-hero-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 56px; text-align: left; align-items: center; }
    .ab-hero-text { justify-items: start; order: -1; }
    .absolvire .ab-subtitle { margin-left: 0; }
    .ab-desk { width: min(520px, 44vw); }
}

/* ---------- Sections ---------- */
.ab-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.ab-section { padding-top: clamp(84px, 11vw, 128px); }
.ab-title { margin: 0 auto clamp(26px, 4vw, 42px); text-align: center; }
.ab-title h2 { font-size: clamp(1.8rem, 5vw, 2.4rem); color: var(--inv-primary); text-wrap: balance; }
.ab-doodle { display: block; width: 160px; height: auto; margin: 6px auto 0; overflow: visible; }
.ab-pencil { fill: none; stroke: color-mix(in srgb, var(--inv-primary) 60%, transparent); stroke-width: 2.4; stroke-linecap: round; }
.ab-star { fill: var(--ab-gold); }
.kit-js .ab-title .ab-pencil { stroke-dasharray: 130; stroke-dashoffset: 130; transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .3, 1) .2s; }
.kit-js .ab-title .ab-star { opacity: 0; scale: 0; transform-box: fill-box; transform-origin: center; transition: opacity .3s ease 1.1s, scale .6s cubic-bezier(.3, 1.8, .5, 1) 1.1s; }
.kit-js .ab-title.is-visible .ab-pencil { stroke-dashoffset: 0; }
.kit-js .ab-title.is-visible .ab-star { opacity: 1; scale: 1; }

/* Welcome, with the owl */
.ab-welcome { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 820px; margin: 0 auto; }
.ab-welcome p { font-size: 1.05rem; }
.ab-owl { width: min(190px, 48vw); }
.kit-js .ab-welcome .ab-owl img { opacity: 0; translate: 0 22px; transition: opacity .9s ease, translate 1s ease; }
.kit-js .ab-welcome.is-visible .ab-owl img { opacity: 1; translate: 0 0; }
.absolvire .ab-welcome-title { font-family: var(--ab-script); font-weight: 400; font-size: clamp(2.8rem, 9vw, 4rem); line-height: 1.15; color: var(--inv-primary); margin-bottom: 12px; }
.ab-quote-author { font-family: var(--inv-font-heading); font-style: italic; color: var(--inv-primary); }
@media (min-width: 760px) {
    .ab-welcome { grid-template-columns: auto minmax(0, 1fr); gap: 50px; text-align: left; align-items: center; }
    .ab-owl { width: 220px; }
}

/* The graduate */
.ab-graduate-grid { display: grid; gap: 56px; justify-items: center; text-align: center; max-width: 900px; margin: 0 auto; }
.ab-portrait { position: relative; width: min(240px, 58vw); }
.ab-diploma--portrait { rotate: 2deg; }
.ab-diploma--portrait .ab-seal { right: auto; left: -9%; }
.ab-backpack { position: absolute; right: -34%; bottom: -12%; width: 60%; z-index: 2; }
.kit-js .ab-graduate-grid .ab-backpack img { opacity: 0; translate: 20px 0; transition: opacity .8s ease .5s, translate 1s cubic-bezier(.3, 1.3, .5, 1) .5s; }
.kit-js .ab-graduate-grid.is-visible .ab-backpack img { opacity: 1; translate: 0 0; }
.ab-graduate-name { font-family: var(--inv-font-heading); font-size: 1.7rem; color: var(--inv-primary); margin-bottom: 4px; }
.ab-graduate-age { font-size: .76rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ab-soft); }
.ab-graduate-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.06rem; max-width: 38ch; margin-left: auto; margin-right: auto; }
@media (min-width: 760px) {
    .ab-graduate-grid { grid-template-columns: auto minmax(0, 1fr); gap: 130px; text-align: left; align-items: center; }
    .ab-portrait { width: 250px; }
    .ab-graduate-message { margin-left: 0; }
}
@media (max-width: 759px) { .ab-backpack { right: -22%; width: 52%; } }

/* The theme on a notebook page */
.ab-notebook { position: relative; max-width: 640px; margin: 0 auto; padding: 32px 26px 30px 64px; text-align: left; rotate: -.6deg;
    font-family: var(--ab-hand); font-size: 1.12rem; line-height: 32px; color: color-mix(in srgb, #1f3f8a 70%, var(--inv-text));
    background:
        linear-gradient(90deg, transparent 46px, color-mix(in srgb, #d0485a 60%, transparent) 46px 47.5px, transparent 47.5px),
        repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, #6d8fd0 32%, transparent) 31px 32px),
        #fffefb;
    background-position: 0 0, 0 30px, 0 0;
    border-radius: 2px; box-shadow: var(--ab-shadow), 0 0 0 1px rgba(0, 0, 0, .04); }
.ab-notebook::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 30px; width: 16px;
    background: radial-gradient(circle at 50% 50%, var(--inv-bg) 0 6px, rgba(0, 0, 0, .12) 6.5px, transparent 7.5px) 0 0 / 16px 96px repeat-y; }
.ab-notebook h3 { font-family: var(--ab-hand); font-weight: 700; font-size: 1.5rem; line-height: 32px; color: color-mix(in srgb, #1f3f8a 60%, var(--inv-primary)); margin: 0 0 0; padding-top: 0; }
.ab-notebook p { margin: 0 0 32px; }
.ab-notebook p:last-child { margin-bottom: 0; }

/* Programme: index cards with paper clips */
.ab-cards { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 34px; }
.ab-lesson-card { display: grid; gap: 4px 26px; justify-items: center; text-align: center; padding: 28px clamp(20px, 5vw, 36px) 24px;
    background: linear-gradient(180deg, transparent 52px, color-mix(in srgb, #d0485a 45%, transparent) 52px 53.5px, transparent 53.5px), repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, #6d8fd0 10%, transparent) 31px 32px) 0 54px / 100% calc(100% - 54px) no-repeat, var(--inv-surface); }
.ab-lesson:nth-child(odd) .ab-lesson-card { rotate: -.8deg; }
.ab-lesson:nth-child(even) .ab-lesson-card { rotate: .8deg; }
.ab-lesson-art { width: min(150px, 42vw); }
.ab-clip { position: absolute; top: -16px; left: 28px; width: 18px; height: 52px; border: 2.5px solid #9ba3ad; border-radius: 9px; rotate: 8deg; z-index: 2;
    box-shadow: inset 0 0 0 3px transparent, 1px 2px 2px rgba(0, 0, 0, .15); }
.ab-clip::after { content: ""; position: absolute; left: 3px; right: 3px; top: 8px; bottom: -2px; border: 2.5px solid #b5bcc5; border-top: 0; border-radius: 0 0 6px 6px; }
.kit-js .ab-lesson .ab-lesson-card { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .9s cubic-bezier(.3, 1.2, .5, 1); }
.kit-js .ab-lesson.is-visible .ab-lesson-card { opacity: 1; translate: 0 0; }
.ab-lesson-time { font-family: var(--ab-hand); font-weight: 700; font-size: 1.6rem; line-height: 1.2; color: var(--inv-primary); margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.ab-lesson-text h3 { font-size: clamp(1.24rem, 4vw, 1.44rem); margin-bottom: 4px; }
.ab-lesson-place { font-weight: 500; margin: 0; }
.ab-lesson-address, .ab-lesson-notes { color: var(--ab-soft); margin: 0; }
.ab-lesson-notes { font-style: italic; margin-top: 6px; }
.ab-lesson .kit-event-actions { margin-top: 14px; justify-content: center; }
@media (min-width: 760px) {
    .ab-lesson-card { grid-template-columns: 160px minmax(0, 1fr); text-align: left; align-items: center; justify-items: start; padding: 30px 36px 26px; }
    .ab-lesson-art { width: 160px; }
    .ab-lesson .kit-event-actions { justify-content: flex-start; }
}
.absolvire .kit-button { border-radius: 6px; border: 1px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-size: .78rem; font-weight: 500; padding: 8px 18px; text-decoration: none; }
.absolvire .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: the blackboard */
.ab-board { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(28px, 5vw, 44px) clamp(14px, 4vw, 40px) clamp(40px, 6vw, 54px); text-align: center; border-radius: 6px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .07), transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 255, .05), transparent 50%),
        var(--ab-board);
    box-shadow: 0 0 0 12px #8a5a34, 0 0 0 14px #6b4426, inset 0 0 40px rgba(0, 0, 0, .35), 0 30px 40px -20px rgba(0, 0, 0, .5);
    margin-top: 14px; margin-bottom: 14px; }
.ab-board-title { font-family: var(--ab-hand); font-size: 1.4rem; color: rgba(255, 255, 255, .88); margin: 0 0 10px; text-shadow: 0 0 2px rgba(255, 255, 255, .5); }
.ab-countdown .kit-countdown { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px clamp(10px, 4vw, 40px); }
.ab-countdown .kit-countdown-unit { min-width: 0; padding: 0; background: none; }
.ab-countdown .kit-countdown-value { font-family: var(--ab-hand); font-weight: 700; font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1.1; color: #f7f5ee; text-shadow: 0 0 3px rgba(255, 255, 255, .55), 1px 1px 0 rgba(255, 255, 255, .15); font-variant-numeric: tabular-nums; }
.ab-countdown .kit-countdown-label { font-family: var(--ab-hand); font-size: .9rem; letter-spacing: .04em; text-transform: lowercase; opacity: 1; color: color-mix(in srgb, var(--inv-accent) 80%, #fff); }
.ab-chalk { position: absolute; right: 12%; bottom: -12px; width: 46px; height: 9px; border-radius: 3px; background: linear-gradient(#fff, #e7e2d6); box-shadow: 0 2px 2px rgba(0, 0, 0, .3); }
.ab-chalk::before { content: ""; position: absolute; right: 70px; top: -6px; width: 70px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, #5d4636 0 55%, #c9c4b8 55%); box-shadow: 0 2px 3px rgba(0, 0, 0, .3); }
.kit-js .ab-countdown .kit-countdown-unit { opacity: 0; transition: opacity .6s ease; }
.kit-js .ab-countdown .kit-countdown-unit:nth-child(2) { transition-delay: .2s; }
.kit-js .ab-countdown .kit-countdown-unit:nth-child(3) { transition-delay: .4s; }
.kit-js .ab-countdown .kit-countdown-unit:nth-child(4) { transition-delay: .6s; }
.kit-js .ab-countdown.is-visible .kit-countdown-unit { opacity: 1; }

/* Gallery: a yearbook, photos taped in */
.ab-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 3vw, 36px) clamp(14px, 2vw, 24px); }
.ab-gallery-grid.kit-gallery a { position: relative; aspect-ratio: 4 / 5; padding: 8px 8px 24px; background: #fffdf8; border-radius: 2px; box-shadow: var(--ab-shadow); rotate: -1.6deg; transition: rotate .5s ease, translate .5s ease; overflow: visible; }
.ab-gallery-grid.kit-gallery a:nth-child(even) { rotate: 1.4deg; }
.ab-gallery-grid.kit-gallery a::before { content: ""; position: absolute; left: 50%; top: -11px; width: 70px; height: 22px; margin-left: -35px; rotate: -3deg; z-index: 1;
    background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--inv-accent) 70%, transparent) 0 6px, color-mix(in srgb, var(--inv-accent) 50%, transparent) 6px 12px); opacity: .9; }
.ab-gallery-grid.kit-gallery a:nth-child(3n+2)::before { rotate: 4deg; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--inv-primary) 30%, transparent) 0 6px, color-mix(in srgb, var(--inv-primary) 18%, transparent) 6px 12px); }
.ab-gallery-grid.kit-gallery img { width: 100%; height: 100%; object-fit: cover; }
.ab-gallery-grid.kit-gallery a:hover { rotate: 0deg; translate: 0 -4px; }
@media (min-width: 760px) { .ab-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP, info, contact */
.ab-reply { max-width: 700px; margin: 0 auto; padding: clamp(40px, 6vw, 56px) clamp(24px, 6vw, 56px) clamp(32px, 5vw, 48px); border-top: 4px solid var(--ab-gold); }
.absolvire .inv-rsvp__intro { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.06rem; }
.absolvire .inv-rsvp__deadline { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-primary); }
.ab-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ab-info-item { padding: 30px 24px 20px; text-align: center; }
.ab-info-item h3 { font-size: 1.22rem; color: var(--inv-primary); margin-bottom: 8px; }
.ab-faq { max-width: 720px; margin: 46px auto 0; text-align: center; display: grid; gap: 12px; }
.ab-faq details { text-align: left; }
.ab-faq summary { cursor: pointer; list-style: none; padding: 17px 52px 17px 22px; position: relative; font-weight: 500; font-size: 1.02rem; }
.ab-faq summary::-webkit-details-marker { display: none; }
.ab-faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: var(--ab-gold);
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); transition: rotate .5s ease; }
.ab-faq details[open] summary::after { rotate: 144deg; }
.ab-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; border-radius: 8px; }
.ab-faq details p { padding: 0 22px; color: var(--ab-soft); }
.ab-faq details p:last-child { padding-bottom: 16px; }
.ab-contact { text-align: center; }
.ab-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.ab-contact-person a { text-decoration: none; }

/* ---------- Footer: the caps fly up one last time ---------- */
.ab-footer { text-align: center; padding: clamp(60px, 9vw, 100px) 16px 70px; overflow: hidden; overflow: clip; }
.ab-toss { position: relative; height: 170px; max-width: 520px; margin: 0 auto 10px; }
.ab-tossed { position: absolute; left: calc(6% + var(--i) * 13%); bottom: 0; width: 48px; height: 36px; opacity: 0; overflow: visible; }
.ab-tossed-board { fill: var(--ab-cap); }
.ab-tossed-cap { fill: color-mix(in srgb, var(--ab-cap) 80%, #000); }
.ab-tossed-tassel { fill: none; stroke: var(--ab-gold); stroke-width: 1.8; stroke-linecap: round; }
.ab-tossed-knot { fill: var(--ab-gold); }
.ab-dark .ab-tossed-board { fill: var(--inv-primary); }
.ab-dark .ab-tossed-cap { fill: color-mix(in srgb, var(--inv-primary) 70%, #000); }
.kit-js .ab-footer.is-visible .ab-tossed { animation: ab-toss 3.4s cubic-bezier(.3, .6, .5, 1) infinite; animation-delay: calc(var(--i) * .18s); }
@keyframes ab-toss { 0% { opacity: 0; translate: 0 20px; rotate: 0deg; } 10% { opacity: 1; } 45% { translate: 0 -120px; rotate: 200deg; } 80% { opacity: 1; translate: 0 -10px; rotate: 360deg; } 100% { opacity: 0; translate: 0 10px; rotate: 380deg; } }
.ab-tossed:nth-child(even) { animation-duration: 3.8s; }
.ab-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.16rem; color: var(--ab-soft); max-width: 36ch; margin: 0 auto 6px; }
.absolvire .ab-footer-name { font-family: var(--ab-script); font-size: clamp(3.2rem, 12vw, 5rem); line-height: 1.15; color: var(--inv-primary); margin: 4px 0 10px; }
.ab-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .kit-js .ab-cap img, .kit-js .ab-diploma--hero, .kit-js .ab-seal, .kit-js .ab-hero-text > * { animation: none; }
    .kit-js .ab-title .ab-pencil { stroke-dashoffset: 0; transition: none; }
    .kit-js .ab-title .ab-star, .kit-js .ab-welcome .ab-owl img, .kit-js .ab-graduate-grid .ab-backpack img, .kit-js .ab-lesson .ab-lesson-card, .kit-js .ab-countdown .kit-countdown-unit { opacity: 1; translate: 0 0; scale: 1; transition: none; }
    .kit-js .ab-footer.is-visible .ab-tossed { animation: none; opacity: 1; }
}
