/* =========================================================
   GALACTIC FUN PARK — series guide
   Design tokens
   ========================================================= */
:root {
  --bg-deep:      #050c14;   /* page background, near-black navy (from hero art) */
  --bg-panel:     #0c2422;   /* dark teal panel background */
  --bg-panel-2:   #102e2c;   /* slightly lighter teal panel */
  --navy-card:    #05051c;   /* ticket starfield navy, used for card backs */
  --orange:       #f49b19;   /* primary accent — ticket orange */
  --orange-bright:#fc9a2d;   /* hover / glow orange */
  --gold:         #ffd24c;   /* moon gold — highlights, stars */
  --red:          #e2402f;   /* small accents only */
  --cream:        #fff6e6;   /* paper / card-back text panels */
  --ink:          #241a10;   /* dark text on cream */
  --ink-soft:     #5a4a34;   /* secondary text on cream */
  --line-soft:    rgba(255,255,255,0.14);

  --font-display: 'Luckiest Guy', cursive;
  --font-body: 'Quicksand', sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 18px 40px -18px rgba(0,0,0,0.55);
}

/* =========================================================
   Reset & base
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
}

button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Subtle scattered starfield texture, reused from the ticket art motif */
.starfield-bg {
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.5px 1.5px at 80% 10%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 30% 85%, rgba(255,212,76,0.5), transparent),
    radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 45% 40%, rgba(255,255,255,0.35), transparent);
  background-repeat: repeat;
  background-size: 340px 340px;
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: #030812;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.topbar__back {
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  text-decoration: none;
  color: var(--gold);
  font-weight: 700;
  transition: color 0.15s ease;
}
.topbar__back:hover { color: var(--orange-bright); }
.topbar__label {
  color: rgba(255,246,230,0.6);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  background: var(--bg-deep);
  padding: 40px 20px 30px;
  text-align: center;
  overflow: hidden;
}
.hero__stars {
  position: absolute;
  inset: 0;
}
.hero__stars::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 15%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 22% 60%, #fff, transparent),
    radial-gradient(1px 1px at 35% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 80%, var(--gold), transparent),
    radial-gradient(1px 1px at 65% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 55%, #fff, transparent),
    radial-gradient(1px 1px at 90% 35%, var(--gold), transparent),
    radial-gradient(1.5px 1.5px at 95% 75%, #fff, transparent);
  opacity: 0.7;
}
.hero__banner {
  position: relative;
  max-width: 780px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.hero__title {
  position: relative;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--cream);
  margin: 22px auto 0;
  max-width: 680px;
  letter-spacing: 0.01em;
}
.hero__subtitle {
  position: relative;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,246,230,0.7);
  max-width: 480px;
  margin: 10px auto 0;
}
.hero__scroll {
  position: relative;
  margin-top: 22px;
  color: rgba(255,246,230,0.75);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__scroll span {
  display: block;
  width: 1px;
  height: 26px;
  margin: 0 auto 8px;
  background: linear-gradient(to bottom, transparent, var(--orange));
  animation: pulse-down 1.8s ease-in-out infinite;
}
@keyframes pulse-down {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.hero__scroll p { margin: 0; }

/* =========================================================
   Section heading utilities
   ========================================================= */
.eyebrow-heading {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--orange);
  margin-bottom: 14px;
}
.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink);
  margin-bottom: 6px;
}
.section-heading--light { color: var(--cream); }
.section-sub {
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 34px;
  font-weight: 600;
}
.section-sub--light { color: rgba(255,246,230,0.72); }

/* =========================================================
   Intro
   ========================================================= */
.intro {
  background: var(--cream);
  color: var(--ink);
  padding: 56px 0 48px;
}
.intro__lede {
  font-size: 1.15rem;
  max-width: 760px;
  color: var(--ink);
}
.intro__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}
.chip {
  display: inline-block;
  background: var(--navy-card);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--orange);
}
.intro__praise {
  max-width: 700px;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 4px solid var(--orange);
  padding-left: 16px;
  margin: 0;
}

/* =========================================================
   Books ("The Story So Far")
   ========================================================= */
.books {
  background: var(--cream);
  color: var(--ink);
  padding: 10px 0 64px;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.book-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 14px 30px -18px rgba(36,26,16,0.35);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -16px rgba(36,26,16,0.4);
}
.book-card__cover {
  position: relative;
  background: var(--navy-card);
}
.book-card__cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  padding: 18px;
}
.book-card__num {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: #1b1204;
  font-family: var(--font-display);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.book-card__body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.book-card__body h3 {
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.book-card__body p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  flex: 1;
  margin: 0 0 16px;
}
.book-card__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  color: #b5560a;
  border-bottom: 2px solid var(--orange);
  padding: 10px 2px 2px;
  margin: -10px -2px 0;
  transition: color 0.15s ease;
}
.book-card__link:hover { color: var(--red); }

/* =========================================================
   Explore the Park (map)
   ========================================================= */
.map-section {
  background: var(--bg-panel);
  padding: 60px 0 66px;
  position: relative;
}

/* ---- Official park map figure ---- */
.park-map-figure {
  margin: 0 0 30px;
}
.park-map-figure__trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid rgba(244,155,25,0.35);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-card);
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.park-map-figure__trigger:hover {
  border-color: var(--orange);
  transform: translateY(-2px);
}
.park-map-figure__trigger img {
  width: 100%;
  height: auto;
}
.park-map-figure__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: var(--orange);
  color: #1b1204;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.park-map-figure figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  font-style: italic;
  color: rgba(255,246,230,0.62);
  text-align: center;
}
.section-note {
  color: rgba(255,246,230,0.75);
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0 0 22px;
}

/* ---- Map lightbox ---- */
.map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3,5,10,0.94);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 60px 16px;
}
.map-lightbox[hidden] { display: none; }
.map-lightbox__scroll {
  max-width: 1600px;
  width: max(100%, 900px);
  flex-shrink: 0;
  margin: auto;
}
.map-lightbox__scroll img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.map-lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--orange);
  color: #1b1204;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 201;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
}
.map-lightbox__close:hover { background: var(--orange-bright); }

.park-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.park-map__side-title {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange-bright);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(244,155,25,0.4);
}
.zone-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--bg-panel-2);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.zone-card:last-child { margin-bottom: 0; }
.zone-card img {
  width: 84px;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
}
.zone-card__compass {
  position: absolute;
  top: -10px;
  left: -10px;
  background: var(--gold);
  color: #241a10;
  font-family: var(--font-display);
  font-size: 0.7rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.zone-card__text h4 {
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 4px;
}
.zone-card__text p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255,246,230,0.75);
}
.zone-card__text strong { color: var(--orange-bright); }

/* =========================================================
   Residents / Humans — jump nav
   ========================================================= */
.residents { background: var(--cream); color: var(--ink); padding: 62px 0 20px; }
.humans { background: var(--bg-deep); padding: 62px 0 30px; }

.jumpnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 38px;
}
.jumpnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid rgba(36,26,16,0.15);
  padding: 10px 16px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.jumpnav a:hover { background: var(--orange); border-color: var(--orange); color: #1b1204; }
.jumpnav--light a {
  color: var(--cream);
  background: var(--bg-panel-2);
  border-color: rgba(255,246,230,0.14);
}
.jumpnav--light a:hover { background: var(--orange); color: #1b1204; }

/* =========================================================
   Card groups & grid
   ========================================================= */
.card-group { scroll-margin-top: 90px; margin-bottom: 46px; }
.card-group__heading { margin-bottom: 18px; }
.card-group__heading h3 {
  font-size: 1.5rem;
  color: inherit;
}
.humans .card-group__heading h3 { color: var(--cream); }
.card-group__heading p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

/* =========================================================
   Flip card
   ========================================================= */
.card {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  perspective: 1400px;
  aspect-ratio: 480 / 763;
  width: 100%;
  border-radius: var(--radius-md);
}
.card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
  border-radius: var(--radius-md);
}
.card.is-flipped .card__inner { transform: rotateY(180deg); }

.card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.card__front {
  display: flex;
  flex-direction: column;
}
.card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.2s ease;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.4)) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.card:hover .card__front img {
  transform: scale(1.035);
  filter: drop-shadow(0 14px 20px rgba(0,0,0,0.48)) drop-shadow(0 3px 5px rgba(0,0,0,0.32));
}
.card:hover .card__inner { transform: translateY(-4px); }
.card.is-flipped:hover .card__inner { transform: rotateY(180deg) translateY(-4px); }

.card__hint {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card__back {
  background: var(--navy-card);
  transform: rotateY(180deg);
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 2px solid var(--orange);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.card__name {
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 1px;
  line-height: 1.08;
}
.card__role {
  margin: 0 0 8px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--orange-bright);
}
.card__bio-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-bottom: 8px;
}
.card__bio {
  font-size: 0.75rem;
  color: rgba(255,246,230,0.88);
  line-height: 1.42;
  margin: 0;
  overflow-y: auto;
  height: 100%;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) transparent;
}
.card__bio::-webkit-scrollbar { width: 5px; }
.card__bio::-webkit-scrollbar-track { background: transparent; }
.card__bio::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 4px; }
.card__fact {
  font-size: 0.7rem;
  color: var(--cream);
  background: rgba(244,155,25,0.14);
  border-radius: 8px;
  padding: 6px 9px;
  margin: 0 0 8px;
  line-height: 1.35;
  flex-shrink: 0;
}
.card__fact span {
  color: var(--gold);
  font-weight: 700;
}
.card__hint--back {
  position: static;
  text-align: left;
  background: none;
  color: var(--orange-bright);
  padding: 0;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--bg-panel);
  text-align: center;
  padding: 64px 0 50px;
}
.site-footer__logo {
  max-width: 320px;
  margin: 0 auto 22px;
  border-radius: var(--radius-md);
}
.site-footer h2 {
  color: var(--cream);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 12px;
}
.site-footer p {
  max-width: 520px;
  margin: 0 auto 22px;
  color: rgba(255,246,230,0.75);
}
.cta-button {
  display: inline-block;
  background: var(--orange);
  color: #1b1204;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-button:hover { background: var(--orange-bright); transform: translateY(-2px); }
.site-footer__back { margin-top: 26px; }
.site-footer__back a {
  color: rgba(255,246,230,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.site-footer__back a:hover { color: var(--gold); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .book-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .park-map { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { font-size: 0.78rem; padding: 12px 16px; }
  .hero { padding: 30px 14px 24px; }
  .wrap { padding: 0 18px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .card__bio { font-size: 0.72rem; line-height: 1.36; }
  .card__name { font-size: 0.98rem; }
  .card__role { font-size: 0.62rem; margin-bottom: 6px; }
  .card__fact { font-size: 0.66rem; padding: 5px 8px; }
  .zone-card { flex-direction: column; align-items: flex-start; }
  .zone-card img { width: 100%; max-width: 140px; }
}

@media (max-width: 400px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero__subtitle { font-size: 0.88rem; }
  .intro__facts { gap: 8px; }
  .chip { font-size: 0.76rem; padding: 7px 13px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* Scroll-more cue: shown on card backs whose bio text doesn't fully fit */
.card__more {
  display: none;
  position: absolute;
  left: 0;
  right: 4px;
  bottom: 0;
  height: 22px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(5,5,28,0), var(--navy-card) 78%);
}
.card__more::after {
  content: "\25be more";
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: var(--navy-card);
  padding-left: 4px;
}
.card.has-overflow .card__more { display: block; }
.card.has-overflow.bio-scrolled-end .card__more { display: none; }


/* ---------- Site navigation in the footer ----------
   Added so visitors arriving on this standalone page can reach the rest of
   masonbellauthor.com; previously only /books and / were linked. */
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 2rem auto 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  max-width: 40rem;
}

.site-footer__nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  /* 44px minimum touch target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.25rem;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus {
  text-decoration: underline;
}
