/* Ecosystem header, on every page: the brand strip with photo pills, the primary bar that pinches
   into a floating capsule on scroll (.header-motion, added by header-motion.js), and the menu drawer. */

/* ---------- Brand strip ---------- */
/* Generous, legible height and type size so every brand name is effortless to scan and tap. */
html:has(.store-strip) { --strip-h: 48px; }
@media (min-width: 1440px) { html:has(.store-strip) { --strip-h: 52px; } }

/* --strip-edge matches the header bar's own side padding; shifting by --pill-pad keeps the first and last
   brand names aligned with the logo and right-edge action below. */
.store-strip .store-strip__inner {
    --pill-pad: 12px;
    --pill-gap: 4px;
    --strip-edge: var(--gutter);
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: normal;
    height: 100%;
    gap: var(--pill-gap);
    padding-inline: calc(var(--strip-edge) - var(--pill-pad)) var(--strip-edge);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-padding-inline: 24px;
    -webkit-mask-image: none;
            mask-image: none;
}
.store-strip .store-strip__inner::-webkit-scrollbar { display: none; }
.store-strip .store-strip__inner::after { content: none; }
@media (min-width: 1025px) {
    .store-strip .store-strip__inner { --strip-edge: clamp(24px, 5vw, 80px); }
}
@media (min-width: 1280px) {
    .store-strip .store-strip__inner:not(.is-overflow) {
        justify-content: space-between;
        --pill-pad: 11px;
        --pill-gap: 2px;
        padding-inline: calc(var(--strip-edge) - var(--pill-pad));
    }
}
@media (min-width: 1440px) {
    .store-strip .store-strip__inner:not(.is-overflow) {
        --pill-pad: 12px;
        --pill-gap: 4px;
    }
}
.store-strip .store-strip__inner.is-overflow { padding-right: 48px; }
.store-strip .store-strip__inner.has-fade-right {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 6px));
            mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 6px));
}
.store-strip .store-strip__inner.has-fade-left {
    -webkit-mask-image: linear-gradient(90deg, transparent 14px, #000 28px);
            mask-image: linear-gradient(90deg, transparent 14px, #000 28px);
}
.store-strip .store-strip__inner.has-fade-left.has-fade-right {
    -webkit-mask-image: linear-gradient(90deg, transparent 14px, #000 28px, #000 calc(100% - 48px), transparent calc(100% - 6px));
            mask-image: linear-gradient(90deg, transparent 14px, #000 28px, #000 calc(100% - 48px), transparent calc(100% - 6px));
}

.store-strip .store-strip__link {
    height: 100%;
    flex: none;
    padding-inline: var(--pill-pad);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(244, 241, 232, 0.86);
}
@media (min-width: 1440px) { .store-strip .store-strip__link { font-size: 15.5px; } }
.store-strip .store-strip__link--all { color: #E7CB8F; font-weight: 500; }
.store-strip__link.has-peek { isolation: isolate; }
.store-strip__link.has-peek::after { display: none !important; }
.store-strip__link.has-peek::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 0;
    right: 0;
    height: 32px;
    margin-top: -16px;
    border-radius: 999px;
    background-image: linear-gradient(rgba(12, 12, 12, 0.68), rgba(12, 12, 12, 0.68)), var(--peek);
    background-position: center, center;
    background-repeat: no-repeat;
    background-size: 100% 100%, 135% auto;
    clip-path: inset(100% 0 0 0 round 999px);
    transition: clip-path 180ms cubic-bezier(0.4, 0, 1, 1), background-size 180ms cubic-bezier(0.4, 0, 1, 1);
}
.store-strip__link.has-peek[aria-current="page"]::before {
    clip-path: inset(0 0 0 0 round 999px);
    background-size: 100% 100%, 110% auto;
    box-shadow: inset 0 0 0 1px rgba(231, 203, 143, 0.48);
}
.store-strip__link[aria-current="page"] { color: #FFFFFF; font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
    .store-strip__link.has-peek:hover::before {
        clip-path: inset(0 0 0 0 round 999px);
        background-size: 100% 100%, 110% auto;
        transition: clip-path 300ms cubic-bezier(0.22, 1, 0.36, 1), background-size 600ms cubic-bezier(0.22, 1, 0.36, 1);
    }
    .store-strip__link.has-peek:hover { color: #FFFFFF; }
}
.store-strip__link:active::before { background-size: 100% 100%, 104% auto; }
.store-strip__link.has-peek:focus-visible { outline: none; color: #FFFFFF; }
.store-strip__link.has-peek:focus-visible::before { clip-path: inset(0 0 0 0 round 999px); box-shadow: inset 0 0 0 2px var(--gold); }
@media (max-width: 760px) {
    .store-strip__link.has-peek::before { height: 30px; margin-top: -15px; }
}
@media (prefers-reduced-motion: reduce) {
    .store-strip__link.has-peek::before { transition: none; }
}

/* ---------- Primary bar & floating capsule ---------- */
/* Keep tablet nav links visible whenever they fit; ResizeObserver folds them (.header--compact) only on overflow. */
@media (min-width: 761px) {
    .header__inner {
        max-width: none;
        padding-inline: var(--gutter);
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: clamp(20px, 3vw, 48px);
    }
    .header__brand { grid-column: 1; grid-row: 1; justify-self: start; }
    .header__nav { display: flex; grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; }
    .header__tools { grid-column: 3; grid-row: 1; gap: 4px; }
    .header__burger { display: none; }
    .header--compact .header__nav { display: none; }
    .header--compact .header__burger { display: flex; }
}
@media (min-width: 1025px) {
    .header__inner { padding-inline: clamp(24px, 5vw, 80px); }
}

/* The capsule: a plate replaces the header's own background, so the header box lets clicks through. */
.header-motion .header,
.header-motion .header--scrolled { background: transparent; border-bottom: 0; pointer-events: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-motion .store-strip,
.header-motion .header__brand,
.header-motion .header__nav a,
.header-motion .header__tools { pointer-events: auto; }
.header-motion .store-strip { position: relative; z-index: 2; overflow: hidden; }
.header-motion .header__inner { z-index: 1; }
.header-plate {
    position: absolute;
    top: var(--strip-h);
    left: 0;
    right: 0;
    height: var(--nav-h);
    pointer-events: none;
    filter: drop-shadow(0 0 1px rgba(20, 16, 12, 0)) drop-shadow(0 10px 28px rgba(20, 16, 12, 0));
}
.header-plate__fill { display: block; height: 100%; background: rgb(252, 252, 249); }
.header-plate__line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(20, 16, 12, 0.08);
}

/* Unified pill controls across links, tools, and the primary Bag / Shop button so everything nests
   concentrically inside the floating capsule on scroll. */
.header .header__nav { gap: 4px; }
.header__nav .header__link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-secondary);
    text-decoration: none !important;
    transition: background-color 160ms ease-out, color 160ms ease-out, transform 120ms ease-out;
}
.header__nav .header__link::after { display: none; }
@media (hover: hover) and (pointer: fine) {
    .header__nav .header__link:hover { background-color: rgba(20, 20, 20, 0.06); color: var(--text); }
}
.header__nav .header__link--active,
.header__nav .header__link[aria-current="page"] { background-color: rgba(20, 20, 20, 0.08); color: var(--text); }
.header__nav .header__link:active { transform: scale(0.97); }
.header__nav .header__link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.header .header__tools { gap: 4px; }
.header .header__tool,
.header .header__utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-secondary);
    transition: background-color 160ms ease-out, color 160ms ease-out, transform 120ms ease-out;
}
.header .header__tool-label { font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.header .header__user-trigger { min-height: 38px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.header .header__user-link { text-transform: none; }
@media (hover: hover) and (pointer: fine) {
    .header .header__tool:hover,
    .header .header__utility-link:hover { background-color: rgba(20, 20, 20, 0.06); color: var(--text); }
}
.header .header__tool:focus-visible,
.header .header__utility-link:focus-visible,
.header .header__user-trigger:focus-visible,
.header .header__bag:focus-visible,
.header .header__burger:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.header .header__bag {
    min-height: 38px;
    padding: 0 18px;
    gap: 8px;
    margin-left: 4px;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color 160ms ease-out, transform 120ms ease-out;
}
.header .header__bag:active { transform: scale(0.97); }
.header .header__bag .ti { font-size: 16px; }

.header .header__burger {
    width: 38px;
    height: 38px;
    padding: 0 9px;
    margin-left: 2px;
    gap: 5px;
    border-radius: 999px;
    transition: background-color 160ms ease-out;
}
.header .header__burger span { height: 1.5px; border-radius: 2px; }
@media (hover: hover) and (pointer: fine) {
    .header .header__burger:hover { background-color: rgba(20, 20, 20, 0.06); }
}

@media (max-width: 760px) {
    .header .header__tools { gap: 2px; }
    .header .header__tool { min-width: 36px; min-height: 36px; padding: 0 8px; }
    .header .header__bag { min-height: 36px; padding: 0 14px; gap: 6px; margin-left: 2px; font-size: 14px; }
    .header .header__burger { width: 36px; height: 36px; padding: 0 8px; }
}

/* ---------- Shop & footer shared alignment ---------- */
/* In the shop (shop.<root>) every page's content starts on the header's own edge, so the logo, the page
   title and the product grid share one left line and one right line at every width. */
.on-shop main .container { max-width: none; padding-inline: var(--gutter); }
@media (min-width: 1025px) { .on-shop main .container { padding-inline: clamp(24px, 5vw, 80px); } }

/* Bag and empty states in the shop: sentence case, no tracked capitals. */
.on-shop .cart-header .muted { font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-secondary, #5C5A55); }
.on-shop .empty-state__actions .link,
.on-shop .cart-summary .link { font-size: 16px; letter-spacing: 0; text-transform: none; }

/* The main site's footer uses the header's edge too, so logo above and logo below share one left line. */
.footer--seraph.footer--hub { --f-gutter: var(--gutter); }
@media (min-width: 1025px) { .footer--seraph.footer--hub { --f-gutter: clamp(24px, 5vw, 80px); } }
@media (max-width: 560px) {
    .footer--seraph .footer__bottom { flex-direction: column; align-items: flex-start; text-align: left; }
}
/* Brand sites' footers: the same edge as their header. */
.footer--seraph:not(.footer--hub) { padding-inline: var(--gutter); }
@media (min-width: 1025px) { .footer--seraph:not(.footer--hub) { padding-inline: clamp(24px, 5vw, 80px); } }

/* ---------- Mobile menu drawer ---------- */
.mobile-menu__head { margin-bottom: 24px; }
.mobile-menu__links { gap: 18px; }
.mobile-menu__links a.mobile-menu__shop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 24px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    background: var(--green);
    color: var(--on-green);
    border-radius: 999px;
    transition: background-color 160ms ease-out, transform 120ms ease-out;
}
@media (hover: hover) and (pointer: fine) {
    .mobile-menu__links a.mobile-menu__shop:hover { background: var(--green-deep); color: var(--on-green); }
}
.mobile-menu__links a.mobile-menu__shop:active { transform: scale(0.98); }

.mobile-menu__page-links { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu__page-links a {
    font-family: var(--font-title);
    font-size: 26px;
    font-weight: 400;
    line-height: 1.25;
    padding: 6px 0;
    color: var(--text);
}
.mobile-menu__page-links a[aria-current="page"] { color: var(--gold-text); }

.mobile-menu__label {
    margin: 0 0 10px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.mobile-menu__houses-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 16px;
}
.mobile-menu__houses-grid a {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    padding: 8px 0;
    color: var(--text-secondary);
    text-transform: none;
}
.mobile-menu__houses-grid a[aria-current="page"] { color: var(--text); font-weight: 600; }

.mobile-menu__account { display: flex; flex-direction: column; gap: 2px; }
.mobile-menu__account a {
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    padding: 8px 0;
    color: var(--text);
    text-transform: none;
}
.mobile-menu__signout { text-transform: none; font-size: 16px; font-weight: 500; padding: 8px 0; }
