/* Greenpoint Pictures concept: the homepage loops as a production stripboard.
   The CSS default is the flat page (reduced motion, or JS failed): card, board with four films open, list, contact.
   html.motion (set by boot.js) + html.gs (set by main.js once GSAP loads) switch on the stripboard mechanics. */

@font-face {
  font-family: "Mona Sans";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url(vendor/fonts/MonaSans-var.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(vendor/fonts/MartianMono-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --pink: #FBD7DA;
  --pink2: #FEB8C5;
  --line: #E8E8E8;
  --ink: #000;
  --white: #fff;
  --sans: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --head: 64px;
  --pad: 4vw;
  --chH: clamp(34px, 5vh, 46px);
}
@media (max-width: 700px) { :root { --head: 56px; --pad: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--pink); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--sans); overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, p { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; background: var(--ink); color: var(--white); font: 700 14px var(--sans); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- header: always solid pink, so nothing slides under it ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--pad); background: var(--pink); border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.is-scrolled .nav { border-bottom-color: var(--pink2); }
.nav__home { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 4px 0; }
.mono { width: auto; height: 30px; fill: var(--ink); overflow: visible; }
.mono path { transition: transform .2s ease-out; }
.nav__home:hover .mono__p1, .nav__home:hover .mono__p3, .nav__home:focus-visible .mono__p1, .nav__home:focus-visible .mono__p3 { transform: translateY(-5px); }
.nav__home:hover .mono__p2, .nav__home:hover .mono__p4, .nav__home:focus-visible .mono__p2, .nav__home:focus-visible .mono__p4 { transform: translateY(5px); }
.nav__word { height: 22px; width: auto; fill: var(--ink); }
.nav__links { display: flex; gap: 28px; font: 700 12px/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; }
.nav__links a { text-decoration: none; padding: 10px 0; }
.nav__links a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 700px) {
  .nav__word { height: 17px; }
  .mono { height: 24px; }
  .nav__links { gap: 16px; font-size: 11px; }
  .nav__links a:first-child { display: none; }
}

/* ---------- 1. the title card ---------- */
.stage { position: relative; padding: calc(var(--head) + 6vh) var(--pad) 10vh; }
.card { max-width: 34rem; margin-bottom: 7vh; }
.card__kick, .card__hint, .f-spec, .cap__br, .grp__n, .close__cred, .board__lede + .sort button { font-family: var(--mono); }
.card__kick { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 22px; }
.card__title { font-size: clamp(40px, 4.6vw, 80px); line-height: .94; font-weight: 800; font-stretch: 125%; letter-spacing: -.01em; }
.card__title .ln { display: block; white-space: nowrap; }
.card__meta { margin-top: 26px; font-size: 16px; line-height: 1.35; }
.card__meta span { display: block; }
.card__meta span:first-child { font-weight: 700; font-stretch: 125%; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.card__tag { margin-top: 26px; font-size: 15px; line-height: 1.45; }
.card__tag span { display: block; }
.card__hint { display: none; margin-top: 30px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.card__hint .h-p { display: none; }
@media (max-width: 700px) {
  .card__title { font-size: 10.6vw; }
  .card__meta { font-size: 15px; }
}

/* ---------- the strips (shared by the card's board and the whole board) ---------- */
.ch { position: relative; margin-bottom: 8px; }
.strip { position: relative; background: var(--ink); color: var(--white); }
.strip__tab { display: none; }
.strip__face, .row__a {
  display: grid; grid-template-columns: 3.2rem minmax(11rem, 14rem) minmax(0, 1fr) auto; align-items: center; column-gap: 18px;
  min-height: var(--chH); padding: 0 18px;
}
.f-no { font-weight: 800; font-stretch: 125%; font-size: 15px; }
.f-dir { font-weight: 800; font-stretch: 125%; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-job { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-title { opacity: .72; }
.f-spec { display: flex; gap: 14px; font-size: 10.5px; letter-spacing: .02em; opacity: .8; white-space: nowrap; }
@media (max-width: 1100px) and (min-width: 701px) { .stage .f-spec { display: none; } .stage .strip__face { grid-template-columns: 2.6rem minmax(9rem, 12rem) minmax(0, 1fr); } }
@media (max-width: 700px) {
  .strip__face, .row__a { grid-template-columns: 2.4rem minmax(0, 1fr); grid-template-areas: "no dir" "no job"; row-gap: 2px; padding: 11px 14px; min-height: 58px; align-content: center; }
  .f-no { grid-area: no; align-self: start; }
  .f-dir { grid-area: dir; }
  .f-job { grid-area: job; font-size: 13px; }
  .f-spec { display: none; }
}

/* a film: still under the video, both at the loop's true aspect */
.film { position: relative; display: none; background: var(--ink); aspect-ratio: var(--ar); overflow: hidden; }
.ch--key .film { display: block; }
.film .still, .film video { position: absolute; left: 0; top: 0; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; }
.film video { background: transparent; }
.cap { display: none; }

/* ---------- 3. the whole board ---------- */
.board { padding: 14vh var(--pad) 16vh; }
.board__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); gap: 24px 6vw; align-items: end; margin-bottom: 36px; }
.board__title { font-size: clamp(34px, 4.2vw, 68px); line-height: .95; font-weight: 800; font-stretch: 125%; }
.board__lede { font-size: 15px; }
.sort { display: inline-flex; margin-bottom: 26px; border: 1px solid var(--ink); background: var(--pink); }
.sort[hidden] { display: none; }
.sort button { appearance: none; border: 0; background: transparent; padding: 12px 18px; font: 700 12px/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.sort button[aria-pressed="true"] { background: var(--ink); color: var(--pink); }
.rows { display: flex; flex-direction: column; }
.rows[data-sort="n"] > li { order: var(--n); }
.rows[data-sort="d"] > li { order: var(--d); }
.rows[data-sort="n"] .grp { display: none; }
.grp { display: flex; align-items: baseline; gap: 14px; padding: 26px 0 10px; font-weight: 800; font-stretch: 125%; font-size: 20px; line-height: 1.1; }
.grp:first-child, .rows[data-sort="d"] .grp[style*="--d:0"] { padding-top: 0; }
.grp__n { font-weight: 400; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.row { margin-bottom: 6px; background: var(--ink); color: var(--white); outline: 1px solid var(--line); outline-offset: 2px; }
.row__a { grid-template-columns: 3.2rem minmax(11rem, 15rem) minmax(0, 1fr) auto auto; min-height: 56px; text-decoration: none; }
.row__a:focus-visible { outline: 3px solid var(--pink2); outline-offset: -3px; }
.row__go { font: 700 11px/1 var(--sans); font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; color: var(--pink); white-space: nowrap; }
.row__a:hover .row__go, .row__a:focus-visible .row__go { color: var(--pink2); text-decoration: underline; text-underline-offset: 4px; }
.row__sliver { display: none; height: 0; overflow: hidden; }
.row__sliver video { width: 100%; height: 40px; object-fit: cover; }
@media (max-width: 700px) {
  .board__head { grid-template-columns: 1fr; }
  .board__title { font-size: 9.4vw; }
  .row__a { grid-template-columns: 2.4rem minmax(0, 1fr) auto; grid-template-areas: "no dir go" "no job go"; }
  .row__go { grid-area: go; font-size: 0; }
  .row__go::after { content: "↗"; font-size: 16px; }
  .sort { position: sticky; top: calc(var(--head) + 8px); z-index: 5; display: flex; width: 100%; }
  .sort button { flex: 1; }
}

/* ---------- 5. back to the corner ---------- */
.close { position: relative; min-height: 100vh; background: var(--ink); overflow: hidden; padding: calc(var(--head) + 40vh) var(--pad) 10vh; color: var(--ink); }
.close__film { position: absolute; inset: 0; }
.close__film .still, .close__film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.close__word { position: absolute; left: var(--pad); right: var(--pad); top: calc(var(--head) + 6vh); width: calc(100% - 2 * var(--pad)); height: auto; fill: var(--white); mix-blend-mode: difference; }
.lid { display: none; }
.close__card { position: relative; max-width: 36rem; background: var(--pink); padding: 34px 34px 30px; }
.close__title { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.02; font-weight: 800; font-stretch: 125%; margin-bottom: 22px; }
.close__addr { font-size: 15px; line-height: 1.45; margin-bottom: 20px; }
.close__mail li { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--pink2); font-size: 15px; }
.close__mail .who { font-size: 13px; flex-basis: 100%; }
.close__mail a { font-weight: 700; font-stretch: 112%; text-underline-offset: 4px; padding: 4px 0; }
.close__cred { margin-top: 16px; font-size: 10.5px; letter-spacing: .02em; }
@media (max-width: 700px) {
  .close { padding-top: calc(var(--head) + 30vh); min-height: 0; }
  .close__film video { display: none; }
  .close__card { padding: 26px 22px; }
}

.foot { padding: 28px var(--pad) 36px; font-size: 13px; max-width: 60rem; }
.foot a { font-weight: 700; }

/* ======================= motion (html.motion.gs) ======================= */
.motion .card__hint { display: block; }
.motion .row__sliver { display: block; }
.motion .film video[controls] { pointer-events: none; }

/* intro: strips wait off to the right until the timeline brings them in */
.motion .sb .strip { transform: translateX(110vw); }
.motion.is-ready .sb .strip { transform: none; }

/* desktop: the board sits beside the card; the stage is pinned while four strips are pulled */
@media (min-width: 701px) {
  .motion .stage { height: 100vh; min-height: 620px; padding: 0; overflow: hidden; }
  .motion .card { position: absolute; left: var(--pad); top: calc(var(--head) + 7vh); width: 31vw; max-width: none; margin: 0; }
  .motion .sb { position: absolute; left: 38vw; width: 52vw; top: var(--head); bottom: 0; display: flex; flex-direction: column; justify-content: center; }
  .motion .ch { height: var(--chH); margin: 0 0 8px; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
  .motion .ch.is-up { z-index: 3; }
  .motion .strip { position: absolute; inset: 0; }
  .motion .strip__tab { display: block; position: absolute; right: 100%; top: 0; bottom: 0; width: 12px; background: var(--pink2); transform: scaleX(0); transform-origin: right; }
  .motion .strip__face { height: 100%; min-height: 0; }
  .motion .film { position: absolute; z-index: 2; display: block; aspect-ratio: auto; left: var(--fx, 0); top: 50%; width: var(--fw, 100%); height: var(--fh, 100%); margin-top: calc(var(--fh, 0px) / -2); clip-path: inset(50% 0 50% 0); visibility: hidden; }
  .motion .ch:not(.ch--key) .film { display: none; }
  .motion .cap { display: block; position: absolute; inset: 0; color: var(--white); text-shadow: 0 0 14px rgba(0, 0, 0, .55); pointer-events: none; }
  .motion .cap > span { position: absolute; padding: 16px 18px; line-height: 1.25; }
  .cap__tl { left: 0; top: 0; font-weight: 800; font-stretch: 125%; font-size: 22px; }
  .cap__tr { right: 0; top: 0; font-weight: 800; font-stretch: 125%; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
  .cap__bl { left: 0; bottom: 0; font-size: 15px; }
  .cap__br { right: 0; bottom: 0; font-size: 10.5px; }
  .motion .board .rows { gap: 0; }
}

/* phone: no pin; a strip is a two-line row; tap pulls it, then it opens downward at true aspect */
@media (max-width: 700px) {
  .motion .sb { overflow: hidden; }
  .motion .ch { box-shadow: inset 0 0 0 1px var(--line); }
  .motion .card__hint .h-d { display: none; }
  .motion .card__hint .h-p { display: inline; }
  .motion .strip__face { cursor: pointer; }
  .motion .film { display: block; height: 0; aspect-ratio: auto; }
  .motion .ch.is-open .strip { box-shadow: -10px 0 0 var(--pink2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* 5. the lid: eleven strips stack onto the card */
.motion .lid { display: block; position: relative; z-index: 2; max-width: 36rem; margin-bottom: -112px; padding: 26px 34px 0; pointer-events: none; }
.motion .lid i { display: block; height: 4px; margin-bottom: 3px; background: var(--ink); }
.motion .close__card { padding-top: 116px; }
@media (max-width: 700px) { .motion .lid { padding: 22px 22px 0; } }

/* the empty channel a pulled strip leaves behind: its number stays in the slot */
.motion .ch::before { content: attr(data-no); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 400 10.5px/1 var(--mono); letter-spacing: .04em; color: var(--ink); opacity: var(--slot, 0); }
@media (max-width: 700px) {
  .motion .ch::before { top: 22px; transform: none; }
  .nav { gap: 10px; }
  .nav__links { gap: 14px; font-size: 10px; letter-spacing: .02em; }
  .nav__word { height: 15px; }
  .board { padding-top: 8vh; }
}
@media (min-width: 701px) { .film { max-width: 64rem; } .motion .film { max-width: none; } }

/* rows wait off to the right before they slide in: never let that widen the page */
.stage, .board { overflow-x: clip; }

/* phone: the slot number shows only behind the strip being pulled; the sort toggle sits on a pink band */
.motion .ch.is-open::before { --slot: .55; }
.grp { scroll-margin-top: calc(var(--head) + 80px); }
@media (max-width: 700px) {
  .sort { box-shadow: 0 -16px 0 8px var(--pink), 0 10px 0 8px var(--pink); }
  .grp { padding-top: 34px; }
}
