/* Moon Dog Atlas — coming soon
   Minimal editorial: warm paper, navy ink, a single gold accent. */

:root {
  --paper:      #faeee5;
  --paper-deep: #f3e2d6;
  --ink:        #16263f;
  --ink-soft:   #46546b;
  --ink-faint:  #8b94a3;
  --gold:       #d98a32;
  --gold-deep:  #b9701f;
  --line:       rgba(22, 38, 63, 0.14);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  /* Solid cream behind the logo (matches the artwork's background so the
     embedded square is seamless); deepens gently only toward the far edges. */
  background-image:
    radial-gradient(140% 120% at 50% 34%, var(--paper) 0%, var(--paper) 58%, var(--paper-deep) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ----------
   Single viewport, no scrolling: the logo is the flexible element and
   absorbs all remaining height; headline, form, and footer sit at the
   bottom of the page. */
.page {
  position: relative;
  z-index: 1;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 2vh, 1.5rem);
  padding: clamp(1rem, 3vh, 2rem) 1.5rem clamp(1rem, 2.5vh, 1.75rem);
  text-align: center;
}

.card {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Brand ---------- */
.brand {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.brand__logo {
  height: 100%;
  width: auto;
  max-width: min(86vw, 100%);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Type ---------- */
.headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(0.85rem, 3.2vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

/* ---------- Form ---------- */
.notify {
  width: 100%;
  max-width: 27rem;
  margin-top: clamp(0.75rem, 2vh, 1.25rem);
}

.notify__row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.notify__input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.notify__input::placeholder { color: var(--ink-faint); }

.notify__input:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 138, 50, 0.18);
}

.notify__button {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.12s var(--ease);
}

.notify__button:hover { background: #0f1d31; }
.notify__button:active { transform: translateY(1px); }

.notify__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 138, 50, 0.35);
}

.notify__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.notify__msg {
  margin: 0.9rem 0 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.notify__msg[data-state="ok"]    { color: var(--gold-deep); }
.notify__msg[data-state="error"] { color: #b23b3b; }

.notify.is-done .notify__row { display: none; }

/* ---------- Footer ---------- */
.footer {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ---------- Stars (decorative) ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.18;
  animation: twinkle 4.5s ease-in-out infinite;
}

.star:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.star:nth-child(2) { top: 22%; left: 82%; width: 3px; height: 3px; animation-delay: 1.4s; }
.star:nth-child(3) { top: 72%; left: 24%; animation-delay: 2.1s; }
.star:nth-child(4) { top: 78%; left: 70%; animation-delay: 0.7s; }
.star:nth-child(5) { top: 58%; left: 91%; animation-delay: 2.8s; }
.star:nth-child(6) { top: 50%; left: 6%;  animation-delay: 1.9s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.08; transform: scale(0.85); }
  50%      { opacity: 0.32; transform: scale(1.15); }
}

/* ---------- Entrance ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: 80ms;
}

.headline.reveal { animation-delay: 190ms; }
.notify.reveal   { animation-delay: 300ms; }
.footer.reveal   { animation-delay: 410ms; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

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

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .star { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 30rem) {
  .notify__row { flex-direction: column; }
  .notify__button { padding: 0.85rem; }
}
