/* ============================================================
   It's a Blast, LLC — stylesheet
   STEM-education framing. Hero centerpiece: a large circular
   night-sky "window" (moon, stars, clouds) with a rocket
   orbiting the RIM of the circle, nose tangent to the path.
   Fresh build — not a clone of any prior design.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito+Sans:wght@400;600;700;900&display=swap');

:root {
  --night-1:  #16224a;
  --night-2:  #243a73;
  --sky-1:    #3f6bb0;
  --sky-2:    #6f9fd4;
  --rocket:   #e23b32;
  --flame:    #ff8a1e;
  --spark:    #ffd23e;
  --cloud:    #eaf3fb;
  --cream:    #fdf8ef;
  --ink:      #1b2440;
  --ink-soft: #4a5578;
  --star:     #ffe9a8;
  --card:     #ffffff;
  --shadow:   0 16px 38px rgba(27, 36, 64, 0.16);
  --shadow-lift: 0 26px 52px rgba(27, 36, 64, 0.26);
  --display:  'Baloo 2', system-ui, sans-serif;
  --body:     'Nunito Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- Header / nav -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253, 248, 239, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(27, 36, 64, 0.08);
}
.nav {
  max-width: 1140px; margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.brand {
  font-family: var(--display);
  font-weight: 800; font-size: 1.45rem;
  color: var(--night-1); text-decoration: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.brand .rk { display: inline-block; transform: rotate(45deg); font-size: 1.25rem; }
.nav-links { display: flex; gap: 0.25rem; list-style: none; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 0.45rem 0.8rem; border-radius: 999px;
  color: var(--ink-soft); transition: background 0.18s, color 0.18s;
}
.nav-links a:hover { background: rgba(63, 107, 176, 0.15); color: var(--night-1); }
.nav-links a.active { background: var(--night-1); color: var(--cream); }
.nav-links a.shop-link { background: var(--rocket); color: #fff; }
.nav-links a.shop-link:hover { background: #c22f27; color: #fff; }

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--display);
  font-weight: 700; font-size: 1.02rem; text-decoration: none;
  padding: 0.78rem 1.7rem; border-radius: 999px;
  border: none; cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}
.btn-rocket {
  background: linear-gradient(135deg, var(--flame), var(--rocket));
  color: #fff; box-shadow: 0 8px 20px rgba(226, 59, 50, 0.4);
}
.btn-rocket:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(226, 59, 50, 0.5); }
.btn-night { background: var(--night-1); color: var(--cream); }
.btn-night:hover { transform: translateY(-3px); }

/* ---- Hero ---------------------------------------------------------- */
.hero {
  max-width: 1140px; margin: 0 auto;
  padding: 3rem 1.25rem 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem; align-items: center;
}
.hero-copy .kicker {
  display: inline-block; font-weight: 900;
  font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--rocket); margin-bottom: 0.7rem;
}
.hero-copy h1 {
  font-family: var(--display);
  font-weight: 800; font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.1; color: var(--night-1);
  margin-bottom: 0.7rem;
}
.hero-copy p { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 1.5rem; max-width: 30rem; }
.hero-cta { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* ---- Circular night-sky window with rim-orbiting rocket ------------ */
/* .orbit-stage is a square box. The night-sky disc sits inside it.
   The rocket rides .orbit-ring, a layer that rotates a full turn;
   the rocket is pinned to the ring's top-center, so as the ring
   rotates the rocket travels the circle's rim. The rocket is
   pre-rotated 90deg so its nose points along the path (tangent). */
.orbit-stage {
  position: relative;
  width: 100%; max-width: 460px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.sky-window {
  position: absolute;
  inset: 34px;                 /* room for the rocket on the rim */
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 38%, var(--sky-1) 72%, var(--sky-2) 100%);
  box-shadow: var(--shadow-lift), inset 0 0 55px rgba(0,0,0,0.4);
  border: 6px solid #fff;
}
.sky-window .moon {
  position: absolute; top: 13%; left: 19%;
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fffdf2, var(--star));
  box-shadow: 0 0 34px 12px rgba(255, 233, 168, 0.45);
}
.sky-window .stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 60% 22%, #fff, transparent),
    radial-gradient(2px 2px at 78% 36%, var(--star), transparent),
    radial-gradient(1.5px 1.5px at 45% 28%, #fff, transparent),
    radial-gradient(2px 2px at 31% 46%, var(--star), transparent),
    radial-gradient(1.5px 1.5px at 67% 52%, #fff, transparent),
    radial-gradient(2px 2px at 83% 58%, var(--star), transparent),
    radial-gradient(1.5px 1.5px at 23% 60%, #fff, transparent),
    radial-gradient(2px 2px at 53% 42%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 72% 16%, var(--star), transparent);
  animation: twinkle 3.6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }
.sky-window .clouds { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; }
.sky-window .clouds span { position: absolute; bottom: -50px; background: var(--cloud); border-radius: 50%; }
.sky-window .clouds .c1 { width: 150px; height: 150px; left: -30px; }
.sky-window .clouds .c2 { width: 190px; height: 190px; left: 32%; bottom: -80px; }
.sky-window .clouds .c3 { width: 150px; height: 150px; right: -24px; bottom: -56px; }
.sky-window .clouds .c4 { width: 110px; height: 110px; left: 14%; bottom: -66px; }

/* the rotating ring the rocket is pinned to */
.orbit-ring {
  position: absolute; inset: 0;
  animation: orbit 16s linear infinite;
}
@keyframes orbit { to { transform: rotate(360deg); } }

/* the rocket: pinned to top-center of the ring, centered ON the rim.
   The orbit-ring rotates clockwise; a point at top-center therefore
   travels to the RIGHT, so the rocket (SVG drawn nose-up) is rotated
   90deg clockwise to make its nose lead along the rim (tangent). */
.orbit-rocket {
  position: absolute;
  top: 0; left: 50%;
  width: 84px; height: 84px;
  margin-left: -42px;
  margin-top: -42px;          /* center the rocket exactly on the rim line */
  /* 45deg makes the artwork's nose lead tangentially as the ring turns
     clockwise; translateY nudges the body 13px so it rides the rim cleanly */
  transform: rotate(45deg) translateY(13px);
}
.orbit-rocket img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 7px rgba(0,0,0,0.3)); }

/* ---- Page header (inner pages) ------------------------------------- */
.page-head {
  background: linear-gradient(180deg, var(--night-1), var(--sky-1));
  color: var(--cream); text-align: center;
  padding: 3rem 1.25rem 3.4rem;
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 25% 35%, var(--star), transparent),
    radial-gradient(2px 2px at 75% 25%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 65%, var(--star), transparent),
    radial-gradient(2px 2px at 88% 70%, #fff, transparent);
  opacity: 0.6;
}
.page-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem); position: relative;
}
.page-head p { position: relative; color: var(--star); font-weight: 700; margin-top: 0.3rem; }

/* ---- Layout -------------------------------------------------------- */
.section { max-width: 1140px; margin: 0 auto; padding: 3.5rem 1.25rem; }
.section-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--night-1);
  text-align: center; margin-bottom: 0.4rem;
}
.section-sub {
  text-align: center; color: var(--ink-soft); font-weight: 600;
  max-width: 560px; margin: 0 auto 2.4rem;
}

/* ---- Feature cards ------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.feature-card {
  background: var(--card); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lift); }
.feature-card .fc-img {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--sky-1), var(--night-2));
  overflow: hidden;
}
.feature-card .fc-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-card .fc-body { padding: 1.2rem 1.3rem 1.5rem; flex: 1; }
.feature-card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.3rem; color: var(--rocket); margin-bottom: 0.4rem;
}
.feature-card p { color: var(--ink-soft); font-size: 0.97rem; }

/* ---- Alternating content rows -------------------------------------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; align-items: center;
  max-width: 1000px; margin: 0 auto 2.5rem;
}
.split:nth-child(even) .split-img { order: 2; }
.split-text h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.6rem; color: var(--night-1); margin-bottom: 0.5rem;
}
.split-text p { color: var(--ink-soft); }
.split-img {
  border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--sky-1), var(--night-2));
}
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Testimonials -------------------------------------------------- */
.quotes {
  background: linear-gradient(180deg, var(--night-2), var(--night-1));
  position: relative; overflow: hidden;
}
.quotes::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 15% 40%, var(--star), transparent),
    radial-gradient(2px 2px at 80% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 75%, var(--star), transparent);
  opacity: 0.5;
}
.quote-grid {
  position: relative; max-width: 1000px; margin: 0 auto;
  padding: 3.4rem 1.25rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.quote-card {
  background: rgba(253, 248, 239, 0.07);
  border: 1.5px solid rgba(255, 233, 168, 0.3);
  border-radius: 18px; padding: 1.6rem 1.5rem;
  color: var(--cream);
}
.quote-card .stars { color: var(--spark); font-size: 1.05rem; margin-bottom: 0.5rem; }
.quote-card blockquote { font-size: 1.08rem; font-weight: 600; line-height: 1.5; margin-bottom: 0.8rem; }
.quote-card cite { color: var(--star); font-weight: 700; font-style: normal; font-size: 0.9rem; }

/* ---- Gallery ------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}
.gallery-grid a {
  display: block; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--sky-1), var(--night-2));
  transition: transform 0.18s;
}
.gallery-grid a:hover { transform: scale(1.04) rotate(-1deg); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Contact ------------------------------------------------------- */
.contact-wrap {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 2rem; max-width: 1000px; margin: 0 auto;
}
.contact-form {
  background: var(--card); border-radius: 20px;
  padding: 1.8rem; box-shadow: var(--shadow);
}
.contact-form label {
  display: block; font-weight: 700; font-size: 0.9rem;
  color: var(--ink-soft); margin: 0.85rem 0 0.3rem;
}
.contact-form input, .contact-form textarea {
  width: 100%; font-family: var(--body); font-size: 1rem;
  padding: 0.7rem 0.85rem; border: 2px solid #e4e1d5;
  border-radius: 10px; background: var(--cream);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--sky-1); }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .btn { margin-top: 1.2rem; width: 100%; }
.info-card {
  background: linear-gradient(160deg, var(--night-1), var(--night-2));
  color: var(--cream); border-radius: 20px; padding: 1.8rem;
}
.info-card h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 1.35rem; color: var(--star); margin-bottom: 0.8rem;
}
.info-card p { margin-bottom: 0.9rem; font-size: 0.98rem; }
.info-card a { color: var(--spark); font-weight: 700; text-decoration: none; }
.info-card .label {
  font-weight: 900; text-transform: uppercase; font-size: 0.76rem;
  letter-spacing: 0.07em; color: var(--star);
  display: block; margin-bottom: 0.1rem;
}

/* ---- Placeholder note (for unfinished content) --------------------- */
.placeholder-note {
  background: #fff3d4; border: 2px dashed var(--rocket);
  border-radius: 14px; padding: 1rem 1.2rem;
  color: #8a4a12; font-weight: 600; font-size: 0.95rem;
  margin: 1.4rem auto; max-width: 720px;
}

/* ---- CTA band ------------------------------------------------------ */
.cta-band {
  background: linear-gradient(135deg, var(--rocket), var(--flame));
  text-align: center; padding: 3rem 1.25rem;
}
.cta-band h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.3rem); color: #fff; margin-bottom: 0.4rem;
}
.cta-band p { color: #fff; font-weight: 700; margin-bottom: 1.3rem; }
.cta-band .btn-night { box-shadow: 0 10px 24px rgba(27,36,64,0.3); }

/* ---- Footer -------------------------------------------------------- */
.site-footer {
  background: var(--night-1); color: #aab4d4;
  text-align: center; padding: 2.2rem 1.25rem; font-size: 0.9rem;
}
.site-footer .foot-brand {
  font-family: var(--display); font-weight: 800;
  font-size: 1.2rem; color: var(--cream); margin-bottom: 0.4rem;
}
.site-footer a { color: var(--spark); text-decoration: none; font-weight: 700; }
.site-footer .foot-row { margin-bottom: 0.35rem; }

/* ---- Responsive ---------------------------------------------------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { order: 2; text-align: center; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .split { grid-template-columns: 1fr; }
  .split:nth-child(even) .split-img { order: 0; }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav { flex-direction: column; align-items: flex-start; }
}

/* respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .sky-window .stars { animation: none; }
  /* Scroll animations: skip the motion, just show the content. */
  .reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-scale,
  .stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Scroll-triggered reveal animations ────────────────────────────── */
/*
 * A small, consistent motion vocabulary used across the site. Elements
 * marked with these classes start hidden/shifted and get an "is-visible"
 * class added by JS (IntersectionObserver) when they scroll into view —
 * the transitions then run.
 *
 * One-time only: once "is-visible" is set, scrolling away and back does
 * NOT re-trigger. See the matching JS at the bottom of each page.
 *
 * Reduced-motion users see content appear instantly — see the
 * @media (prefers-reduced-motion: reduce) block above.
 */

.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.34, 1.36, 0.64, 1);
  will-change: opacity, transform;
}

/* Distances bumped well past "subtle" — you watch them travel. */
.reveal-up   { transform: translateY(60px); }
.reveal-left { transform: translateX(-80px); }
.reveal-right{ transform: translateX(80px); }
.reveal-scale{ transform: scale(0.85); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger: children of a .stagger container reveal in sequence.
   Gap widened to 140ms so each card more clearly arrives separately. */
.stagger > *:nth-child(1)  { transition-delay: 0ms;   }
.stagger > *:nth-child(2)  { transition-delay: 140ms; }
.stagger > *:nth-child(3)  { transition-delay: 280ms; }
.stagger > *:nth-child(4)  { transition-delay: 420ms; }
.stagger > *:nth-child(5)  { transition-delay: 560ms; }
.stagger > *:nth-child(6)  { transition-delay: 700ms; }
.stagger > *:nth-child(7)  { transition-delay: 840ms; }
.stagger > *:nth-child(8)  { transition-delay: 980ms; }

/* Gallery is large (49 tiles) — keep its stagger tighter and capped
   so later tiles don't lag noticeably. Tiles past #8 fall to 0ms. */
.gallery-stagger > *:nth-child(n+9)  { transition-delay: 0ms; }
.gallery-stagger > *:nth-child(1)  { transition-delay: 0ms; }
.gallery-stagger > *:nth-child(2)  { transition-delay: 60ms; }
.gallery-stagger > *:nth-child(3)  { transition-delay: 120ms; }
.gallery-stagger > *:nth-child(4)  { transition-delay: 180ms; }
.gallery-stagger > *:nth-child(5)  { transition-delay: 240ms; }
.gallery-stagger > *:nth-child(6)  { transition-delay: 300ms; }
.gallery-stagger > *:nth-child(7)  { transition-delay: 360ms; }
.gallery-stagger > *:nth-child(8)  { transition-delay: 420ms; }
