@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/poppins-latin-700-normal.woff2") format("woff2"); }

/* one screen: the engraving is fixed, the bar is the navigation, the text changes in place */

:root {
  --ground: #5a5044;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.82);
  --bar: #ffffff;
  --bar-text: #111111;
  --flag: #f0a080;
  --shadow: 0 1px 14px rgba(20, 17, 12, 0.55);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--ground);
  color: var(--text);
  font-family: "Poppins", "Century Gothic", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

h1, h2, p, ol { margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* backdrop: fixed, never moves; the sky band on top of it drifts */

.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: -1; }

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, calc(100vh * 16 / 9));
  height: max(100vh, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
  filter: brightness(0.82);
}

.base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.sky {
  position: absolute;
  top: 0;
  left: -5%;
  width: 110%;
  height: 22.22%;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  animation: drift 180s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  from { transform: translateX(-1.6%); }
  to   { transform: translateX(1.6%); }
}

.fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 52%;
  background: linear-gradient(to top, rgba(20, 17, 12, 0.66), rgba(20, 17, 12, 0));
}

/* the screen */

.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 2.25rem;
}

/* the bar: wordmark, search, options */

.bar {
  width: min(100%, 64rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bar);
  color: var(--bar-text);
  border-radius: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  font-weight: 500;
}

.wordmark img { display: block; height: 1.4rem; width: auto; }

.search { flex: 1 1 10rem; min-width: 0; }

.search input {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--bar-text);
  background: rgba(17, 17, 17, 0.06);
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  min-width: 0;
}

.search input::placeholder { color: rgba(17, 17, 17, 0.5); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.menu { display: flex; gap: 1.5rem; white-space: nowrap; }

.menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; }

.menu .icon { display: inline-flex; align-items: center; }
.menu .icon img { display: block; width: 1.15rem; height: 1.15rem; }
.menu .icon + .icon { margin-left: -0.25rem; }

/* views: title at the top left, content at the bottom, white over the engraving */

#views {
  flex: 1;
  width: min(100%, 64rem);
  min-height: 0;
  display: grid;
  perspective: 1800px;
}

.view {
  grid-area: 1 / 1;
  min-width: 0;
  overflow: hidden auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 2.5rem;
  text-shadow: var(--shadow);
  transform-origin: left center;
  backface-visibility: hidden;
}

.view[hidden] { display: none; }
.view::-webkit-scrollbar { display: none; }

/* turning a page: the outgoing page is cut into strips that lift around the spine,
   the outer edge leading, so the sheet bows as it turns; the next page arrives once it is gone */

#views { position: relative; perspective-origin: 20% 50%; }

.sheet {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform-style: preserve-3d;
}

.strip {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: lift 520ms cubic-bezier(0.5, 0, 0.2, 1) both;
}

.strip > * { backface-visibility: hidden; }

.strip > .view { height: 100%; }

@keyframes lift {
  0%   { transform: rotateY(0deg); opacity: 1; }
  55%  { opacity: 1; }
  100% { transform: rotateY(-90deg); opacity: 0; }
}

.view.arrive { animation: arrive 260ms ease-out both; }

@keyframes arrive {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.view .bottom { margin-top: auto; }

.view > .three, .view > .body { margin-block: auto; }

.view .body {
  max-width: 36rem;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  font-weight: 500;
  line-height: 1.45;
}

.view .body a { text-decoration: underline; text-underline-offset: 0.2em; }

.view h1 {
  font-weight: 700;
  font-size: clamp(2.75rem, 5.2vw, 4.9rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 28px rgba(20, 17, 12, 0.45);
}

.view h1 .keep { white-space: nowrap; }

.bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
}

.line {
  max-width: 34rem;
  margin-inline: auto;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  font-weight: 500;
  line-height: 1.4;
  text-wrap: balance;
}

#view-station .line { max-width: 44rem; }

.line a { text-decoration: underline; text-underline-offset: 0.2em; }


/* how it works: three columns under the title */

.three {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem 2rem;
  text-align: left;
}

.three > div {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 1rem;
  padding: 1.25rem 1.4rem 1.35rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.three h2 { font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin-bottom: 0.35rem; }

.three p { color: #ffffff; font-size: 1.0625rem; }

/* search results */

.results {
  width: min(100%, 40rem);
  list-style: none;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.results li a {
  display: block;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.75rem;
}

.results li a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }

.results .where { display: block; font-size: 0.875rem; color: var(--text-soft); }

.results li.none { color: var(--text-soft); }

/* the field */

/* the field: fixed furniture under every page, never part of a turn */
#waitlist {
  width: min(100%, 34rem);
  flex: none;
  text-align: center;
  margin-top: 1.1rem;
  text-shadow: var(--shadow);
}

.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

input[type="email"] {
  flex: 1 1 12rem;
  font: inherit;
  color: var(--text);
  background: rgba(20, 17, 12, 0.4);
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  min-width: 0;
  text-shadow: none;
}

input::placeholder { color: var(--text-soft); opacity: 1; }

button {
  font: inherit;
  font-weight: 600;
  color: #14110c;
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-shadow: none;
}

button:disabled { opacity: 0.6; cursor: wait; }

.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }

/* Turnstile stays out of the flow: it takes no space unless it has to show a challenge */
#waitlist { position: relative; }
#turnstile {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.5rem);
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}
#turnstile:empty { display: none; }

#note { margin-top: 0.85rem; font-size: 0.9375rem; }
#note.err { color: var(--flag); }

#waitlist.done .row, #waitlist.done #turnstile { display: none; }

/* phones */

@media (max-width: 48rem) {
  .screen { padding: 0.75rem 0.75rem 1.25rem; }
  .bar { flex-wrap: wrap; gap: 0.6rem 1rem; padding: 0.65rem 1rem; }
  .wordmark { order: 0; }
  .search { order: 1; flex-basis: 100%; }
  .menu { order: 2; flex-basis: 100%; justify-content: space-between; gap: 0.5rem; font-size: 0.875rem; }
  .view { padding-top: 1.75rem; }
  .view h1 { font-size: 2.5rem; line-height: 1.1; }
  .view h1 br { display: none; }
  .view { gap: 1rem; }
  .three { grid-template-columns: 1fr; gap: 0.6rem; }
  .three > div { padding: 0.85rem 1rem 0.95rem; }
  .three h2 { font-size: 1.05rem; margin-bottom: 0.2rem; }
  .three p { font-size: 0.9375rem; line-height: 1.4; }
  .view .body { font-size: 1.0625rem; }
  .row > input, .row > button { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sky { animation: none; }
  .sheet { display: none; }
  .view.arrive { animation: none; }
}
