:root {
  color-scheme: dark;
  --bg:      #08070d;
  --ink:     #ffffff;
  --ink-2:   #a9a3c0;
  --line:    rgba(255,255,255,.14);
  --field:   rgba(255,255,255,.05);
  --accent:  #5227FF;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  /* Stops iOS bumping font sizes when the device is rotated. */
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 5vw, 4rem);
  /* Keeps content clear of notches when viewport-fit=cover is set. */
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Nothing should ever scroll sideways. */
  overflow-x: hidden;
}

/* WebGL backdrop. pointer-events:none is load-bearing — the canvas covers the
   whole viewport and would otherwise swallow every click on the form. */
.molten {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  width: min(30rem, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 .9rem;
  font-size: clamp(.6875rem, 2.6vw, .8125rem);
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--ink-2);
}

h1 {
  margin: 0 0 2rem;
  /* Never break the domain across lines — it is the product. The vw term
     shrinks it to fit; the rem floor still reads on a 320px phone. */
  white-space: nowrap;
  font-size: clamp(1.625rem, 10.5vw, 4rem);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 600;
}
h1 .tld { color: var(--ink-2); font-weight: 400; }

form {
  display: grid;
  gap: .55rem;
}

.row {
  display: flex;
  gap: .5rem;
  /* min-width:0 on the child does the real work, but this guards the flex
     container against its own content forcing an overflow. */
  min-width: 0;
}

input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.875rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: .9375rem;
  backdrop-filter: blur(6px);
}
input[type="email"]::placeholder {
  color: var(--ink-2);
  /* Long placeholder must not widen the field on narrow screens. */
  text-overflow: ellipsis;
}
input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

button {
  flex: 0 0 auto;
  height: 2.875rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #0b0a12;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, opacity .15s ease;
}
button:hover { opacity: .88; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.status {
  margin: 0;
  min-height: 1.25rem;
  font-size: .8125rem;
  color: var(--ink-2);
}
.status.ok { color: var(--ink); }
.status.err { color: #ff9f8a; }

/* Honeypot + visually-hidden labels. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Below ~24rem the input and button no longer fit side by side without the
   input becoming unusably narrow, so stack them full width. */
@media (max-width: 24rem) {
  .row { flex-wrap: wrap; }
  input[type="email"], button { flex: 1 1 100%; width: 100%; }
}

/* Short landscape viewports: reclaim vertical space so nothing is cut off. */
@media (max-height: 26rem) {
  h1 { margin-bottom: 1.25rem; font-size: clamp(1.5rem, 7vh, 2.5rem); }
  .eyebrow { margin-bottom: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
