:root {
  --navy: #061628;
  --navy-2: #0b2144;
  --ink: #14284a;
  --muted: #4d5e78;
  --gold: #f5c518;
  --gold-deep: #e2ae04;
  --red: #e31b23;
  --yt: #ff2d2d;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 40px rgba(7, 21, 37, 0.18);
  --wrap: 1160px;
  --header: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Nunito, "Segoe UI", sans-serif;
  background: #082038;
  overflow-x: hidden;
}
img { max-width: 100%; }
button, input { font: inherit; }
a { color: inherit; }
h1, h2, h3, .nav-links a, .btn, .shot-label, .legal button {
  font-family: Montserrat, Nunito, sans-serif;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 80;
}
.skip:focus { top: 12px; }

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

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

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--navy);
  color: #fff;
  height: var(--header);
}
.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.brand { grid-column: 1; grid-row: 1; }
.nav-links { grid-column: 2; grid-row: 1; justify-self: center; }
.nav-tools { grid-column: 3; grid-row: 1; }
.brand {
  display: flex;
  align-items: center;
  height: 64px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  justify-self: start;
}
.brand img {
  display: block;
  flex: none;
  height: 90px;
  width: auto;
  max-width: none;
  margin: -19px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 8px 10px;
  border-radius: 999px;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a[aria-current="page"] {
  background: var(--gold);
  color: #1c1604;
}
.nav-links a[aria-current="page"]:hover { color: #1c1604; }

.nav-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--gold); }
.nav-toggle { display: none; }

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.missions {
  background: #12315f url("Images/Backgrounds/Section1.webp") center bottom / cover no-repeat;
  padding: 42px 0 64px;
}
.panel {
  display: grid;
  grid-template-columns: 1.28fr 0.82fr;
  gap: 28px;
  background: #fffefb;
  border-radius: 30px;
  padding: 26px 28px 30px;
  box-shadow: var(--shadow);
}
.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.block-title img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}
.block-title h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-2);
}
.lede {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  max-width: 46ch;
}

.fan {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 20px 4px 10px;
}
.shot {
  width: 30%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--navy-2);
  transform-origin: center bottom;
  transition: transform 0.25s ease;
}
.shot:nth-child(1) { transform: rotate(-4deg); }
.shot:nth-child(2) { transform: translateY(-10px); z-index: 1; }
.shot:nth-child(3) { transform: rotate(4deg); }
.shot:hover, .shot:focus-visible {
  transform: translateY(-14px) rotate(0deg) scale(1.04);
  z-index: 2;
}
.shot-frame {
  position: relative;
  background: #fff;
  padding: 6px 6px 12px;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(16, 32, 64, 0.22);
  overflow: hidden;
}
.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 13px;
}
.shot-label {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--navy-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
}
.shot-label svg { width: 16px; height: 16px; flex: none; }

.actions { display: flex; justify-content: center; margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.gold { background: var(--gold); color: #1c1604; }
.btn.gold:hover { background: var(--gold-deep); }
.btn.yt { background: var(--yt); color: #fff; margin-top: 14px; }
.btn.yt:hover { background: #d91818; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { cursor: default; opacity: 0.75; }
.btn:disabled:hover { transform: none; background: var(--yt); }

.latest h3 {
  margin: 12px 0 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-2);
}
.ep-kicker {
  margin: 14px 0 0;
  color: #6d7d96;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 12px;
}
.episode-thumb {
  display: block;
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(16, 32, 64, 0.16);
}
.episode-thumb img { display: block; width: 100%; height: auto; }

.world-title {
  margin: 46px 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.world-title svg { width: 28px; height: 28px; flex: none; }

.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px 16px;
  align-items: stretch;
  padding-bottom: 18px;
}
.world-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 22px 14px;
  align-content: stretch;
}
.world-card[hidden] {
  display: none !important;
}
.world-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 26px rgba(5, 16, 36, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.world-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(5, 16, 36, 0.28);
}
.world-card .art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px 22px 0 0;
}
.world-card p {
  margin: 0;
  padding: 12px 10px 26px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  color: #3f516b;
  min-height: 5.4em;
}
.world-card .badge {
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.world-card.feature {
  height: 100%;
}
.world-card.feature .art {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center top;
}
.world-side .art,
.more-grid .art {
  aspect-ratio: 5 / 4;
  height: auto;
  object-fit: cover;
  object-position: center top;
}
.world-side p,
.more-grid p {
  font-size: 12.5px;
  min-height: 0;
  padding: 10px 8px 24px;
}
.world-side .badge,
.more-grid .badge {
  width: 34px;
  height: 34px;
  bottom: -14px;
}

.details {
  background: linear-gradient(#011620, #04223a 55%, #06284a);
  padding: 12px 0 72px;
}
.details[hidden], .details-panel[hidden] { display: none !important; }
.details-panel {
  background: #fffefb;
  color: var(--ink);
  border-radius: 30px;
  padding: 44px clamp(22px, 4vw, 56px) 20px;
  box-shadow: var(--shadow);
}
.details-intro {
  max-width: 760px;
  margin: 0 auto 12px;
  text-align: center;
}
.details-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy-2);
}
.details-intro p, .chapter-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
}
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  padding: 36px 0;
  border-top: 2px dashed rgba(11, 33, 68, 0.14);
}
.chapter:first-of-type { margin-top: 28px; }
.chapter.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.chapter.flip .chapter-art { order: 2; }
.chapter-art {
  margin: 0;
  background: #fff;
  padding: 8px 8px 8px;
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(16, 32, 64, 0.2);
  transform: rotate(-2deg);
}
.chapter.flip .chapter-art { transform: rotate(2deg); }
.chapter-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}
.chapter.camp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.chapter-art .crop {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #1277b8;
}
.chapter-art .crop img {
  position: absolute;
  width: 253.3%;
  max-width: none;
  height: auto;
  aspect-ratio: auto;
  left: -118.9%;
  top: -42.1%;
  border-radius: 0;
}
.chapter-kicker {
  margin: 0 0 6px !important;
  color: #2e6b12 !important;
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chapter-body h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy-2);
}
.chapter-tag {
  margin: 0 0 14px !important;
  color: #c4361b !important;
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  line-height: 1.4 !important;
  text-transform: uppercase;
}
.chapter-body p.chapter-line {
  color: var(--navy-2);
  font-weight: 800;
}
.chapter-body .btn { margin-top: 6px; }
.chapter-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px !important;
  padding: 7px 14px;
  border-radius: 999px;
  background: #e8f4dc;
  color: #2e6b12 !important;
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chapter-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3f9a1a;
  box-shadow: 0 0 0 4px rgba(63, 154, 26, 0.22);
}
.chapter.closing {
  display: block;
  margin: 12px 0 24px;
  padding: 36px clamp(20px, 4vw, 48px);
  border: 0;
  border-radius: 24px;
  background: var(--navy-2);
  text-align: center;
}
.chapter.closing .chapter-body { max-width: 640px; margin: 0 auto; }
.chapter.closing h3 { color: #fff; }
.chapter.closing p { color: rgba(255, 255, 255, 0.82); }
.chapter.closing p.chapter-line { color: #fff; }
.chapter.closing .chapter-tag { color: var(--gold) !important; margin: 18px 0 0 !important; }

.chapter-art.portrait img { aspect-ratio: 4 / 5; object-position: 50% 22%; }
.crew-tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 8px 0 32px;
  padding: 8px 0 4px;
}
.crew-tab[hidden] {
  display: none !important;
}
.crew-tab {
  --c: #3f74d6;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #5b6b86;
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.crew-tab[data-crew-tab="buddy"] { --c: #d9822b; }
.crew-tab[data-crew-tab="malley"] { --c: #3f74d6; }
.crew-tab[data-crew-tab="oscar"] { --c: #2b2f3a; }
.crew-tab img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 25%;
  border: 4px solid #fff;
  box-shadow: 0 8px 18px rgba(16, 32, 64, 0.18);
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.crew-tab[data-crew-tab="oscar"] img { object-position: 50% 40%; }
.crew-tab[aria-selected="true"] { color: var(--navy-2); }
.crew-tab[aria-selected="true"] img {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px var(--c), 0 10px 20px rgba(16, 32, 64, 0.22);
}
.chapter[data-crew]:not(.is-active),
.chapter[data-adv]:not(.is-active),
.chapter[data-world]:not(.is-active) { display: none; }
.chapter-art.object {
  background: #eef3fa;
}
.chapter-art.object img {
  object-fit: contain;
  object-position: center;
  background: #f4f7fb;
}
#details-meet { transition: background 0.3s ease; }
#details-meet[data-active="buddy"] { background: #fbe7cf; }
#details-meet[data-active="malley"] { background: #d9e6fb; }
#details-meet[data-active="oscar"] { background: #e1e3ea; }
#details-adventures[data-active="lunar"] { background: #d9e6fb; }
#details-adventures[data-active="camp"] { background: #e5f3d9; }
#details-adventures[data-active="remaster"] { background: #ece4fb; }
#details-adventures[data-active="lessons"] { background: #fbe7cf; }
#details-adventures .crew-tabs { gap: 28px; flex-wrap: wrap; }
#details-adventures .crew-tab { min-width: 88px; }
#details-adventures .crew-tab img { width: 96px; height: 96px; }
#details-adventures .crew-tab[data-adv-tab="lunar"] { --c: #3f74d6; }
#details-adventures .crew-tab[data-adv-tab="camp"] { --c: #3f9a1a; }
#details-adventures .crew-tab[data-adv-tab="remaster"] { --c: #6a3fc0; }
#details-adventures .crew-tab[data-adv-tab="lessons"] { --c: #d9822b; }
#details-world { transition: background 0.3s ease; }
#details-world[data-group="lunar"] { background: #d9e6fb; }
#details-world[data-group="home"] { background: #fbe7cf; }
#details-world .world-groups { gap: 40px; }
#details-world .world-groups .crew-tab { min-width: 110px; }
#details-world .world-groups .crew-tab img { width: 120px; height: 120px; }
#details-world .world-group .crew-tabs { gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
#details-world .world-group .crew-tab { min-width: 72px; }
#details-world .world-group .crew-tab img { width: 80px; height: 80px; object-fit: cover; background: #f4f7fb; }
#details-world .crew-tab[data-world-group-tab="lunar"],
#details-world .crew-tab[data-world-tab="agency"],
#details-world .crew-tab[data-world-tab="rocket"],
#details-world .crew-tab[data-world-tab="lem"],
#details-world .crew-tab[data-world-tab="cradle"],
#details-world .crew-tab[data-world-tab="suit"],
#details-world .crew-tab[data-world-tab="helmet"],
#details-world .crew-tab[data-world-tab="ring"] { --c: #3f74d6; }
#details-world .crew-tab[data-world-group-tab="home"],
#details-world .crew-tab[data-world-tab="ball"],
#details-world .crew-tab[data-world-tab="bed"],
#details-world .crew-tab[data-world-tab="fountain"] { --c: #d9822b; }
.world-group:not(.is-active) { display: none !important; }
.world-group-intro {
  max-width: 760px;
  margin: 0 auto 8px;
  text-align: center;
}
.world-group-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy-2);
}
.world-group-intro p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
}
.crew-next {
  margin: 22px 0 0;
}
.crew-next button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.crew-next button:hover, .crew-next button:focus-visible { text-decoration: underline; }
.chapter-art.portrait.oscar img { aspect-ratio: 1 / 1; object-position: 50% 40%; }
.chapter-art.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.chapter-art.pair img { aspect-ratio: 3 / 4; object-position: 50% 25%; border-radius: 14px; }
.details-intro .chapter-tag { margin: 0 0 16px !important; }

.details-panel.soon {
  padding-block: 64px 56px;
  text-align: center;
}
.details-panel.soon .soon-icon {
  display: block;
  width: 96px;
  height: auto;
  margin: 0 auto 18px;
}
.details-panel.soon h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-2);
}
.details-panel.soon > p:not(.chapter-status) {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
}
.details-panel.soon .chapter-status {
  background: rgba(245, 197, 24, 0.22);
  color: #7a5a00 !important;
  margin: 0 0 18px !important;
}
.details-panel.soon .chapter-status::before {
  background: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(226, 174, 4, 0.28);
}
.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.traits li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8eefa;
  color: var(--navy-2);
  font-family: Montserrat, Nunito, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.chapter-body p.philosophy {
  margin: 6px 0 0;
  padding: 12px 16px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #fff6d6;
  color: var(--navy-2);
  font-weight: 800;
  text-align: left;
}

.signup {
  position: relative;
  isolation: isolate;
  display: block;
  aspect-ratio: 2172 / 540;
  background: #1277b8;
  overflow: hidden;
}
.signup-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.signup-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
}
.signup-layout {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
}
.signup-card {
  position: relative;
  top: 4%;
  width: min(640px, 100%);
  background: var(--navy-2);
  color: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 36px rgba(4, 12, 28, 0.28);
}
.signup-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mail-badge {
  width: 54px;
  height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
}
.signup-card h2 {
  margin: 2px 0 4px;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.signup-card p { margin: 0; color: #d5e2f4; font-weight: 700; line-height: 1.4; }
.signup-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.signup-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--ink);
}
.signup-row input[aria-invalid="true"] { outline: 3px solid #ff8d8d; }
.form-status {
  min-height: 1.3em;
  margin: 10px 0 0;
  font-weight: 800;
  color: #ffe08a;
}
.form-status.ok { color: #b6f5c8; }

.site-footer {
  background: var(--navy);
  color: #d5deea;
  padding: 42px 0 18px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 0.9fr 0.9fr auto;
  gap: 28px;
  align-items: start;
}
.footer-blurb {
  margin: 14px 0 0;
  max-width: 32ch;
  font-weight: 700;
  line-height: 1.45;
  color: #c5d0e0;
}
.site-footer h2 {
  margin: 6px 0 12px;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li + li { margin-top: 8px; }
.site-footer a {
  color: #d5deea;
  text-decoration: none;
  font-weight: 700;
}
.site-footer a:hover { color: var(--gold); }
.connect-list a, .connect-list button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: #d5deea;
  font-weight: 700;
  cursor: pointer;
  font-family: Nunito, "Segoe UI", sans-serif;
  font-size: 16px;
}
.connect-list button:hover { color: var(--gold); }
.connect-list svg { width: 18px; height: 18px; }
.footer-mark { width: auto; height: 132px; justify-self: end; }
.legal {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.legal button {
  background: none;
  border: 0;
  color: #c5d0e0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.legal button:hover { color: var(--gold); }

dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(560px, calc(100% - 32px));
  max-height: min(80vh, 720px);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(5, 14, 28, 0.66); }
.dialog-card { padding: 22px; overflow-y: auto; max-height: min(80vh, 720px); }
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 { margin: 0; font-size: 22px; }
.dialog-card p { color: var(--muted); font-weight: 700; line-height: 1.45; }
.dialog-card h3 {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-2);
}
.dialog-x {
  border: 0;
  background: #eef2f7;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}
#search-input {
  width: 100%;
  margin: 14px 0;
  border: 2px solid #d5deea;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
}
#search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
}
#search-results a {
  display: block;
  text-decoration: none;
  padding: 10px 8px;
  border-radius: 10px;
}
#search-results a:hover, #search-results a:focus-visible { background: #f4f7fb; }
#search-results strong { display: block; }
#search-results span { color: var(--muted); font-size: 13px; font-weight: 700; }
.empty-note { color: var(--muted); font-weight: 800; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow);
  z-index: 70;
}

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-mark { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1180px) {
  .nav-toggle { display: grid; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-tools { grid-column: 2; grid-row: 1; }
  .nav-links {
    display: none;
    justify-self: stretch;
    grid-column: 1 / -1;
    grid-row: 2;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    border-top: 1px solid var(--line);
  }
  .nav-links.is-open {
    display: flex;
    gap: 2px;
    max-height: calc(100vh - var(--header));
    overflow-y: auto;
    box-shadow: 0 16px 30px rgba(3, 10, 22, 0.45);
  }
  .nav-links a {
    display: block;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 14px;
  }
}
@media (max-width: 980px) {
  .panel { grid-template-columns: 1fr; }
  .block-title h2 { font-size: 22px; }
}
@media (max-width: 800px) {
  .fan {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .shot, .shot:nth-child(1), .shot:nth-child(2), .shot:nth-child(3) {
    width: min(100%, 360px);
    transform: none;
  }
  .shot-label { font-size: 15px; }
  .signup { height: auto; aspect-ratio: auto; background: var(--navy); }
  .signup-photo { position: relative; height: auto; aspect-ratio: 2172 / 540; }
  .signup-photo img { top: 0; height: 100%; object-position: center bottom; }
  .signup-layout { position: relative; inset: auto; display: block; padding: 16px 0 24px; }
  .signup-card { top: 0; }
  .world-grid { grid-template-columns: 1fr; }
  .world-side,
  .hub-grid,
  .more-grid {
    padding: 16px 14px 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    box-shadow: 0 12px 26px rgba(5, 16, 36, 0.22);
  }
  .chapter, .chapter.flip, .chapter.camp { grid-template-columns: 1fr; }
  .chapter.flip .chapter-art { order: 0; }
  .chapter-art, .chapter.flip .chapter-art { width: 100%; max-width: 420px; margin: 0 auto; }
  .chapter-body { text-align: center; }
  .traits { justify-content: center; }
  .chapter-body .btn { white-space: normal; text-align: center; }

  /* Phones: each chapter becomes its own colour-coded card */
  .details-panel:not(.soon) {
    background: #e6edf8;
    padding: 26px 14px 14px;
  }
  .details-intro { padding: 0 6px; }
  .chapter {
    --accent: #3f74d6;
    --tint: #e4edfc;
  }
  .chapter.tone-green { --accent: #3f9a1a; --tint: #e5f3d9; }
  .chapter.tone-blue { --accent: #3f74d6; --tint: #e4edfc; }
  .chapter.tone-orange { --accent: #d9822b; --tint: #fdeedb; }
  .chapter.tone-purple { --accent: #8a4fd0; --tint: #f0e6fb; }
  .chapter.tone-dark { --accent: #2b2f3a; --tint: #fff3bf; }
  .chapter:not(.closing) {
    margin-top: 18px;
    padding: 22px 16px 24px;
    background: var(--tint);
    border-top: 6px solid var(--accent);
    border-radius: 22px;
    box-shadow: 0 8px 20px rgba(16, 32, 64, 0.12);
  }
  .chapter:first-of-type { margin-top: 22px; }
  .chapter.closing { margin: 18px 0 4px; }
  .chapter .chapter-art { background: #fff; }
  .chapter .traits li {
    background: #fff;
    box-shadow: inset 0 0 0 2px var(--accent);
  }
  .chapter-body p.philosophy {
    background: #fff;
    border-left-color: var(--accent);
    text-align: left;
  }
  .chapter-kicker { color: var(--accent) !important; }

  /* Phones: compact sticky crew picker */
  .crew-tabs {
    gap: 12px;
    position: sticky;
    top: var(--header);
    z-index: 6;
    margin: 6px -14px 0;
    padding: 12px 14px 10px;
    background: inherit;
  }
  .crew-tab {
    min-width: 76px;
    gap: 8px;
    font-size: 12px;
  }
  .crew-tab img {
    width: 64px;
    height: 64px;
    border-width: 3px;
    box-shadow: 0 4px 10px rgba(16, 32, 64, 0.2);
    opacity: 0.65;
  }
  .crew-tab[aria-selected="true"] img {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px var(--c), 0 6px 14px rgba(16, 32, 64, 0.28);
  }
  .chapter[data-crew],
  .chapter[data-adv],
  .chapter[data-world] { margin-top: 10px; }
  #details-world .world-groups { gap: 24px; }
  #details-world .world-groups .crew-tab { min-width: 76px; }
  #details-world .world-groups .crew-tab img { width: 64px; height: 64px; }
  #details-world .world-group .crew-tabs { position: static; gap: 8px; }
  #details-world .world-group .crew-tab { min-width: 58px; }
  #details-world .world-group .crew-tab img { width: 52px; height: 52px; }
  #details-adventures .crew-tabs { gap: 8px; }
  #details-adventures .crew-tab { min-width: 68px; }
  #details-adventures .crew-tab img { width: 56px; height: 56px; }
  .crew-next { display: none; }

  /* Phones: Adventures chapters hang off a vertical timeline */
  .chapter.tl {
    position: relative;
    margin-left: 26px;
  }
  .chapter.tl::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--accent);
    z-index: 1;
  }
  .chapter.tl-next::before {
    background: #fff;
    border: 3px dashed var(--accent);
    box-shadow: none;
  }
  .chapter.tl::after {
    content: "";
    position: absolute;
    left: -19px;
    top: 32px;
    height: calc(100% - 14px + 18px);
    width: 4px;
    border-radius: 2px;
    background: #9fb4d9;
  }
  .chapter.tl-now::after {
    background: repeating-linear-gradient(to bottom, #9fb4d9 0 8px, transparent 8px 14px);
  }
  .chapter.tl-past::after { display: none; }
  .chapter.tl-bonus { margin-top: 30px; }
}
@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  .chapter.tl-now::before { animation: tl-pulse 2s ease-out infinite; }
  @keyframes tl-pulse {
    0% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 2px rgba(63, 116, 214, 0.5); }
    100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 12px rgba(63, 116, 214, 0); }
  }
}
@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  .chapter[data-crew].is-active,
  .chapter[data-adv].is-active { animation: crew-in 0.3s ease; }
  @keyframes crew-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--wrap), calc(100% - 28px)); }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer li + li { margin-top: 0; }
  .site-footer ul a { display: inline-block; padding: 8px 0; }
  .connect-list a, .connect-list button { padding: 8px 0; }
  .legal { justify-content: flex-start; flex-wrap: wrap; gap: 4px 22px; }
  .legal button { padding: 8px 0; }
  .details-panel { padding-top: 32px; border-radius: 24px; }
  .panel { padding: 22px 18px 26px; border-radius: 24px; }
  .btn { padding: 14px 20px; }
  .signup-row { flex-direction: column; }
  .world-title { gap: 8px; }
  .brand { height: 52px; }
  .brand img { height: 90px; margin: -19px 0; }
}
@media (max-width: 640px) {
  .world-side { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .world-card:hover, .btn:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Multi-page additions ---- */
[id] { scroll-margin-top: calc(var(--header) + 12px); }
.page-details { padding: 40px 0 64px; }
.more-explore { padding-top: 36px; }
.more-explore .world-title { margin-top: 0; }
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 16px;
  padding-bottom: 18px;
}
@media (max-width: 980px) {
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .page-details { padding: 22px 0 40px; }
}
@media (max-width: 640px) {
  .more-grid { grid-template-columns: 1fr; }
}

/* ---- Home: equal-size Explore cards ---- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  padding-bottom: 18px;
}
.hub-card { --cta: #3a5fc4; }
.hub-green  { --cta: #3f7a2a; }
.hub-blue   { --cta: #3a5fc4; }
.hub-purple { --cta: #6a3fc0; }
.hub-orange { --cta: #c8650f; }
.hub-brown  { --cta: #9a3a1a; }
.hub-card .art {
  aspect-ratio: 5 / 4;
  height: auto;
  object-fit: cover;
  object-position: center top;
}
.hub-card p {
  flex: 1 1 auto;
  min-height: calc(4.05em + 22px);
  padding: 14px 18px 8px;
  font-size: 14.5px;
}
.hub-cta {
  display: block;
  margin: 6px 16px 18px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--cta);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hub-card:hover .hub-cta, .hub-card:focus-visible .hub-cta { filter: brightness(1.12); }
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card p { min-height: 0; }
}

/* ---- Back to Home link on inner pages ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.back-link:hover, .back-link:focus-visible { background: rgba(255, 255, 255, 0.24); transform: translateX(-3px); }
.back-link.back-bottom { display: flex; width: fit-content; margin: 22px auto 0; }
@media (hover: none) { .back-link:hover { transform: none; } }
