/* One screen, no scroll: the logo centred over the still, a line of copy under it, and the Deploy
   with us button in the top-right corner. Carries the tokens of the full site rather than
   redefining them — the same black, white and orange, the same Funnel Display / Funnel Sans at
   Light, the same 1px strokes, and the same angle-to-radius move on the button, where square
   edges round off on hover. */
:root {
  --black: #000000;
  --white: #ffffff;
  --orange: #fa500f;

  --font-display: "Funnel Display", system-ui, -apple-system, sans-serif;
  --font: "Funnel Sans", system-ui, -apple-system, sans-serif;

  /* The page margin, rounded to whole pixels as on the main site. No content cap: the main site
     grows its margins past 1600px to keep a centred column, but there is no column here — the
     logo centres itself, and the button belongs to the corner of the screen at every width. */
  --space: round(clamp(20px, 4.4vw, 64px), 1px);
}

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

/* No scroll anywhere: the page is exactly one screen and nothing runs past it. svh rather than vh
   so a phone's retracting toolbar cannot push anything under the fold. */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--black); /* under the still, so no white flashes before it paints */
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- The screen ---------- */

.screen {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  padding: var(--space);
  overflow: hidden;
}

/* The still exactly as supplied: no scrim, no tint. */
.screen__still {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Only the logo is in the flow, so it is the thing centred on the screen — at the start, when it
   is the mark alone, and at the end. The line of copy hangs below it out of the flow; in the flow
   it would push the logo above the middle while it was still invisible. */
.screen__inner {
  position: relative;
  display: flex;
  justify-content: center;
}

.logo {
  display: block; /* an <h1> on the landing, a link home on the 404 */
  width: clamp(140px, 13vw, 200px);
  margin: 0;
}

.logo svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 124.5 / 43;
  overflow: visible;
}

.lede {
  position: absolute;
  top: calc(100% + clamp(56px, 7vw, 104px));
  left: 50%;
  translate: -50% 0;
  width: min(620px, calc(100vw - 2 * var(--space)));
  margin: 0;
  text-align: center;
  font-size: clamp(17px, 1.35vw, 20px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* The 404 puts a title above the line and a link inside it. */
.lede__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: inherit;
  font-weight: 500;
}
.lede p { margin: 0; }
.lede a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ---------- Deploy with us ---------- */

/* The site's two-part button in outline: a label cell and an arrow cell reading as one block at
   rest, parting into two rounded tiles on hover. Transparent, with the same 1px stroke the site
   draws everywhere, in white over the still. The arrow cell pulls back 1px so the shared edge is
   a single line rather than two; on hover it lets go, and each tile closes its own outline. The
   angle-to-radius move and the 0.4s ease are the same ones the nav and the cards use. Pinned to
   the top-right corner, on the page margins. */
.cta-split {
  --cta-ease: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: var(--space);
  right: var(--space);
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  height: 56px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  transition: gap var(--cta-ease);
}

.cta-split__label,
.cta-split__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--white);
  border-radius: 0;
  transition: border-radius var(--cta-ease), margin var(--cta-ease);
}

.cta-split__label { padding: 0 32px; }
.cta-split__arrow { width: 56px; margin-left: -1px; }
.cta-split__arrow svg { display: block; transition: transform var(--cta-ease); }

.cta-split:hover,
.cta-split:focus-visible { gap: 3px; outline: none; }
.cta-split:hover .cta-split__label,
.cta-split:hover .cta-split__arrow,
.cta-split:focus-visible .cta-split__label,
.cta-split:focus-visible .cta-split__arrow { border-radius: 12px; }
.cta-split:hover .cta-split__arrow,
.cta-split:focus-visible .cta-split__arrow { margin-left: 0; }
.cta-split:hover .cta-split__arrow svg,
.cta-split:focus-visible .cta-split__arrow svg { transform: translate(2px, -2px); }

@media (prefers-reduced-motion: reduce) {
  .cta-split, .cta-split__label, .cta-split__arrow, .cta-split__arrow svg { transition: none; }
}

/* ---------- Footer: legal bottom left, social bottom right ---------- */

/* On the same page margins as the button, mirrored into the bottom corners. Type at the nav's
   12px / 500, white over the still like everything else. */
.foot {
  position: absolute;
  left: var(--space);
  right: var(--space);
  bottom: var(--space);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-weight: 500;
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  min-width: 0;
}

.foot__legal a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.foot__legal a:hover,
.foot__legal a:focus-visible { text-decoration-color: currentColor; outline: none; }

/* Plain text, styled like the legal links on the left. */
.foot__social {
  display: flex;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot__social a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.foot__social a:hover,
.foot__social a:focus-visible { text-decoration-color: currentColor; outline: none; }

@media (prefers-reduced-motion: reduce) {
  .foot__social a, .foot__legal a { transition: none; }
}

/* ---------- Arrival ----------

   The page opens on the mark alone, dead centre. After a beat it slides left into its place in
   the lockup and the word unrolls out from behind it; then the line of copy, then the button.

   The mark is centred by moving the whole lockup: the mark's middle sits 12.49 units into a
   124.5-unit box whose middle is at 62.25, so it starts 49.76 units — 39.97% of its own width — to
   the right. The word is clipped away to nothing from the right and opens left to right while the
   mark travels, so it reads as coming out from behind it rather than fading up on its own. */
:root {
  --intro-hold: 1.4s;                         /* the mark alone */
  --intro-move: 1.1s;                         /* the slide and the reveal */
  --intro-ease: cubic-bezier(0.65, 0, 0.25, 1);
}

@keyframes logo-settle {
  from { transform: translateX(39.97%); }
  to   { transform: none; }
}

@keyframes word-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0; }
  20%  { opacity: 1; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.logo svg {
  animation: logo-settle var(--intro-move) var(--intro-ease) var(--intro-hold) both;
}

.logo__word {
  animation: word-reveal var(--intro-move) var(--intro-ease) var(--intro-hold) both;
}

.lede {
  animation: rise 0.9s cubic-bezier(0.2, 0, 0, 1) calc(var(--intro-hold) + var(--intro-move) - 0.2s) both;
}

/* The button keeps its own transform free for nothing — the hover moves the arrow, not the
   button — so the same rise is safe here. */
.cta-split,
.foot {
  animation: rise 0.9s cubic-bezier(0.2, 0, 0, 1) calc(var(--intro-hold) + var(--intro-move) + 0.1s) both;
}

/* Reduced motion, and the 404: the finished page, straight away. */
@media (prefers-reduced-motion: reduce) {
  .logo svg, .logo__word, .lede, .cta-split, .foot { animation: none; }
}
.screen--settled :is(.logo svg, .logo__word, .lede, .cta-split, .foot) { animation: none; }

/* ---------- Narrow ---------- */

@media (max-width: 600px) {
  .cta-split { height: 48px; font-size: 13px; }
  .cta-split__arrow { width: 48px; }
  .cta-split__label { padding: 0 20px; }
}
