/* ===========================================================
   PIKOPALS — token system
   Color: cream base, ink text, lavender primary, sunshine accent,
          plum contrast, pink-lilac highlight
   Type: Baloo 2 (display) / Inter (body) / Space Mono (HUD/stats)
   =========================================================== */

:root {
  --cream:        #FBF6EC;
  --cream-deep:   #F3EBDA;
  --ink:          #2E2540;
  --lavender:     #9B87E8;
  --lavender-dk:  #7A63D6;
  --sunshine:     #FFD166;
  --plum:         #4A3B6B;
  --lilac:        #E8C5F0;
  --line:         rgba(46, 37, 64, 0.12);

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Space Mono', monospace;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --shadow-soft: 0 8px 24px rgba(74, 59, 107, 0.12);
  --shadow-pop:  0 4px 0 var(--plum);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  color: var(--plum);
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

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

/* ===== NAV ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 236, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--plum);
}

.nav__sprite {
  width: 26px;
  height: 26px;
  background: var(--lavender);
  border-radius: 40% 40% 45% 45% / 50% 50% 40% 40%;
  display: inline-block;
  position: relative;
  box-shadow: inset 0 -4px 0 rgba(74,59,107,0.18);
}
.nav__sprite::before, .nav__sprite::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  background: var(--ink);
  border-radius: 50%;
  top: 9px;
}
.nav__sprite::before { left: 6px; }
.nav__sprite::after { right: 6px; }

.nav__links { display: flex; gap: 18px; font-size: 1.1rem; }
.nav__links a { text-decoration: none; opacity: 0.75; transition: opacity .15s; }
.nav__links a:hover { opacity: 1; }

/* ===== HERO ===== */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(48px, 10vh, 110px) clamp(20px, 6vw, 56px) 0;
  overflow: hidden;
}

.hero__trail {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
}

.walker {
  position: absolute;
  top: 0;
  left: -40px;
  width: 22px;
  height: 22px;
  background: var(--lavender);
  border-radius: 40% 40% 45% 45% / 50% 50% 40% 40%;
  animation: walk 7s linear infinite;
}
.walker::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 50%;
  width: 4px; height: 4px;
  background: var(--lavender);
  opacity: 0.4;
  border-radius: 50%;
  box-shadow:
    -14px 4px 0 -1px rgba(155,135,232,0.3),
    -28px 2px 0 -1.5px rgba(155,135,232,0.22),
    -42px 5px 0 -1.5px rgba(155,135,232,0.15);
}

@keyframes walk {
  0%   { left: -5%; transform: translateY(0); }
  25%  { transform: translateY(-6px); }
  50%  { transform: translateY(0); }
  75%  { transform: translateY(-6px); }
  100% { left: 105%; transform: translateY(0); }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--lavender-dk);
  margin: 0 0 18px;
}

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.hero__sub {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 1.08rem;
  color: var(--ink);
  opacity: 0.8;
}

.hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 34px 0 50px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 100px;
  display: inline-block;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn--primary {
  background: var(--sunshine);
  color: var(--plum);
  box-shadow: var(--shadow-pop);
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); box-shadow: 0 2px 0 var(--plum); }

.btn--ghost {
  background: transparent;
  color: var(--plum);
  border: 2px solid var(--plum);
}
.btn--ghost:hover { background: var(--plum); color: var(--cream); }

.btn--lg { font-size: 1.1rem; padding: 16px 32px; }

/* Ticker */
.ticker {
  background: var(--plum);
  color: var(--cream);
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
  margin: 0 calc(-1 * clamp(20px, 6vw, 56px));
}
.ticker__track {
  display: inline-flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  animation: scroll-left 26s linear infinite;
  padding-left: 100%;
}
.ticker__track span { opacity: 0.9; }
@keyframes scroll-left {
  to { transform: translateX(-100%); }
}

/* ===== WHO ===== */
.who {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 120px) clamp(20px, 6vw, 56px) 50px;
}

.who__art {
  position: relative;
  height: 280px;
}

.placeholder-pal {
  position: absolute;
  border-radius: 42% 42% 46% 46% / 55% 55% 38% 38%;
  box-shadow: var(--shadow-soft);
}
.placeholder-pal::before, .placeholder-pal::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  top: 38%;
}
.placeholder-pal::before { left: 30%; }
.placeholder-pal::after { right: 30%; }

.placeholder-pal--1 {
  width: 150px; height: 150px;
  background: var(--lavender);
  top: 10px; left: 30px;
  transform: rotate(-6deg);
}
.placeholder-pal--2 {
  width: 110px; height: 110px;
  background: var(--sunshine);
  top: 100px; left: 190px;
  transform: rotate(8deg);
}
.placeholder-pal--3 {
  width: 90px; height: 90px;
  background: var(--lilac);
  top: 0; left: 230px;
  transform: rotate(-10deg);
}

.who__copy h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 16px; }
.who__copy p { opacity: 0.82; margin: 0 0 12px; }

.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
  background: var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: 30px 20px;
}

.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--lavender-dk);
}
.stat__label {
  font-size: 0.82rem;
  opacity: 0.7;
  text-transform: lowercase;
}

/* ===== GALLERY ===== */
.gallery {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px clamp(20px, 6vw, 56px) 80px;
  text-align: center;
}
.gallery h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.gallery__sub { opacity: 0.7; margin: 10px 0 36px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  perspective: 1000px;
  height: 230px;
  cursor: pointer;
}
.card__inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.5s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.card:hover .card__inner,
.card:focus-visible .card__inner {
  transform: rotateY(180deg);
}
.card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.card__face--front {
  background: var(--cream-deep);
  border: 1px solid var(--line);
}
.card__face--back {
  background: var(--lavender);
  color: var(--cream);
  transform: rotateY(180deg);
}
.card__art {
  width: 80px; height: 80px;
  background: var(--lavender);
  border-radius: 42% 42% 46% 46% / 55% 55% 38% 38%;
  margin-bottom: 14px;
  position: relative;
}
.card__art::before, .card__art::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
  top: 36%;
}
.card__art::before { left: 28%; }
.card__art::after { right: 28%; }
.card__art--alt { background: var(--sunshine); }
.card__art--alt2 { background: var(--lilac); }

.card__name { font-family: var(--font-mono); font-size: 0.85rem; opacity: 0.7; }
.card__note { font-size: 0.92rem; font-style: italic; line-height: 1.4; }

.gallery__note { margin-top: 30px; font-size: 0.85rem; opacity: 0.5; font-style: italic; }

/* ===== TRAIL MAP ===== */
.trail {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px clamp(20px, 6vw, 56px) 90px;
  text-align: center;
}
.trail h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.trail__sub { opacity: 0.7; margin: 10px 0 50px; }

.trail__map {
  position: relative;
  text-align: left;
}

.trail__path {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100%;
  z-index: 0;
}

.stop {
  position: relative;
  z-index: 1;
  width: 46%;
  background: var(--cream-deep);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 60px;
  box-shadow: var(--shadow-soft);
}
.stop--1, .stop--3 { margin-left: 0; }
.stop--2, .stop--4 { margin-left: 54%; }

.stop__marker {
  font-size: 1.6rem;
  display: inline-block;
  margin-bottom: 8px;
}
.stop h3 { font-size: 1.2rem; margin-bottom: 6px; }
.stop p { font-size: 0.92rem; opacity: 0.78; margin: 0; }

/* ===== FAQ ===== */
.faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px clamp(20px, 6vw, 56px) 90px;
}
.faq h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); text-align: center; margin-bottom: 36px; }

.accordion__item {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.accordion__item summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--plum);
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--lavender-dk);
  transition: transform 0.2s;
}
.accordion__item[open] summary::after { transform: rotate(45deg); }
.accordion__item p { margin: 14px 0 0; opacity: 0.8; }
.accordion__item a { color: var(--lavender-dk); font-weight: 600; }

/* ===== JOIN ===== */
.join {
  text-align: center;
  background: var(--plum);
  color: var(--cream);
  padding: clamp(60px, 10vh, 110px) clamp(20px, 6vw, 56px);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.join h2 { color: var(--cream); font-size: clamp(2rem, 5vw, 3rem); }
.join p { opacity: 0.8; max-width: 420px; margin: 14px auto 30px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--plum);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px clamp(20px, 6vw, 56px) 36px;
  flex-wrap: wrap;
  gap: 14px;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
}
.footer .nav__sprite { background: var(--sunshine); }
.footer .nav__sprite::before, .footer .nav__sprite::after { background: var(--plum); }
.footer__links { display: flex; gap: 16px; }
.footer__links a { text-decoration: none; opacity: 0.8; }
.footer__copy { width: 100%; text-align: center; font-size: 0.78rem; opacity: 0.55; order: 3; }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .who { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stop, .stop--1, .stop--2, .stop--3, .stop--4 {
    width: 100%;
    margin-left: 0;
  }
  .trail__path { left: 14px; transform: none; width: 40px; }
  .trail__map { padding-left: 40px; }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: 1fr; }
}
