/* One-screen intro on phones, tablets and desktops; the archive remains the real shop. */
body.home #page > .site-content,
body.home #main .inside-article { padding: 0; }
body.home #main .entry-content { margin-top: 0; }
.ah-home-splash {
    position: relative;
    overflow: clip;
    --ah-splash-scale: 1;
    box-sizing: border-box;
    min-height: calc(100svh - var(--ah-header-height, 100px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vh, 48px) 32px;
}
.ah-home-splash > figure {
    margin: 0;
    width: min(100%, 920px, calc(100svh - var(--ah-header-height, 100px) - 96px));
    transform: translateY(var(--ah-pull, 0px)) scale(var(--ah-splash-scale, 1));
    transition: transform 280ms cubic-bezier(.2, .8, .3, 1.1);
}
.ah-home-splash > figure img { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--ah-header-height, 100px) - 48px); object-fit: contain; }
.ah-home-splash img { -webkit-user-drag: none; user-select: none; }
.ah-home-splash.ah-dragging > figure { transition: none; }
/* Keep the scrolling element and scrollbar geometry unchanged throughout the handoff.
   Input interception and touch-action provide resistance without an overflow-mode switch. */
html { scrollbar-gutter: stable; }
html.ah-intro-locked, html.ah-intro-locked body { overscroll-behavior-y: none; }
html.ah-intro-locked .ah-home-shop { visibility: hidden; }
html.ah-intro-locked .ah-home-splash { touch-action: pan-x pinch-zoom; }
.ah-home-shop { display: flow-root; box-sizing: border-box; padding: 32px; min-height: max(220px, calc(100svh - var(--ah-shop-offset, 0px))); scroll-margin-top: var(--ah-shop-offset, 0px); }
.ah-shop-status { margin: 0 0 24px; }
.ah-home-shop[data-state="ready"] > .ah-shop-status { display: none; }
.ah-home-shop[aria-busy="true"] { cursor: progress; }

.ah-entering-shop .ah-home-splash > figure { transform: translateY(var(--ah-pull, 0px)) scale(var(--ah-splash-scale, 1)); transition: none; }
.ah-entering-shop .ah-home-shop > .ah-shop-catalog { animation: none; }

@media (max-width: 768px) {
    .ah-home-splash { padding: 24px 24px 36px; }
    .ah-home-splash > figure { width: min(100%, calc(100svh - var(--ah-header-height, 64px) - 64px)); }
    body.home .ah-home-shop { padding: 24px 16px; }
}
@media (max-height: 500px) {
    .ah-home-splash { padding: 12px 24px; }
    .ah-home-splash > figure { width: min(100%, calc(100svh - var(--ah-header-height, 64px) - 28px)); }
}
@media (prefers-reduced-motion: reduce) {
    .ah-home-shop[data-state="ready"] > .ah-shop-catalog,
    .ah-entering-shop .ah-home-shop > .ah-shop-catalog { animation: none; }
    .ah-home-splash > figure, .ah-entering-shop .ah-home-splash > figure { transition: none; opacity: 1; transform: scale(var(--ah-splash-scale, 1)); }
}

/* Use more of the available landscape width, without increasing the intro's scroll height.
   The unchanged square SVG has transparent top/bottom space; only that space can be clipped. */
@media (min-width: 769px) and (min-aspect-ratio: 6/5) {
    .ah-home-splash { --ah-splash-scale: 1.18; }
}
