/* Radioactive Fork — teaser
   Direction D: near-black void, one acid accent, a faint grid, a lot of nothing. */

:root {
  --ink:        #070806;
  --ink-raised: #0F110D;
  --hairline:   #1A1E15;
  --border:     #23271D;
  --grid-line:  #14170F;

  --text:       #E6E7E2;
  --text-muted: #9AA090;
  --text-faint: #8A9080;
  --text-dim:   #767B6C;
  --text-ghost: #7C8172;

  --accent:     #C4F553;
  --accent-hot: #D6FF7A;

  --ring-outer: #2A2F22;
  --ring-inner: #3A4130;

  --sans: 'Space Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(1.375rem, 4vw, 3rem);
  --grid-size: 90px;
}

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

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- atmosphere --------------------------------------------------------- */

.grid,
.glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

.grid {
  inset: 0;
  opacity: 0.65;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.glow {
  top: 4%;
  left: 50%;
  translate: -50% 0;
  width: min(900px, 190vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(196, 245, 83, 0.17) 0%,
    rgba(196, 245, 83, 0.045) 42%,
    rgba(7, 8, 6, 0) 68%);
}

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

.masthead,
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--gutter);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.masthead__meta { color: var(--text-faint); }

.mark { display: block; }
.mark--small { width: 22px; height: 22px; }
.mark--hero  { width: clamp(72px, 12vw, 96px); height: clamp(72px, 12vw, 96px); }

/* --- the void ----------------------------------------------------------- */

.void {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.625rem, 3vw, 2.25rem);
  padding: clamp(2.5rem, 6vw, 3.75rem) var(--gutter) clamp(3.5rem, 8vw, 5rem);
  text-align: center;
}

.headline {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.75rem, 6.6vw, 5.75rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.sub {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* --- signup ------------------------------------------------------------- */

.signup {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  width: min(100%, 32rem);
  margin-top: 0.375rem;
  padding: 0.4375rem 0.4375rem 0.4375rem 1.5rem;
  background: var(--ink-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 160ms ease;
}

.signup:focus-within { border-color: var(--accent); }

.signup__input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.signup__input::placeholder { color: var(--text-ghost); }
.signup__input:focus { outline: none; }

.signup__button {
  flex-shrink: 0;
  min-height: 2.75rem;
  padding: 0 1.625rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.signup__button:hover { background: var(--accent-hot); }
.signup__button:active { transform: scale(0.985); }

/* The pill itself carries the focus indication on wide screens, so the
   input needs no rectangular ring of its own inside it. */
.signup__button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.signup[data-state="sending"] .signup__button { opacity: 0.6; cursor: progress; }
.signup[data-state="done"] { display: none; }
.signup[data-state="error"] { border-color: #7E3B3B; }

/* --- fineprint + footer -------------------------------------------------- */

.fineprint {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.fineprint[data-tone="good"]  { color: var(--accent); }
.fineprint[data-tone="bad"]   { color: #E8837F; }

.footer {
  border-top: 1px solid var(--hairline);
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer__status { color: var(--accent); }

/* --- utilities ----------------------------------------------------------- */

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

.reveal {
  opacity: 0;
  translate: 0 14px;
  animation: reveal 700ms cubic-bezier(0.22, 0.68, 0.28, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal {
  to { opacity: 1; translate: 0 0; }
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 640px) {
  :root { --grid-size: 65px; }

  .masthead,
  .footer { font-size: 0.75rem; letter-spacing: 0.13em; }

  .signup {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
  }

  .signup__input {
    flex: none;
    height: 3.25rem;
    padding: 0 1.375rem;
    background: var(--ink-raised);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 1rem; /* keeps iOS from zooming on focus */
  }

  .signup__button { flex: none; min-height: 3.25rem; font-size: 0.9375rem; }

  /* Stacked, the input is its own pill again and takes its own ring. */
  .signup__input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .void {
    gap: 1.25rem;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .footer {
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; translate: none; }
  .signup__button { transition: none; }
}
