@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark only: red on a near-black backdrop, whatever the device prefers. */
  color-scheme: dark;
  --bg: #0e0d0c;
  --surface: #171514;
  --ink: #f2eee8;
  --muted: #9d968c;
  --line: #2b2825;
  --red: #ff5a47;
  --red-soft: rgb(255 90 71 / 0.14);
  --glow: rgb(255 90 71 / 0.1);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.7);

  /* A wide face for the count, the line, and the wordmark: it fills the page. */
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A slow glow behind the count: the only ornament. */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  background: radial-gradient(closest-side at 50% 42%, var(--glow), transparent 60%);
  animation: breathe 9s ease-in-out infinite;
}

p,
h1 {
  margin: 0;
}

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

/* ---- Frame ------------------------------------------------------------------- */

.top,
.foot {
  display: flex;
  justify-content: center;
  padding: 24px var(--gutter);
}

.wordmark {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}

.wordmark-dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 2.8s ease-out infinite;
}

.foot {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
  text-align: center;
}

/* ---- The count --------------------------------------------------------------- */

.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count {
  font-family: var(--display);
  font-size: clamp(7rem, 30vw, 13rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.count.ticking {
  opacity: 0;
  transform: translateY(-14px);
}

/* The countdown before opening is wider: smaller digits. */
[data-phase="soon"] .count {
  font-size: clamp(2.2rem, 9.5vw, 5.5rem);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0;
}

.count-kicker,
.count-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.count-label {
  margin-top: 14px;
}

.count-kicker {
  margin-bottom: 10px;
}

.line {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.6rem, 5.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ---- The form ---------------------------------------------------------------- */

.join {
  width: 100%;
  max-width: 520px;
}

.field {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}

.field:focus-within {
  border-color: var(--ink);
}

.join.invalid .field {
  border-color: var(--red);
}

.field input {
  flex: 1;
  min-width: 0;
  padding: 0 14px 0 18px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}

.field input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

button,
.primary {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.field button,
.primary {
  flex: none;
  display: inline-block;
  padding: 14px 24px;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  transition: background-color 0.2s, transform 0.2s;
}

.field button:hover,
.primary:hover {
  background: var(--red);
  color: #fff;
}

.field button:active,
.primary:active {
  transform: scale(0.97);
}

button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.field button:focus-visible,
.primary:focus-visible,
.ghost:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fine,
.notice-text {
  color: var(--muted);
}

.fine {
  margin-top: 14px;
  font-size: 13px;
}

.status {
  min-height: 1.5em;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--red);
}

.notice,
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  outline: none;
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.notice-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.notice-text {
  max-width: 26em;
}

.ghost {
  padding: 10px 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s;
}

.ghost:hover {
  border-color: var(--ink);
}

/* ---- Phases (index) and steps (confirm) --------------------------------------- */

[hidden],
[data-phase="soon"] .join,
[data-phase="full"] .join,
[data-phase="launched"] .join,
[data-phase="launched"] .counter,
[data-step] .step {
  display: none;
}

[data-step="ready"] [data-show="ready"],
[data-step="done"] [data-show="done"],
[data-step="problem"] [data-show="problem"] {
  display: flex;
}

/* ---- Motion ------------------------------------------------------------------ */

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--red-soft); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes breathe {
  50% { opacity: 0.55; transform: scale(1.06); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

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

@media (max-width: 440px) {
  .field {
    flex-direction: column;
    border-radius: 22px;
  }
  .field input {
    padding: 12px 14px;
  }
  .field button {
    border-radius: 16px;
  }
}
