/* The welcome. One screen, no scrolling: the drawings live on one canvas behind the words; every box they sit in is laid
   out here, and the canvas follows those boxes (lines.js reads them). */
.welcome-page, .welcome-page body { height: 100%; overflow: hidden; }
.welcome-page main { position: fixed; inset: 0; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* boxes the drawings sit in (invisible) */
#stage { position: fixed; left: 50%; top: calc(var(--hh) + 9vh); transform: translateX(-50%); width: min(62vw, 980px); height: 50vh; pointer-events: none; }
#zoom { position: fixed; left: var(--gut); top: calc(var(--hh) + 3vh); width: calc(54vw - var(--gut)); height: calc(100vh - var(--hh) - 9vh); pointer-events: none; }

/* the welcome line: it rises in with the pen, and lifts away when the sentence comes */
.welcome-line { position: fixed; top: calc(var(--hh) + 8px); left: 0; right: 0; text-align: center; z-index: 2; color: var(--ink); opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform 1s var(--expo); pointer-events: none; }
.intro .welcome-line { opacity: 1; transform: none; transition-delay: .15s; }
.home .welcome-line { transform: translateY(-8px); }
.welcome-line span { display: inline-block; white-space: nowrap; }

/* the intro's captions, bottom left: one at a time */
.caps { position: fixed; left: var(--gut); bottom: 52px; z-index: 2; width: min(46vw, 520px); height: 90px; pointer-events: none; }
.cap { position: absolute; left: 0; bottom: 0; display: flex; flex-direction: column; gap: 4px; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .5s var(--ease); }
.cap:has(~ .cap.on) { transform: translateY(-8px); }   /* the one leaving lifts away first */
.cap.on { opacity: 1; transform: none; transition: opacity .6s var(--ease) .22s, transform .9s var(--expo) .22s; }   /* the next rises in after it */
.cap b { font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); letter-spacing: -.025em; line-height: 1.1; }
.cap > span:last-child { font-size: 14px; color: var(--muted); }
.cap .mono { color: var(--ink); }
.skipintro { position: fixed; left: var(--gut); bottom: 20px; z-index: 3; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity .5s, color .3s; }
.intro .skipintro { opacity: 1; pointer-events: auto; }
.skipintro:hover { color: var(--ink); }

/* the words, once the drawings have settled */
.hero { position: fixed; left: 0; right: 0; top: calc(var(--hh) + 11vh); z-index: 2; text-align: center; padding: 0 var(--gut); pointer-events: none; }
/* the sentence: each line fades in as it slides up, one after the other */
.hero .eyebrow { margin: 0 0 22px; opacity: 0; transform: translateY(12px); transition: opacity .9s var(--ease), transform 1.2s var(--expo); }
.hero .h { margin: 0; font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -.042em; }
.hero .ln { display: block; padding-bottom: .08em; opacity: 0; transform: translateY(.55em); transition: opacity 1.1s var(--ease), transform 1.4s var(--expo); }
.hero .l2 { color: var(--head2); }
.home .hero .eyebrow, .home .hero .ln { opacity: 1; transform: none; }
.home .hero .l1 { transition-delay: .14s; }
.home .hero .l2 { transition-delay: .3s; }

/* the four */
.row { position: fixed; left: 50%; bottom: max(13vh, 110px); transform: translateX(-50%); z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2vw, 40px); opacity: 0; pointer-events: none; transition: opacity .7s var(--ease); }
.home .row { opacity: 1; pointer-events: auto; }
.slot { --mag: 1; position: relative; display: flex; flex-direction: column; align-items: center; width: calc(clamp(150px, 16vw, 260px) * var(--mag)); outline-offset: 10px; }
.slot .art { display: block; width: 100%; height: calc(clamp(116px, 21vh, 210px) * var(--mag)); }
.slot .art .fallback { width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.no-gl .slot .art .fallback { opacity: .85; }
[data-theme=dark] .no-gl .slot .art .fallback { filter: invert(1) hue-rotate(180deg); }
.slot .lab { margin-top: 16px; font: 400 var(--fs-label)/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .3s; }
.slot .lab b { font-weight: 400; margin-right: .9em; color: var(--dim); }
.slot .enter { position: absolute; left: 50%; bottom: -30px; transform: translate(-50%, 6px); font-size: 14px; white-space: nowrap; opacity: 0; transition: opacity .35s var(--ease), transform .5s var(--expo); }
.slot.hot .lab { color: var(--ink); }
.slot.hot .enter { opacity: 1; transform: translate(-50%, 0); }
.row.has-hot .slot:not(.hot) .lab { color: var(--dim); }

/* credits: right side, bottom right, bottom left. v20.5: as their logos, in black and white; on hover each comes up in its
   own colours on a white card (day and night alike, so a black or navy logo is never lost on the night page). One file
   each, shown twice: .m, in one colour (the filter makes it ink, and anything white in it a cut-out), and .c, as it is. */
.seen { position: fixed; right: var(--gut); top: 44vh; transform: translateY(-50%); z-index: 2; text-align: right; opacity: 0; transition: opacity 1s var(--ease) .2s; }
.forr { position: fixed; left: var(--gut); bottom: 58px; z-index: 2; text-align: left; opacity: 0; transform: translateY(10px); transition: opacity 1s var(--ease) .55s, transform 1.3s var(--expo) .55s; }
.forr .mono { margin: 0 0 10px; }
.logos { --s: 1; list-style: none; margin: 0; padding: 0; display: flex; }
.seen .logos { flex-direction: column; align-items: flex-end; gap: 14px; margin-top: 14px; }
.forr .logos { align-items: center; gap: 24px; }
.logos li { position: relative; display: flex; align-items: center; gap: 7px; }
.logos li::before { content: ""; position: absolute; inset: -6px -9px; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(15,19,23,.07), 0 10px 24px -12px rgba(15,19,23,.35); opacity: 0; transform: scale(.94); transition: opacity .3s var(--ease), transform .5s var(--expo); pointer-events: none; }
.logos .lg { position: relative; display: block; }
.logos img { display: block; width: auto; height: calc(var(--h) * var(--s) * 1px); }
.logos .m { filter: brightness(0); opacity: .82; transition: opacity .35s var(--ease); }
.logos .c { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .35s var(--ease); }
[data-theme=dark] .logos .m { filter: brightness(0) invert(1); opacity: .8; }
.logos li:has(.ed) { align-items: baseline; }   /* the edition sits on the logo's baseline */
.logos .ed { position: relative; font: 400 max(6px, calc(9.5px * var(--s)))/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); transition: color .35s; }
.logos .name { position: relative; font-size: calc(15px * var(--s)); font-weight: 700; letter-spacing: -.005em; color: var(--ink2); }   /* a credit whose logo is off */
@media (hover: hover) {
  .logos li:hover::before { opacity: 1; transform: none; }
  .logos li:hover .c { opacity: 1; }
  .logos li:hover .m { opacity: 0; }
  .logos li:hover .ed, .logos li:hover .name { color: #0f1317; }
}
.copy { position: fixed; left: var(--gut); bottom: 30px; margin: 0; z-index: 2; opacity: 0; transform: translateY(8px); transition: opacity 1s var(--ease) .7s, transform 1.3s var(--expo) .7s; }
.home .seen, .home .forr, .home .copy { opacity: 1; }
.home .forr, .home .copy { transform: none; }
.panel-open .hero, .panel-open .row, .panel-open .seen, .panel-open .forr, .panel-open .copy { opacity: 0 !important; pointer-events: none !important; transition-delay: 0s; }

/* a chosen one: the drawing large on the left, its words on the right */
.panel { position: fixed; z-index: 4; top: calc(var(--hh) + 2vh); bottom: 3vh; right: var(--gut); width: min(40vw, 600px); display: flex; align-items: center; pointer-events: none; }
.panel:not([hidden]) { pointer-events: auto; }
.ptext { width: 100%; max-height: 100%; overflow: auto; padding: 4px 4px 4px 0; }
.ptext > * { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .9s var(--expo); }
.panel.on .ptext > * { opacity: 1; transform: none; }
.panel.on .ptext > *:nth-child(2) { transition-delay: .06s; } .panel.on .ptext > *:nth-child(3) { transition-delay: .12s; } .panel.on .ptext > *:nth-child(4) { transition-delay: .2s; }
.panel.on .ptext > *:nth-child(5) { transition-delay: .26s; } .panel.on .ptext > *:nth-child(6) { transition-delay: .32s; } .panel.on .ptext > *:nth-child(7) { transition-delay: .38s; }
.ptext .back { color: var(--muted); margin-bottom: 26px; display: inline-block; }
.ptext .back:hover { color: var(--ink); }
.ptext .back:focus-visible { outline: none; color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.ptext > .mono { margin: 0 0 14px; }
.ptext h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.035em; margin: 0 0 26px; }
.ptext h2 span { display: block; }
.ptext h2 .l2 { color: var(--head2); }
.ptext .body { font-size: var(--fs-lede); line-height: 1.6; color: var(--ink2); max-width: 44ch; }
.ptext .lead { font-size: 15px; color: var(--muted); margin: 26px 0 8px; }
.ptext .lnk.big { font-size: 17px; }
.pitems { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pitems li { border-bottom: 1px solid var(--line); }
.pi { display: block; width: 100%; padding: 16px 0; text-align: left; }
.pi b { display: block; font-weight: 400; font-size: 18px; letter-spacing: -.015em; margin-bottom: 4px; }
.pi span:not(.arrow) { display: block; font-size: 14px; line-height: 1.55; color: var(--muted); max-width: 52ch; }
.pi:hover b { color: var(--accent); }
.watch { display: inline-flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 16px; }
/* the films of each, side by side: its own, and one from the news; a film still to come keeps its place */
.watches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 34px; margin: 4px 0 18px; }
.watches .watch { margin-top: 0; }
.watch.soon { color: var(--muted); cursor: default; }
.watch.soon i { border-style: dashed; }
.watch.soon:hover i { background: none; color: inherit; border-color: var(--line3); }
.watch.soon em { margin-left: 10px; font-style: normal; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.watch i { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line3); display: grid; place-items: center; font-style: normal; transition: background .3s, color .3s, border-color .3s; }
.watch i svg { width: 34%; height: 34%; }
.watch:hover i { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* any of the four can be turned by hand */
.slot { touch-action: pan-y; -webkit-user-drag: none; }
.slot .art { cursor: grab; }
.panel-open #zoom { pointer-events: auto; cursor: grab; touch-action: pan-y; }
.turning, .turning * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
/* the mind's name, as it arrives: an insect's, a lizard's, an ape's, a human's, ours */
.evo { position: fixed; z-index: 2; margin: 0; transform: translateX(-50%); color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.evo.on { opacity: 1; }

/* phones and narrow windows: the four in a square, words above, chosen ones stacked */
@media (max-width: 820px) {
  #stage { top: calc(var(--hh) + 4vh); width: 92vw; height: 46vh; }
  .caps { bottom: 64px; width: calc(100vw - 2 * var(--gut)); }
  .hero { top: calc(var(--hh) + 3vh); }
  .row { bottom: 92px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; width: min(92vw, 520px); }
  .slot { width: 100% !important; }
  .slot .art { height: 15vh !important; }
  .slot .enter { display: none; }
  .seen { top: auto; bottom: 46px; right: auto; left: var(--gut); transform: none; text-align: left; }
  .seen p { display: none; }
  .seen .logos { flex-direction: row; align-items: center; gap: 16px; margin: 0; }
  .logos { --s: .72; }
  .forr { bottom: 16px; left: var(--gut); right: auto; text-align: left; max-width: calc(100vw - 2 * var(--gut) - 64px); }
  .forr .mono { display: none; }
  .forr .logos { gap: 18px; }
  .copy { display: none; }
  #zoom { left: 0; width: 100vw; top: calc(var(--hh)); height: 38vh; }
  .panel { left: var(--gut); right: var(--gut); width: auto; top: calc(var(--hh) + 38vh); bottom: 0; align-items: flex-start; }
  .ptext { padding-bottom: 32px; }
}
/* the narrowest phones: the credits a little smaller, so their row stays clear of Athena's button in the corner */
@media (max-width: 380px) { .logos { --s: .64; } .seen .logos { gap: 12px; } .forr .logos { gap: 16px; } }
@media (max-width: 340px) { .logos { --s: .55; } .seen .logos { gap: 10px; } }
/* on a laptop's shorter screen the options sit a little closer, so a panel with its films and its list is all in view */
@media (max-height: 880px) and (min-width: 821px) { .pi { padding: 11px 0; } .ptext .lead { margin: 14px 0 8px; } .ptext .back { margin-bottom: 18px; } .watches { margin-bottom: 14px; } }
@media (max-height: 640px) and (min-width: 821px) { .hero { top: calc(var(--hh) + 4vh); } .row { bottom: 92px; } }

/* keyboard focus on the four: a quiet rounded ring, not a box */
.slot:focus-visible { outline: 1px solid color-mix(in srgb, var(--ink) 34%, transparent); outline-offset: 12px; border-radius: 20px; }
