/*
 * Prototype home14 (/html/home14.html), "Split": a fashion-house split screen.
 * Desktop: the page is one pinned scene cut in two. The left half is a soft-white editorial panel
 * whose chapter changes as you scroll (DEPO, the crafts, the six values, the people, join); the
 * right half is two columns of photographs travelling in opposite directions at different speeds,
 * each revealed by a clip-path wipe. Choosing a craft brings its pictures back to colour.
 * Phones (and anything under 960px): a stacked composition, paper text blocks alternating with
 * dark photo pairs that drift apart. Without JS every chapter is in the flow and readable.
 */
.proto-home14 {
    --k: #141315;          /* off-black ground (the photo half) */
    --k2: #201f22;
    --paper: #ecebe8;      /* soft white (the text half) */
    --ink: #17161a;
    --mute: #67636a;       /* secondary ink on paper */
    --mute-d: #a19da3;     /* secondary ink on the dark half */
    --y: #ffb500;          /* the single accent */
    --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
    --text: "Lato", "Source Sans 3", system-ui, sans-serif;
    --edge: clamp(24px, 4vw, 72px);
    --ease: cubic-bezier(.2, .7, .1, 1);
    --wipe: cubic-bezier(.76, 0, .18, 1);
    background: var(--k);
}
.proto-home14 .main { padding: 0; }
.proto-home14 .header { background: var(--k); }
.proto-home14 .header::before { display: none; }
.h14 :where(*) { color: inherit; }
.h14 { color: var(--ink); font-family: var(--text); }
:where(.h14) :where(ul) { margin: 0; padding: 0; list-style: none; }

/* ── type ─────────────────────────────────────────────────────────────────────────────── */
.h14-ch { container-type: inline-size; }
.h14-display {
    margin: 0; font-family: var(--display); font-weight: 400; font-optical-sizing: auto;
    font-size: clamp(46px, 13.6cqi, 132px); line-height: .94; letter-spacing: -0.025em;
    text-wrap: balance;
}
.h14-title {
    margin: 0; font-family: var(--display); font-weight: 400;
    font-size: clamp(28px, 6cqi, 44px); line-height: 1.05; letter-spacing: -0.01em;
}
.h14-lead { margin: 28px 0 0; max-width: 34em; font-size: clamp(18px, 1.3vw, 20px); line-height: 1.55; }
.h14-note { margin: 12px 0 0; font-size: 15px; line-height: 1.4; color: var(--mute); }

/* ── controls ─────────────────────────────────────────────────────────────────────────── */
.h14-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 36px; }
.h14-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 32px;
    background: var(--y); color: var(--ink); font: 700 16px/1 var(--text); letter-spacing: .01em;
    transition: background 250ms ease, color 250ms ease, transform 150ms ease;
}
.h14-btn:hover { background: var(--ink); color: var(--paper); }
.h14-btn:active { transform: scale(.97); }
.h14-link {
    display: inline-flex; align-items: center; min-height: 44px; font: 700 16px/1.2 var(--text);
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px;
    text-decoration-color: currentColor; transition: text-decoration-color 200ms ease, text-underline-offset 200ms ease;
}
.h14-link:hover { text-decoration-color: var(--y); text-underline-offset: 10px; }
.h14 a:focus-visible, .h14 button:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
:where(.h14) :where(button) { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }

/* ── photographs ──────────────────────────────────────────────────────────────────────── */
.h14-fig { margin: 0; color: var(--paper); }
.h14-fig__m { overflow: hidden; background: var(--k2); }
.h14-fig img { display: block; width: 100%; height: auto; transition: filter 700ms ease, transform 900ms var(--ease); }
.h14-fig figcaption { padding-top: 10px; font: 400 15px/1.3 var(--text); color: var(--mute-d); transition: color 500ms ease, opacity 500ms ease; }
.h14-fig.is-off img { filter: grayscale(1) brightness(.46) contrast(1.05); }
.h14-fig.is-off figcaption { opacity: .35; }
.h14-fig.is-match figcaption { color: var(--paper); }

/* ── the split ────────────────────────────────────────────────────────────────────────── */
.h14-panel { background: var(--paper); }
.h14-chnav, .h14-valnav { display: none; }
.h14-banner { display: none; }

/* Roles */
.h14-roles { display: grid; justify-items: start; gap: 2px; margin-top: 28px; }
.h14-role {
    position: relative; display: inline-flex; align-items: center; min-height: 48px;
    font-family: var(--display) !important; font-weight: 400; letter-spacing: -0.015em; line-height: 1.05;
    font-size: max(30px, min(7.4cqi, 6.4svh)); color: var(--mute);
    transition: color 300ms ease, transform 500ms var(--ease);
}
.h14-role::before {
    content: ""; position: absolute; left: -.55em; top: 50%; width: .26em; height: .26em; margin-top: -.13em;
    border-radius: 50%; background: var(--y); transform: scale(0); transition: transform 400ms var(--ease);
}
.h14-role:hover { color: var(--ink); }
.h14-hy { font-family: var(--text); font-weight: 300; font-style: normal; }
.h14-role.is-on { color: var(--ink); font-style: italic; transform: translateX(.55em); }
.h14-role.is-on::before { transform: scale(1); }
.h14-gives { margin-top: 24px; max-width: 34em; }
.h14-give ul { display: grid; gap: 8px; }
.h14-give li { font-size: 18px; line-height: 1.5; padding-left: 1.1em; position: relative; }
.h14-give li::before { content: ""; position: absolute; left: 0; top: .72em; width: .4em; height: 2px; background: var(--ink); }
.h14-give .h14-link { margin-top: 12px; }
.h14-give.is-on { animation: h14-give 500ms var(--ease); }
@keyframes h14-give { from { opacity: 0; transform: translateY(10px); } }

/* Values */
.h14-vals { margin-top: 28px; }
.h14-val + .h14-val { margin-top: 56px; }
.h14-val__name { font-size: clamp(44px, 12cqi, 120px); }
.h14-val__name span { display: inline-block; }
.h14-val__text { margin: 22px 0 0; max-width: 34em; font-size: clamp(18px, 1.3vw, 20px); line-height: 1.55; }

/* People */
.h14-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin-top: 32px; }
.h14-names li { font-family: var(--display); font-size: clamp(22px, 4.6cqi, 32px); line-height: 1.25; }

/* Join */
.h14-ways { display: grid; gap: 4px; margin-top: 44px; max-width: 36em; }
.h14-ways a { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 12px 0; font-size: 18px; line-height: 1.45; transition: transform 300ms var(--ease); }
.h14-ways a:hover { transform: translateX(6px); }
.h14-ways b { font-weight: 700; }
.h14-ways span { color: var(--mute); }

/* ── stacked composition (phones, tablets, no pinning) ───────────────────────────────── */
@media (max-width: 959.98px) {
    .h14-stage { display: none; }
    .h14-ch { display: flex; flex-direction: column; }
    .h14-ch__body { padding: 72px 16px 80px; }
    .h14-ch--intro .h14-ch__body { padding-top: 36px; }
    .h14-display { font-size: clamp(44px, 13cqi, 88px); }
    .h14-val__name { font-size: clamp(40px, 12cqi, 80px); }
    .h14-role { font-size: clamp(30px, 9cqi, 52px); min-height: 52px; }
    .h14-pics {
        display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start;
        padding: 20px 16px 56px; background: var(--k); overflow: hidden;
    }
    .h14-pics__col { display: grid; gap: 10px; will-change: transform; }
    .h14-pics__col + .h14-pics__col { margin-top: 72px; }
    .h14-pics--hero { order: -1; grid-template-columns: 1.55fr 1fr; padding-top: 16px; padding-bottom: 32px; }
    .h14-pics--hero .h14-pics__col + .h14-pics__col { margin-top: 38%; }
    .h14-pics--nocap figcaption { display: none; }
    .h14-pics--roles, .h14-pics--inval { margin: 28px -16px 0; }
    .h14-pics--inval { margin: 56px -16px; }
    .h14-ch--roles .h14-ch__body { padding-bottom: 48px; }
    .h14-ways a { grid-template-columns: 1fr; gap: 2px; }
    .h14-banner { display: block; }
    .h14-banner img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 62% 40%; }
    .h14-names { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
    .h14-names li { font-size: 21px; }
    .h14-ways { margin-top: 32px; }
}
@media (min-width: 640px) and (max-width: 959.98px) {
    .h14-ch__body { padding-left: 48px; padding-right: 48px; }
    .h14-pics { padding-left: 48px; padding-right: 48px; gap: 16px; }
    .h14-pics--roles, .h14-pics--inval { margin-left: -48px; margin-right: -48px; }
    .h14-pics__col { gap: 16px; }
}

/* ── desktop: two halves ──────────────────────────────────────────────────────────────── */
@media (min-width: 960px) {
    .h14-pics { display: none; }
    .h14-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); --top: var(--header-h, 70px); }
    .h14-text { grid-column: 1; grid-row: 1; }
    .h14-ch { min-height: calc(100svh - var(--top)); display: flex; align-items: center; }
    .h14-ch__body { width: 100%; padding: 64px var(--edge); }
    .h14-stage {
        grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: var(--top);
        height: calc(100svh - var(--top)); overflow: hidden; background: var(--k);
        display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 16px; align-items: start;
    }
    .h14-col { display: grid; gap: 20px; will-change: transform; }
    .h14-col--b { padding-top: 48px; }
    .h14-col--a { padding-bottom: 48px; }

    /* Pinned (JS): the panel stays, its chapter changes. */
    .h14-split.is-pinned { height: calc(var(--steps) * 100svh); }
    .is-pinned .h14-text { align-self: start; position: sticky; top: var(--top); height: calc(100svh - var(--top)); }
    .is-pinned .h14-panel { height: 100%; display: flex; flex-direction: column; }
    .is-pinned .h14-chs { flex: 1; min-height: 0; display: grid; }
    .is-pinned .h14-ch {
        grid-area: 1 / 1; min-height: 0; visibility: hidden; opacity: 0;
        transition: opacity 450ms ease, visibility 0s linear 450ms;
    }
    .is-pinned .h14-ch.is-on { visibility: visible; opacity: 1; transition: opacity 450ms ease, visibility 0s; }
    .is-pinned .h14-ch__body { padding-top: 40px; padding-bottom: 24px; }
    .is-pinned .h14-chnav {
        display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 0 var(--edge) 22px;
    }
    .h14-chnav__b {
        position: relative; min-height: 40px; font-size: 15px !important; color: var(--mute);
        transition: color 250ms ease;
    }
    .h14-chnav__b::after {
        content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; background: var(--ink);
        transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease);
    }
    .h14-chnav__b:hover, .h14-chnav__b.is-on { color: var(--ink); }
    .h14-chnav__b.is-on::after { transform: scaleX(1); }
    .is-pinned .h14-chnav { container-type: inline-size; }

    /* Values: one at a time in the pinned panel */
    .is-pinned .h14-vals { display: grid; }
    .is-pinned .h14-val { grid-area: 1 / 1; margin: 0 !important; visibility: hidden; transition: visibility 0s linear 600ms; }
    .is-pinned .h14-val.is-on { visibility: inherit; transition: none; }
    .is-pinned .h14-val__name { overflow: hidden; padding-bottom: .08em; }
    .is-pinned .h14-val__name span { transform: translateY(110%); transition: transform 800ms var(--ease); }
    .is-pinned .h14-val.is-on .h14-val__name span { transform: none; }
    .is-pinned .h14-val__text { opacity: 0; transform: translateY(16px); transition: opacity 400ms ease, transform 600ms var(--ease); }
    .is-pinned .h14-val.is-on .h14-val__text { opacity: 1; transform: none; transition-delay: 160ms; }
    .is-pinned .h14-valnav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 36px; }
    .h14-valnav__b { min-height: 40px; font-size: 15px !important; color: var(--mute); transition: color 250ms ease; }
    .h14-valnav__b:hover { color: var(--ink); }
    .h14-valnav__b.is-on { color: var(--ink); text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; text-underline-offset: 8px; }

    /* Staggered entrance of each chapter's parts */
    .is-pinned .h14-ch [data-in] { opacity: 0; transform: translateY(26px); transition: opacity 500ms ease, transform 800ms var(--ease); }
    .is-pinned .h14-ch.is-on [data-in] { opacity: 1; transform: none; }
    .is-pinned .h14-ch.is-on [data-in]:nth-child(2) { transition-delay: 80ms; }
    .is-pinned .h14-ch.is-on [data-in]:nth-child(3) { transition-delay: 160ms; }
    .is-pinned .h14-ch.is-on [data-in]:nth-child(4) { transition-delay: 240ms; }
    .is-pinned .h14-ch.is-on [data-in]:nth-child(5) { transition-delay: 320ms; }

    /* Clip-path wipes: column A enters from below, column B from above. */
    .is-pinned .h14-col--a .h14-fig__m { clip-path: inset(100% 0 0 0); }
    .is-pinned .h14-col--b .h14-fig__m { clip-path: inset(0 0 100% 0); }
    .is-pinned .h14-fig__m { transition: clip-path 1200ms var(--wipe); }
    .is-pinned .h14-col .h14-fig img { transform: scale(1.22); }
    .is-pinned .h14-col .h14-fig.is-in .h14-fig__m { clip-path: inset(0 0 0 0); }
    .is-pinned .h14-col .h14-fig.is-in img { transform: none; transition: filter 700ms ease, transform 1700ms var(--ease); }
    .is-pinned .h14-col figcaption { opacity: 0; transition: opacity 600ms ease 500ms, color 500ms ease; }
    .is-pinned .h14-col .h14-fig.is-in figcaption { opacity: 1; }
    .is-pinned .h14-col .h14-fig.is-in.is-off figcaption { opacity: .35; }
}
@media (min-width: 960px) and (max-height: 760px) {
    .is-pinned .h14-ch__body { padding-top: 24px; padding-bottom: 12px; }
    .h14-display { font-size: clamp(44px, min(12cqi, 13svh), 110px); }
    .h14-lead, .h14-val__text { margin-top: 18px; font-size: 18px; }
    .h14-actions { margin-top: 24px; }
    .h14-give li { font-size: 17px; }
    .h14-ways { margin-top: 24px; }
    .h14-ways a { padding: 6px 0; }
}
@media (min-width: 1700px) {
    .h14-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
    .h14-stage { gap: 24px; padding: 0 24px; }
}

/* Phones: the reveal wipes in on entry. */
@media (max-width: 959.98px) {
    .h14-motion .h14-pics .h14-fig__m { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--wipe); }
    .h14-motion .h14-pics .h14-fig img { transform: scale(1.18); }
    .h14-motion .h14-pics .h14-fig.is-in .h14-fig__m { clip-path: inset(0 0 0 0); }
    .h14-motion .h14-pics .h14-fig.is-in img { transform: none; transition: filter 700ms ease, transform 1600ms var(--ease); }
    .h14-motion .h14-ch__body [data-in] { opacity: 0; transform: translateY(22px); transition: opacity 500ms ease, transform 800ms var(--ease); }
    .h14-motion .h14-ch__body.is-seen [data-in] { opacity: 1; transform: none; }
    .h14-motion .h14-ch__body.is-seen [data-in]:nth-child(2) { transition-delay: 80ms; }
    .h14-motion .h14-ch__body.is-seen [data-in]:nth-child(3) { transition-delay: 160ms; }
    .h14-motion .h14-ch__body.is-seen [data-in]:nth-child(4) { transition-delay: 240ms; }
}

@media (prefers-reduced-motion: reduce) {
    .h14 *, .h14 *::before, .h14 *::after { transition-duration: 1ms !important; transition-delay: 0s !important; animation: none !important; }
    .h14 .h14-fig__m { clip-path: none !important; }
    .h14 .h14-fig img, .h14 [data-in], .h14-val__name span, .h14-val__text, .h14-role.is-on { transform: none !important; }
    .h14 [data-in] { opacity: 1 !important; }
}
