/* uncertainity.dev -- coming soon.
   System fonts only: no third-party font host, nothing to block, nothing to leak. */

:root {
  --bg: #08070d;
  --bg-raise: #100e19;
  --ink: #ece9f5;
  --ink-dim: #9d97b5;
  /* 5.68:1 on --bg, 5.41:1 on --bg-raise. The previous #6a6482 measured
     3.59:1 and failed WCAG 1.4.3 AA everywhere it was used, which was most
     of the small type on the page. */
  --ink-faint: #8b84a6;
  --amber: #ff9f45;
  --violet: #a78bfa;
  --green: #5ee6a8;
  --line: rgba(167, 139, 250, 0.18);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--amber); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Off-screen by clipping, NOT by `left: -9999px`.
   In an RTL document the scroll origin is on the right, so an absolutely positioned
   element parked 9999px to the left becomes real scrollable overflow: it stretched
   the Arabic page to 11,279px wide and pushed every visible element into a sliver at
   the far edge. Clipping takes the element out of the layout in both directions. */
.skip-link {
  position: absolute;
  top: 0;
  inset-inline-start: 8px;
  background: var(--bg-raise);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 100;
  clip-path: inset(50%);
}
.skip-link:focus {
  top: 8px;
  clip-path: none;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- stage: the live PineWidget scene ---------- */

#stage {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  text-align: inherit;
  color: inherit;
  height: clamp(280px, 46vh, 460px);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #14101f 0%, var(--bg) 72%);
  border-bottom: 1px solid var(--line);
  cursor: crosshair;
}
#stage pine-widget {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
#stage canvas { display: block; width: 100%; height: 100%; }

/* The static line shown until the custom element upgrades -- and permanently if
   JavaScript never runs. `:defined` is the only signal that the widget is live. */
#stage pine-widget:defined ~ .stage-fallback { display: none; }
.stage-fallback .dim { opacity: 0.75; }

.stage-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(8, 7, 13, 0.72);
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
  transition: opacity 0.4s ease, color 0.4s ease;
}
.stage-hint[data-state="collapsed"] { color: var(--green); }

/* ---------- masthead ---------- */

main { flex: 1 0 auto; padding: 44px 0 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  font-weight: 700;
}
h1 .dev { color: var(--ink-faint); font-weight: 400; }

.tagline {
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-dim);
  margin: 0 0 26px;
  max-width: 44ch;
}

/* The owned typo, acknowledged rather than hidden. */
.errata {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-faint);
  border-left: 2px solid var(--line);
  padding: 2px 0 2px 16px;
  margin: 0 0 34px;
  max-width: 56ch;
}
.errata b { color: var(--ink-dim); font-weight: 600; }

/* ---------- countdown ---------- */

.countdown-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.countdown-label .target { color: var(--amber); }

.countdown {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.countdown li {
  flex: 1 1 76px;
  min-width: 76px;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 8px 11px;
  text-align: center;
}
.countdown .num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.countdown .unit {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- newsletter ---------- */

.signup {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  margin: 0 0 34px;
}
.signup h2 {
  font-size: 1.16rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.signup .sub {
  color: var(--ink-dim);
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 0 0 18px;
  max-width: 50ch;
}

.field-row { display: flex; gap: 10px; flex-wrap: wrap; }

input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  background: #07060b;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 13px 15px;
}
input[type="email"]::placeholder { color: var(--ink-faint); }

button[type="submit"] {
  flex: 0 0 auto;
  background: var(--amber);
  color: #1a1005;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 650;
  padding: 13px 24px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
button[type="submit"]:hover:not(:disabled) { background: #ffb469; }
button[type="submit"]:disabled { opacity: 0.55; cursor: progress; }

/* Honeypot: invisible, out of the tab order, and hidden from assistive technology,
   so no human ever meets it. Clipped rather than pushed off-screen, for the same
   RTL-overflow reason as .skip-link above. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#turnstile { margin-top: 14px; min-height: 0; }

.form-note {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-faint);
  margin: 14px 0 0;
}

.form-status {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  min-height: 1.2em;
}
.form-status[data-tone="ok"] { color: var(--green); }
.form-status[data-tone="error"] { color: #ff8080; }

/* ---------- what it is ---------- */

.about { margin: 0 0 38px; }
.about h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
  font-weight: 500;
}
.about p {
  color: var(--ink-dim);
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 62ch;
}
.about strong { color: var(--ink); font-weight: 600; }

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

footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 22px 0 34px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}
footer .row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
footer a { color: var(--ink-dim); }

.footer-end {
  display: flex;
  align-items: center;
  gap: 16px;
}

#lang-select {
  background: var(--bg-raise);
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  /* WCAG 2.2 SC 2.5.8 Target Size (Minimum) asks for 24x24 CSS pixels. */
  min-height: 32px;
  padding: 4px 8px;
  cursor: pointer;
}
#lang-select:hover { color: var(--ink); }

/* Right-to-left locales. Only the directional properties need saying; everything
   else is already logical or symmetric. */
[dir="rtl"] .errata {
  border-left: 0;
  border-right: 2px solid var(--line);
  padding: 2px 16px 2px 0;
}
/* `inset-inline-start` already flips the skip link, so RTL needs nothing here. */

@media (max-width: 560px) {
  main { padding-top: 32px; }
  .signup { padding: 20px; }
  .countdown li { flex-basis: calc(50% - 5px); }
}

/* Motion is decorative here; the page must read the same without it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  #stage { cursor: default; }
}
