/* Juno's Adventure Stories — coming-soon styles */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fredoka-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fredoka-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --deep: #2e125c;
  --violet: #622da5;
  --magenta: #aa46af;
  --pink: #e86ea0;
  --ink: #4a1a82;
  --yellow: #ffc42e;
  --white: #ffffff;
  --panel: rgba(38, 13, 80, 0.62);
  --font: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--white);
  background-color: var(--deep);
  background-image: linear-gradient(135deg, var(--deep) 0%, var(--violet) 38%, var(--magenta) 72%, var(--pink) 100%);
  background-attachment: fixed;
}

/* ---------- Space backdrop ---------- */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  isolation: isolate;
}

/* tiny dots of starlight, tiled */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 90px 140px, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 160px 60px, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 230px 200px, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(2px 2px at 60px 230px, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 200px 110px, rgba(255, 255, 255, 0.8), transparent 60%);
  background-size: 260px 260px;
}

.decor {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  height: auto;
}

.sparkle {
  position: absolute;
  z-index: -1;
  width: 18px;
  height: 18px;
  fill: var(--white);
  opacity: 0.9;
  pointer-events: none;
}

/* mobile positions: tucked into the corners, away from text */
.d-planet-red { width: 92px; top: -26px; left: -30px; }
.d-planet-ringed { width: 118px; top: 10px; right: -34px; }
.d-planet-teal { display: none; }
.d-planet-blue { width: 34px; top: 236px; left: 4px; }
.d-meteor { display: none; }
.d-rocket { display: none; }

.s1 { top: 88px; left: 22%; }
.s2 { top: 150px; right: 14%; width: 14px; height: 14px; }
.s3 { top: 40px; left: 52%; width: 12px; height: 12px; }
.s4 { display: none; }
.s5 { display: none; }

@media (min-width: 900px) {
  .d-planet-red { width: 190px; top: -40px; left: -50px; }
  .d-planet-ringed { width: 240px; top: 30px; right: -40px; }
  .d-planet-teal { display: block; width: 110px; bottom: 12%; left: 2%; }
  .d-planet-blue { width: 56px; top: 44%; left: 3%; }
  .d-meteor { display: block; width: 90px; top: 210px; right: 9%; }
  .d-rocket { display: block; width: 180px; bottom: 60px; right: -10px; }
  .s1 { top: 14%; left: 18%; width: 22px; height: 22px; }
  .s2 { top: 10%; right: 26%; }
  .s3 { top: auto; bottom: 18%; left: 44%; }
  .s4 { display: block; top: 46%; right: 4%; }
  .s5 { display: block; bottom: 8%; left: 14%; width: 14px; height: 14px; }
}

/* ---------- Layout ---------- */

.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 16px 24px;
}

.hero-inner {
  width: 100%;
  max-width: 1060px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  justify-items: center;
  text-align: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 40px 32px;
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: center;
    text-align: left;
  }
  .hero-inner.single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
    text-align: center;
  }
}

.juno {
  position: relative;
  margin: 0;
  width: min(72vw, 290px);
}

/* soft yellow glow behind Juno */
.juno::before {
  content: "";
  position: absolute;
  inset: 4% 2% 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 196, 46, 0.5), rgba(255, 196, 46, 0.18) 55%, transparent);
  filter: blur(6px);
}

.juno img {
  display: block;
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

@media (min-width: 900px) {
  .juno {
    width: min(100%, 460px);
    justify-self: end;
  }
  .single .juno {
    width: 260px;
    justify-self: center;
  }
}

.single .juno {
  width: min(56vw, 220px);
}

/* ---------- Text panel ---------- */

.panel {
  width: 100%;
  max-width: 520px;
  padding: 22px 20px 20px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 10px 40px rgba(20, 5, 45, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

@media (min-width: 900px) {
  .panel {
    padding: 32px 34px 26px;
  }
  .single .panel {
    justify-self: center;
    max-width: 640px;
  }
}

h1,
h2 {
  font-weight: 700;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 4.25rem);
  color: var(--yellow);
  letter-spacing: 0.005em;
  text-shadow:
    3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink),
    2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink),
    0 6px 0 var(--ink);
}

.single h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
}

h2 {
  font-size: 1.35rem;
  color: var(--yellow);
  margin-top: 1.4em;
}

.sub {
  font-size: clamp(1.3rem, 4.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 14px 0 10px;
}

.lead {
  margin: 0 0 18px;
}

.lead strong {
  font-weight: 700;
  color: var(--yellow);
}

.prose {
  text-align: left;
}

.prose p,
.prose ul {
  margin: 0 0 12px;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 6px;
}

a {
  color: var(--yellow);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

a:hover {
  color: var(--white);
}

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Form ---------- */

.signup {
  display: grid;
  gap: 14px;
  text-align: left;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  color: #2e1a47;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 999px;
}

.field input::placeholder {
  color: #6e5f80;
}

.field input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: #ffd1d1;
  box-shadow: 0 0 0 3px #c0263d;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--yellow);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 12px 30px;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--ink);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

.btn[disabled] {
  opacity: 0.75;
  cursor: progress;
}

.signup .btn {
  width: 100%;
}

@media (min-width: 520px) {
  .signup .btn {
    width: auto;
    justify-self: start;
  }
}

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

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff;
  color: #9b1230;
  font-weight: 700;
}

.form-error:empty {
  display: none;
}

.success {
  padding: 18px;
  border-radius: 20px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.success p {
  margin: 0;
}

.success .success-note {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 600;
}

.success:focus {
  outline: none;
}

.fine {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: #f1e9ff;
}

.center {
  text-align: center;
}

.actions {
  margin-top: 20px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.95rem;
  background: rgba(38, 13, 80, 0.72);
}

.site-footer p {
  margin: 0;
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-6px, -12px) rotate(-3deg); }
}

.d-rocket {
  animation: drift 7s ease-in-out infinite;
}

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