/* Arche Labs' front page, for signed-out visitors: one still screen, a field of dots that gathers into the arch.
   Laid out after monarch.inc (Gregg, 29 Sep 2026), dressed in the moco.ai look the rest of ARCHE wears
   (docs/research/moco-ai-look-and-feel.md; the tokens are arche.css's). A white page with the sky as the field,
   framed and rounded as the sign-in page's sky panel is; near-black dots and ink; Instrument Sans for the words
   and Atkinson Hyperlegible Mono for the capitals. The typefaces are the same files arche.css uses, stored beside
   it in fonts/, so the sign-in page and this one share one download. Nothing loads from outside ARCHE. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(fonts/instrument-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(fonts/instrument-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/atkinson-hyperlegible-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Mono"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/atkinson-hyperlegible-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --page: #FFFFFF;        /* arche.css --bg: the white frame */
  --ink: #202425;         /* arche.css --ink: words, dots, logo. 11.6:1 on the darkest sky, 13.2:1 by the words */
  --ink-2: #45484A;       /* arche.css --ink-2: the description. 6.8:1 on the darkest sky, 7.7:1 where it sits */
  --ring: #3D5A66;        /* arche.css --ring (--sky-ink): the focus ring, 5.4:1 on the darkest sky */
  /* the sky that stands in for moco's photographs: arche.css --sky-wash, the sign-in page's panel */
  --sky-wash: linear-gradient(172deg, #BFE3F3 0%, #D9EFF8 42%, #EEF6F8 78%, #F3F5F3 100%);
  --particle: #202425;    /* the dots of the sphere and the arch (read by landing.js) */
  --glow: #FFFFFF;        /* near the cursor the dots catch the light (read by landing.js) */
  --ambient: #202425;     /* the dust behind (read by landing.js) */
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --frame: 12px;          /* the white margin round the sky, as round the sign-in page's panel */
  --radius: 1rem;         /* arche.css --radius */
  --pad-x: 30px;          /* inside the sky; with the frame, the logo sits where the sign-in page's does */
  --pad-y: 36px;
  --inset-l: calc(var(--frame) + var(--pad-x) + env(safe-area-inset-left, 0px));
  --inset-r: calc(var(--frame) + var(--pad-x) + env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body.landing {
  margin: 0; min-height: 100%; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--frame) 0;
  background: var(--page); color: var(--ink);
  font: 15px/1.35 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Only once the dots are alive can they be turned and clicked. */
body.landing.alive { cursor: grab; }
body.landing.alive.dragging { cursor: grabbing; }

/* The sky, with the field of dots on it, sits behind everything and never takes a click from the words or links.
   It is the canvas's own background, so it is there with JavaScript off too. */
.landing-field {
  position: fixed; z-index: 0; display: block; touch-action: pinch-zoom;
  left: var(--frame); top: var(--frame); width: calc(100% - 2 * var(--frame)); height: calc(100% - 2 * var(--frame));
  border-radius: var(--radius); background: var(--sky-wash);
}
/* With JavaScript off, the still arch fills the space between the nav and the words, so it never sits behind them. */
.landing > noscript { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; z-index: 0; }
.landing-still { display: block; height: 100%; max-height: min(46vh, 60vw); width: auto; aspect-ratio: 1; opacity: .8; }

.landing-nav, .landing-copy, .landing-links { position: relative; z-index: 1; pointer-events: none; }
.landing a { pointer-events: auto; color: var(--ink); text-decoration: none; }
.landing a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.landing a:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

/* Read by screen readers, not seen: the label's real words while it decodes (scramble.js). */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scramble-noise { opacity: .5; }  /* the capitals still decoding: paler than the settled ones */

/* Mono capitals, as moco's eyebrows: the label, and the links. */
.landing-cta, .landing-links a, .landing-label {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase;
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--inset-r) 0 var(--inset-l);
}
/* The logo as the top bar of every other page shows it: the arch on an ink square, the name in the mono. */
.landing-lockup { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px;
  font-family: var(--font-mono); font-weight: 600; font-size: .98rem; letter-spacing: -0.02em; white-space: nowrap; }
.landing a.landing-lockup:hover { text-decoration: none; }
.landing-lockup svg { width: 26px; height: 26px; flex: 0 0 auto; }
.landing-cta { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; }

.landing-copy {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 0 var(--inset-r) var(--pad-y) var(--inset-l);
  margin-top: auto;
  max-width: 820px;
}
/* The label is led by a small square, as moco's eyebrows are: ink, as on the sign-in page's sky (sky would vanish). */
.landing-label { display: inline-flex; align-items: center; gap: .55rem; margin: 0; }
.landing-label::before { content: ""; width: .6rem; height: .6rem; background: var(--ink); flex: 0 0 auto; }
.landing-heading {
  font-family: var(--font); font-weight: 500;
  font-size: 76px; line-height: .98; letter-spacing: -0.045em;
  margin: 0;
}
.landing-description { font-size: 15px; line-height: 1.35; color: var(--ink-2); max-width: 420px; margin: 0; text-wrap: pretty; }

.landing-links {
  position: fixed; right: var(--inset-r); bottom: calc(var(--frame) + var(--pad-y));
  display: flex; gap: 20px;
}
/* Small words, but a finger-sized place to tap: the padding widens the target without moving the text. */
.landing-links a { padding: 15px 4px; margin: -15px -4px; }

@media (max-width: 768px) {
  :root { --pad-x: 22px; --pad-y: 22px; }
  .landing-nav { padding-top: 12px; }
  .landing-copy { gap: 14px; padding-bottom: 16px; }
  .landing-heading { font-size: 48px; }
  .landing-description { font-size: 14px; max-width: 330px; }
  /* The links step under the words rather than sit on top of them. */
  .landing-links { position: relative; right: auto; bottom: auto; gap: 16px; padding: 0 var(--inset-r) var(--pad-y) var(--inset-l); }
}

@media (max-width: 480px) {
  :root { --frame: 8px; --pad-x: 18px; }
  .landing-heading { font-size: 38px; }
  .landing-cta { display: none; }
}

/* A short, wide window: with JavaScript off, the still arch stands beside the words (as the live one moves beside
   them), rather than squeezed into the strip above them. */
@media (max-height: 700px) and (min-aspect-ratio: 3/2) {
  .landing > noscript { position: fixed; top: 0; bottom: 0; left: 55%; right: 0; padding: 56px 24px 24px; }
}

/* A short window (a phone on its side): smaller words, so nothing needs scrolling. */
@media (max-height: 520px) {
  :root { --frame: 8px; }
  .landing-nav { padding-top: 4px; }
  .landing-heading { font-size: 40px; }
  .landing-copy { gap: 10px; }
}

/* A very short one (a small phone on its side with the browser's bars showing): tighter still. Only far below
   any phone (or zoomed a long way in) does the page scroll, rather than hide words. */
@media (max-height: 300px) {
  :root { --pad-y: 12px; }
  .landing-nav { padding-top: 0; }
  .landing-heading { font-size: 34px; }
  .landing-copy { gap: 8px; padding-bottom: 8px; }
}
