/* 2026-11-27: extend the home background across the viewport behind the centered poster. */
@font-face {
    font-family: "Negrita Pro";
    src: url("../fonts/NegritaPro.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Bebas Neue";
    src: url("../fonts/bebas-neue-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root { background: #061532; }
body.home-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #061532 url("../images/home/background.jpg") center top / cover no-repeat;
    color: #fff8db;
}
.home-screen main { display: flex; flex: 1 0 auto; width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; }
.home-screen .skip:focus { z-index: 10; color: #061532; }

/* Heading above the information group; extra row height reserves the tilted frame's full bounds. */
.home-poster {
    position: relative;
    isolation: isolate;
    container-type: inline-size;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(clamp(16px, 1.4vw, 26px), 1fr) auto;
    align-content: stretch;
    flex: 1;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding-block: clamp(24px, 2vw, 36px) clamp(28px, 2.5vw, 44px);
    overflow: clip;
    font-family: "Negrita Pro", Impact, sans-serif;
    text-transform: uppercase;
    line-height: 1;
    --home-yellow: #ffe500;
    --home-red: #b40023;
    --home-cream: #fff8db;
}
.home-poster img { display: block; max-width: 100%; height: auto; }
.home-poster h1, .home-poster h2, .home-poster p { margin: 0; font-weight: 400; }
.home-poster a { color: inherit; text-decoration: none; }
.home-poster a:focus-visible { outline: 4px solid var(--home-yellow); outline-offset: 6px; }
.home-santa { position: absolute; z-index: -1; display: flex; align-items: center; left: 1.75%; top: 0; bottom: 0; width: 34.4%; pointer-events: none; }
.home-santa img { width: 100%; height: auto; }
.home-heading { grid-column: 1; grid-row: 1; min-width: 0; margin: 0 2cqw 0 29.9cqw; }
.home-heading h1 { margin-left: 6.1cqw; font-size: 7.32cqw; line-height: .84; }
.home-date { font-size: 3.98cqw; line-height: .94; white-space: nowrap; }
.home-place { margin-left: .8cqw !important; font-size: 4.76cqw; line-height: .96; white-space: nowrap; }
.home-information { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: 38% 60%; row-gap: clamp(16px, 1.4vw, 26px); min-width: 0; align-content: start; }

.home-registration { grid-column: 2; min-width: 0; min-height: max(24.5cqw, 236px); position: relative; }
.home-registration-panel { position: relative; margin-top: 6.2cqw; padding: .5cqw .7cqw .8cqw 13.5cqw; border-radius: 1.65cqw; background: var(--home-red); transform: rotate(-1deg); }
.home-registration h2 { color: var(--home-yellow); font-size: 3.72cqw; white-space: nowrap; line-height: 1; }
.home-registration-details { display: flex; align-items: center; gap: .7cqw; margin-top: .2cqw; }
.home-registration-copy { flex: 1; min-width: 0; font-size: 2.63cqw; line-height: .92; white-space: nowrap; }
.home-registration-copy span { display: block; }
.home-registration-copy span:last-child { font-size: 2.22cqw; }
.home-capacity { display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: .28cqw solid var(--home-cream); padding-left: .8cqw; }
.home-capacity strong { font-size: 4.55cqw; font-weight: 400; line-height: .85; }
.home-capacity > span { font-size: 2.24cqw; line-height: .9; }
.home-capacity small { color: inherit; font-family: inherit; font-size: max(12px, 1.2cqw); line-height: 1; white-space: nowrap; }

/* One semantic link: the photograph, white frame and caption all lead to registration. */
.home-polaroid { position: absolute; z-index: 1; left: -4.1cqw; top: .7cqw; width: 15.4cqw; padding: .6cqw; background: #f9f9f6; box-shadow: .2cqw .3cqw .3cqw #0008; transform: rotate(-5deg); transition: box-shadow 200ms ease; }
.home-polaroid img { width: 100%; }
.home-polaroid-cta { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: .4cqw; padding: .42cqw .2cqw .34cqw; border-radius: .12cqw; background: #2f2e82; color: var(--home-yellow); font: 700 max(22px, 2.2cqw)/1 "Bebas Neue", Impact, sans-serif; text-align: center; white-space: nowrap; transition: background-color 200ms ease; }
.home-polaroid-cta > span { position: relative; z-index: 1; }
.home-polaroid:is(:hover, :focus-visible) { box-shadow: .2cqw .3cqw .4cqw #0009, 0 0 22px 4px #ffe48a38; }
.home-polaroid:is(:hover, :focus-visible) .home-polaroid-cta { background: #3b3a95; }
.home-polaroid-cta::after { content: ""; position: absolute; z-index: 0; pointer-events: none; top: -60%; bottom: -60%; left: 0; width: 30%; background: linear-gradient(90deg, transparent, #fff4ce42, transparent); transform: translateX(-150%) skewX(-20deg); opacity: 0; animation: home-cta-shine 8s ease-in-out infinite; }
@keyframes home-cta-shine {
    0%, 65% { transform: translateX(-150%) skewX(-20deg); opacity: 0; }
    67% { opacity: .65; }
    90% { transform: translateX(450%) skewX(-20deg); opacity: .65; }
    92%, 100% { transform: translateX(450%) skewX(-20deg); opacity: 0; }
}

.home-older { grid-column: 2; min-width: 0; margin: .5cqw 0 .5cqw 3.2cqw; position: relative; padding: .8cqw 14.8cqw .8cqw 1cqw; border-radius: 1.6cqw; background: var(--home-red); transform: rotate(-1deg); }
.home-older h2 { color: var(--home-yellow); font-size: 3.55cqw; line-height: 1; white-space: nowrap; }
.home-older-details { display: flex; align-items: center; gap: .7cqw; margin-top: .2cqw; }
.home-older .home-small-gifts { width: 7.5cqw; flex: 0 0 auto; }
.home-older p { font-size: 2.1cqw; line-height: .98; white-space: nowrap; }
.home-older p span { display: block; }
.home-older .home-big-gifts { position: absolute; right: -.2cqw; bottom: -.7cqw; width: 14.2cqw; }
.home-parents { grid-column: 2; min-width: 0; margin-left: 3.2cqw; min-height: 10.5cqw; display: flex; align-items: center; padding: .7cqw 1cqw 1cqw; border-radius: 1.7cqw; background: var(--home-red); transform: rotate(-1deg); }
.home-parents-copy { flex: 1; min-width: 0; text-align: center; }
.home-parents h2 { color: var(--home-yellow); font-size: 3.8cqw; white-space: nowrap; line-height: .9; }
.home-parents p { font-size: 2.95cqw; line-height: .95; white-space: nowrap; }
.home-parents p span { display: block; }
.home-parents > img { width: 33.7%; margin-left: .9cqw; flex: 0 0 auto; }
.home-brand { grid-column: 1; grid-row: 3; align-self: end; position: relative; width: 97.36%; height: 7.5cqw; display: flex; justify-content: flex-end; align-items: center; padding-right: 1.5cqw; border-radius: 0 1.6cqw 1.6cqw 0; background: #2f2e82; }
.home-brand img { width: 84%; }

/* Preserve the portrait layout; the linked frame now participates in the row's height. */
@media (max-width: 700px), (max-width: 1100px) and (max-aspect-ratio: 5/4) {
    body.home-screen { background: linear-gradient(#020e25 5%, #0a2053 70%, #05194d); }
    .home-poster { grid-template-rows: auto minmax(clamp(240px, calc(55vw + 14px), 514px), 1fr) auto; padding-block: 24px; }
    .home-information { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
    .home-heading { grid-column: 1; grid-row: 1; margin: 0 16px; text-align: center; }
    .home-heading h1 { margin-left: 0; font-size: clamp(44px, 12.1cqw, 94px); line-height: .9; }
    .home-date { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .3em; margin-top: 8px !important; font-size: clamp(18px, 5.03cqw, 36px); line-height: 1.1; white-space: normal; }
    .home-date time, .home-date > span { white-space: nowrap; }
    .home-place { margin: 6px 0 0 !important; font-size: clamp(21px, 6.04cqw, 44px); line-height: 1.05; white-space: normal; text-wrap: balance; }
    .home-santa { grid-column: 1 / -1; grid-row: 2 / -1; position: absolute; inset: 0; display: block; width: auto; height: auto; margin: 0; }
    .home-santa img { position: static; width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: 60% bottom; }
    .home-registration { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); align-items: center; gap: clamp(18px, 4vw, 32px); min-height: 0; margin: 0 12px; padding: 20px 12px; background: var(--home-red); border-radius: 14px; }
    .home-registration-panel { grid-column: 2; grid-row: 1; min-width: 0; margin: 0; padding: 0; border-radius: 0; background: transparent; transform: none; font-size: clamp(16px, 4.13cqw, 28px); container: home-registration-panel / inline-size; }
    .home-registration h2 { font-size: clamp(22px, 5.55vw, 40px); line-height: 1.05; white-space: normal; text-wrap: balance; }
    .home-registration-details { display: block; margin-top: 8px; }
    .home-registration-copy { font-size: inherit; line-height: 1.06; white-space: normal; }
    .home-registration-copy span:last-child { font-size: inherit; }
    .home-capacity { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 3px 6px; margin-top: 8px !important; padding: 8px 0 0; border-left: 0; border-top: 1px solid #fff8db70; }
    .home-capacity strong { font-size: clamp(25px, 7.15vw, 40px); line-height: 1; }
    .home-capacity > span { font-size: clamp(17px, 3.65vw, 24px); line-height: 1; }
    .home-capacity small { font-size: clamp(12px, 1.92vw, 16px); line-height: 1; }
    .home-polaroid { grid-column: 1; grid-row: 1; position: relative; left: -2px; top: 0; width: 100%; padding: 6px; }
    .home-polaroid-cta { min-height: 44px; margin-top: 6px; padding: 3px 2px; font-size: clamp(21px, 4.2cqw, 30px); white-space: normal; text-wrap: balance; }
    .home-older { grid-column: 1; grid-row: 2; margin: 6px 12px; padding: 14px 24% 14px 12px; border-radius: 14px; transform: none; }
    .home-older h2 { font-size: clamp(24px, 5.55cqw, 40px); white-space: normal; text-wrap: balance; }
    .home-older-details { gap: 8px; margin-top: 6px; }
    .home-older .home-small-gifts { width: clamp(34px, 9cqw, 70px); }
    .home-older p { font-size: clamp(16px, 4cqw, 28px); line-height: 1.05; white-space: normal; }
    .home-older .home-big-gifts { right: -2px; bottom: 6px; width: 24%; }
    .home-parents { grid-column: 1; grid-row: 3; gap: 10px; min-height: 0; margin: 0 12px; padding: 16px 12px; border-radius: 14px; transform: none; }
    .home-parents-copy { transform: none; }
    .home-parents h2 { font-size: clamp(24px, 6.05cqw, 42px); line-height: 1.02; white-space: normal; text-wrap: balance; }
    .home-parents p { margin-top: 4px; font-size: clamp(16px, 4.8cqw, 30px); line-height: 1.08; white-space: normal; text-wrap: balance; }
    .home-parents > img { width: 29%; margin-left: 0; }
    .home-brand { grid-column: 1; grid-row: 4; position: relative; bottom: auto; width: 72%; max-width: 600px; min-height: 70px; height: auto; margin-top: 4px; padding: 12px 18px; border-radius: 0 14px 14px 0; }
    .home-brand img { width: 84%; max-width: 460px; }
}

/* Retain the right-hand capacity column only where the actual text panel has room. */
@container home-registration-panel (min-width: 420px) {
    .home-registration-details { display: flex; align-items: center; gap: 12px; }
    .home-registration-copy { font-size: clamp(16px, 3.95vw, 28px); }
    .home-registration-copy span:last-child { font-size: clamp(16px, 3.3vw, 26px); }
    .home-capacity { flex: 0 0 auto; flex-direction: column; flex-wrap: nowrap; align-self: stretch; justify-content: center; gap: 0; margin-top: 0 !important; padding: 0 0 0 12px; border-top: 0; border-left: 2px solid var(--home-cream); }
    .home-capacity strong { font-size: clamp(40px, 7.15vw, 64px); line-height: .9; }
    .home-capacity > span { font-size: clamp(20px, 3.65vw, 32px); line-height: .95; }
}
@media (prefers-reduced-motion: reduce) {
    .home-polaroid, .home-polaroid-cta { transition: none; }
    .home-polaroid-cta::after { animation: none; opacity: 0; }
}
