:root {
  --bg: #0b0d18;
  --ink: #f2efe9;
  --muted: #9a9bb4;
  --line: #262a44;
  --lavender: #b9b1da;
  --lavender-deep: #8a80c4;
  --gold: #e8d8b0;
  --radius: 999px;
  --maxw: 860px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Night sky backdrop */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 50% 32%, rgba(138, 128, 196, 0.18), transparent 62%),
    linear-gradient(180deg, #11142b 0%, #0b0d18 50%, #08090f 100%);
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 82% 14%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 68% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 28% 44%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 92% 50%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 6% 60%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 46% 16%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 75% 66%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 36% 8%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 60% 54%, rgba(255, 255, 255, 0.4), transparent);
  opacity: 0.8;
}

/* Soft glow rising from the bottom, like a horizon */
.horizon {
  position: absolute;
  left: 50%;
  bottom: -40vmax;
  transform: translateX(-50%);
  width: 130vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(138, 128, 196, 0.16), transparent 60%);
}

/* Top bar */
.topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mark {
  width: 116px;
  height: auto;
  fill: var(--ink);
}

.topbar-tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lavender);
}

/* Page — full-height flex column. The hero grows to fill leftover space
   (vertically centered); the values + footer stay pinned to the bottom.
   When everything together exceeds the viewport, the page scrolls. */
.page {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem clamp(2.5rem, 5vh, 4rem);
  display: flex;
  flex-direction: column;
}

/* Hero — moon as centerpiece, content beneath. Grows and centers. */
.hero {
  text-align: center;
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vh, 4rem) 0;
}

/* Bottom block sits below the hero, against the foot of the screen. */
.values {
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
}

.moon {
  width: clamp(120px, 26vw, 200px);
  height: clamp(120px, 26vw, 200px);
  border-radius: 50%;
  margin: 0 auto clamp(2rem, 5vh, 3rem);
  background: radial-gradient(circle at 38% 36%, #fbf7ee 0%, #e8e2d2 55%, #cfc8b6 100%);
  box-shadow:
    0 0 70px 22px rgba(233, 216, 176, 0.16),
    0 0 160px 50px rgba(185, 177, 218, 0.16),
    inset -18px -14px 36px rgba(140, 130, 110, 0.35);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lavender);
  font-weight: 500;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.3rem, 6.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 auto 1.5rem;
  max-width: 16ch;
  color: #f7f4ee;
}

h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--lavender);
}

.lede {
  margin: 0 auto 2.5rem;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.075rem;
}

/* Signup — inline, on the sky (no card) */
.signup {
  margin: 0 auto;
  max-width: 460px;
}

.field {
  display: flex;
  gap: 0.6rem;
}

input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.9rem 1.1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input[type="email"]::placeholder {
  color: #6b6d86;
}

input[type="email"]:focus {
  outline: none;
  border-color: var(--lavender-deep);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(138, 128, 196, 0.25);
}

button[type="submit"] {
  flex: 0 0 auto;
  padding: 0.9rem 1.5rem;
  font: inherit;
  font-weight: 500;
  color: #14122a;
  background: var(--lavender);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.06s ease;
}

button[type="submit"]:hover {
  background: #cbc4e6;
}

button[type="submit"]:active {
  transform: translateY(1px);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: default;
}

.status {
  min-height: 1.4em;
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.status.is-error {
  color: #e0917f;
}

.status.is-success {
  color: var(--lavender);
}

.reassurance {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Values */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  padding-top: clamp(1rem, 3vh, 2rem);
  border-top: 1px solid var(--line);
}

.value h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: #f0ece4;
}

.value p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

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

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .field {
    flex-direction: column;
  }

  .values {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    max-width: 24rem;
    margin: 0 auto;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .page > *,
  .topbar {
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .values { animation-delay: 0.12s; }
  .footer { animation-delay: 0.2s; }

  .moon {
    animation: glow 7s ease-in-out infinite;
  }
}

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

@keyframes glow {
  0%, 100% { opacity: 0.94; box-shadow: 0 0 70px 22px rgba(233, 216, 176, 0.14), 0 0 160px 50px rgba(185, 177, 218, 0.14), inset -18px -14px 36px rgba(140, 130, 110, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 80px 26px rgba(233, 216, 176, 0.2), 0 0 190px 60px rgba(185, 177, 218, 0.2), inset -18px -14px 36px rgba(140, 130, 110, 0.35); }
}
