/*
 * Prototype home3 (/html/home3.html): a light, modern DEPO. One idea carries the page: the DEPO
 * cover. A cover frame with the DEPO masthead stays pinned while the text column scrolls, and each
 * of the six values becomes the cover line of a new issue with a community portrait as its star.
 * Then the magazines as an open list, the roles as one sentence, the faces and a closing masthead.
 * Header and footer come from the site styles; the header sits on the deep green field.
 */
.proto-home3 {
    --g3-ground: #e8ebe4;
    --g3-paper: #f4f6f1;
    --g3-ink: #121612;
    --g3-soft: #4a524b;
    --g3-deep: #0f2a1a;
    --g3-green: #2f7d43;
    --g3-yellow: #ffb500;
    --g3-font: "Schibsted Grotesk", "Lato", system-ui, sans-serif;
    --g3-edge: clamp(16px, 3vw, 48px);
    background: var(--g3-ground);
}
.proto-home3 .main { padding: 0; }
.proto-home3 .header { background: var(--g3-deep); }
.proto-home3 .header::before { display: none; }
.h3 :where(*) { color: inherit; }
.h3 { color: var(--g3-ink); font-family: var(--g3-font); }
.h3-wrap { width: 100%; max-width: 1720px; margin: 0 auto; padding: 0 var(--g3-edge); }
.h3-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.h3-title { margin: 0; font: 700 clamp(36px, 4.6vw, 76px)/0.98 var(--g3-font); letter-spacing: -0.035em; text-wrap: balance; }
.h3-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px;
    border-radius: 999px; background: var(--g3-ink); color: var(--g3-paper);
    font: 700 16px/1 var(--g3-font); transition: background 200ms ease, transform 150ms ease;
}
.h3-btn:hover { background: var(--g3-green); }
.h3-btn:active { transform: scale(0.97); }
.h3-btn--light { background: var(--g3-yellow); color: var(--g3-ink); }
.h3-btn--light:hover { background: #fff; }
.h3-link {
    display: inline-flex; align-items: center; min-height: 44px; font: 700 16px/1.2 var(--g3-font);
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
    text-decoration-color: var(--g3-green); transition: color 200ms ease;
}
.h3-link:hover { color: var(--g3-green); }
.h3 a:focus-visible, .h3 button:focus-visible { outline: 3px solid var(--g3-green); outline-offset: 3px; }

/* ── the cover ─────────────────────────────────────────────────────────────────────────── */
.h3-cover { position: relative; margin: 0; aspect-ratio: 2 / 3; overflow: hidden; background: #cfd4cb; container-type: inline-size; }
.h3-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Neutral scrims behind the masthead and the cover line, as on a printed cover. */
.h3-cover::after { content: ""; position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; }
.h3-cover::after { bottom: 0; height: 40%; background: linear-gradient(transparent, rgb(0 0 0 / 0.55)); }
.h3-cover__mast, .h3-cover__lines { z-index: 1; }
.h3-cover__mast {
    position: absolute; top: 3cqw; left: 0; right: 0; text-align: center;
    font: 900 31cqw/0.8 var(--g3-font); letter-spacing: -0.06em; color: #fff;
}
.h3-cover__lines { position: absolute; left: 6cqw; right: 6cqw; bottom: 6cqw; display: grid; gap: 1.6cqw; color: #fff; }
.h3-cover__line { font: 900 11cqw/0.9 var(--g3-font); letter-spacing: -0.04em; }
.h3-cover__star { font: 500 4.4cqw/1.2 var(--g3-font); }

/* ── pinned sequence ───────────────────────────────────────────────────────────────────── */
.h3-seq { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); max-width: 1720px; margin: 0 auto; padding: 0 var(--g3-edge); }
.h3-seq__stage { grid-column: 2; grid-row: 1; position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); display: grid; place-items: center; }
.h3-seq__frame { position: relative; height: min(82%, 980px); aspect-ratio: 2 / 3; }
.h3-seq__frame .h3-cover { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity 700ms ease, transform 1100ms cubic-bezier(.2, .7, .2, 1); }
.h3-seq__frame .h3-cover.is-on { opacity: 1; transform: none; }
/* The masthead and the cover line are the only things that stay put: the line slides in per issue. */
.h3-seq__frame .h3-cover__lines { transform: translateY(12px); opacity: 0; transition: transform 700ms cubic-bezier(.2, .7, .2, 1) 150ms, opacity 500ms ease 150ms; }
.h3-seq__frame .h3-cover.is-on .h3-cover__lines { transform: none; opacity: 1; }
.h3-seq__steps { grid-column: 1; grid-row: 1; }
.h3-step {
    min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center;
    padding: 64px clamp(0px, 4vw, 80px) 64px 0; max-width: 760px;
}
.h3-step p { margin: 24px 0 0; max-width: 46ch; font: 400 clamp(18px, 1.45vw, 22px)/1.5 var(--g3-font); color: var(--g3-ink); }
.h3-step__title { margin: 0; font: 900 clamp(48px, 6.4vw, 112px)/0.9 var(--g3-font); letter-spacing: -0.05em; }
.js-seq .h3-step { opacity: 0.22; transition: opacity 500ms ease; }
.js-seq .h3-step.is-on { opacity: 1; }
.h3-hero__title { margin: 0; font: 900 clamp(54px, 7.6vw, 132px)/0.88 var(--g3-font); letter-spacing: -0.055em; max-width: 12ch; }
.h3-hero__lead { max-width: 40ch !important; }
.h3-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 36px; }
.h3-cover--inline { display: none; }

/* ── magazines ─────────────────────────────────────────────────────────────────────────── */
.h3-mags { background: var(--g3-deep); color: #f1f3ee; padding: clamp(96px, 12vw, 200px) 0; }
.h3-mags__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 48px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.h3-mags__head p { margin: 0; max-width: 40ch; font: 400 18px/1.5 var(--g3-font); color: #c9d3cb; }
.h3-mags__list { margin: 0; padding: 0; display: grid; gap: 4px; }
.h3-mag { border-radius: 6px; transition: background 300ms ease; }
.h3-mag.is-open { background: rgb(255 255 255 / 0.05); }
.h3-mag__name {
    display: flex; align-items: baseline; justify-content: space-between; gap: 24px; width: 100%; padding: 10px 16px;
    background: none; cursor: pointer; text-align: left;
    font: 700 clamp(36px, 5.4vw, 92px)/1 var(--g3-font); letter-spacing: -0.04em; color: #f1f3ee;
    transition: color 200ms ease, padding 300ms cubic-bezier(.2, .7, .2, 1);
}
.h3-mag__name:hover { color: var(--g3-yellow); padding-left: 28px; }
.h3-mag.is-open .h3-mag__name { color: var(--g3-yellow); }
.h3-mag__count { flex: none; font: 500 16px/1 var(--g3-font); letter-spacing: 0; color: #c9d3cb; font-variant-numeric: tabular-nums; }
.h3-mag__covers { display: flex; gap: 8px; padding: 8px 16px 20px; overflow-x: auto; scrollbar-width: none; }
.h3-mag__covers[hidden] { display: none; }
.h3-mag__covers a { flex: none; width: clamp(140px, 13vw, 210px); border-radius: 3px; overflow: hidden; animation: h3-in 500ms cubic-bezier(.2, .7, .2, 1) both; }
.h3-mag__covers a:nth-child(2) { animation-delay: 60ms; }
.h3-mag__covers a:nth-child(3) { animation-delay: 120ms; }
.h3-mag__covers a:nth-child(4) { animation-delay: 180ms; }
.h3-mag__covers a:nth-child(5) { animation-delay: 240ms; }
.h3-mag__covers a:nth-child(6) { animation-delay: 300ms; }
.h3-mag__covers img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 500ms ease; }
.h3-mag__covers a:hover img { transform: scale(1.04); }
@keyframes h3-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── one sentence for the roles ────────────────────────────────────────────────────────── */
.h3-team { padding: clamp(110px, 13vw, 220px) 0 clamp(96px, 11vw, 180px); }
.h3-team__sentence { margin: 0; max-width: 21ch; font: 700 clamp(38px, 5.2vw, 88px)/1.06 var(--g3-font); letter-spacing: -0.04em; }
.h3-team__word { white-space: nowrap; }
.h3-team__sentence a { text-decoration: none; transition: color 200ms ease; }
.h3-team__sentence a:hover { color: var(--g3-green); }
.h3-team__sentence img {
    display: inline-block; width: 1.3em; height: 0.86em; margin: 0 0.12em; border-radius: 999px; object-fit: cover; vertical-align: -0.06em;
    transition: width 400ms cubic-bezier(.2, .7, .2, 1);
}
.h3-team__sentence a:hover + img { width: 1.9em; }
.h3-team__ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 4vw, 72px); margin-top: clamp(64px, 8vw, 120px); }
.h3-team__ways h3 { margin: 0 0 12px; font: 700 clamp(24px, 2vw, 32px)/1.1 var(--g3-font); letter-spacing: -0.02em; }
.h3-team__ways p { margin: 0 0 12px; max-width: 36ch; font: 400 18px/1.5 var(--g3-font); }
.h3-team__ways > div { padding-top: 20px; box-shadow: inset 0 6px 0 var(--g3-green); }

/* ── faces ─────────────────────────────────────────────────────────────────────────────── */
.h3-people { background: var(--g3-paper); padding: clamp(96px, 11vw, 180px) 0; }
.h3-people__grid {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; gap: 10px;
    margin: clamp(40px, 5vw, 64px) 0 0; padding: 0;
}
.h3-people__grid li:nth-child(1), .h3-people__grid li:nth-child(8) { grid-column: span 2; grid-row: span 2; }
.h3-person { position: relative; display: block; height: 100%; overflow: hidden; border-radius: 4px; background: #d7dbd3; }
.h3-person img { display: block; width: 100%; height: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform 700ms cubic-bezier(.2, .7, .2, 1); }
.h3-person:hover img { transform: scale(1.05); }
.h3-person span {
    position: absolute; left: 8px; bottom: 8px; padding: 6px 10px; border-radius: 999px;
    background: var(--g3-paper); color: var(--g3-ink); font: 700 14px/1.2 var(--g3-font);
}

/* ── close ─────────────────────────────────────────────────────────────────────────────── */
.h3-close { background: var(--g3-deep); color: #f1f3ee; padding: clamp(96px, 11vw, 180px) 0 0; overflow: hidden; }
.h3-close__inner { display: grid; justify-items: start; gap: 22px; }
.h3-close__title { margin: 0; font: 900 clamp(44px, 6.4vw, 112px)/0.92 var(--g3-font); letter-spacing: -0.05em; }
.h3-close__inner p { margin: 0; max-width: 42ch; font: 400 19px/1.5 var(--g3-font); color: #f1f3ee; }
.h3-close__mast {
    margin: clamp(48px, 6vw, 96px) 0 0; text-align: center; white-space: nowrap;
    font: 900 32vw/0.72 var(--g3-font); letter-spacing: -0.07em; color: var(--g3-green);
    transform: translateY(8%);
}

/* ── responsive ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .h3-people__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
    .h3-seq { display: block; }
    .h3-seq__stage { display: none; }
    .h3-step, .js-seq .h3-step { min-height: 0; opacity: 1; padding: 56px 0; max-width: none; }
    .h3-step--intro { padding-top: 40px; }
    .h3-cover--inline { display: block; width: 100%; max-width: 520px; margin-top: 32px; }
    .h3-mags__head { grid-template-columns: minmax(0, 1fr); }
    .h3-team__ways { grid-template-columns: minmax(0, 1fr); }
    .h3-team__sentence { font-size: clamp(30px, 8vw, 44px); }
    .h3-team__word { white-space: normal; }
    .h3-people__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .h3-people__grid li:nth-child(8) { grid-column: auto; grid-row: auto; }
}
@media (max-width: 575px) {
    .h3-mag__name { padding: 10px 8px; }
    .h3-mag__count { font-size: 14px; }
    .h3-mag__covers { flex-wrap: wrap; padding: 8px 8px 16px; }
    .h3-mag__covers a { width: calc(50% - 4px); }
}
@media (prefers-reduced-motion: reduce) {
    .h3-seq__frame .h3-cover, .h3-seq__frame .h3-cover__lines, .h3-step { transition: none; transform: none; }
    .h3-mag__covers a { animation: none; }
}
