@font-face {
  font-family: "Inconsolata";
  src: url("/assets/inconsolata.ttf") format("truetype");
  font-weight: 200 900;
  font-stretch: 50% 200%;
  font-display: swap;
}

:root {
  --red: #ed1f24;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --line: rgba(255, 255, 255, 0.55);
  --panel: rgba(0, 0, 0, 0.55);
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

/* black lives on <html> only: a body background would paint over the
   negative z-index video */
html { background: #000; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--ink);
  font-family: "Inconsolata", ui-monospace, Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* keeps white text legible over the bright frames of the video */
.shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 28%),
    linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 40%);
  pointer-events: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: calc(var(--gutter) + env(safe-area-inset-top)) var(--gutter) 0;
}

.logo { margin: 0; line-height: 0; }
.logo img { width: clamp(120px, 18vw, 220px); height: auto; }

.status {
  margin: 0;
  text-align: right;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .status span { display: block; }
}

.bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
}

.cta {
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 14px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cta:hover, .cta:focus-visible { background: var(--ink); color: #000; outline: none; }
.cta[disabled] { opacity: 0.6; cursor: progress; }

.signup {
  width: min(560px, 100%);
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 20px;
  display: grid;
  gap: 16px;
}
.signup[hidden] { display: none; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

.fields label { display: grid; gap: 6px; }
.fields span {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.fields input {
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  border-radius: 0;
}
.fields input:focus { outline: none; border-bottom-color: var(--ink); }
.fields input[aria-invalid="true"] { border-bottom-color: var(--red); }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.consent input[aria-invalid="true"] { outline: 1px solid var(--red); outline-offset: 2px; }

.row { display: flex; align-items: center; gap: 16px; }
.link {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
}

.msg { margin: 0; min-height: 1.2em; font-size: 14px; color: #ffb3b5; }
.msg:empty { display: none; }

.toast {
  width: min(560px, 100%);
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.04em;
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 18px;
}
.toast[hidden] { display: none; }

/* standalone pages (unsubscribe) */
.page-center { justify-content: center; align-items: center; padding: 16px; }
.page-center .signup { text-align: center; }
.page-center .signup p { margin: 0; }
.page-center .row { justify-content: center; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .cta { transition: none; }
}
