/* Prove10 — stealth page.
   One screen, dark by commitment rather than by preference. Light comes
   from a single source behind the wordmark, the way a horizon does
   before dawn. Nothing explains itself. */

:root {
  color-scheme: dark;

  --ground:  #06080e;
  --rise:    #0d1424;
  --ink:     #e9edf6;
  --muted:   #7c879c;
  --faint:   #39425a;
  --accent:  #8fa6ff;

  --display: Sora, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter:  clamp(1.5rem, 6vw, 5rem);
}

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

/* Reserve the scrollbar on every page, scrolling or not. Without this the
   home page (one screen, no scrollbar) and the privacy page (scrolls, so
   Windows gives it a classic 15px bar) centre into different widths, and
   the lockup jumps ~8px sideways as you move between them. */
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- the light source ---------- */

.field {
  position: fixed;
  inset: 0;
  /* The reserved scrollbar gutter sits outside the containing block, so
     inset:0 alone leaves a flat strip beside the gradient. vw counts the
     gutter, and an over-constrained box drops the right offset. */
  width: 100vw;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(74rem 42rem at 18% -14%, #1b2a55 0%, transparent 62%),
    radial-gradient(52rem 34rem at 92% 108%, #141d38 0%, transparent 60%),
    linear-gradient(180deg, var(--rise) 0%, var(--ground) 52%);
}

/* a little tooth, so the gradients do not read as plastic */
.field::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- frame ---------- */

.page {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(2.5rem, 7vh, 5rem);
  max-width: 78rem;
  margin-inline: auto;
  padding-top: clamp(1.5rem, 5vh, 2.75rem);
  padding-bottom: clamp(1.5rem, 5vh, 2.75rem);
  padding-left:  max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wordmark b { font-weight: 600; color: var(--accent); }

/* The mark is sized in em, so it tracks the wordmark rather than needing
   a second decision every time the type changes. Strokes are geometry,
   not type: no font to load and nothing to go wrong at 16px. */
/* Spacing lives on the mark, not as a flex gap: a gap would also push
   apart "Prove" and the "10", which are two flex items of their own. */
.mark {
  flex: none;
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.45em;
}
.mark circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.2;
}
/* Filled rather than stroked: at 16px a stroked bolt closes up into a
   blot, while a solid one keeps its notches. */
.mark .bolt {
  fill: currentColor;
  stroke: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgb(143 166 255 / 0.14);
}

/* The chip names what the page is, so it belongs with the sentence that
   says the rest. Opposite the wordmark it read as a second brand mark,
   and it was the only thing making the three headers differ. */
.stage > .chip {
  justify-self: start;
  margin: 0 0 -0.6rem;
}

/* ---------- the one screen ---------- */

.stage {
  align-self: center;
  display: grid;
  gap: clamp(1.4rem, 3vh, 2rem);
  /* 34ch is a measure for body copy, and the headline is four times that
     size, so inside it the sentence broke after every second word. The cap
     applies at every width on purpose: behind a breakpoint it left every
     narrower window with the old measure and the same broken headline.
     The prose keeps its own measure -- .capture 30rem, .consent 44ch,
     .note 42ch -- so only the headline reads this one. */
  max-width: 36rem;
}

h1 {
  margin: 0;
  /* Height counts as much as width on a page that is one screen: a short
     laptop viewport has to shrink the type rather than start to scroll.
     svh, not vh, so the type measures the same viewport the layout does.
     The vh line first because an engine that does not know svh throws out
     the whole clamp and leaves the headline at its default size. */
  font-size: clamp(2.25rem, min(1rem + 5.4vw, 9vh), 4.5rem);
  font-size: clamp(2.25rem, min(1rem + 5.4vw, 9svh), 4.5rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 em {
  display: block;
  font-style: normal;
  color: var(--muted);
}

/* ---------- capture ---------- */

.capture {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 30rem;
}

.capture input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--ink);
  background: rgb(233 237 246 / 0.04);
  border: 1px solid var(--faint);
  border-radius: 2px;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.capture input::placeholder { color: #5b6479; }
.capture input:hover { border-color: #4a5674; }
.capture input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgb(233 237 246 / 0.06);
}

.capture button {
  flex: 0 0 auto;
  padding: 0.85rem 1.35rem;
  font: inherit;
  font-weight: 400;
  color: #060810;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.capture button:hover { background: #fff; border-color: #fff; }
.capture[aria-busy="true"] button { opacity: 0.6; pointer-events: none; }

.done { margin: 0; color: var(--ink); }
.done a { color: var(--accent); text-underline-offset: 3px; }

.note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
}
.note.warn { color: var(--accent); }
/* silent until the script has something to report */
.note:empty { display: none; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* ---------- footer ---------- */

.bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.contact {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.contact:hover { color: var(--ink); border-color: var(--accent); }

/* A 22px line of type is a small thing to hit with a thumb. The target
   grows to 44px without the text moving: padding would push the
   border-bottom underline away from the words, so the hit area is an
   invisible overlay instead. The -6px sides still leave a 12px dead
   gap between the two links, so neither steals the other's taps. */
.bottom a { position: relative; }
.bottom a::after {
  content: "";
  position: absolute;
  inset: -11px -6px;
}

.rights { color: var(--faint); }

/* The footer carries two links now, kept together on the left so the
   copyright stays on the right at every width. */
.foot-links {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

/* ---------- one orchestrated arrival ---------- */

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

.reveal > * {
  opacity: 0;
  animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal > * { opacity: 1; animation: none; }
}

@media (max-width: 30rem) {
  .bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* The scope of consent, stated before it is given rather than after.
   Small, but never hidden: it is the thing being agreed to. */
.consent {
  margin: 0;
  max-width: 44ch;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}
.consent a {
  color: var(--muted);
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.consent a:hover { color: var(--ink); text-decoration-color: var(--accent); }
