/* ============================================================
   Sensor Squad World — a sky-world adventure design
   Golden-hour sky · chunky rounded type · charging signal trail
   hand-drawn squad characters · collectible cards
   ============================================================ */

:root {
  --ink:       #233049;
  --ink-soft:  #566183;
  --ink-faint: #8b93ab;

  --coral:      #FF7A59;
  --coral-deep: #F0603C;
  --sun:        #FFC64B;
  --cyan:       #2FB7E6;

  --card:  #FFFFFF;
  --cream: #FFFDF6;
  --line:  #ECE3D2;

  --shadow-soft: 0 16px 36px -20px rgba(35, 48, 73, 0.40);
  --shadow-pop:  0 30px 60px -26px rgba(35, 48, 73, 0.46);
  --shadow-sky:  0 24px 50px -24px rgba(54, 86, 120, 0.40);

  --r:    18px;
  --r-lg: 28px;
  --r-xl: 40px;
  --pill: 999px;

  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --pad: max(1.15rem, 5vw);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.6;
  font-weight: 600;
  background:
    linear-gradient(180deg,
      #BFE3F5 0%, #CFE8EF 18%, #E3F0E6 40%,
      #F2EFDD 64%, #FBE7CA 84%, #FCE3C0 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(255, 122, 89, 0.26); }

.skip-link {
  position: fixed; top: .7rem; left: .7rem; z-index: 300;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--pill);
  transform: translateY(-160%); transition: transform .18s ease; font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

/* ───────────────────── The sky (fixed world) ─────────────── */

.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sun {
  position: absolute; top: -7rem; right: -5rem; width: 34rem; height: 34rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,224,150,.9) 0%, rgba(255,214,120,.5) 34%, rgba(255,224,150,0) 66%);
}
.cloud { position: absolute; border-radius: 999px; background: rgba(255,255,255,.78); filter: blur(1px); box-shadow: 0 18px 40px -22px rgba(54,86,120,.5); }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 0; border-radius: 999px; background: inherit; }
.cloud-a { width: 12rem; height: 3.4rem; top: 13%; left: 7%; animation: drift 34s ease-in-out infinite; }
.cloud-a::before { width: 6rem; height: 6rem; left: 1.6rem; bottom: .4rem; }
.cloud-a::after  { width: 4.6rem; height: 4.6rem; right: 1.8rem; bottom: .6rem; }
.cloud-b { width: 8rem; height: 2.4rem; top: 30%; right: 12%; animation: drift 46s ease-in-out infinite reverse; opacity: .8; }
.cloud-b::before { width: 4rem; height: 4rem; left: 1rem; }
.cloud-b::after  { width: 3.2rem; height: 3.2rem; right: 1.2rem; }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22rem; opacity: .68; }
.sparkles { position: absolute; inset: 0; }
.sparkles i { position: absolute; width: .5rem; height: .5rem; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 1px rgba(255,255,255,.8); opacity: .7; animation: twinkle 4s ease-in-out infinite; }

/* ───────────────────── Squad characters ─────────────────── */
.squad-peek { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 12px 18px rgba(54,86,120,.28)); }
.peek-cloud { width: 8rem; height: auto; top: 1rem; left: -1.2rem; }
.peek-drop  { width: 3.6rem; height: auto; bottom: 6rem; left: 1rem; }

/* ───────────────────────── Header ────────────────────────── */

.world-header {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 1.2rem;
  padding: .7rem var(--pad);
  background: linear-gradient(180deg, rgba(207,232,243,.92), rgba(207,232,243,.55) 70%, rgba(207,232,243,0));
  backdrop-filter: blur(8px);
}
.logo { display: inline-flex; align-items: center; gap: .65rem; }
.logo-orb {
  display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 34% 28%, #cdeefb, #bfe3f5);
  box-shadow: 0 8px 16px -8px rgba(47,140,208,.7), inset 0 -3px 6px rgba(0,0,0,.08);
}
.logo-orb img { width: 100%; height: 100%; object-fit: cover; object-position: center 16%; }
.logo-orb.small { width: 2.4rem; height: 2.4rem; }
.logo-text { display: flex; flex-direction: column; line-height: 1.04; }
.logo-text strong { font-family: var(--display); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.logo-text em { font-style: normal; font-weight: 700; font-size: .72rem; color: var(--ink-soft); letter-spacing: .02em; }

.world-nav { display: flex; gap: 1.3rem; margin-left: auto; font-weight: 800; }
.world-nav a { color: var(--ink-soft); padding: .35rem .2rem; transition: color .15s ease; }
.world-nav a:hover { color: var(--ink); }
.header-go { padding: .55rem 1.1rem; font-size: .92rem; }
.header-support { padding: .55rem .95rem; font-size: .92rem; }
.header-support svg { width: .95em; height: .95em; }

/* ───────────────────────── Pills ─────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display);
  font-weight: 700; font-size: 1rem; padding: .7rem 1.3rem; border-radius: var(--pill);
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.pill svg { width: 1.15em; height: 1.15em; fill: currentColor; }
.pill.big { font-size: 1.12rem; padding: .92rem 1.7rem; }
.pill-coral { background: var(--coral); color: #fff; box-shadow: 0 14px 26px -12px rgba(255,122,89,.9); }
.pill-coral:hover { background: var(--coral-deep); transform: translateY(-3px); box-shadow: 0 20px 34px -12px rgba(240,96,60,.95); }
.pill-ghost { background: rgba(255,255,255,.82); color: var(--ink); box-shadow: var(--shadow-soft); }
.pill-ghost:hover { background: #fff; transform: translateY(-3px); }
.pill-sun {
  background: linear-gradient(135deg, var(--sun), #FFE082);
  color: #5a3d00;
  box-shadow: 0 14px 26px -12px rgba(255,198,75,.95);
}
.pill-sun:hover { transform: translateY(-3px); box-shadow: 0 20px 34px -12px rgba(255,198,75,1); }
.support-link svg { width: 1.05em; height: 1.05em; }

/* ───────────────────── Headings & kickers ────────────────── */

.kicker {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display);
  font-weight: 700; font-size: .9rem; color: #fff; background: rgba(47,183,230,.9);
  padding: .35rem .85rem; border-radius: var(--pill); box-shadow: 0 10px 20px -12px rgba(47,183,230,.9);
}
.kicker.dark { background: rgba(35,48,73,.9); box-shadow: none; }
.kicker .spark { color: var(--sun); }

.section-head { max-width: 44rem; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; color: var(--ink); margin: 0; line-height: 1.05; letter-spacing: -.005em; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); margin: 1rem 0 0; }
.section-sub { margin: .9rem 0 0; color: var(--ink-soft); font-size: 1.06rem; font-weight: 600; max-width: 40rem; }
.center .section-sub { margin-inline: auto; }

/* ───────────────────────── Hero ──────────────────────────── */

.hero {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--pad) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.hero-words { position: relative; z-index: 2; max-width: 35rem; }
.hero-words .kicker { margin-bottom: 1.2rem; }
#hero-title { font-size: clamp(2.6rem, 6vw, 4.5rem); }
#hero-title .wake { position: relative; color: var(--coral); white-space: nowrap; }
#hero-title .wake::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .18em; background: var(--sun); border-radius: 999px; z-index: -1; transform: rotate(-1.2deg); }
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.24rem); color: var(--ink-soft); margin: 1.3rem 0 1.8rem; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: .8rem; }

.badges { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; margin: 2rem 0 0; padding: 0; }
.badges li { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.8); border-radius: var(--pill); padding: .5rem .95rem .5rem .6rem; box-shadow: var(--shadow-soft); }
.badges .dot { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: #fff; font-size: .95rem; }
.badges b { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--ink); }
.badges span { color: var(--ink-soft); font-size: .9rem; font-weight: 700; }

.hero-scene { position: relative; min-height: 30rem; }
.floaters { position: absolute; inset: 0; }
.floater { position: absolute; margin: 0; aspect-ratio: 420 / 594; animation: bob 6s ease-in-out infinite; will-change: transform; }
.floater img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; border: 5px solid #fff; box-shadow: var(--shadow-sky); }
.floater .arc { position: absolute; width: 40%; height: 40%; border-radius: 50%; border: 3px solid rgba(47,183,230,.55); border-bottom-color: transparent; border-left-color: transparent; top: -10%; right: -8%; transform: rotate(-30deg); animation: ring 3s ease-out infinite; }
.floater:nth-child(1) { top: 5%;  left: 31%; z-index: 4; width: 40%; animation-delay: -.2s; }
.floater:nth-child(2) { top: 35%; left: 0%;  z-index: 3; width: 36%; animation-delay: -1.6s; }
.floater:nth-child(3) { top: 9%;  right: 0%; z-index: 3; width: 36%; animation-delay: -2.8s; }
.floater:nth-child(4) { top: 60%; right: 13%; z-index: 2; width: 33%; animation-delay: -3.8s; }

.scroll-cue { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); width: 1.7rem; height: 2.7rem; border: 3px solid rgba(35,48,73,.4); border-radius: 999px; display: grid; justify-items: center; padding-top: .4rem; }
.scroll-cue span { width: .4rem; height: .4rem; border-radius: 50%; background: var(--ink-soft); animation: cue 1.5s ease-in-out infinite; }

/* ───────────────────── Meet the Squad ────────────────────── */

.squad-section { max-width: var(--wrap); margin: clamp(1rem,3vw,2rem) auto; padding: 0 var(--pad); }
.squad-band {
  display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: clamp(1.5rem,4vw,3rem);
  align-items: center; background: rgba(255,255,255,.6); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-xl); padding: clamp(1.4rem,3.5vw,2.4rem);
  box-shadow: var(--shadow-soft);
}
.squad-intro h2 { font-size: clamp(1.6rem,3vw,2.3rem); margin: .8rem 0 0; }
.squad-intro p { margin: .7rem 0 0; color: var(--ink-soft); }
.squad-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 1.7rem 1rem; }
.squad-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.squad-medallion {
  width: 5rem; height: 5rem; border-radius: 50%; display: grid; place-items: center; margin-bottom: .65rem;
  overflow: hidden; background: #fff; border: 4px solid var(--c); box-shadow: var(--shadow-soft);
  font-family: var(--display); font-weight: 800; font-size: 1.8rem; color: var(--c);
  transition: transform .2s ease;
}
.squad-medallion svg { width: 70%; height: 70%; }
.squad-medallion img { width: 84%; height: 84%; object-fit: contain; object-position: center; }
.squad-card:hover .squad-medallion { animation: wiggle .55s ease; }
.squad-card strong { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.squad-card em { font-style: normal; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.squad-card.you .squad-medallion { color: var(--sun); }

/* ───────────── Squad: per-character life ───────────── */
.squad-card { position: relative; }
.squad-medallion { position: relative; z-index: 1; }

/* themed glow halo breathing behind every medallion */
.squad-card::before {
  content: ""; position: absolute; top: -.4rem; left: 50%; z-index: 0;
  width: 6.4rem; height: 6.4rem; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 44%, transparent), transparent 64%);
  opacity: 0; transform: translateX(-50%) scale(.8);
  animation: haloBreathe 4.6s ease-in-out infinite;
}
@keyframes haloBreathe {
  0%, 100% { opacity: 0;  transform: translateX(-50%) scale(.8); }
  50%      { opacity: .5; transform: translateX(-50%) scale(1.05); }
}

/* whole-illustration idle motion, tuned to each character's personality
   (shared by the squad medallions, the trail guides, and the lightbox guide) */
.squad-card[data-char] .squad-medallion img, .fam-guide, .lb-guide { will-change: transform; }
.squad-card[data-char="sammy"] .squad-medallion img,
.fam-guide[data-char="sammy"], .lb-guide[data-char="sammy"]                         { animation: idleSammy  4.2s ease-in-out infinite; }
.squad-card[data-char="gateway-gus"] .squad-medallion img,
.fam-guide[data-char="gateway-gus"], .lb-guide[data-char="gateway-gus"]             { animation: idleGus    5s   ease-in-out infinite; }
.squad-card[data-char="cloud-clara"] .squad-medallion img,
.fam-guide[data-char="cloud-clara"], .lb-guide[data-char="cloud-clara"]             { animation: idleClara  6s   ease-in-out infinite; }
.squad-card[data-char="light-lucy"] .squad-medallion img,
.fam-guide[data-char="light-lucy"], .lb-guide[data-char="light-lucy"]               { animation: idleLucy   3.4s ease-in-out infinite; }
.squad-card[data-char="temperature-terry"] .squad-medallion img,
.fam-guide[data-char="temperature-terry"], .lb-guide[data-char="temperature-terry"] { animation: idleTerry  3.8s ease-in-out infinite; }
.squad-card[data-char="motion-marley"] .squad-medallion img,
.fam-guide[data-char="motion-marley"], .lb-guide[data-char="motion-marley"]         { animation: idleMarley 1.7s ease-in-out infinite; }
.squad-card[data-char="moisture-maya"] .squad-medallion img,
.fam-guide[data-char="moisture-maya"], .lb-guide[data-char="moisture-maya"]         { animation: idleMaya   3.2s ease-in-out infinite; }
.squad-card.you .squad-medallion           { animation: idleLucy 2.8s ease-in-out infinite; }

/* let the hover wiggle read clearly */
.squad-card:hover .squad-medallion img { animation-play-state: paused; }
/* Lucy glows warmer + faster */
.squad-card[data-char="light-lucy"]::before { animation-duration: 2.6s; }

@keyframes idleSammy  { 0%,100%{transform:translateY(0) rotate(0)} 30%{transform:translateY(-2px) rotate(-4deg)} 65%{transform:translateY(-1px) rotate(4deg)} }
@keyframes idleGus    { 0%,82%,100%{transform:translateY(0) rotate(0)} 88%{transform:translateY(-5px) rotate(-3deg)} 94%{transform:translateY(0) rotate(2deg)} }
@keyframes idleClara  { 0%,100%{transform:translate(-3px,1px)} 50%{transform:translate(3px,-2px)} }
@keyframes idleLucy   { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
@keyframes idleTerry  { 0%,100%{transform:translateY(2px) scaleY(.98)} 50%{transform:translateY(-3px) scaleY(1.03)} }
@keyframes idleMarley { 0%,100%{transform:translateY(0) rotate(-3deg)} 50%{transform:translateY(-3px) rotate(3deg)} }
@keyframes idleMaya   { 0%,100%{transform:translateY(-1px) rotate(-3deg)} 50%{transform:translateY(2px) rotate(3deg)} }

/* special themed accents, in front of the medallion */
.squad-card[data-char="motion-marley"]::after,
.squad-card[data-char="moisture-maya"]::after,
.squad-card[data-char="gateway-gus"]::after { content: ""; position: absolute; z-index: 2; pointer-events: none; }

/* Marley — Wi-Fi ping radiating off his cap */
.squad-card[data-char="motion-marley"]::after {
  top: .15rem; left: 50%; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 2.5px solid var(--c); border-bottom-color: transparent; border-left-color: transparent;
  transform: translateX(-50%) rotate(-35deg) scale(.45);
  animation: pingRing 2.4s ease-out infinite;
}
@keyframes pingRing {
  0%   { transform: translateX(-50%) rotate(-35deg) scale(.4); opacity: .95; }
  70%  { opacity: 0; }
  100% { transform: translateX(-50%) rotate(-35deg) scale(1.8); opacity: 0; }
}

/* Maya — a droplet drips */
.squad-card[data-char="moisture-maya"]::after {
  top: 3.1rem; left: 50%; width: .5rem; height: .62rem; background: var(--c);
  border-radius: 50% 50% 50% 50% / 64% 64% 100% 100%;
  transform: translateX(-50%); opacity: 0;
  box-shadow: 0 2px 5px -1px color-mix(in srgb, var(--c) 55%, transparent);
  animation: dripFall 3.2s ease-in infinite;
}
@keyframes dripFall {
  0%   { transform: translateX(-50%) translateY(0)     scaleY(.7); opacity: 0; }
  16%  { transform: translateX(-50%) translateY(.1rem) scaleY(1.15); opacity: 1; }
  88%  { opacity: .85; }
  100% { transform: translateX(-50%) translateY(2.1rem) scaleY(1); opacity: 0; }
}

/* Gus — a data signal blips on his antenna */
.squad-card[data-char="gateway-gus"]::after {
  top: -.25rem; left: 50%; width: .8rem; height: .8rem; border-radius: 50%; background: var(--c);
  transform: translateX(-50%) scale(.4);
  box-shadow: 0 0 9px 2px color-mix(in srgb, var(--c) 70%, transparent);
  animation: blip 2.2s ease-in-out infinite;
}
@keyframes blip {
  0%, 100% { transform: translateX(-50%) scale(.4); opacity: .2; }
  50%      { transform: translateX(-50%) scale(1);  opacity: 1; }
}


/* ─────────────────────── The signal trail ────────────────── */

.trail-section { max-width: var(--wrap); margin: clamp(2rem,5vw,4rem) auto; padding: 0 var(--pad); }
.trail { position: relative; max-width: 60rem; margin: 3rem auto 0; }
.trail-spine {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 6px; transform: translateX(-50%);
  background: linear-gradient(180deg, #8B0000, #D84315, #795548, #2E7D32, #43A047, #FFC400, #1976D2, #7B1FA2, #C2185B, #546E7A, #0097A7);
  border-radius: 999px; opacity: .28;
}
.trail-charge {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(180deg, #8B0000, #D84315, #795548, #2E7D32, #43A047, #FFC400, #1976D2, #7B1FA2, #C2185B, #546E7A, #0097A7);
  clip-path: inset(0 0 calc(100% - var(--charge, 0%)) 0);
  transition: clip-path .15s linear;
}
.spark-head { position: absolute; left: 50%; top: var(--charge, 0%); width: 1.2rem; height: 1.2rem; transform: translate(-50%,-50%); border-radius: 50%; background: #fff; box-shadow: 0 0 16px 5px rgba(255,255,255,.95); transition: top .15s linear; }

.trail-stops { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3.2rem); position: relative; }
.stop { position: relative; display: grid; grid-template-columns: 1fr 5.5rem 1fr; align-items: center; gap: 1rem; }
.stop .node-wrap { grid-column: 2; display: grid; place-items: center; }
.stop .fam-card { grid-column: 1; }
.stop:nth-child(even) .fam-card { grid-column: 3; }

.node {
  position: relative; width: 5rem; height: 5rem; border-radius: 50%; display: grid; place-items: center;
  color: #fff; z-index: 2; background: var(--accent);
  box-shadow: 0 14px 26px -12px var(--accent), inset 0 -4px 8px rgba(0,0,0,.18);
  filter: saturate(.35) brightness(1.05); opacity: .8;
  transition: filter .35s ease, opacity .35s ease, transform .35s cubic-bezier(.2,1.6,.5,1);
}
.node.active { filter: none; opacity: 1; transform: scale(1.08); }
.node::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.node.active::after { animation: beacon 2.6s ease-out infinite; }
.node .n-num { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.node .n-wifi { position: absolute; top: .5rem; width: 1.1rem; height: 1.1rem; opacity: .9; }

.fam-card {
  position: relative; background: var(--card); border-radius: var(--r-lg); padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(35,48,73,.04); border-top: 5px solid var(--accent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fam-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.fam-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.fam-card h3 { font-size: 1.4rem; color: var(--accent); }
.fam-count { font-family: var(--display); font-weight: 700; font-size: .8rem; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, #fff); padding: .25rem .6rem; border-radius: var(--pill); }
.fam-card p { margin: .5rem 0 0; color: var(--ink-soft); font-size: .96rem; }
.fam-minis { display: flex; margin: 1rem 0 .2rem; }
.fam-minis img { width: 3rem; aspect-ratio: 420/594; object-fit: cover; border-radius: 8px; border: 3px solid #fff; box-shadow: var(--shadow-soft); margin-left: -.8rem; transition: transform .2s ease; }
.fam-minis img:first-child { margin-left: 0; }
.fam-card:hover .fam-minis img { transform: translateY(-2px); }
.fam-explore { margin-top: 1rem; display: inline-flex; align-items: center; gap: .4rem; font-family: var(--display); font-weight: 700; color: var(--accent); cursor: pointer; background: none; border: none; font-size: .98rem; padding: 0; }
.fam-explore svg { width: 1.05em; height: 1.05em; fill: currentColor; transition: transform .2s ease; }
.fam-explore:hover svg { transform: translateX(4px); }

/* per-world guide character standing on its card */
.fam-guide {
  position: absolute; top: -4.2rem; height: 4.7rem; width: auto; z-index: 4; pointer-events: none;
  filter: drop-shadow(0 8px 7px rgba(54,86,120,.28));
  animation: floaty 5s ease-in-out infinite;
}
.stop:nth-child(odd) .fam-guide { right: 1.3rem; }
.stop:nth-child(even) .fam-guide { left: 1.3rem; }
.fam-card:hover .fam-guide { animation: wiggle .6s ease; }
.fam-card p.fam-guide-name {
  margin: .2rem 0 .1rem; font-family: var(--display); font-weight: 700; font-size: .8rem;
  color: color-mix(in srgb, var(--accent) 68%, var(--ink));
}
.fam-guide-name strong { color: var(--accent); }

/* ───────────────────────── Library ───────────────────────── */

.library { padding: clamp(2.5rem, 6vw, 5rem) var(--pad); }
.library-sheet {
  max-width: var(--wrap); margin: 0 auto; background: rgba(255,255,255,.66); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-xl); padding: clamp(1.6rem, 4vw, 3rem); box-shadow: var(--shadow-sky);
}
.unlock-line b { color: var(--coral-deep); }

.controls { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin: 1.8rem 0 2rem; }
.finder { display: flex; align-items: center; gap: .6rem; flex: 1 1 16rem; background: #fff; border-radius: var(--pill); padding: .65rem 1.1rem; box-shadow: var(--shadow-soft); }
.finder svg { width: 1.2rem; height: 1.2rem; fill: var(--ink-faint); }
.finder input { border: none; background: none; font: inherit; font-weight: 600; color: var(--ink); width: 100%; }
.finder input:focus { outline: none; }
.finder input::placeholder { color: var(--ink-faint); font-weight: 600; }

.world-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-family: var(--display); font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .9rem .3rem .4rem; border-radius: var(--pill); cursor: pointer; border: 2px solid transparent; background: #fff; color: var(--ink-soft); box-shadow: var(--shadow-soft); transition: all .15s ease; }
.chip .swatch { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }
.chip-av { width: 1.65rem; height: 1.65rem; border-radius: 50%; object-fit: cover; object-position: center top; background: #fff; border: 1.5px solid var(--accent); flex: none; }
.chip-spark { width: 1.65rem; text-align: center; color: var(--accent); font-size: .95rem; line-height: 1; flex: none; }
.chip[aria-pressed="true"] .chip-av { border-color: rgba(255,255,255,.85); }
.chip.all { padding-left: .5rem; }
.chip.all[aria-pressed="true"] .chip-spark { color: #fff; }
.chip:hover { color: var(--ink); transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
.chip[aria-pressed="true"] .swatch { background: rgba(255,255,255,.9); }
.chip.all[aria-pressed="true"] { background: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem 1.3rem; perspective: 1000px; }
.card {
  position: relative; background: var(--cream); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-soft); cursor: pointer; transform-style: preserve-3d;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
}
.card:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: var(--shadow-pop); }
.card.tilt { transition: box-shadow .22s ease; }            /* JS drives transform while tilting */
.card .shine { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background: radial-gradient(circle at var(--gx,50%) var(--gy,0%), rgba(255,255,255,.55), rgba(255,255,255,0) 45%); }
.card.tilt .shine { opacity: 1; }
.card .cover { position: relative; aspect-ratio: 420 / 594; overflow: hidden; background: var(--light); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.card:hover .cover img { transform: scale(1.05); }
.ribbon { position: absolute; top: .7rem; left: .7rem; z-index: 2; display: inline-flex; align-items: center; gap: .3rem; font-family: var(--display); font-weight: 700; font-size: .74rem; padding: .3rem .65rem; border-radius: var(--pill); backdrop-filter: blur(4px); }
.ribbon.unlocked { background: var(--sun); color: #5a3d00; }
.ribbon.locked { background: rgba(35,48,73,.6); color: #fff; }
.ribbon svg { width: .9em; height: .9em; fill: currentColor; }
.card .info { padding: .9rem 1rem 1.1rem; border-top: 4px solid var(--accent); }
.stamp { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--display); font-weight: 700; font-size: .72rem; color: #fff; background: var(--accent); padding: .2rem .55rem; border-radius: var(--pill); margin-bottom: .5rem; }
.card h3 { font-size: 1.12rem; line-height: 1.1; }
.card .sub { margin: .35rem 0 0; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .8rem; font-size: .85rem; }
.card .row .world { color: var(--ink-faint); font-weight: 700; }
.card .row .go { font-family: var(--display); font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: .3rem; }
.card .row .go svg { width: 1em; height: 1em; fill: currentColor; }
.card .row .soon { color: var(--ink-faint); font-weight: 700; }

.empty { grid-column: 1/-1; text-align: center; padding: 3rem 1rem; color: var(--ink-faint); font-size: 1.1rem; font-weight: 700; }

/* ───────────────────── Every explorer welcome ────────────── */

.welcome { padding: clamp(2rem, 5vw, 4rem) var(--pad) clamp(3rem, 6vw, 5rem); }
.welcome-blob { position: relative; max-width: 52rem; margin: 0 auto; text-align: center; background: linear-gradient(160deg, #fff, #FFF4E2); border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.6rem); box-shadow: var(--shadow-sky); overflow: hidden; }
.welcome-blob::before { content: ""; position: absolute; top: -6rem; right: -6rem; width: 14rem; height: 14rem; border-radius: 50%; background: radial-gradient(circle, rgba(255,198,75,.5), transparent 70%); }
.welcome-pal { position: absolute; width: 4.4rem; height: auto; left: 1.6rem; bottom: 1.2rem; filter: drop-shadow(0 10px 14px rgba(54,86,120,.25)); animation: floaty 6s ease-in-out infinite; }
.welcome-blob .kicker { background: var(--coral); box-shadow: none; }
.welcome-blob h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 1rem 0 0; }
.welcome-blob p { margin: 1.1rem auto 0; color: var(--ink-soft); max-width: 38rem; font-size: 1.06rem; }
.welcome-blob strong { color: var(--ink); }
.welcome-meta { font-size: 1rem; }
.welcome-buttons { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.8rem; }
.welcome-blob .support-note {
  margin-top: 1.1rem;
  max-width: 37rem;
  color: var(--ink-faint);
  font-size: .92rem;
  line-height: 1.45;
}

/* ───────────────────────── Footer ────────────────────────── */

.world-footer { background: linear-gradient(180deg, transparent, rgba(58,86,120,.16)); padding: 2.5rem var(--pad) 3rem; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand strong { font-family: var(--display); font-weight: 800; }
.footer-brand p { margin: .1rem 0 0; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.footer-credit { color: var(--ink-soft); font-weight: 700; font-size: .92rem; margin: 0; text-align: right; }
.footer-credit a { color: var(--coral-deep); }
.footer-credit a:hover { text-decoration: underline; }
/* ───────────────────────── Lightbox ──────────────────────── */

.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 1.2rem; }
.lightbox[hidden] { display: none; }
.lb-scrim { position: absolute; inset: 0; background: rgba(28,40,62,.55); backdrop-filter: blur(7px); animation: fade .2s ease; }
.lb-card { position: relative; width: min(54rem, 100%); max-height: 92vh; overflow: auto; background: var(--cream); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); animation: pop .28s cubic-bezier(.2,.9,.2,1); }
.lb-close { position: absolute; top: .9rem; right: .9rem; z-index: 3; width: 2.5rem; height: 2.5rem; border: none; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-soft); transition: transform .15s ease; }
.lb-close:hover { transform: rotate(90deg); }
.lb-close svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.lb-body { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.lb-scene { position: relative; background: var(--light); padding: 1.8rem; display: grid; place-items: center; }
.lb-scene::before, .lb-scene::after { content: ""; position: absolute; border-radius: 50%; border: 2px solid var(--accent); opacity: .35; }
.lb-scene::before { width: 7rem; height: 7rem; top: 1.4rem; left: 1.4rem; }
.lb-scene::after { width: 4rem; height: 4rem; bottom: 1.6rem; right: 1.8rem; }
.lb-scene .lb-cover-img { position: relative; width: 100%; max-width: 17rem; border-radius: 14px; border: 6px solid #fff; box-shadow: var(--shadow-pop); }
.lb-guide-wrap { position: absolute; right: .5rem; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; animation: greetIn .62s cubic-bezier(.18,1.55,.4,1) both; }
.lb-guide { height: 6rem; width: auto; transform-origin: bottom center; filter: drop-shadow(0 8px 8px rgba(54,86,120,.32)); animation: wave 2.4s ease-in-out infinite; }
.lb-bubble { position: relative; margin-bottom: .4rem; max-width: 10.5rem; background: #fff; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: .78rem; line-height: 1.22; text-align: right; padding: .4rem .75rem; border-radius: 13px; box-shadow: var(--shadow-soft); animation: bubblePop .42s ease both .3s; }
.lb-bubble-name { display: block; color: var(--accent); }
.lb-bubble::after { content: ""; position: absolute; right: 1.1rem; bottom: -5px; border: 5px solid transparent; border-top-color: #fff; }
@keyframes wave { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg); } }
@keyframes greetIn { 0% { opacity: 0; transform: translateY(28px) scale(.7); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes bubblePop { 0% { opacity: 0; transform: translateY(7px) scale(.7); } 100% { opacity: 1; transform: none; } }
.lb-info { padding: clamp(1.5rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; }
.lb-stamp { align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; font-family: var(--display); font-weight: 700; font-size: .8rem; color: #fff; background: var(--accent); padding: .3rem .75rem; border-radius: var(--pill); }
.lb-info .label { margin: 1rem 0 .1rem; color: var(--ink-faint); font-weight: 800; font-size: .85rem; }
.lb-info h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.lb-info .sub { margin: .5rem 0 0; color: var(--ink-soft); font-size: 1.05rem; }
.lb-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0; }
.lb-tags span { background: #fff; border-radius: var(--pill); padding: .35rem .8rem; font-size: .85rem; font-weight: 700; color: var(--ink-soft); box-shadow: var(--shadow-soft); }
.lb-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; }
.lb-note { margin: .9rem 0 0; color: var(--ink-faint); font-size: .88rem; font-weight: 600; }

/* ─────────── Trail life: scene tint · rider · world glow ─────────── */

.trail-scene {
  position: absolute; inset: -2rem -12vw; z-index: -1; pointer-events: none; color: transparent;
  background: radial-gradient(58% 46% at 50% 42%, currentColor, transparent 72%);
  transition: color .6s ease;
}
.trail-rider {
  position: absolute; left: 50%; top: var(--charge, 0%); width: 2.7rem; height: 3.4rem; z-index: 3;
  pointer-events: none; filter: drop-shadow(0 3px 6px rgba(54,86,120,.4)) drop-shadow(0 0 9px rgba(255,255,255,.9));
  transition: top .15s linear; animation: riderBob 1.7s ease-in-out infinite;
}
.trail-rider svg, .trail-rider img { width: 100%; height: 100%; object-fit: contain; }
.stop::before {
  content: ""; position: absolute; inset: -1.1rem -2.4rem; z-index: -1; pointer-events: none; border-radius: 2.4rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
  opacity: 0; transition: opacity .55s ease;
}
.stop.current::before { opacity: .9; }

/* ─────────── Intro: the world wakes up on load ─────────── */

.hero-words .kicker { animation: introUp .6s both .05s; }
#hero-title          { animation: introUp .65s both .14s; }
.hero-sub            { animation: introUp .6s both .26s; }
.hero-buttons        { animation: introUp .6s both .36s; }
.badges              { animation: introUp .6s both .46s; }
.floaters            { animation: sceneIn .85s both .2s; }
.peek-cloud { animation: charWake .7s both .5s, floaty 7s ease-in-out 1.25s infinite; }
.peek-drop  { animation: charWake .7s both .66s, floaty 5.5s ease-in-out 1.4s infinite; }

/* ───────────────────────── Reveal ────────────────────────── */

.reveal { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ───────────────────────── Keyframes ─────────────────────── */

@keyframes bob { 0%,100% { transform: translateY(-7px) rotate(-1.4deg); } 50% { transform: translateY(7px) rotate(1.4deg); } }
@keyframes floaty { 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
@keyframes drift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(3rem); } }
@keyframes twinkle { 0%,100% { opacity: .15; transform: scale(.7); } 50% { opacity: .9; transform: scale(1.1); } }
@keyframes ring { 0% { transform: rotate(-30deg) scale(.6); opacity: .9; } 100% { transform: rotate(-30deg) scale(1.4); opacity: 0; } }
@keyframes beacon { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: .3; } 50% { transform: translateY(.7rem); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

@keyframes introUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes sceneIn { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes charWake { 0% { opacity: 0; transform: scale(.3) rotate(-12deg); } 60% { opacity: 1; transform: scale(1.12) rotate(6deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes wiggle { 0% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-6px) rotate(-9deg); } 50% { transform: translateY(-4px) rotate(7deg); } 75% { transform: translateY(-6px) rotate(-4deg); } 100% { transform: translateY(-3px) rotate(0); } }
@keyframes riderBob { 0%,100% { transform: translate(40%,-50%) rotate(-7deg); } 50% { transform: translate(62%,-50%) rotate(7deg); } }

/* ───────────────────────── Responsive ────────────────────── */

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .hero-words { max-width: none; }
  .hero-scene { order: -1; min-height: 22rem; }
  .scroll-cue { display: none; }
  .squad-band { grid-template-columns: 1fr; }
  .lb-body { grid-template-columns: 1fr; }
  .lb-scene { padding: 1.6rem 1.6rem .4rem; }
}

@media (max-width: 760px) {
  .world-nav { display: none; }
  .header-support { display: none; }
  .header-go { margin-left: auto; }
  .peek-cloud { width: 5rem; height: auto; top: .2rem; }
  .peek-drop, .welcome-pal { display: none; }
  .trail-spine, .trail-charge { left: 1.75rem; right: auto; width: 6px; }
  .trail-charge { inset: 0 auto 0 0; }
  .spark-head { left: 1.75rem; }
  .trail-rider { display: none; }
  .stop:nth-child(odd) .fam-guide, .stop:nth-child(even) .fam-guide { left: auto; right: .8rem; height: 3.8rem; top: -3.4rem; }
  .stop { grid-template-columns: 3.5rem 1fr; gap: .8rem; }
  .stop .node-wrap { grid-column: 1; }
  .stop .fam-card, .stop:nth-child(even) .fam-card { grid-column: 2; }
  .node { width: 3.5rem; height: 3.5rem; }
  .node .n-num { font-size: 1.1rem; }
  .node .n-wifi { display: none; }
  .footer-credit { text-align: left; }
}

@media (max-width: 560px) {
  .squad-list { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .chip { font-size: .9rem; padding: .45rem 1rem .45rem .45rem; }
  .finder { padding: .8rem 1.1rem; }
  .hero-buttons .pill.big, .welcome-buttons .pill.big { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 460px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 1rem .8rem; }
  .header-go { display: none; }
  .floater:nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .trail-charge { transition: none; }

  /* Keep the squad gently alive — subtle, non-parallax character motion is safe */
  .squad-card[data-char="sammy"] .squad-medallion img,
  .fam-guide[data-char="sammy"], .lb-guide[data-char="sammy"]                         { animation: idleSammy  4.2s ease-in-out infinite !important; }
  .squad-card[data-char="gateway-gus"] .squad-medallion img,
  .fam-guide[data-char="gateway-gus"], .lb-guide[data-char="gateway-gus"]             { animation: idleGus    5s   ease-in-out infinite !important; }
  .squad-card[data-char="cloud-clara"] .squad-medallion img,
  .fam-guide[data-char="cloud-clara"], .lb-guide[data-char="cloud-clara"]             { animation: idleClara  6s   ease-in-out infinite !important; }
  .squad-card[data-char="light-lucy"] .squad-medallion img,
  .fam-guide[data-char="light-lucy"], .lb-guide[data-char="light-lucy"]               { animation: idleLucy   3.4s ease-in-out infinite !important; }
  .squad-card[data-char="temperature-terry"] .squad-medallion img,
  .fam-guide[data-char="temperature-terry"], .lb-guide[data-char="temperature-terry"] { animation: idleTerry  3.8s ease-in-out infinite !important; }
  .squad-card[data-char="motion-marley"] .squad-medallion img,
  .fam-guide[data-char="motion-marley"], .lb-guide[data-char="motion-marley"]         { animation: idleMarley 1.7s ease-in-out infinite !important; }
  .squad-card[data-char="moisture-maya"] .squad-medallion img,
  .fam-guide[data-char="moisture-maya"], .lb-guide[data-char="moisture-maya"]         { animation: idleMaya   3.2s ease-in-out infinite !important; }
  .squad-card.you .squad-medallion           { animation: idleLucy 2.8s ease-in-out infinite !important; }
  .squad-card::before { animation: haloBreathe 4.6s ease-in-out infinite !important; }
  .squad-card[data-char="light-lucy"]::before { animation: haloBreathe 2.6s ease-in-out infinite !important; }
  .squad-card[data-char="motion-marley"]::after { animation: pingRing 2.4s ease-out infinite !important; }
  .squad-card[data-char="moisture-maya"]::after { animation: dripFall 3.2s ease-in infinite !important; }
  .squad-card[data-char="gateway-gus"]::after { animation: blip 2.2s ease-in-out infinite !important; }
  .lb-guide-wrap { animation: greetIn .62s cubic-bezier(.18,1.55,.4,1) both !important; }
  .lb-bubble { animation: bubblePop .42s ease both .3s !important; }
}
