/* Project Nova: the coming-soon page (/coming-soon). Its own look, carried over
   from the original page: black, Instrument Serif and JetBrains Mono. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fafafa;
  --grey: #9a9a9a;
  --panel: #111;
  --field: #262626;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

* {
  margin: 0;
}

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

body {
  min-height: 100svh;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

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

.nova {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  width: min(100% - 40px, 860px);
  margin-inline: auto;
  padding-block: clamp(48px, 10svh, 96px) clamp(48px, 8svh, 80px);
  text-align: center;
}

/* Title and tagline sit left of centre, as on the original page. */
.nova__title,
.nova__tagline {
  align-self: flex-start;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
}

.nova__title {
  font-size: clamp(3.25rem, 8vw, 5.5rem);
  letter-spacing: -0.01em;
}

.nova__tagline {
  margin-top: clamp(16px, 3svh, 32px);
  margin-left: clamp(0px, 6vw, 48px);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
}

.nova__camera {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(8px, 2svh, 24px);
}

.nova__specs {
  margin-top: clamp(24px, 5svh, 48px);
  font-size: clamp(0.8125rem, 1.6vw, 1rem);
  font-weight: 200;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nova__specs span {
  white-space: nowrap;
}

.nova__specs b {
  margin-inline: 0.5em;
  font-weight: inherit;
}

.nova__button {
  margin-top: clamp(32px, 6svh, 56px);
  height: 44px;
  padding-inline: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease;
}

@media (hover: hover) {
  .nova__button:hover {
    background: #d9d9d9;
  }
}

.nova__note {
  margin-top: 20px;
  color: var(--grey);
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* The sign-up pop-up */
.notify {
  margin: auto; /* the reset above removes the browser's centring */
  width: min(100% - 32px, 500px);
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--mono);
  overflow: visible;
}

.notify::backdrop {
  background: rgb(0 0 0 / 0.9);
}

.notify__form,
.notify__done {
  padding: 24px;
  border-radius: 24px;
  background: var(--panel);
  text-align: left;
}

.notify__title {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
}

.notify__title:focus {
  outline: none;
}

.notify__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.notify__field {
  margin-bottom: 18px;
}

.notify__field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

/* 16 px or more, so iOS doesn't zoom in on focus. */
.notify__field input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--field);
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  appearance: none;
}

.notify__field input:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.notify__field input[aria-invalid="true"] {
  border-color: #ff6b5b;
}

.notify__error {
  min-height: 1.5em; /* reserved, so a message moves nothing */
  margin: -6px 0 10px;
  color: #ff8a7d;
  font-size: 0.875rem;
}

.notify__submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.notify__submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.notify__done p {
  color: var(--grey);
  line-height: 1.5;
}

.notify__close {
  display: block;
  margin: 40px auto 0;
  height: 40px;
  padding-inline: 44px;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  .nova__specs {
    letter-spacing: 0.08em;
  }

  .nova__specs b {
    margin-inline: 0.25em;
  }

  .notify__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 360px) {
  .nova__specs {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }
}
