/*
  fomo.shaanpawa.com: an invite card and a way-finder for one evening.
  Plain paper, one white card with a black edge, and bold type all the way through: nothing is set lighter than 600.
  Two colours do the talking: blue for the time and the button, red for the walk.
*/
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --paper: #f6f3ec;
  --card: #fffefa;
  --ink: #111111;
  --soft: #55514a;
  --blue: #3255a4;
  --red: #e5533d;
  --on: #fffefa;
  --tint: rgba(50, 85, 164, 0.08);
  --road: rgba(50, 85, 164, 0.18);
  --edge: 3px;
  --pad: 16px;
  --col: min(100vw - 32px, 460px);
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (min-width: 420px) { :root { --pad: 20px; } }
@media (min-width: 600px) { :root { --pad: 24px; --col: 540px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a0c18;
    --card: #11152b;
    --ink: #f2eee6;
    --soft: #b4b9cb;
    --blue: #9db0ff;
    --red: #ff7a62;
    --on: #0a0c18;
    --tint: rgba(150, 170, 255, 0.1);
    --road: rgba(150, 170, 255, 0.22);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
p, h1, h2, h3, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: var(--edge) solid var(--blue); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.page {
  width: var(--col);
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 0 calc(56px + env(safe-area-inset-bottom, 0px));
}

/* 1. the card: who, when, what, where, and the one button */
.card { background: var(--card); border: var(--edge) solid var(--ink); container-type: inline-size; }
.row { padding: var(--pad); border-bottom: var(--edge) solid var(--ink); }
.top { display: flex; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; font-weight: 800; font-size: 17px; line-height: 1.2; }
.rel { color: var(--blue); white-space: nowrap; }
.time svg { display: block; width: 100%; height: auto; fill: var(--blue); }
.time text { font-family: var(--sans); font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.date { margin-top: 14px; font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; }
/* the title is sized so that "Journey to $550M" (8.8 em wide) always fits on its first line */
h1 { font-weight: 800; font-size: min(44px, 8.9vw); line-height: 1.03; letter-spacing: -0.03em; }
@supports (width: 1cqw) { h1 { font-size: min(44px, (100cqw - 2 * var(--pad)) / 8.9); } }
.by { margin-top: 10px; }
.place { font-weight: 800; font-size: 24px; line-height: 1.15; letter-spacing: -0.015em; }
.addr { margin-top: 6px; }
.go {
  display: flex; align-items: center;
  min-height: 64px;
  padding: 0 var(--pad);
  background: var(--blue);
  color: var(--on);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.go:hover { background: color-mix(in srgb, var(--blue) 88%, #000); }
.go:active { background: color-mix(in srgb, var(--blue) 78%, #000); }

/* 2. the way in: one plan, then a picture for each number on it */
.way { margin-top: 44px; }
h2 { font-weight: 800; font-size: 32px; line-height: 1.05; letter-spacing: -0.03em; }
.lead { margin-top: 10px; }
.box { margin-top: 20px; background: var(--card); border: var(--edge) solid var(--ink); }
.box figcaption { padding: 14px var(--pad) 16px; border-top: var(--edge) solid var(--ink); }

.plan { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.plan text { font-family: var(--sans); font-size: 13.5px; font-weight: 700; fill: var(--ink); }
.plan .dim { fill: var(--soft); }
.plan .inkb { fill: var(--blue); }
.plan .on { fill: var(--on); }
.plan .big { font-size: 28px; font-weight: 800; }
.plan .mass { fill: var(--tint); }
.plan .road { fill: var(--road); }
.plan .yard { fill: var(--card); }
.plan .dots { opacity: 0.45; }
.plan pattern circle { fill: var(--blue); }
.plan .halo { paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.plan .floor { fill: var(--card); }
.plan .dest { fill: var(--blue); }
.plan .desk { fill: var(--tint); stroke: var(--blue); stroke-width: 1.5; }
.plan .tread { fill: none; stroke: var(--blue); stroke-width: 1.2; }
.plan .wall { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: square; }
.plan .glass { fill: none; stroke: var(--blue); stroke-width: 3.6; }
.plan .glass-in { fill: none; stroke: var(--card); stroke-width: 1.4; }
.plan .bluewall { fill: none; stroke: var(--blue); stroke-width: 7; }
.plan .route { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.plan .approach { stroke-dasharray: 0.1 8.5; }
.plan .head-a { fill: var(--red); }
.plan .mk { fill: var(--red); }
.plan .mk-n { fill: var(--on); font-size: 13px; font-weight: 800; text-anchor: middle; }
.plan .arr { fill: none; stroke: var(--soft); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.step { margin-top: 36px; }
.step h3 { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; }
.n {
  flex: none;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--on);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}
.frame { position: relative; margin-top: 14px; aspect-ratio: 1; background: var(--tint); border: var(--edge) solid var(--ink); overflow: hidden; }
.frame .wait { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--soft); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.veil { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.done {
  display: none;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--pad);
  border: 0;
  background: var(--blue);
  color: var(--on);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.shot.live .veil { display: none; }
.shot.live .frame { border-color: var(--blue); }
.shot.live .done { display: block; }
.step figcaption { margin-top: 12px; }

.small { margin-top: 44px; font-size: 15px; line-height: 1.4; color: var(--soft); }

/* the page for a wrong address */
.lost { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; font-weight: 800; font-size: 22px; line-height: 1.25; }
.lost a { color: var(--blue); }

/* on a laptop the card is wider (see --col above) and the type goes up one size with it */
@media (min-width: 600px) {
  body { font-size: 20px; }
  .top { font-size: 19px; }
  .date, .place { font-size: 28px; }
  h1 { font-size: 50px; }
  h2 { font-size: 38px; }
  .step h3 { font-size: 28px; }
  .go { font-size: 22px; min-height: 72px; }
  .small { font-size: 16px; }
}

/* the only thing that moves: the colon keeps time */
@media (prefers-reduced-motion: no-preference) {
  .time .tick { animation: tick 2s steps(1, end) infinite; }
}
@keyframes tick { 50% { fill-opacity: 0.25; } }
