/* ATLAS landing — one screen: release line, craft, three figures. */

:root {
  --ink: #171a20; /* the figures and the release line */
  --muted: #5c5e62; /* the labels under them */
  --rule: #e4e5e7; /* hairlines between the figures */
  --paper: #ffffff;

  /* One rhythm for the page's side margins, so the release line, the craft
     and the figures all sit inside the same column. */
  --gutter: clamp(14px, 2.6vw, 40px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden; /* one screen, and it stays put */
  overscroll-behavior: none; /* no rubber-banding at the edges either */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The whole page is one screen: the craft takes whatever height the release
   line and the figures leave it, and never pushes them off. */
.page {
  /* A definite height, not just a minimum: the craft below sizes itself
     against this row, and a percentage height cannot resolve against a
     min-height. With only a minimum the image fell back to its natural size
     and spilled out of a short window. */
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* everything reads along the bottom edge */
  padding: clamp(14px, 2.2vh, 26px) var(--gutter) clamp(14px, 2.6vh, 30px);
  gap: clamp(6px, 1.2vh, 14px);
  pointer-events: none; /* the layer is type only; nothing to click through to */
}

/* ── masthead ─────────────────────────────────────────────────────────── */

/* One line along the bottom: the name at the left, the figures in the middle,
   the invitation at the right. */
.footer {
  display: flex;
  /* All three read off one line: the name and the invitation take their
     vertical centre from the figures between them, not from the page edge. */
  align-items: center;
  gap: clamp(20px, 4vw, 72px);
}

/* The name, set in the face it is meant to be seen in. */
.masthead {
  margin: 0;
  flex: 0 0 auto;
  text-align: left;
  font-family: 'Zen Dots', 'Archivo', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(26px, min(4.6vw, 8vh), 64px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* ── the craft ────────────────────────────────────────────────────────── */

/* The picture is the screen. It sits behind everything, covering the whole
   viewport, and the type is laid over it. */
.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Below square the crop would eat the wings and leave a slice of fuselage, so
   the craft is shown whole there instead of filling the screen. */
@media (max-aspect-ratio: 4 / 5) {
  .backdrop {
    object-fit: contain;
  }
}

/* The craft fills the row it is given, whole, at every window shape. */
/* ── the figures ──────────────────────────────────────────────────────── */

.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  /* Takes whatever the name leaves, rather than a fixed measure of its own. */
  flex: 1 1 auto;
  min-width: 0;
}

.spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(4px, 0.7vh, 9px);
  /* The hairlines read as rules on a spec bar, not as tight dividers around
     the words: they run a little past the type at both ends. */
  padding: clamp(5px, 1vh, 12px) clamp(8px, 2vw, 28px);
}

.spec + .spec {
  border-left: 1px solid var(--rule);
}

.spec__figure {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.06em;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
}

.spec__value {
  font-size: clamp(22px, 3.3vw, 44px);
  letter-spacing: -0.02em;
}

.spec__unit {
  font-size: clamp(9px, 1.12vw, 16px);
  letter-spacing: -0.01em;
}

.spec__label {
  margin: 0;
  font-size: clamp(9px, 0.78vw, 12px);
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

/* Too narrow for one line: the name leaves the bottom row entirely and takes
   the top of the screen, centred, while the figures and the invitation keep
   the foot to themselves. */
@media (max-width: 760px) {
  .footer {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(10px, 2vh, 20px);
  }

  .masthead {
    position: fixed;
    top: clamp(14px, 2.2vh, 26px);
    left: var(--gutter);
    right: var(--gutter);
    text-align: center;
  }
}

/* On a phone the three figures still stand side by side, as they do on the
   spec bar this is drawn from; only the type steps down to fit. */
@media (max-width: 420px) {
  .spec {
    padding: 6px;
  }

  .spec__figure {
    gap: 0.04em;
  }
}

/* ── the invitation ───────────────────────────────────────────────────── */

/* The page's type layer ignores the pointer so the picture stays clean; the
   one thing you can actually press has to take it back. */
.preorder {
  flex: 0 0 auto;
  pointer-events: auto;
  margin: 0;
  padding: clamp(9px, 1.3vh, 14px) clamp(18px, 2.2vw, 30px);
  border: 1px solid rgba(23, 26, 32, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--ink);
  font: inherit;
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.preorder:hover {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(23, 26, 32, 0.4);
}

.preorder:active {
  transform: translateY(1px);
}

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

/* The modal is a native <dialog>, so the browser handles the top layer, Esc,
   and returning focus to the button when it closes. */
.invite {
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 2 * var(--gutter));
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(34px) saturate(1.6);
  backdrop-filter: blur(34px) saturate(1.6);
  box-shadow: 0 32px 90px rgba(23, 26, 32, 0.18);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain; /* scrolling the form must not reach the page */
}

.invite::backdrop {
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

/* The card and the thank-you both sit on the same padded field. */
.invite__card,
.invite__thanks {
  position: relative;
  padding: clamp(26px, 4vh, 40px) clamp(22px, 4vw, 40px) clamp(22px, 3.4vh, 34px);
}

.invite__thanks[hidden] {
  display: none;
}

.invite__close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.invite__close:hover {
  color: var(--ink);
  background: rgba(23, 26, 32, 0.06);
}

.invite__title {
  margin: 0;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.invite__lede {
  margin: 6px 0 clamp(16px, 2.4vh, 24px);
  font-size: clamp(12px, 1.05vw, 14px);
  color: var(--muted);
}

.invite__fields {
  display: grid;
  gap: 10px;
}

.invite__fields input,
.invite__fields textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(23, 26, 32, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  font: inherit;
  font-size: clamp(13px, 1.05vw, 15px);
  transition: border-color 180ms ease, background 180ms ease;
}

.invite__fields textarea {
  resize: vertical;
  min-height: 84px;
}

.invite__fields input::placeholder,
.invite__fields textarea::placeholder {
  color: rgba(92, 94, 98, 0.72);
}

.invite__fields input:focus,
.invite__fields textarea:focus {
  outline: none;
  border-color: rgba(23, 26, 32, 0.55);
  background: rgba(255, 255, 255, 0.92);
}

/* Marked only after a failed send, never while someone is still typing. */
.invite__fields .is-missing {
  border-color: #c2453d;
  background: rgba(194, 69, 61, 0.06);
}

.invite__send {
  width: 100%;
  margin-top: clamp(14px, 2.2vh, 20px);
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 200ms ease;
}

.invite__send:hover {
  opacity: 0.86;
}

/* Narrow screens: the invitation takes the whole width it can get. */
@media (max-width: 560px) {
  .invite {
    width: calc(100vw - 24px);
    border-radius: 18px;
  }
}
