/* Juju Space — plain CSS, no build step. Mobile-first. */

:root {
  /* Pastel palette */
  --lavender: #e6dcfa;
  --blue: #d3e9f8;
  --mint: #d3f1e4;
  --peach: #ffe0d3;
  --butter: #fff3b8;
  --page: #faf7ff;

  /* Text (dark on pastels: well above WCAG AA 4.5:1) */
  --ink: #2f2a52;
  --ink-soft: #4a4575;

  /* Night-sky hero gradient (white text stays AA on both ends) */
  --sky-top: #3f3877;
  --sky-bottom: #6a5fb0;

  --radius: 1.5rem;
  --shadow: 0 8px 24px rgba(63, 56, 119, 0.12);

  --font-head: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.6;
  overflow-x: hidden; /* safety net: no horizontal scroll */
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid #5b4fc7;
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 10vw, 7rem) 1.25rem clamp(4rem, 12vw, 8rem);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  border-radius: 0 0 clamp(2rem, 6vw, 4rem) clamp(2rem, 6vw, 4rem);
}

/* Twinkling stars: two radial-gradient layers that fade at different speeds */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-repeat: repeat;
  pointer-events: none;
}
.hero::before {
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 90px 80px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 150px 20px, #fff3b8, transparent),
    radial-gradient(2px 2px at 210px 120px, #fff, transparent);
  background-size: 240px 150px;
  opacity: 0.8;
  animation: twinkle 5s ease-in-out infinite;
}
.hero::after {
  background-image:
    radial-gradient(1.5px 1.5px at 50px 110px, #fff, transparent),
    radial-gradient(2px 2px at 120px 50px, #d3e9f8, transparent),
    radial-gradient(1.5px 1.5px at 190px 90px, #fff, transparent);
  background-size: 200px 170px;
  opacity: 0.5;
  animation: twinkle 7s ease-in-out -3s infinite;
}

.hero-inner { position: relative; max-width: 40rem; margin: 0 auto; }

.hero h1 { font-size: clamp(2.5rem, 1.5rem + 5vw, 4.5rem); font-weight: 600; }

.subtitle {
  margin: 0.75rem 0 0;
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 600;
}

.deco { display: block; }
.planet {
  margin: 0 auto 1rem;
  width: clamp(130px, 28vw, 240px);
  height: auto;
  animation: float 6s ease-in-out infinite;
}
.moon, .rocket { position: absolute; height: auto; }
.moon   { top: 1.25rem; right: 1.25rem; width: clamp(40px, 8vw, 80px); }
.rocket { bottom: 1.5rem; left: 1.25rem; width: clamp(36px, 7vw, 68px); transform: rotate(35deg); }

/* ---------- Sections ---------- */
main { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0 0; }
.section h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Cards: stacked on mobile, grid on larger screens */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

.card {
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.card h3 { font-size: 1.3rem; margin: 0.75rem 0 0.25rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card--lavender { background: var(--lavender); }
.card--blue     { background: var(--blue); }
.card--mint     { background: var(--mint); }
.card--peach    { background: var(--peach); }

/* "Placeholder" tag: remove the element once real content is added */
.badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--butter);
  color: var(--ink);
  border: 1px dashed #a08a1e;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Timeline: gentle vertical line with soft dots */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0 0 0 1.75rem;
  max-width: 40rem;
  border-left: 4px solid var(--lavender);
}
.timeline li {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem - 12px);
  top: 1.6rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--butter);
  border: 4px solid #b9a4ee;
}
.timeline h3 { font-size: 1.25rem; margin: 0.5rem 0 0.25rem; }
.timeline p { margin: 0; color: var(--ink-soft); }
.timeline .when { margin-top: 0.5rem; font-weight: 700; color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  background: var(--lavender);
  border-radius: clamp(2rem, 6vw, 4rem) clamp(2rem, 6vw, 4rem) 0 0;
  color: var(--ink);
}
.footer p { margin: 0.25rem 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Animations (all disabled for reduced motion) ---------- */
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.9; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

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