/* ============================================================
   Home, Planet & Hunters - Shared Stylesheet
   ============================================================ */

:root {
  --bg:          #313d41;
  --bg-dark:     #222c30;
  --bg-card:     #283035;
  --text:        #ffffff;
  --text-muted:  #b0bcc0;
  --accent:      #efb071;
  --accent-dark: #34606d;
  --content-width: 1024px;
  --content-gutter: 1rem;
  --max-width: var(--content-width);
  --radius:      6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-logo img {
  height: 44px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link, .nav-btn {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-link:hover, .nav-btn:hover { background: rgba(255,255,255,0.1); }

.nav-btn .chevron {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.nav-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 0.4rem 0;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 100;
}
.dropdown.open { display: block; }

.dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: background 0.15s;
}
.dropdown a:hover { background: rgba(255,255,255,0.08); }
.dropdown a.active { color: var(--accent); }

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ============================================================
   DIVIDER STRIPE
   ============================================================ */
.section-divider {
  width: 100%;
  height: 18px;
  display: flex;
}
.section-divider img {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   COMMON SECTION
   ============================================================ */
/* Site content column — 1024px design width (all main content, not header/footer) */
body .page-content,
body .section-inner,
body .char-section-inner,
body .char-section > .char-section-inner,
body .char-hero > .page-content,
body .char-hero > .char-hero-inner,
body .char-hero > .char-stats,
body .char-hero > .char-tab-bar,
body .blog-header,
body .blog-hero,
body .blog-video,
body .blog-content,
body .blog-nav {
  box-sizing: border-box;
  width: min(1024px, 100%);
  max-width: 1024px;
  margin-inline: auto;
}

body .page-content,
body .char-section-inner,
body .char-section > .char-section-inner,
body .char-hero > .page-content,
body .char-hero > .char-hero-inner,
body .char-hero > .char-stats,
body .char-hero > .char-tab-bar {
  padding-inline: 0;
}

body .section-inner,
body .blog-header,
body .blog-hero,
body .blog-video,
body .blog-content,
body .blog-nav {
  padding-inline: var(--content-gutter);
}

@media (max-width: 1023px) {
  body .page-content,
  body .section-inner,
  body .char-section-inner,
  body .char-section > .char-section-inner,
  body .char-hero > .page-content,
  body .char-hero > .char-hero-inner,
  body .char-hero > .char-stats,
  body .char-hero > .char-tab-bar,
  body .blog-header,
  body .blog-hero,
  body .blog-video,
  body .blog-content,
  body .blog-nav {
    padding-inline: var(--content-gutter);
  }
}

.site-section {
  padding: 4rem 0;
}

.section-title {
  font-style: italic;
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ============================================================
   ABOUT THE GAME
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius);
  width: 100%;
}

.about-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-description {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  padding: 0;
  line-height: 0;
  border-radius: var(--radius);
  transition: opacity 0.2s;
}
.download-btn:hover { opacity: 0.85; }

/* Match live Squarespace block sizes (measured on homeplanethunters.com) */
.download-buttons img { max-width: none; }
.download-btn--google img { width: auto; height: 70px; }
.download-btn--apple img { width: 136px; height: auto; }
.download-btn--taptap {
  width: 120px;
  height: 44px;
  margin-left: 15px;
  overflow: hidden;
  justify-content: center;
}

.download-btn--taptap img {
  width: 120px;
  height: 120px;
  max-width: none;
  flex-shrink: 0;
}

/* ============================================================
   SCREENSHOTS CAROUSEL
   ============================================================ */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  user-select: none;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

.carousel-track img {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background: #1a2225;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s;
  z-index: 5;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.carousel-dot.active { background: var(--accent); }

/* ============================================================
   INFORMATION (NEWS + VIDEOS)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 2.5rem;
  row-gap: 1.25rem;
  align-items: stretch;
}

.info-grid > div {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
}

.info-col-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0;
  font-weight: 600;
}

.card-list {
  display: contents;
}

.card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  min-height: 100%;
  align-items: stretch;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background 0.15s;
  cursor: pointer;
}
.card:hover { background: #2f3a3e; }

.card-thumb {
  width: 120px;
  height: 100%;
  min-height: 80px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-body {
  padding: 0.6rem 0.75rem 0.6rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

.card-excerpt {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   CHARACTERS & BOSSES
   ============================================================ */
.chars-bosses-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.chars-bosses-col-title {
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.sprite-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.sprite-item {
  text-align: center;
  color: inherit;
  display: block;
}

a.sprite-item {
  cursor: pointer;
  text-decoration: none;
}

.sprite-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

a.sprite-item:hover img {
  border-color: var(--accent);
  transform: scale(1.04);
}

.sprite-name {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   SOCIAL MEDIA
   ============================================================ */
.social-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.social-mascot img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.social-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  transition: opacity 0.2s, transform 0.2s;
}
.social-link:hover { opacity: 0.85; transform: scale(1.04); }
.social-link img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-dark);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.5rem; }

/* ============================================================
   BLOG POST PAGE
   ============================================================ */
.blog-header {
  padding-block: 3rem 2rem;
  text-align: center;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.blog-hero {
  margin-bottom: 2rem;
}
.blog-hero img {
  width: 100%;
  border-radius: var(--radius);
}

.blog-video {
  margin-bottom: 2rem;
}

.blog-video-inner {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a2225;
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-video video {
  width: 100%;
  height: 100%;
  display: block;
}

.blog-content {
  padding-bottom: 4rem;
  font-size: 0.9rem;
  line-height: 1.85;
  color: #d0dce0;
}

.blog-content p { margin-bottom: 1rem; }
.blog-content h2 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 2rem 0 0.75rem;
}
.blog-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.blog-content ul li { margin-bottom: 0.4rem; }
.blog-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.blog-nav {
  padding-block: 1.5rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.blog-nav a { color: var(--accent); }
.blog-nav a:hover { text-decoration: underline; }

/* ============================================================
   CHARACTER DETAIL PAGE
   ============================================================ */
.char-hero {
  background: var(--bg-dark);
  padding-block: 3rem 2rem;
  padding-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-hero-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.char-portrait {
  text-align: center;
}

.char-portrait img {
  width: 100%;
  max-width: 260px;
  border-radius: var(--radius);
  border: 2px solid rgba(239,176,113,0.35);
  background: #1a2225;
}

.char-name {
  font-size: 3.5rem;
  font-style: italic;
  color: var(--accent);
  opacity: 0.9;
  line-height: 1;
  margin-bottom: 1.25rem;
}

.char-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.char-bio p + p { margin-top: 0.75rem; }

.char-stats {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
  font-size: 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.25rem;
}

.char-stats p strong { color: var(--accent); }

.char-tab-bar {
  margin-top: 1.75rem;
  display: flex;
  gap: 1rem;
}

.btn-tab {
  display: inline-block;
  padding: 0.55rem 1.75rem;
  background: var(--accent);
  color: #222;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-radius: 99px;
  transition: opacity 0.2s;
}

.btn-tab:hover { opacity: 0.82; }

.char-section {
  padding-block: 3rem;
  padding-inline: 0;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-section + .char-section { padding-top: 0; }

.char-section-title {
  font-style: italic;
  font-size: 1.4rem;
  text-align: center;
  color: var(--accent);
  margin-bottom: 2rem;
  padding: 0.75rem 1rem;
  background: var(--bg-dark);
  border-radius: var(--radius);
}

/* Talent cards — single column @ content width (matches Squarespace) */
.talent-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.talent-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1rem;
  overflow: hidden;
}

.talent-card-body {
  display: grid;
  grid-template-columns: minmax(200px, 36%) 1fr;
  gap: 1.25rem;
  align-items: start;
}

.talent-info {
  grid-column: 2;
  grid-row: 1;
}

.talent-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.talent-skill-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0,0,0,0.25);
}

.talent-card h3 {
  font-size: 1rem;
  color: var(--accent);
  margin: 0;
}

.talent-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.talent-mods h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: 0.45rem;
}

.talent-mod-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.talent-mod-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.talent-mod-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.talent-mod-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.talent-preview {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
}

.talent-skill-gif {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Equipment sets */
.equip-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.equip-set {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

.equip-set-layout {
  display: grid;
  grid-template-columns: minmax(160px, 28%) 1fr;
  gap: 0;
}

.equip-set-visual {
  background: rgba(0,0,0,0.22);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.equip-set-portrait {
  width: 100%;
  max-width: 180px;
  margin-bottom: 0.65rem;
}

.equip-set-outfit {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.equip-slot-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  max-width: 56px;
  margin-bottom: 0.65rem;
}

.equip-slot-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
}

.equip-set-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.35;
}

.equip-weapon-panel {
  padding: 1rem 1.1rem;
}

.equip-weapon-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.equip-weapon-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
}

.equip-weapon-panel h4 {
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0;
}

.equip-star-skill {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.equip-star-skill summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.equip-star-skill summary::-webkit-details-marker { display: none; }

.equip-star-toggle::before {
  content: "+";
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1;
}

.equip-star-skill[open] .equip-star-toggle::before {
  content: "−";
}

.equip-star-body {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 42%);
  gap: 1rem;
  padding-bottom: 1rem;
  align-items: start;
}

.equip-star-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.equip-star-preview {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.equip-skill-gif {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }

  .about-layout,
  .info-grid,
  .chars-bosses-layout,
  .social-layout {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-rows: none;
  }

  .info-grid > div {
    display: block;
    grid-row: auto;
  }

  .info-col-title {
    margin-bottom: 1rem;
  }

  .card-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .social-mascot { display: none; }

  .sprite-grid { grid-template-columns: repeat(4, 1fr); }

  .card { grid-template-columns: 100px 1fr; }
  .card-thumb { width: 100px; height: 70px; }

  .blog-title { font-size: 1.4rem; }

  .char-hero-inner { grid-template-columns: 1fr; }
  .char-portrait { display: flex; justify-content: center; }
  .char-name { font-size: 2.4rem; }

  .talent-card-body,
  .equip-star-body {
    grid-template-columns: 1fr;
  }

  .talent-preview,
  .talent-info {
    grid-column: auto;
    grid-row: auto;
  }

  .talent-preview {
    min-height: 100px;
  }

  .equip-set-layout {
    grid-template-columns: 1fr;
  }

  .equip-set-visual {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .equip-slot-list {
    flex-direction: row;
    max-width: none;
  }

  .mobile-nav {
    display: flex !important;
    flex-direction: column;
    background: var(--bg-dark);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .mobile-nav a {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}

.mobile-nav { display: none; }
