/*
 * demo38 "Connect · Spotlight Stack" — the Connect page as a cinematic stack: each partner
 * magazine is a near-full-screen sticky card (blurred cover glow, big cover, Bodoni Moda name,
 * facts, three issues); the next card slides over it while it scales down and dims. FREE and
 * People follow as quiet grids. Site chrome: css/site.css, site-chrome.css, header.css.
 */
:root {
    --hh: 70px;
    --ink: #f4efe8;
    --soft: rgb(244 239 232 / 0.66);
    --faint: rgb(244 239 232 / 0.42);
    --rule: rgb(244 239 232 / 0.14);
    --gold: #ffb500;
    --green: #53f57e;
    --card: rgb(20 19 22 / 0.8);
    --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
    --sans: "Lato", "Source Sans 3", system-ui, sans-serif;
    --gut: clamp(16px, 3.4vw, 56px);
    --peek: 8px;
}
@media (max-width: 1199px) { :root { --hh: 50px; } }
/* site.css scrolls smoothly; here only the banner's own links glide (js), so programmatic and
   restored scroll positions jump straight to the sticky stack */
html { scroll-behavior: auto; }

.sx { padding: 0 0 clamp(64px, 9vw, 140px); color: var(--ink); font-family: var(--sans); }
.sx a { color: inherit; text-decoration: none; }
.sx :focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.sx img { display: block; max-width: 100%; }

.sx-kicker, .sx-head__no, .spot__top, .spot__facts dt, .sx-tile__meta, .sx-all, .sx-banner__index span:last-child {
    font: 700 12px/1.2 var(--sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ── banner ─────────────────────────────────────────────────────────────────────────────────── */
.sx-banner {
    overflow-x: clip;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(24px, 5vw, 96px);
    min-height: min(820px, calc(100svh - var(--hh)));
    padding: clamp(32px, 5vw, 72px) var(--gut) clamp(40px, 6vw, 96px);
    max-width: 1720px;
    margin: 0 auto;
}
.sx-kicker { margin: 0 0 28px; color: var(--green); }
.sx-banner__title {
    margin: 0;
    font: 500 clamp(46px, 7.2vw, 128px)/0.94 var(--serif);
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.sx-banner__title em { font-style: italic; font-weight: 400; color: var(--soft); }
.sx-banner__lede { max-width: 46ch; margin: 32px 0 0; color: var(--soft); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; }
.sx-banner__index { display: flex; flex-wrap: wrap; gap: 12px 44px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--rule); }
.sx-banner__index a { display: grid; gap: 6px; }
.sx-banner__num { font: 400 clamp(36px, 3.6vw, 56px)/1 var(--serif); font-variant-numeric: lining-nums; transition: color 0.3s ease; }
.sx-banner__index span:last-child { color: var(--faint); transition: color 0.3s ease; }
.sx-banner__index a:hover .sx-banner__num { color: var(--green); }
.sx-banner__index a:hover span:last-child { color: var(--ink); }

/* three covers fanned like the stack below */
.sx-banner__deck { position: relative; aspect-ratio: 4 / 4.6; width: min(100%, 560px); justify-self: center; }
.sx-banner__deck::before {
    content: "";
    position: absolute;
    inset: -12% -16%;
    background: radial-gradient(closest-side, rgb(255 181 0 / 0.16), transparent 72%);
    pointer-events: none;
}
.sx-banner__card {
    position: absolute;
    width: 72%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.06);
}
.sx-banner__card--1 { left: 14%; top: 13%; z-index: 3; }
.sx-banner__card--2 { left: 21%; top: 6.5%; z-index: 2; transform: scale(0.94); filter: brightness(0.62); transform-origin: 50% 0; }
.sx-banner__card--3 { left: 28%; top: 0; z-index: 1; transform: scale(0.88); filter: brightness(0.38); transform-origin: 50% 0; }

/* ── section heads ──────────────────────────────────────────────────────────────────────────── */
.sx-section { max-width: 1720px; margin: 0 auto; padding: clamp(56px, 7vw, 112px) var(--gut) 0; scroll-margin-top: var(--hh); }
.sx-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px 28px;
    margin-bottom: clamp(28px, 3.4vw, 48px);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}
.sx-head__no { grid-row: 1 / 3; align-self: start; margin: 10px 0 0; color: var(--green); }
.sx-head__title { margin: 0; font: 500 clamp(40px, 5vw, 84px)/0.95 var(--serif); letter-spacing: -0.02em; }
.sx-head__note { grid-column: 2; margin: 0; max-width: 60ch; color: var(--soft); font-size: 15px; line-height: 1.55; }
.sx-all {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 4px;
    color: var(--soft);
    border-bottom: 1px solid var(--rule);
    transition: color 0.3s ease, border-color 0.3s ease, gap 0.3s ease;
}
.sx-all:hover { color: var(--ink); border-color: var(--ink); gap: 16px; }

.sx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    font: 700 10px/1 var(--sans);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}
.sx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sx-badge--paid { color: var(--gold); background: rgb(255 181 0 / 0.12); box-shadow: inset 0 0 0 1px rgb(255 181 0 / 0.3); }
.sx-badge--free { color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); letter-spacing: 0.14em; }
.sx-badge--creator { color: #0d1a10; background: rgb(83 245 126 / 0.92); }

/* ── PARTNERS: the stack ────────────────────────────────────────────────────────────────────── */
.sx-stack { margin: 0; padding: 0; list-style: none; }
.sx-stack__item {
    position: sticky;
    top: calc(var(--hh) + 20px + var(--i) * var(--peek));
    height: calc(100vh - var(--hh) - 40px - 7 * var(--peek));
    height: calc(100svh - var(--hh) - 40px - 7 * var(--peek));
    min-height: 520px;
    max-height: 940px;
}
.sx-stack__item + .sx-stack__item { margin-top: 12vh; }

.spot {
    --cover: 0;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(24px, 4vw, 72px);
    height: 100%;
    padding: clamp(18px, 2.2vw, 32px);
    overflow: hidden;
    isolation: isolate;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 -30px 60px -40px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(255 255 255 / 0.07);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    transform: scale(calc(1 - var(--cover) * 0.06));
    transform-origin: 50% 0;
    will-change: transform;
}
/* the cover's own colour, blurred, behind the card */
.spot__glow { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.spot__glow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.4);
    filter: blur(70px) saturate(1.3);
    opacity: 0.42;
}
.spot::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgb(18 17 20 / 0.2) 0%, rgb(18 17 20 / 0.55) 45%, rgb(18 17 20 / 0.82) 100%);
}
/* dimming while covered */
.spot::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #0c0b0d;
    opacity: calc(var(--cover) * 0.6);
    pointer-events: none;
}

.spot__cover { display: block; height: 100%; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -28px rgb(0 0 0 / 0.8); }
.spot__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.spot:hover .spot__cover img { transform: scale(1.025); }

.spot__body { display: flex; flex-direction: column; min-width: 0; padding: clamp(4px, 1vw, 16px) clamp(0px, 1.4vw, 24px) 0 0; }
.spot__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 0; color: var(--faint); }
.spot__count { color: var(--ink); font-variant-numeric: tabular-nums; }
.spot__count i { font-style: normal; color: var(--faint); }
.spot__top .sx-badge { margin-left: auto; }
.spot__name {
    margin: auto 0 0;
    padding-top: 24px;
    font: 500 clamp(56px, 8.6vw, 168px)/0.9 var(--serif);
    letter-spacing: -0.035em;
}
.spot__name--long { font-size: clamp(44px, 6.2vw, 120px); }
.spot__name a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s ease; }
.spot__name a:hover { background-size: 100% 1px; }
.spot__line { max-width: 28ch; margin: 18px 0 0; font: italic 400 clamp(19px, 1.7vw, 28px)/1.3 var(--serif); color: var(--soft); }
.spot__facts { display: flex; flex-wrap: wrap; gap: 14px clamp(28px, 3.4vw, 56px); margin: clamp(22px, 3vw, 40px) 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.spot__facts div { display: grid; gap: 6px; }
.spot__facts dt { color: var(--faint); }
.spot__facts dd { margin: 0; font: 400 clamp(20px, 1.6vw, 26px)/1.1 var(--serif); }
.spot__foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: clamp(20px, 3vw, 40px); }
.spot__issues { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }
.spot__issue { width: clamp(64px, 6.4vw, 112px); }
.spot__issue img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 6px; box-shadow: 0 12px 24px -14px rgb(0 0 0 / 0.9); }
.spot__issue span { display: block; margin-top: 8px; color: var(--faint); font: 700 10px/1 var(--sans); letter-spacing: 0.18em; }
.spot__open {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 999px;
    background: var(--ink);
    color: #18171a !important;
    font: 700 14px/1 var(--sans);
    letter-spacing: 0.04em;
    transition: gap 0.3s ease, background-color 0.3s ease;
}
.spot__open:hover { gap: 18px; background: #fff; }

/* ── FREE + People grids ────────────────────────────────────────────────────────────────────── */
.sx-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(28px, 2.6vw, 44px) clamp(12px, 1.6vw, 28px); margin: 0; padding: 0; list-style: none; }
.sx-tile__link { display: block; }
.sx-tile__media { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 12px; background: rgb(255 255 255 / 0.04); }
.sx-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s ease; }
.sx-tile__link:hover .sx-tile__media img { transform: scale(1.04); }
.sx-tile__name { display: block; margin-top: 14px; font: 500 clamp(19px, 1.5vw, 24px)/1.15 var(--serif); letter-spacing: -0.01em; }
.sx-tile__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--faint); font-size: 11px; }
.sx-tile__meta .sx-badge { padding-block: 4px; font-size: 9px; }
.sx-tile--person .sx-tile__meta { justify-content: flex-start; letter-spacing: 0.14em; }
.sx-tile--person .sx-badge { position: absolute; left: 10px; bottom: 10px; }

.sx-tile--all .sx-tile__media {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: inset 0 0 0 1px var(--rule);
    background: rgb(255 255 255 / 0.025);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}
.sx-tile__all-num { font: 400 clamp(56px, 6vw, 96px)/1 var(--serif); }
.sx-tile__all-text { color: var(--soft); font: 700 11px/1.3 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.sx-tile--all svg { margin-top: 8px; color: var(--green); transition: transform 0.3s ease; }
.sx-tile--all .sx-tile__link:hover .sx-tile__media { background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(244 239 232 / 0.4); }
.sx-tile--all .sx-tile__link:hover svg { transform: translateX(6px); }

/* ── responsive ─────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .sx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .spot__name { font-size: clamp(52px, 8vw, 110px); }
    .spot__name--long { font-size: clamp(44px, 6vw, 80px); }
}
@media (max-width: 899px) {
    .sx-banner { grid-template-columns: 1fr; min-height: 0; }
    .sx-banner__deck { width: min(78%, 420px); grid-row: 1; }
    .sx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sx-head { grid-template-columns: minmax(0, 1fr) auto; }
    .sx-head__no { grid-row: auto; grid-column: 1 / -1; margin: 0; }
    .sx-head__title { grid-column: 1; }
    .sx-head__note { grid-column: 1 / -1; grid-row: 3; }
    .sx-all { grid-column: 2; grid-row: 2; }

    /* the card becomes the cover itself, text over a dark foot */
    .spot { grid-template-columns: 1fr; padding: 0; border-radius: 20px; }
    .spot__cover { position: absolute; inset: 0; z-index: -1; height: auto; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
    .spot::before { z-index: 0; background: linear-gradient(180deg, rgb(12 11 13 / 0.55) 0%, rgb(12 11 13 / 0) 22%, rgb(12 11 13 / 0) 36%, rgb(12 11 13 / 0.78) 62%, rgb(12 11 13 / 0.95) 100%); }
    .spot__glow { display: none; }
    .spot__body { position: relative; z-index: 1; padding: 18px 18px 20px; pointer-events: none; }
    .spot__body a, .spot__body .spot__issues { pointer-events: auto; }
    .spot__top { color: var(--soft); }
    .spot__name { font-size: clamp(48px, 14vw, 96px); }
    .spot__name--long { font-size: clamp(40px, 11vw, 72px); }
    .spot__line { font-size: 18px; margin-top: 10px; }
    .spot__facts { margin-top: 16px; padding-top: 12px; gap: 10px 28px; }
    .spot__facts dd { font-size: 18px; }
    .spot__foot { margin-top: 18px; padding-top: 0; }
    .spot__issue { width: 52px; }
    .spot__issue span { display: none; }
    .spot__open { padding: 12px 18px; font-size: 13px; }
}
@media (max-width: 560px) {
    :root { --peek: 6px; }
    .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
    .sx-banner__index { gap: 12px 28px; margin-top: 32px; }
    .spot__top .sx-badge { margin-left: 0; }
    .spot__facts div:nth-child(3) { display: none; }
    .sx-tile__meta { font-size: 10px; letter-spacing: 0.12em; }
}
/* short screens (landscape phones): no sticky stack, the cards simply follow each other */
@media (max-height: 600px) {
    .sx-stack__item { position: relative; top: 0; height: auto; min-height: 0; }
    .sx-stack__item + .sx-stack__item { margin-top: 24px; }
    .spot { min-height: 480px; }
}
@media (prefers-reduced-motion: reduce) {
    .spot { transform: none; will-change: auto; }
    .spot::after { opacity: 0; }
    .spot__cover img, .sx-tile__media img, .sx-all, .spot__open, .spot__name a { transition: none; }
}
