/* Sol Egress
   Words and thin lines set straight onto the scene. No cards, no boxes.
   Gold is you and the one thing to do. Red is danger. Everything else is warm white at three strengths.
   Full-screen moments are centred, like a film's title cards. Reading runs left-aligned. */

:root {
  --gold: #ffbe68;
  --gold-text: #ffd696;
  --on-gold: #1c1306;                /* words set on solid gold */
  --danger: #ff9687;
  --text: #f0e8da;
  --text-2: rgba(240, 232, 218, .76);
  --text-3: rgba(240, 232, 218, .62);
  --hair: rgba(240, 232, 218, .18);
  --ground: #060504;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --edge: clamp(22px, 6vw, 96px);
  --column: 34rem;
  --slow: cubic-bezier(.2, .6, .2, 1);
  /* a soft dark edge round small type, so it holds when a bright star passes behind */
  --halo: 0 0 2px rgba(6, 5, 4, .9), 0 0 10px rgba(6, 5, 4, .7);
  /* the veil, held close behind words that sit on the open sky (the title, the story cards, a screen's caption):
     dark enough that even a star passing straight behind leaves the words at 4.5:1 or better */
  --scrim: rgba(6, 5, 4, .88);
}

* { box-sizing: border-box; }
html { background: var(--ground); color: var(--text); scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  /* keep anything scrolled or tabbed to clear of the fixed top line */
  scroll-padding-top: 5.5rem; scroll-padding-bottom: 2rem; }
body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, ol, figure { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; text-decoration-color: var(--hair); text-underline-offset: .25em; text-decoration-thickness: 1px; transition: text-decoration-color .3s; }
a:hover { text-decoration-color: var(--gold); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 6px; border-radius: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* Words on the open sky carry the veil with them: a soft dark pool just behind each line (see --scrim) */
.wordmark, .hero-line, .hero-foot > span:first-child, .card > *, .epoch-phone figcaption, .epoch-phone .film-controls button, .film .film-controls button { position: relative; }
/* (no isolation: each pool sits behind every word on the page, never over a neighbouring line) */
.hero-line::before, .hero-foot > span:first-child::before, .card > :not(.actions):not(form)::before, .epoch-phone figcaption::before,
.epoch-phone .film-controls button::before, .film .film-controls button::before {
  content: ""; position: absolute; inset: -.9em -1.5em; z-index: -1; pointer-events: none;
  background: var(--scrim); border-radius: 2em; filter: blur(12px);
}
/* the title is large type and needs only 3:1, so its pool is fainter and tighter */
.wordmark::before { content: ""; position: absolute; inset: -.35em -.6em -.35em -.1em; z-index: -1; pointer-events: none; background: var(--scrim); border-radius: 2em; filter: blur(14px); opacity: .8; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: var(--edge); top: -4rem; z-index: 10; background: var(--ground); padding: .6rem .9rem; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }

/* The scene */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--ground); }
.js #sky { opacity: 0; transition: opacity 1.8s var(--slow); }
.js.lit #sky { opacity: 1; }
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--slow); }
/* dark under the whole reading column whatever the screen's width, then clearing toward the scene */
.veil-side { background: linear-gradient(90deg, rgba(6,5,4,.93) 0, rgba(6,5,4,.86) calc(var(--edge) + var(--column) + 1.5rem), rgba(6,5,4,.45) calc(var(--edge) + var(--column) + 9rem), rgba(6,5,4,0) calc(var(--edge) + var(--column) + 20rem)); }
.veil-all { background: var(--ground); }

/* The bar: the game's own top line */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  padding: max(18px, env(safe-area-inset-top)) var(--edge) 0;
  font-size: .875rem;
  transition: opacity .8s var(--slow);
}
/* a soft shade under the top line, always there: words scrolling beneath it fall away instead of colliding,
   and the links stay readable even when a bright star drifts across the top of the title screen */
.bar::before {
  content: ""; position: absolute; inset: 0 0 -3.5rem 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(6,5,4,.96), rgba(6,5,4,.9) 55%, rgba(6,5,4,0));
}
.bar-row { display: flex; align-items: baseline; gap: 1.25rem; min-height: 1.5rem; }
.bar-home {
  text-decoration: none; text-transform: uppercase; letter-spacing: .34em; font-size: .6875rem; font-stretch: 125%;
  padding-block: .875rem; margin-block: -.875rem;
  opacity: 0; transition: opacity .8s var(--slow);
}
.scrolled .bar-home, .bar-home:focus-visible { opacity: 1; }
.bar-where { color: var(--text-2); opacity: 0; transition: opacity .8s var(--slow); white-space: nowrap; }
.bar-where .num { font-family: var(--mono); color: var(--gold-text); margin-right: .7em; }
.bar-where.on { opacity: 1; }
.bar-links { margin-left: auto; min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 clamp(1rem, 2.4vw, 2rem); }   /* wraps, rather than running off the edge, when words are set large */
.bar-links a { text-decoration: none; color: var(--text-2); transition: color .3s; padding-block: .75rem; margin-block: -.25rem; }
.bar-links a:hover { color: var(--text); }
/* the one thing to do, always in reach: a small gold button */
.bar-links { align-items: center; }
.bar-links .bar-get {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem; margin-block: -.5rem; border-radius: 999px;
  font-weight: 600; color: var(--on-gold); background: var(--gold); box-shadow: 0 0 22px rgba(255, 190, 104, .28);
  transition: background-color .3s, box-shadow .3s;
}
.bar-links .bar-get:hover { color: var(--on-gold); background: #ffd08c; box-shadow: 0 0 34px rgba(255, 190, 104, .5); }
.line { height: 1.5px; margin-top: .55rem; background: transparent; position: relative; }
.line i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); transition: width .25s linear; }
.scrolled .line { background: var(--hair); }

/* Layout */
main { position: relative; z-index: 2; transition: opacity .9s var(--slow); overflow-x: clip; }   /* soft edges (the scrims) never widen the page on a phone */
section { padding-inline: var(--edge); }

/* Title card */
.hero {
  /* at least a screen tall, and free to grow when the words are set large */
  min-height: max(560px, 100vh); min-height: max(560px, 100svh);
  display: grid; grid-template-rows: minmax(5.5rem, 17fr) auto auto minmax(0, 52fr) auto auto minmax(0, 7fr); justify-items: center; text-align: center;
}
.wordmark {
  grid-row: 2;
  font-weight: 400; font-size: clamp(1.35rem, 3.3vw, 2.5rem); line-height: 1;
  text-transform: uppercase; letter-spacing: .5em; margin-right: -.5em; font-stretch: 125%;
}
.hero-line { grid-row: 3; margin-top: 1.75rem; color: var(--text-2); font-size: clamp(1.0625rem, 1.3vw, 1.25rem); letter-spacing: .005em; max-width: 30rem; text-wrap: balance; text-shadow: var(--halo); }
.hero .cta { grid-row: 5; }
.hero-foot { grid-row: 6; margin-top: 2.25rem; color: var(--text-2); font-size: .875rem; display: grid; justify-items: center; gap: 1.5rem; text-shadow: var(--halo); }
.hero-foot > span:first-child { max-width: 30rem; text-wrap: balance; }
/* the way on: a thread of light that keeps falling, bright enough to read as "more below" in a still frame */
.drop { position: relative; width: 1.5px; height: 56px; background: linear-gradient(var(--hair), transparent); }
.drop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--text-2), transparent); transform-origin: top; animation: drop 3.2s var(--slow) infinite; }
@keyframes drop { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* The calls to action: solid gold, the one loud thing on a quiet page */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .9rem 2rem; border-radius: 999px;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.2; letter-spacing: .005em; text-align: center; text-decoration: none; text-shadow: none;
  color: var(--on-gold); background: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .65), 0 0 0 1px rgba(255, 190, 104, .35), 0 0 38px rgba(255, 190, 104, .3), 0 12px 30px rgba(0, 0, 0, .5);
  transition: transform .25s var(--slow), box-shadow .35s var(--slow), background-color .35s var(--slow), color .35s var(--slow);
}
.cta:hover, .cta:focus-visible {
  background: #ffd08c; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .8), 0 0 0 1px rgba(255, 208, 140, .5), 0 0 56px rgba(255, 190, 104, .5), 0 14px 34px rgba(0, 0, 0, .55);
}
.cta:active { transform: translateY(0) scale(.985); }
.cta:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
/* on the title screen */
.hero .cta { font-size: 1.1875rem; min-height: 3.6rem; padding: 1rem 2.75rem; }
/* the closing call, and the store buttons: the largest */
.cta.big { font-size: clamp(1.125rem, 1.7vw, 1.375rem); min-height: 4rem; padding: 1.1rem 2.75rem; }
/* beside each epoch: the same button, outlined, so the page has one loudest thing at a time */
.epoch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.25rem; }
.epoch-actions .cta { min-height: 3rem; padding: .8rem 1.75rem; color: var(--gold-text); background: rgba(6, 5, 4, .4); box-shadow: inset 0 0 0 1.5px var(--gold); }
.epoch-actions .cta:hover, .epoch-actions .cta:focus-visible { color: var(--on-gold); background: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 38px rgba(255, 190, 104, .3); }
[hidden] { display: none !important; }
.cta[aria-disabled="true"] { color: var(--text-2); background: none; box-shadow: inset 0 0 0 1px var(--hair); cursor: default; transform: none; }

/* Reading */
.read { padding-block: clamp(6rem, 16vh, 11rem); min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.read > * { max-width: var(--column); }
.read.first { min-height: 90vh; }
.statement { font-weight: 300; font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.18; letter-spacing: -.012em; max-width: 17em; text-wrap: balance; }
.statement.quiet { margin-top: 1.1em; color: var(--text-2); }
.eyebrow { font-size: .875rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-bottom: 1.5rem; }
.display { font-weight: 300; font-size: clamp(2.25rem, 5.4vw, 4.5rem); line-height: 1.04; letter-spacing: -.022em; text-wrap: balance; }
.lede { margin-top: 1.5rem; font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.45; color: var(--text-2); max-width: 30em; text-wrap: pretty; }
.lede.wide { margin-top: 0; color: var(--text); font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.22; letter-spacing: -.01em; }
.note { margin-top: 3rem; font-size: .9375rem; color: var(--text-3); max-width: 32em; text-shadow: var(--halo); }

/* How you play */
#play > .moves { max-width: 62rem; }
.moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(2.5rem, 6vh, 4.5rem); width: 100%; }
.moves figure { display: grid; gap: 1.1rem; align-content: start; }
.vig { width: 100%; max-width: 320px; aspect-ratio: 320 / 220; height: auto; display: block; margin-left: -6px; }
.moves h3 { font-size: 1.375rem; font-weight: 400; letter-spacing: -.01em; }
.moves p { margin-top: .4rem; color: var(--text-2); font-size: 1rem; max-width: 19em; }
.later { margin-top: clamp(3rem, 8vh, 5rem); width: 100%; }
.terms div, .ends div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem; padding-block: .8rem; border-top: 1px solid var(--hair); }
.terms div:last-child, .ends div:last-child { border-bottom: 1px solid var(--hair); }
.terms dt, .ends dt { font-weight: 500; }
.terms dd, .ends dd { color: var(--text-2); }

/* An epoch */
.epoch { padding-top: clamp(8rem, 24vh, 15rem); }
.epoch-when { color: var(--text-2); font-size: .9375rem; margin-bottom: 1.4rem; display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.epoch-when .num { font-family: var(--mono); color: var(--gold-text); margin-right: .9em; }
.epoch-when .mono { color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: 1.25rem 2.75rem; margin-top: 2.75rem; }
.facts dt { font-size: .8125rem; color: var(--text-3); text-shadow: var(--halo); }
.facts dd { margin-top: .15rem; }
.stages { margin-top: 3rem; width: 100%; counter-reset: stage; }
.stages li {
  display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; column-gap: .75rem; align-items: baseline;
  padding-block: .85rem; border-top: 1px solid var(--hair);
}
.stages li:last-child { border-bottom: 1px solid var(--hair); }
.stages .mono { color: var(--text-3); font-size: .8125rem; }
.stages h3 { font-size: 1.0625rem; font-weight: 500; }
.stages p { grid-column: 2 / -1; color: var(--text-2); font-size: .9375rem; margin-top: .1rem; }
.stages em { font-style: normal; font-size: .8125rem; color: var(--gold-text); white-space: nowrap; }
.legend { margin-top: 1rem; font-size: .8125rem; color: var(--text-3); }
/* Each epoch's stages fold away: its hardest named in a line, the rest a quiet word away */
.stages-key { margin-top: 3rem; color: var(--text-2); font-size: .9375rem; }
.stages-fold { margin-top: 1.25rem; width: 100%; }
.stages-fold summary {
  display: inline-block; list-style: none; cursor: pointer; font-size: .9375rem; color: var(--text-2);
  text-decoration: underline; text-decoration-color: var(--hair); text-decoration-thickness: 1px; text-underline-offset: .3em;
  padding: .75rem .25rem; margin: -.75rem -.25rem; transition: color .3s, text-decoration-color .3s; text-shadow: var(--halo);
}
.stages-fold summary::-webkit-details-marker { display: none; }
.stages-fold summary:hover { color: var(--text); text-decoration-color: var(--gold); }
/* open, it says so in words: nothing turns or slides */
.stages-fold .fold-open, .stages-fold[open] .fold-shut { display: none; }
.stages-fold[open] .fold-open { display: inline; }
.stages-fold .stages { margin-top: 1.5rem; }
.epoch > p:last-child { margin-top: 2.75rem; }
/* A real screen from the game with each epoch. Beside the words on a wide screen, where it stays in view
   while the stages scroll past; in the column on a narrow one. */
.epoch-phone { margin-top: 3rem; display: grid; justify-items: center; gap: .9rem; }
.epoch-phone .phone { --h: min(66vh, 600px, 150vw); }
.epoch-phone figcaption { font-size: .8125rem; color: var(--text-3); text-shadow: var(--halo); }
@media (min-width: 1200px) {
  .epoch { display: grid; grid-template-columns: minmax(0, var(--column)) minmax(0, 1fr); align-content: center; justify-items: start; }
  .epoch > * { grid-column: 1; width: 100%; }
  .epoch > .epoch-phone { grid-column: 2; grid-row: 1 / span 12; width: auto; justify-self: end; align-self: start; margin-top: 0; position: sticky; top: calc((100vh - min(66vh, 600px)) / 2 - 1rem); }
}

/* The story between epochs, and the last card */
.card {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding-block: 18vh 30vh;
}
.card-era { color: var(--gold-text); font-size: .875rem; margin-bottom: 1.25rem; text-shadow: var(--halo); }
.card h2 { font-weight: 300; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 2rem; text-wrap: balance; text-shadow: 0 0 24px rgba(6,5,4,.6); }
.card p { max-width: 24em; color: var(--text-2); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; text-wrap: balance;
  /* the halo, and a wider shade like the title's, for when a giant's jet or a bright star crosses the line */
  text-shadow: var(--halo), 0 0 16px rgba(6,5,4,.9), 0 0 32px rgba(6,5,4,.6); }
.card p + p { margin-top: .5rem; }
/* One idea at a time: each line lands before the next begins */
/* The lines wait unseen only once the page has been scrolled (app.js adds .reveal), so a still capture of the
   whole page, taken without scrolling, still shows every card rather than long empty stretches. */
.js .card:not(.last) > * { transition: opacity 1.6s var(--slow), transform 1.6s var(--slow); }
.js.reveal .card:not(.last):not(.seen) > * { opacity: 0; transform: translateY(6px); }
.js .card.seen > * { opacity: 1; transform: none; }
.js .card.seen > :nth-child(2) { transition-delay: .5s; }
.js .card.seen > :nth-child(3) { transition-delay: 1.5s; }
.js .card.seen > :nth-child(4) { transition-delay: 3s; }
.js .card.seen > :nth-child(5) { transition-delay: 4.5s; }
.card.last { padding-block: 22vh 34vh; }
.card.last .actions { margin-top: 2.75rem; max-width: none; }
#join-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 3.5rem; }
/* Registering: a line to write on, and the word that sends it */
.register { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2.75rem; width: min(100%, 30rem); }
.register input {
  flex: 1; min-width: 0; font: inherit; font-size: clamp(1.125rem, 2vw, 1.375rem); color: var(--text); background: none; border: 0; border-radius: 0;
  border-bottom: 1.5px solid var(--text-3); padding: .55rem 0 .6rem; text-align: left; caret-color: var(--gold); transition: border-color .3s;
  text-shadow: var(--halo);
}
.register input[aria-invalid="true"], .register input[aria-invalid="true"]:focus { border-bottom-color: var(--danger); }
.register input::placeholder { color: var(--text-3); }
.register input:focus { outline: none; border-bottom: 2px solid var(--gold); padding-bottom: calc(.6rem - .5px); }
.register input:-webkit-autofill { -webkit-text-fill-color: var(--text); transition: background-color 99999s; }
.register .cta { flex: none; }
.register.busy { opacity: .5; pointer-events: none; }
.card .small.register-note { margin-top: 1rem; }
.card .small.register-note.bad { color: var(--danger); }
.card.last h2 { margin-bottom: 1.5rem; }
.card.last .actions + .small, .card.last .actions + [hidden] + .small { margin-top: 2.5rem; }   /* the first note after the buttons, even when "Also for…" is hidden */
.hero-foot a { display: block; max-width: 20rem; text-wrap: balance; text-decoration: none; color: var(--text-2); padding: .75rem 1rem; margin: -.75rem -1rem; transition: color .3s; }
.hero-foot a:hover { color: var(--text); }
.thanks { min-height: 70vh; }
.thanks .lede a { color: var(--text); text-decoration-color: var(--gold); }
.card .small { font-size: .875rem; color: var(--text-2); margin-top: 1.5rem; }
/* a small link, still a full fingertip tall */
.card .small .tap { display: inline-block; padding-block: .75rem; margin-block: -.75rem; }
.card .small + .small { margin-top: .6rem; }

/* Challenges */
.count { display: grid; width: 100%; grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), max-content)); justify-content: start;   /* three across; fewer only when the words are set large */
  gap: 1.5rem clamp(1.25rem, 5vw, 4.5rem); margin-block: 3.5rem 4rem; }
.count dt { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 300; line-height: 1; letter-spacing: -.04em; }
.count dd { margin-top: .6rem; color: var(--text-2); font-size: .9375rem; max-width: 11em; }
.ends { width: 100%; }
.ends div { grid-template-columns: 9.5rem 1fr; }
.ends dt { color: var(--danger); font-weight: 400; }

/* Keys */
#sound-keys > .keys { max-width: 60rem; }
.keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 3.5rem; width: 100%; border-top: 1px solid var(--hair); }
.keys button { text-align: left; padding: 1rem 1rem 1.25rem 0; display: grid; gap: .2rem; position: relative; }
.keys button::before { content: ""; position: absolute; left: 0; top: -1px; height: 1.5px; width: 0; background: var(--gold); }
.keys button.sounding::before { width: calc(100% - 1rem); transition: width 2.6s linear; }
.keys .num { font-family: var(--mono); font-size: .8125rem; color: var(--gold-text); }
.keys .k { font-size: 1.25rem; font-weight: 400; letter-spacing: -.01em; }
.keys .n { font-size: .8125rem; color: var(--text-3); }
.keys .h { font-size: .8125rem; color: var(--text-2); margin-top: .7rem; text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: .3em; }
.keys button:hover .h { text-decoration-color: var(--gold); }

/* Film */
.film { align-items: center; }
.film > * { max-width: none; }
.film .eyebrow { align-self: center; }
/* The game's screen sits in the barest outline of a phone: a thin dark rim and one hairline.
   Every measure follows the screen's height, so the corners keep an iPhone's proportions at any size. */
.phone {
  --h: min(74vh, 740px, 190vw);
  --rim: calc(var(--h) * .0105);
  --corner: calc(var(--h) * .058);
  padding: var(--rim); border-radius: calc(var(--corner) + var(--rim));
  background: #0b0a09;
  box-shadow: 0 0 0 1px rgba(240, 232, 218, .26), inset 0 0 0 1px rgba(240, 232, 218, .07), 0 30px 90px rgba(0, 0, 0, .65);
}
.phone video { display: block; height: var(--h); width: auto; aspect-ratio: 886 / 1920; background: #000; border-radius: var(--corner); cursor: pointer; }
.film-controls { display: flex; gap: 2rem; margin-top: 1.25rem; font-size: .875rem; }
.film-controls button { color: var(--text-2); padding: .75rem; margin: -.75rem; min-width: 44px; transition: color .3s; }
.film-controls button:hover { color: var(--text); }
.film .note { text-align: center; margin-top: 1.5rem; }

/* Foot */
.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding: 2rem var(--edge) max(2rem, env(safe-area-inset-bottom)); font-size: .875rem; color: var(--text-3); border-top: 1px solid var(--hair); background: var(--ground); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.foot a, .foot button { padding: .75rem .375rem; margin: -.75rem -.375rem; }
.foot a { text-decoration: none; color: var(--text-2); }
.foot a:hover, .foot button:hover { color: var(--text); }
.foot button { color: var(--text-2); }
.still .drop::after { animation: none; }
.noscript { position: relative; z-index: 2; padding: 1rem var(--edge); color: var(--text-3); font-size: .875rem; }

/* Six keys in two rows of three, until there's room for one row */
@media (max-width: 1100px) {
  .keys { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; }
  .keys button { border-top: 1px solid var(--hair); }
}

/* Narrow screens: one column, the scene dimmed evenly behind the words */
@media (max-width: 820px) {
  .epoch-phone { align-self: center; }
  .bar-links a:not(.bar-get) { display: none; }
  /* with no gold button in the bar (coming soon, no sign-up), there's room for two ways round */
  .bar-links:has(.bar-get[style*="none"]) a:is([href="#epochs"], [href="#hard"]) { display: inline-block; white-space: nowrap; }
  .bar-where { display: none; }
  .moves { grid-template-columns: 1fr; gap: 2.5rem; }
  .moves figure { gap: .75rem; }
  .vig { max-width: 100%; margin-left: 0; }
  .keys { grid-template-columns: repeat(2, 1fr); border-top: 0; }
  .keys button { border-top: 1px solid var(--hair); }
  .terms div, .ends div { grid-template-columns: 1fr; gap: .15rem; }
  .foot nav { gap: .5rem 1.25rem; }
  /* on a phone the scene sits right behind the words: give every line the soft dark edge */
  .read p, .read dt, .read dd, .read h2, .read h3, .read figcaption { text-shadow: var(--halo); }
}

/* The smallest phones: the three counts stay in one row, a size down */
@media (max-width: 380px) {
  .count dt { font-size: 2.25rem; }
  .count dd { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drop::after { animation: none; }
  .js .card:not(.last) > *, .js.reveal .card:not(.last):not(.seen) > * { opacity: 1; transform: none; transition: none; }
  .veil, main { transition-duration: .01s; }
}

/* The small pages' way home: a comfortable target, nothing moves */
.page .home { padding-block: .875rem; margin-top: -.875rem; }
