/* Prehistoriq homepage: one screen, a 1:87 museum model at night, the words on the dark bench to its left. */

@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/home/assets/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 900; font-display: swap; src: url("/home/assets/fonts/barlow-condensed-900.woff2") format("woff2"); }
@font-face { font-family: "Archivo Black"; font-weight: 400; font-display: swap; src: url("/home/assets/fonts/archivo-black-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/home/assets/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/home/assets/fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url("/home/assets/fonts/ibm-plex-mono-600.woff2") format("woff2"); }

:root {
  --ink: #120e0a;
  --bone: #f4ecdd;
  --bone-soft: rgba(244, 236, 221, .75);
  --bone-faint: rgba(244, 236, 221, .5);
  --hazard: #ffd400;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --brand: "Archivo Black", "Arial Black", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --gutter: clamp(20px, 4vw, 64px);
  /* the side gutters, clear of a notch or the rounded corners when a phone is on its side */
  --left: max(var(--gutter), env(safe-area-inset-left, 0px));
  --right: max(var(--gutter), env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--ink); color: var(--bone); }
body { font-family: var(--mono); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 3px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- the model ---------- */
/* the photograph, cover-fit like the scene (script.js then places it exactly where the scene draws) and as soft as the
   scene is when it first racks into focus; the live scene fades in over it */
.poster img { position: fixed; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  transform-origin: 0 0; animation: unblur 1.4s cubic-bezier(.3, .7, .1, 1) 5s both; }
/* soft at first, like the scene racking in; it comes sharp by itself in case nothing takes over (the live scene covers
   it long before), at once when the page knows it will stay a photograph, and never blurred at all without scripts */
@keyframes unblur { from { filter: blur(7px); } to { filter: none; } }
.poster.sharp img { animation-delay: 0s; }
html:not(.js) .poster img { animation: none; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .7s ease; }
#scene.live { opacity: 1; }
/* the left of the shot is the dark bench beside the model, where the words sit; a little shade under the signup too */
.shade { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 46vw 34vh at 0% 100%, rgba(18, 14, 10, .62), transparent 72%),
              linear-gradient(90deg, rgba(18, 14, 10, .5) 0%, rgba(18, 14, 10, .18) 26%, transparent 38%); }

/* ---------- header ---------- */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) calc(var(--right) - 4px) 0 max(clamp(20px, 2.2vw, 32px), env(safe-area-inset-left, 0px)); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 17px/1 var(--brand); letter-spacing: -.04em; padding: 6px 0; }
.mark svg { width: 20px; height: 24px; fill: currentColor; }
.top nav { display: flex; gap: 2px; }
.top nav a { padding: 10px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--bone-soft); transition: color .2s; }
.top nav a:hover { color: var(--bone); }
/* Sign in joined the nav: on phones the links tighten, and X, then Stacks (both also in the About panel), give way */
@media (max-width: 440px) { .top { gap: 8px; } .top nav a { padding: 10px 5px; letter-spacing: .06em; white-space: nowrap; } .top nav a.x { display: none; } }
@media (max-width: 350px) { .top nav a[href="/stacks/"] { display: none; } }

/* ---------- the words ---------- */
.hero { position: fixed; z-index: 10; left: var(--left); top: 46%; transform: translateY(-62%); width: min(30vw, 27rem); display: grid; gap: 18px; }
.hero h1 { margin: 0; font: 900 min(4.3vw, 7.6vh)/.88 var(--display); text-transform: uppercase; letter-spacing: -.025em; text-wrap: balance;
  text-shadow: 0 2px 50px rgba(0, 0, 0, .55); }
.hero h1 em { display: block; font-style: normal; color: var(--hazard); margin-top: .12em; }
.hero p { margin: 0; max-width: 23rem; font: 400 13px/1.65 var(--mono); color: var(--bone-soft); text-shadow: 0 1px 16px rgba(0, 0, 0, .8); }

.foot { position: fixed; z-index: 10; left: var(--left); bottom: calc(clamp(22px, 5vh, 52px) + env(safe-area-inset-bottom, 0px)); }
.join { display: flex; width: min(calc(100vw - 32px), 26rem); }
.join input { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 0; border-radius: 0; outline: 1px solid rgba(244, 236, 221, .3); outline-offset: -1px;
  background: rgba(18, 14, 10, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--bone); font: 500 13px/1 var(--mono); }
.join input::placeholder { color: rgba(244, 236, 221, .45); }
/* a touch screen zooms into any field set smaller than 16px, and this page can't be scrolled back */
@media (pointer: coarse) { .join input { font-size: 16px; } }
.join input:focus-visible { outline: 2px solid var(--hazard); outline-offset: -2px; }
.join button { height: 52px; padding: 0 20px; border: 0; border-radius: 0; background: var(--hazard); color: var(--ink); font: 600 12px/1 var(--mono); letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background .2s; }
.join button:hover { background: #ffe14d; }
.join button:disabled { cursor: progress; opacity: .8; }
.fine { margin: 12px 0 0; font: 400 11px/1.5 var(--mono); color: rgba(244, 236, 221, .72); text-shadow: 0 1px 10px #000; }
.fine.done { font-size: 13px; color: var(--bone); }

/* ---------- the exhibit label, standing in the model in front of his case; it moves with the model ---------- */
.kit { position: fixed; z-index: 10; left: 0; top: 0; display: grid; grid-template-columns: auto auto; border: 1px solid var(--bone); color: var(--bone);
  background: rgba(18, 14, 10, .86); box-shadow: 0 6px 22px rgba(0, 0, 0, .35); text-decoration: none; visibility: hidden; opacity: 0; will-change: transform; }
.kit .sr-only { position: absolute; }
.kit .sc { grid-row: span 2; display: grid; place-items: center; align-content: center; padding: 6px 9px; background: var(--bone); color: var(--ink); font: 900 19px/.9 var(--display); text-align: center; }
.kit .sc small, .tag .sc small { display: block; font: 600 7px/1 var(--mono); letter-spacing: .16em; margin-top: 3px; }
.kit .t { padding: 7px 11px 1px; font: 700 13px/1.05 var(--display); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.kit .n { padding: 0 11px 7px; font: italic 400 12px/1.3 var(--serif); color: rgba(244, 236, 221, .85); white-space: nowrap; }
.kit:hover { background: rgba(18, 14, 10, .95); }
svg.pin { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; overflow: visible; opacity: 0; }
svg.pin path { fill: none; stroke: var(--bone); stroke-width: 1; stroke-opacity: .9; }
svg.pin .ring { fill: none; stroke: var(--bone); stroke-width: 1.25; }
svg.pin .dot { fill: var(--bone); }

/* ---------- arrival: the scene racks into focus, then the words, then the label ---------- */
/* the headline is there from the first paint, as out of focus as the model, and racks in with it */
@keyframes sharpen { from { filter: blur(16px); opacity: .45; } to { filter: none; opacity: 1; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.hero h1 { animation: sharpen 1.9s cubic-bezier(.3, .7, .1, 1) .7s both; }
.hero p { animation: appear 1s ease 1.6s both; }
.foot { animation: appear 1s ease 1.8s both; }
.top { animation: appear 1.2s ease 2s both; }
.kit.placed { visibility: visible; animation: appear 1.2s ease 1.7s both; }
.kit.placed ~ svg.pin { animation: appear .6s ease 2.3s both; }

/* ---------- the exhibit notes: a panel over the words, leaving him in view ---------- */
.notes { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(34rem, 100%); height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  border-right: 1px solid rgba(244, 236, 221, .16); background: rgba(18, 14, 10, .93); color: var(--bone); overflow-y: auto; overscroll-behavior: contain;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.notes::backdrop { background: rgba(18, 14, 10, .22); }
.notes[open] { animation: notes-in .55s cubic-bezier(.2, .8, .2, 1) both; }   /* it slides out again from script.js */
@keyframes notes-in { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
html:not(.js) .notes:target { display: block; }
.notes-body { position: relative; min-height: 100%; align-content: start; padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)) var(--left); display: grid; gap: 16px; max-width: 34rem; }
.notes .close { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); right: calc(var(--gutter) - 10px); padding: 10px; font: 500 11px/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none; color: var(--bone-soft); }
.notes .close:hover { color: var(--bone); }
.notes .tag { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--bone-soft); }
.notes .tag .sc { display: grid; place-items: center; padding: 6px 9px; background: var(--bone); color: var(--ink); font: 900 19px/.9 var(--display); text-align: center; }
.notes:focus, .notes:focus-visible { outline: none; }   /* the panel itself takes focus when it opens, so a screen reader reads its title */
.notes h2 { margin: 0; font: 900 clamp(2.4rem, 5vw, 3.4rem)/.9 var(--display); text-transform: uppercase; letter-spacing: -.02em; text-wrap: balance; }
.notes .latin { margin: -6px 0 10px; font: italic 400 17px/1.3 var(--serif); color: rgba(244, 236, 221, .85); }
.notes p, .notes li { margin: 0; font: 400 14px/1.7 var(--mono); color: var(--bone-soft); max-width: 62ch; }
.notes .lede { font-size: 16px; line-height: 1.6; color: var(--bone); }
.notes h3 { margin: 22px 0 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--hazard); }
.notes .big { margin-top: -6px; font: 900 2rem/1 var(--display); text-transform: uppercase; letter-spacing: -.01em; color: var(--bone); }
.notes ol { margin: 4px 0 8px; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 14px; }
.notes li { counter-increment: n; position: relative; padding-left: 2.6em; }
.notes li::before { content: "0" counter(n); position: absolute; left: 0; top: 0; font: 600 12px/1.95 var(--mono); color: var(--hazard); }
.notes li b { color: var(--bone); font-weight: 600; }
.notes .join { margin-top: 4px; width: 100%; }
.notes .fine { margin-top: -4px; text-shadow: none; }
.notes .more { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(244, 236, 221, .14); }
.notes .more a { color: var(--bone); text-decoration-color: rgba(244, 236, 221, .35); text-underline-offset: 4px; }
.notes .more a:hover { text-decoration-color: var(--hazard); }
.notes .sign { font-size: 11px; color: var(--bone-faint); }

/* ---------- phones and tall screens: the words up top, the signup at the bottom, the model between ---------- */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .poster img { object-position: 64% 50%; }
  .hero { top: calc(74px + env(safe-area-inset-top, 0px)); transform: none; left: max(20px, env(safe-area-inset-left, 0px)); right: max(20px, env(safe-area-inset-right, 0px)); width: auto; gap: 10px; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .hero p { font-size: 12px; max-width: 19rem; }
  .foot { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .join { width: 100%; }
  .top { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
  .shade { background: linear-gradient(180deg, rgba(18, 14, 10, .88) 0%, rgba(18, 14, 10, .5) 36%, transparent 50%, transparent 62%, rgba(18, 14, 10, .88) 84%); }
  .notes { width: 100%; border-right: 0; }
  .notes .join { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero p, .foot, .top, .kit.placed, .kit.placed ~ svg.pin, .notes[open] { animation: none; }
  .kit.placed, .kit.placed ~ svg.pin { opacity: 1; }
  .poster img { animation: none; }
}

/* back from a signup sent without JavaScript (/api/waitlist redirects to #joined): the thanks, by CSS alone */
.joined { display: none; }
.joined:target { display: block; }
.joined:target ~ [data-status], .foot:has(.joined:target) [data-status] { display: none; }
