@import url("/assets/fonts/inter.css");

@font-face {
  font-family: "PP Telegraf";
  src: url("/assets/fonts/pptelegraf-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Berkeley Mono";
  src: url("/assets/fonts/berkeleymonotrial-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #c9c6ff;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "PP Telegraf", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 24px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ------------------------------------------------------------------ *
 * Waitlist screen — one viewport, no scrolling.
 * ------------------------------------------------------------------ */

body.screen {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

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

#drop {
  display: block;
  width: 100%;
  height: 100%;
}

/* If WebGL is unavailable the canvas stays black; this keeps some texture. */
.no-webgl .stage {
  background:
    radial-gradient(ellipse at 50% 78%, rgba(255, 255, 255, 0.12), transparent 62%),
    #000;
}

.shell {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3.2vh, 36px) var(--gutter);
  /* let pointer events through to the canvas except on real controls */
  pointer-events: none;
}
.shell a,
.shell button,
.shell input,
.shell label { pointer-events: auto; }

/* soft scrim so the legal text stays readable over the brightest part
   of the drop surface; sits above the canvas, below the shell content */
.shell::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 32vh;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 18%, rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: -1;
}

.brand { justify-self: center; }
.brand a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--fg);
}
.brand img { display: block; height: 30px; width: auto; }
.brand span {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.015em;
}

/* ---- middle ---- */

.center {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: var(--maxw);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vh, 22px);
}

.lede {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 5.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 400;
  max-width: 16ch;
}

.sub {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(12px, 1.5vw, 15px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- form ---- */

.form {
  display: flex;
  gap: 8px;
  width: min(440px, 100%);
  margin-top: clamp(2px, 1vh, 8px);
}

.form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(240, 243, 243, 0.35);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: border-color 0.18s, background 0.18s;
}
.form input::placeholder { color: var(--faint); }
.form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}
.form input:disabled { opacity: 0.55; }

/* Same treatment as the main site's primary button: the lavender wash is
   an image (buttons.png), with Berkeley Mono set in black on top. */
.form button {
  flex: 0 0 auto;
  height: 50px;
  min-width: 160px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  background: #cdd3f5 url("/assets/ui/button-gradient.png") center / 100% 100% no-repeat;
  color: #000;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 300ms ease-in-out;
}
.form button:hover:not(:disabled) { filter: brightness(1.06); }
.form button:active:not(:disabled) { transform: translateY(1px); }
.form button:disabled { cursor: default; opacity: 0.55; }

.note {
  margin: 0;
  min-height: 1.2em;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.note.ok { color: var(--accent); }
.note.bad { color: #ff9d9d; }

/* ---- footer ---- */

.foot {
  justify-self: center;
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--faint);
  text-align: center;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.9);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
}

.foot a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}
.foot a:hover { color: var(--fg); border-bottom-color: var(--line); }

.foot .legal { line-height: 1.55; max-width: 72ch; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85); }

.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  opacity: 0.6;
  transition: opacity 0.16s, background 0.16s;
}
.x-link:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.x-link img { display: block; width: 13px; height: 13px; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.linkish:hover { color: var(--fg); border-bottom-color: var(--line); }

/* ---- cookie notice ---- */

.cookie {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 2 * var(--gutter)));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.cookie[hidden] { display: none; }

/* keep the legal line clear of the notice while it is up */
body.cookie-open .foot { padding-bottom: 104px; }
@media (max-width: 560px) { body.cookie-open .foot { padding-bottom: 150px; } }
.cookie p { margin: 0; flex: 1 1 auto; }
.cookie a { color: var(--fg); }
.cookie button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.cookie button:hover { background: rgba(255, 255, 255, 0.15); }

/* ------------------------------------------------------------------ *
 * Legal pages — these do scroll.
 * ------------------------------------------------------------------ */

body.doc {
  background: #000;
  min-height: 100vh;
}

.doc-head {
  border-bottom: 1px solid var(--line);
  padding: 22px var(--gutter);
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2;
}
.doc-head .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--fg);
}
.doc-brand img { display: block; height: 22px; width: auto; }
.doc-brand span {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.015em;
}
.doc-head a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.doc-head a:hover { color: var(--fg); }

.doc main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 7vh, 72px) var(--gutter) 96px;
}

.doc h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 10px;
}

.doc .meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 0 0 14px;
}


.doc h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 40px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.doc h2:first-of-type { border-top: 0; padding-top: 0; }

.doc h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 7px;
}

.doc p, .doc li {
  font-size: 15px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.76);
}
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 7px; }

.doc a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14px;
}
.doc th, .doc td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.76);
}
.doc th {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}


.doc-foot {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.doc-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.doc-foot a { color: var(--muted); text-decoration: none; }
.doc-foot a:hover { color: var(--fg); }

/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
  .form { flex-direction: column; }
  .form button { width: 100%; }
  .foot { font-size: 10.5px; gap: 7px; }
  .cookie { flex-direction: column; align-items: stretch; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
