/* Seraph Living home (root host only; linked from storefront/hub.php).
   One studio, real products: the line-up, Made In LoveWorld, the brand rooms, the bag.
   Every block starts and ends on the header's own edge (--edge). */

.store-hub.page-home { --edge: var(--gutter); }
@media (min-width: 1025px) { .store-hub.page-home { --edge: clamp(24px, 5vw, 80px); } }
.store-hub.page-home main { overflow-x: clip; }
.store-hub.page-home .footer { margin-top: 0; }

/* ---------- Buttons: the header's pill, solid for the one main action ---------- */
.hm-btn.btn {
    min-height: 52px;
    padding: 0 32px;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--hm-btn, #1A1A18);
    color: var(--hm-btn-ink, #FCFCF9);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    transition: background-color 180ms ease-out, color 180ms ease-out, transform 120ms ease-out;
}
.hm-btn--quiet.btn { background: var(--hm-quiet, rgba(26, 26, 24, 0.08)); color: var(--hm-quiet-ink, #1A1A18); }
.hm-btn .arrow { display: inline-block; }
@media (hover: hover) and (pointer: fine) {
    .hm-btn.btn:hover { background: var(--hm-btn-hover, #000000); color: var(--hm-btn-ink, #FCFCF9); }
    .hm-btn--quiet.btn:hover { background: var(--hm-quiet-hover, rgba(26, 26, 24, 0.14)); color: var(--hm-quiet-ink, #1A1A18); }
}
.hm-btn.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- The line-up ---------- */
.hm-hero {
    position: relative;
    isolation: isolate;
    height: clamp(calc(540px + var(--header-total)), 100svh, calc(1000px + var(--header-total)));
    overflow: hidden;
    background: linear-gradient(180deg, #FCFCF9 0%, #F7F7F5 46%, #E9EAE9 78%, #DEDFDE 100%);
    color: #1A1A18;
}
/* Units: the stage is drawn at 1440 x 772 (--u scales it to fit, nothing ever crops). A taller stage leaves
   --spare height, shared between the wall above the wordmark and the floor under the products. */
.hm-stage { position: absolute; z-index: 1; inset: var(--header-total) 0 0; container-type: size; }
.hm-word,
.hm-tag,
.hm-obj { --u: min(100cqh / 772, 100cqw / 1440); --spare: max(0px, 100cqh - 772 * var(--u)); }
.hm-word,
.hm-tag { --wt: calc(clamp(14px, 2.6cqh, 28px) + 0.42 * var(--spare)); --ww: min(100cqw - 2 * var(--edge), 195cqh); }

/* The wordmark: the logo's own gold letters, cut one by one so each can rise. */
.hm-word {
    position: absolute;
    top: var(--wt);
    left: 50%;
    width: var(--ww);
    aspect-ratio: 1868 / 356;
    translate: -50% 0;
}
/* LIVING sits under the S, as in the logo lockup; it stands above the products so none can cover it. */
.hm-stage .hm-tag {
    position: absolute;
    z-index: 20;
    left: calc(50% - var(--ww) * 0.496);
    top: calc(var(--wt) + var(--ww) * 0.1966);
    font-family: 'Cinzel', var(--font-title);
    font-weight: 500;
    font-size: max(15px, var(--ww) * 0.022);
    line-height: 1;
    letter-spacing: 0.6em;
    text-transform: uppercase;
    pointer-events: none;
}
.hm-tag > span { background: linear-gradient(180deg, #F2DC9E 0%, #D6A548 50%, #9C6E26 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-word__l { position: absolute; top: 0; height: 100%; overflow: clip; overflow-clip-margin: 2px; }
.hm-word__l i { position: absolute; inset: 0; background-image: var(--word); background-repeat: no-repeat; }
.hm-word__line,
.hm-word__dot { position: absolute; visibility: hidden; background: linear-gradient(90deg, #B98A38, #F2DC9E 45%, #C99A44 100%); }
.hm-word__line { left: 0; right: 0; bottom: 0; height: 2px; transform: scaleX(0); }
.hm-word__dot { left: 50%; top: 50%; width: 5cqw; max-width: 72px; aspect-ratio: 1; margin: -2.5cqw 0 0 -2.5cqw; border-radius: 50%; background: linear-gradient(150deg, #F6E3A8 8%, #D6A548 48%, #A8752A 92%); transform: scale(0); }

/* Products stand on one floor. */
.hm-lineup { margin: 0; padding: 0; list-style: none; }
.hm-obj {
    position: absolute;
    z-index: var(--z);
    left: calc(50% + (var(--x) - 720) * var(--u) - var(--h) * var(--r) * var(--u) / 2);
    bottom: calc(var(--b) * var(--u) + 0.26 * var(--spare));
    width: calc(var(--h) * var(--r) * var(--u));
    height: calc(var(--h) * var(--u));
    color: inherit;
    pointer-events: none;
    transform-origin: 50% 100%;
}
.hm-obj::before,
.hm-obj::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: calc((1 - var(--s)) * 50%);
    right: calc((1 - var(--s)) * 50%);
    border-radius: 50%;
}
.hm-obj::before { bottom: calc(-7px * var(--k, 1)); height: 16px; background: radial-gradient(closest-side, rgba(20, 18, 14, 0.56), rgba(20, 18, 14, 0)); }
.hm-obj::after { bottom: -24px; height: 56px; margin: 0 -8% 0 -4%; background: radial-gradient(closest-side, rgba(20, 18, 14, 0.24), rgba(20, 18, 14, 0)); }
.hm-obj img { position: relative; display: block; width: 100%; height: 100%; }
.hm-obj__hit { position: absolute; inset: 0; pointer-events: auto; cursor: pointer; }
.hm-obj:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 8px; }

.hm-hero__foot {
    position: absolute;
    z-index: 2;
    left: var(--edge);
    right: var(--edge);
    bottom: clamp(20px, 3.4svh, 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px clamp(20px, 2.4vw, 36px);
    pointer-events: none;
}
.hm-hero__foot > * { pointer-events: auto; }
.hm-hero__line { margin: 0; padding-bottom: 0.55em; max-width: 25ch; font-size: clamp(17px, 1.35vw, 21px); line-height: 1.35; }
.hm-hero__actions { display: flex; gap: 12px; padding-bottom: 8px; }
/* Words rise from behind a mask line; the extra room keeps p, g and y whole. */
.hm-roll { position: relative; display: inline-grid; overflow: clip; padding: 0.06em 0.06em 0.2em 0; margin: -0.06em -0.06em -0.2em 0; vertical-align: top; }
.hm-roll > span { grid-area: 1 / 1; }

/* ---------- Made In LoveWorld ---------- */
.hm-made { position: relative; isolation: isolate; overflow: hidden; background: #0C0C0C; color: #F4F1E8; }
.hm-made__ground { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.hm-made__inner { position: relative; padding: clamp(72px, 6.6vw, 112px) var(--edge) clamp(48px, 5vw, 88px); }
.hm-made__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hm-made__title { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(50px, 9.1vw, 176px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.14)); }
.hm-foil {
    padding-bottom: 0.12em; /* descender room inside the clipped text */
    background: linear-gradient(100deg, #A5762A 0%, #E9C777 14%, #FFF3CF 22%, #C98F35 34%, #F0D48D 48%, #A5762A 60%, #F6E0A4 74%, #BE852F 86%, #ECCB80 100%) 50% 0 / 180% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.hm-made__emblem { flex: none; width: clamp(72px, 9vw, 172px); height: auto; }
.hm-made__world { position: relative; width: clamp(min(100%, 860px), calc((100svh - 350px) * 2.048), 100%); margin: clamp(20px, 2vw, 36px) 0 0 auto; }
.hm-made__map { position: relative; }
.hm-made__land { display: block; width: 100%; height: auto; }
.hm-made__star { position: absolute; width: clamp(20px, 3vw, 44px); height: auto; overflow: visible; translate: -50% -50%; }
.hm-made__places { position: absolute; inset: 0; }
.hm-made__label { position: absolute; left: calc(100% + 2 * var(--edge) - 100vw); bottom: 4%; margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(26px, 2.5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; color: #F3DA97; }
.hm-made__places ul { margin: 0; padding: 0; list-style: none; }
.hm-made__places li { position: absolute; left: var(--x); top: var(--y); font-size: clamp(16px, 1.35vw, 22px); font-weight: 500; line-height: 1.2; white-space: nowrap; text-shadow: 0 0 10px #0C0C0C, 0 0 4px #0C0C0C; }
.hm-made__places .is-e { translate: clamp(18px, 2vw, 32px) -50%; }
.hm-made__places .is-w { translate: calc(-100% - clamp(18px, 2vw, 32px)) -50%; }
.hm-made__places .is-sw { translate: calc(-100% - 8px) clamp(14px, 1.8vw, 28px); }

/* ---------- Our Brands: one room per brand ---------- */
.hm-brands { padding: clamp(64px, 6.7vw, 112px) var(--edge) clamp(72px, 7.5vw, 128px); background: #FCFCF9; }
.hm-wall { --gap: 12px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: max(330px, 31vw); gap: var(--gap); }
.hm-wall ul { display: contents; list-style: none; }
.hm-wall__head { grid-column: span 3; display: flex; align-items: flex-start; }
.hm-wall__head h2 { margin: -0.1em 0 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(56px, 6.2vw, 112px); line-height: 0.98; letter-spacing: -0.03em; color: #1A1A18; }
.hm-tile { grid-column: span 3; }
.hm-tile--wide { grid-column: span 4; }
.hm-tile a { position: relative; display: block; height: 100%; overflow: hidden; background: var(--tone); color: #FCFCF9; text-decoration: none; }
.hm-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1); }
.hm-tile__text { position: absolute; top: clamp(18px, 1.8vw, 32px); left: clamp(18px, 1.8vw, 32px); right: clamp(18px, 1.8vw, 32px); display: grid; gap: 6px; }
.hm-tile__name { font-family: var(--font-title); font-size: clamp(24px, 2vw, 36px); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.hm-tile__line { max-width: 27ch; font-size: clamp(15px, 1.1vw, 18px); line-height: 1.35; text-wrap: balance; }
.hm-tile--light a { color: #17171A; }
.hm-tile--aside .hm-tile__text { right: auto; width: 39%; } /* the figure takes the right of the tile, so the words keep to the left */
.hm-tile__go {
    position: absolute;
    right: clamp(12px, 1.2vw, 20px);
    bottom: clamp(12px, 1.2vw, 20px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: #FCFCF9;
    color: #1A1A18;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
}
.hm-tile__go .ti { font-size: 17px; }
.hm-tile a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
    .hm-tile__go { transform: scale(0); transform-origin: 100% 100%; transition: transform 200ms ease-in; }
    .hm-tile a:hover .hm-tile__go,
    .hm-tile a:focus-visible .hm-tile__go { transform: scale(1); transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }
    .hm-tile a:hover img { transform: scale(1.03); }
}
.hm-tile a:active img { transform: scale(1.01); transition-duration: 120ms; }

/* ---------- One account, one bag ---------- */
.hm-order { background: linear-gradient(180deg, #F1F2F1 0%, #E6E7E6 100%); color: #1A1A18; }
.hm-order__inner { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: end; gap: clamp(24px, 3vw, 48px); padding: clamp(72px, 7vw, 112px) var(--edge) 0; }
.hm-order__text { align-self: center; padding-bottom: clamp(48px, 6vw, 96px); }
.hm-order h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(48px, 5vw, 96px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.hm-order p { margin: 24px 0 32px; max-width: 32ch; font-size: clamp(18px, 1.4vw, 22px); line-height: 1.45; text-wrap: pretty; }
/* Help links: one stacked list under the button, each led by its icon. */
.hm-order__links { display: grid; justify-items: start; gap: 4px; margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid rgba(26, 26, 24, 0.1); list-style: none; }
.hm-order__links a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 16px; font-weight: 500; color: #1A1A18; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 6px; transition: text-decoration-color 160ms ease-out; }
.hm-order__links i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(26, 26, 24, 0.06); font-size: 17px; color: #1A1A18; }
@media (hover: hover) and (pointer: fine) { .hm-order__links a:hover { text-decoration-color: rgba(26, 26, 24, 0.4); } }
.hm-order__links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.hm-order__pic { display: block; width: calc(100% + var(--edge)); max-width: none; height: auto; margin-right: calc(-1 * var(--edge)); }

/* ---------- Leaving: the touched brand's colour floods the page, then its site opens ---------- */
.hm-leave { position: fixed; z-index: 300; border-radius: 50%; pointer-events: none; background: var(--tone, #1A1A18); }

/* ---------- Before the opening plays (hub-motion.js clears .hub-anim) ---------- */
.hub-anim .hm-word__l i { transform: translateY(106%); }
.hub-anim .hm-obj { transform: scale(0); }
.hub-anim .hm-roll > span { transform: translateY(125%); }
.hub-anim .hm-hero__actions .btn { transform: scale(0); transition: none; }
.hub-anim.hub-intro .header { transform: translateY(-100%); }
.hub-anim .hm-made__land { clip-path: inset(0 100% 0 0); }
.hub-anim .hm-made__star { scale: 0; }
.hub-anim .hm-made__places li { opacity: 0; }
.hm-made.is-in .hm-made__land { clip-path: inset(0 0 0 0); transition: clip-path 1500ms cubic-bezier(0.65, 0, 0.35, 1); }
.hm-made.is-in .hm-made__star { scale: 1; transition: scale 620ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(700ms + var(--i) * 110ms); }
.hm-made.is-in .hm-made__places li { opacity: 1; transition: opacity 320ms ease-out 1100ms; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
    .hm-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: auto; }
    .hm-wall__head { grid-column: span var(--md); }
    .hm-wall__head h2 { font-size: clamp(44px, 7.4vw, 76px); }
    .hm-tile,
    .hm-tile--wide { grid-column: span 2; aspect-ratio: 420 / 640; }
    .hm-tile--aside .hm-tile__text { width: 46%; }
}
/* Portrait windows: the products close up into a group (the phone's arrangement), still on one full screen. */
@media (min-width: 701px) and (max-aspect-ratio: 21/20) {
    .hm-hero { height: max(100svh, calc(540px + var(--header-total))); }
    .hm-word,
    .hm-tag,
    .hm-obj { --u: min(100cqw / 390, (100cqh - 200px) / 360); --spare: max(0px, 100cqh - 360 * var(--u) - 160px); }
    .hm-word,
    .hm-tag { --wt: calc(clamp(14px, 2.6cqh, 28px) + 0.3 * var(--spare)); --ww: calc(100cqw - 2 * var(--edge)); }
    .hm-stage .hm-tag { letter-spacing: 0.42em; }
    .hm-obj {
        z-index: var(--tz);
        left: calc(50% + (var(--tx) - 195 - var(--th) * var(--r) / 2) * var(--u));
        bottom: calc((var(--tb) - 214) * var(--u) + 132px + 0.3 * var(--spare));
        width: calc(var(--th) * var(--r) * var(--u));
        height: calc(var(--th) * var(--u));
    }
}
@media (max-width: 900px) {
    .hm-hero__foot { grid-template-columns: minmax(0, 1fr) auto; }
    .hm-hero__line { grid-column: 1; grid-row: 2; max-width: none; padding: 0; }
    .hm-hero__actions { grid-column: 2; grid-row: 1 / span 2; align-self: end; padding: 0; }
    .hm-order__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hm-order__text { padding-bottom: 8px; }
    .hm-order__pic { width: calc(100% + 2 * var(--edge)); margin-inline: calc(-1 * var(--edge)); }
}

/* ---------- Phone: the line-up closes up into a group; names move under the map ---------- */
@media (max-width: 700px) {
    .hm-hero { display: flex; flex-direction: column; height: auto; min-height: 100svh; }
    .hm-stage { position: relative; inset: auto; flex: 1 0 calc(280px + var(--header-total)); max-height: calc(160vw + var(--header-total)); }
    .hm-word__l i { background-image: var(--word-small); }
    .hm-word,
    .hm-tag,
    .hm-obj { --u: min(100cqw / 390, (100cqh - var(--header-total) - 48px) / 356); --spare: max(0px, 100cqh - var(--header-total) - 356 * var(--u) - 65px); }
    .hm-word,
    .hm-tag { --wt: calc(var(--header-total) + 18px + 0.6 * var(--spare)); --ww: calc(100cqw - 2 * var(--edge)); }
    .hm-obj {
        z-index: var(--tz);
        left: calc(50% + (var(--tx) - 195 - var(--th) * var(--r) / 2) * var(--u));
        bottom: calc((var(--tb) - 214) * var(--u) + 0.3 * var(--spare));
        width: calc(var(--th) * var(--r) * var(--u));
        height: calc(var(--th) * var(--u));
    }
    .hm-obj::before { height: 9px; bottom: -4px; }
    .hm-obj::after { height: 28px; bottom: -13px; }
    .hm-hero__foot { position: relative; left: auto; right: auto; bottom: auto; padding: 0 var(--edge) 24px; grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .hm-hero__line { font-size: 18px; }
    .hm-hero__actions { grid-column: 1; grid-row: auto; margin-top: 16px; gap: 8px; flex-wrap: wrap; }
    .hm-hero__actions .hm-btn { flex: 1 1 auto; justify-content: center; padding: 0 10px; }

    .hm-made__head { align-items: flex-start; }
    .hm-made__title { max-width: 5.2em; }
    .hm-made__emblem { width: 76px; }
    .hm-made__world { margin-top: 32px; }
    .hm-made__map { margin-inline: calc(-1 * var(--edge)); }
    .hm-made__places { position: static; margin-top: 28px; }
    .hm-made__label { position: static; margin-bottom: 16px; font-size: 28px; }
    .hm-made__places ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
    .hm-made__places li { position: static; translate: none !important; font-size: 18px; }

    .hm-wall { --gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-wall__head { grid-column: span var(--sm); padding-bottom: 12px; }
    .hm-wall__head h2 { font-size: 56px; }
    .hm-tile,
    .hm-tile--wide { grid-column: span 1; aspect-ratio: 420 / 700; }
    .hm-tile__text { top: 16px; left: 14px; right: 14px; gap: 4px; }
    .hm-tile__name { font-size: 21px; }
    .hm-tile__line { font-size: 14px; }
    .hm-tile--aside .hm-tile__text { right: auto; width: 54%; }
    .hm-tile__go { min-height: 40px; padding: 0; width: 40px; justify-content: center; right: 10px; bottom: 10px; }
    .hm-tile__go span { display: none; }
    .hm-order .hm-btn { width: 100%; justify-content: center; }
}

@media (max-width: 379px) {
    .hm-hero__actions .hm-btn { padding: 0 8px; font-size: 15px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-tile img, .hm-tile__go, .hm-btn.btn { transition: none; }
    .hm-tile a:hover img { transform: none; }
}
