/* 25thr: scanning the 25th hour */

:root {
  --paper: #f7f5f0;
  --veil: rgb(247 245 240 / 0.86);
  --ink: #254539;
  --moss: #1f463b;
  --muted: #5a6b57;
  --rule: #dee0da;
  --line: #c2c7bc;
  --caret: #8eb7ca;
  --teal: #2c8781;
  --teal-ink: #22716c;
  --teal-deep: #1b5a55;
  --lime: #d4f04a;

  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bar: 44px;
  --gutter: clamp(16px, 1.7vw, 24px);
  --frame: min(1024px, 100% - 2 * var(--gutter) - 96px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--ink); }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

button { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--moss);
  color: var(--paper);
  font: 500 12px var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.caps {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- scene ---------- */

/* The ghost circles. Figma strokes each one inside its edge, so the radii sit
   half a pixel in; they stay 1px hairlines at any scale. */
.circles {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.circles-lines { stroke: var(--line); }
.circles-wake { stroke: var(--teal); display: none; }
.circles.is-waking .circles-wake { display: inline; }
.js.intro .circles { opacity: 0; }

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

/* ---------- top bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  height: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: calc((100% - var(--frame)) / 2 + 8px);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6.92px;
}

.logo img { display: block; }
.logo-mark { width: 26.6px; height: 19.66px; }
.logo-type { width: 53.48px; height: 15.22px; }

.bar-links {
  display: flex;
  gap: 54px;
  font: 400 10px/1.3 var(--mono);
  letter-spacing: 1px;
}

.bar-links a {
  color: var(--ink);
  text-decoration: none;
}

/* Letter-spacing trails the last letter; pull it back so the ink meets the frame edge. */
.bar-links a:last-child { margin-right: -1px; }

.bar-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  z-index: 2;
  width: var(--frame);
  margin-inline: auto;
  padding: calc(var(--bar) + clamp(28px, 6vh, 54px)) 8px 40px;
  pointer-events: none;
}

.stage :is(a, button, p, h1, .sheet) { pointer-events: auto; }

.meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font: 400 10px/13px var(--mono);
}

.meta p {
  display: grid;
  gap: 5px;
  margin: 0;
}

.meta .caps { letter-spacing: 0.22em; color: var(--ink); }
.meta span:not(.caps) { color: var(--muted); letter-spacing: 0.02em; }
.meta-end { text-align: right; }
.meta-end .caps { margin-right: -0.22em; }

.hero {
  display: grid;
  gap: 30px;
  margin-top: clamp(45px, calc(17.2vh + 13px), 167px);
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.headline {
  margin: 0;
  font: 400 47.32px/1.3 var(--sans);
  color: var(--ink);
}

.lede {
  max-width: 34em;
  margin: 0;
  font: 400 18.2px/1.55 var(--sans);
  color: var(--muted);
}

/* Figma's cursor in proportion to the type: 11 x 24 at 20px, from the top of
   the line and 2px after the last letter. */
.cursor,
.type-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.2em;
  margin-left: 0.1em;
  vertical-align: top;
  background: var(--caret);
}

.js:not(.is-typed) .cursor { visibility: hidden; }

.type-word { white-space: nowrap; }
.type-char { position: relative; visibility: hidden; }
.type-char.is-on { visibility: visible; }

.type-caret {
  position: absolute;
  left: 100%;
  top: 0;
}

/* Spans the frame, so the index can open across it right under the button. */
.hero-aside {
  position: relative;
  display: grid;
  justify-items: start;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--moss);
  background: var(--veil);
  color: var(--moss);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn svg { width: 14px; height: 14px; }
.btn:hover, .btn[aria-expanded="true"] { background: var(--moss); color: var(--paper); }

/* ---------- intro ---------- */

.reveal, .headline { transition: opacity 0.7s ease var(--delay, 0s); }
.lede { --delay: 0.6s; }
.hero-aside { --delay: 0.9s; }

.js.intro .reveal,
.js.intro .headline { opacity: 0; }

.js.intro .reveal { pointer-events: none; }

/* ---------- anchors ---------- */

.anchors {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.anchor {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.anchor.is-found {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.anchor.is-off { opacity: 0; visibility: hidden; pointer-events: none; }
.anchor:focus-visible { outline: none; }

.anchor-pin {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
}

.anchor-pin::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px solid var(--teal);
  background: var(--paper);
  transform: rotate(45deg);
  transition: background-color 0.2s ease;
}

.anchor-pin::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid var(--teal);
  opacity: 0;
}

.is-live .anchor-pin::before { background: var(--lime); }
.anchor:hover .anchor-pin::before,
.anchor:focus-visible .anchor-pin::before { background: var(--teal); }

.anchor.is-found .anchor-pin::after { animation: lock 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.anchor.is-ping .anchor-pin::after { animation: ping 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes lock {
  from { transform: scale(2.8); opacity: 0; }
  30% { opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}

@keyframes ping {
  from { transform: scale(2.8); opacity: 0; }
  30% { opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}

.anchor-stem {
  position: absolute;
  left: -0.5px;
  bottom: 7px;
  width: 1px;
  height: var(--stem);
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.anchor-label {
  position: absolute;
  left: 0;
  bottom: calc(var(--stem) + 7px);
  display: grid;
  gap: 3px;
  padding: 7px 11px 8px 10px;
  background: var(--veil);
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: opacity 0.3s ease 0.3s, clip-path 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s, background-color 0.2s ease;
}

.is-flip .anchor-label { left: auto; right: 0; text-align: right; }

.is-labelled .is-found .anchor-stem { transform: scaleY(1); }
.is-labelled .is-found .anchor-label { opacity: 1; clip-path: inset(0 0 0 0); }

/* A label that would cover the page's text folds away, leaving its pin. */
.is-labelled .is-found.is-hushed .anchor-stem { transform: scaleY(0); }
.is-labelled .is-found.is-hushed .anchor-label { opacity: 0; clip-path: inset(0 100% 0 0); pointer-events: none; }

.anchor:hover .anchor-label,
.anchor:focus-visible .anchor-label {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--moss);
}

.anchor:focus-visible .anchor-label { outline: 2px solid var(--teal); outline-offset: 2px; }

.anchor-title { font-size: 13px; line-height: 1.3; color: var(--muted); }
.anchor-title b { font-weight: 500; color: var(--ink); }

.anchor-status {
  font: 400 10px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.is-live .anchor-status { color: var(--teal-ink); }

/* ---------- index sheet ---------- */

.sheet {
  justify-self: stretch;
  margin-top: 16px;
  padding: 18px 22px 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

/* Out to the frame's edges, past the stage's 8px inset; ui.js keeps it on screen. */
.js .sheet {
  position: absolute;
  top: calc(100% + 16px);
  left: -8px;
  right: -8px;
  z-index: 4;
  max-height: var(--sheet-max, 60vh);
  margin: 0;
  overflow: auto;
  background: rgb(247 245 240 / 0.94);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  translate: 0 -8px;
  transition: opacity 0.28s ease, translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.4s;
}

.js .sheet.is-open {
  visibility: visible;
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.28s ease, translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sheet-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 14px;
}

.sheet-head h2 {
  margin: 0;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sheet-head h2:focus { outline: none; }

.sheet-head p {
  flex: 1;
  margin: 0;
  font: 400 11px/1.4 var(--mono);
  color: var(--muted);
}

.sheet-close {
  display: none;
  align-self: center;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--rule);
  background: none;
  cursor: pointer;
}

.js .sheet-close { display: grid; }
.sheet-close svg { width: 11px; height: 11px; }
.sheet-close:hover { border-color: var(--moss); }

.index {
  width: 100%;
  border-collapse: collapse;
  font: 400 12px/1.4 var(--mono);
}

.index thead th {
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.index tbody :is(th, td) {
  padding: 14px 8px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-weight: 400;
  color: var(--ink);
}

.index tbody tr:last-child :is(th, td) { border-bottom: 0; }

.index th b {
  font: 500 14px/1.3 var(--sans);
  color: var(--ink);
}

.index th span { margin-left: 0.6em; color: var(--muted); }

.index :is(th, td):first-child { width: 36%; }
.index .status {
  text-align: right;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.index [data-live] .status { color: var(--teal-ink); }

.index .visit {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.index .visit a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.index .visit a:hover {
  color: var(--teal-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.index .visit svg { width: 9px; height: 9px; }

.index tr.is-hit > * { animation: hit 1.8s ease-out; }

@keyframes hit {
  from { background: rgb(212 240 74 / 0.5); }
  to { background: transparent; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .is-typed .cursor { animation: blink 1.1s steps(1, end) infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .anchor-label, .anchor-stem, .js .sheet, .js .sheet.is-open { transition: none; }
  .anchor.is-found .anchor-pin::after, .anchor.is-ping .anchor-pin::after { animation: none; }
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  :root { --frame: calc(100% - 2 * var(--gutter)); }
  .index :is(th, td):nth-child(3) { display: none; }
}

/* Landscape phones: pull the copy up and give it a veil over the meadow. */
@media (max-height: 560px) and (orientation: landscape) {
  .stage { padding-top: calc(var(--bar) + 20px); }
  .meta .meta-end { display: none; }
  .hero { margin-top: 33px; gap: 16px; }
}

@media (max-width: 640px) {
  .bar-links { gap: 24px; }
  .meta .meta-end { display: none; }
  .hero { margin-top: 49px; gap: 22px; }
  .anchor-title { font-size: 12px; }
  .anchor-status { display: none; }

  .index thead { display: none; }
  .index tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
  }
  .index tbody tr:last-child { border-bottom: 0; }
  .index tbody :is(th, td) { padding: 0; border: 0; width: auto; }
  .index tbody th { grid-column: 1; }
  .index tbody .status { grid-column: 2; grid-row: 1; align-self: center; }
  .index tbody .visit { grid-column: 2; grid-row: 2; }
  .index tbody td:nth-child(2) { grid-column: 1; color: var(--muted); }
  .index tbody td:nth-child(4) { display: none; }
}

