/* Reset default margins/padding and ensure box sizing is consistent */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Accent colour inspired by the original site’s red highlights */
  --accent: #e61b24;

  /* Fixed header height (used to offset body padding) */
  --nav-h: 74px; /* adjust if your header is taller/shorter */
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-image: url('../assets/img/background.avif');
  background-repeat: repeat;
  background-position: 0 0;
  background-size: contain;
  background-attachment: fixed;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
  padding-top: var(--nav-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Primary layout container used across sections */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navigation bar */
/* Sticky navigation bar at the top.  It contains the logo, primary menu
           links and social icons.  The bar stays visible while scrolling. */
header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #000;
  padding: 0.75rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.navbar .nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* was space-between */
  gap: 2rem; /* gives logo+menu breathing room */
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff; /* drives SVG via currentColor */
}
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo-svg {
  display: block; /* avoids weird inline spacing */
  width: 220px; /* adjust */
  height: auto; /* keeps aspect */
  max-height: 64px; /* fits your header */
}
@media (max-width: 900px) {
  .logo-svg {
    width: 180px;
    max-height: 56px;
  }
}

.navbar nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.navbar nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  transition: color 0.2s;
}
.navbar nav a:hover {
  color: var(--accent);
}

/* Social icons on the right side of the nav bar */
.navbar .socials {
  display: flex;
  align-items: center;
  margin-left: auto; /* KEY: pushes dots to the far right */
  gap: 0.9rem; /* more breathing room */
}

/* Base dot button */
.navbar .socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 69px;
  height: 69px;
  border-radius: 999px;

  border: none !important; /* NO white border */
  background: rgba(255, 255, 255, 0.22); /* grey-ish fill like original */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);

  color: #fff;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

/* Hover invert */
.navbar .socials a:hover {
  background: #fff;
  color: #000;
  transform: translateY(-1px);
}

/* SVG sizing */
.navbar .socials a svg {
  width: 36px;
  height: 36px;
  display: block;
}

.navbar .socials a.telegram svg {
  width: 26px;
  height: 26px;
}

/* TLOS must NOT be a pill — keep it a circle */
.navbar .socials a.tlos {
  font-size: inherit;
}

/* TLOS icon slightly bigger inside circle */
.navbar .socials a.tlos svg {
  width: 36px;
  height: 36px;
}

/* Ensure paths inherit currentColor so invert works */
.navbar .socials a svg path {
  fill: currentColor;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 69px;
  height: 69px;
  border-radius: 10px;
  border: none;
  /* border: 1px solid rgba(255, 255, 255, 0.25); */
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}
.nav-toggle:active {
  transform: scale(0.98);
}
/* Nav toggle SVG */
.nav-toggle .nav-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle .nav-toggle-svg {
  width: 42px;
  height: 42px;
  display: block;
}

.nav-toggle .nav-toggle-svg path {
  fill: currentColor; /* inherits white / hover colors */
}

/* Close icon hidden by default */
.nav-toggle .nav-toggle-icon--close {
  display: none;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-1px);
}

/* When menu is open: show X, hide burger SVG */
header.navbar.menu-open .nav-toggle .nav-toggle-icon--menu {
  display: none;
}
header.navbar.menu-open .nav-toggle .nav-toggle-icon--close {
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu,
  .nav-toggle {
    transition: none !important;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Keep desktop layout */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Mobile layout (animated dropdown + subtle glass blur) */
@media (max-width: 900px) {
  .navbar .socials {
    margin-left: 0;
  }

  .navbar .nav-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  /* Only blur when menu is open (premium glassy feel) */
  header.navbar.menu-open {
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  /* Animated dropdown: we don't use display:none anymore */
  .nav-menu {
    width: 100%;
    display: flex; /* always in the flow so it can animate */
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;

    /* spacing */
    padding-top: 0.75rem;

    /* animation state (closed) */
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    pointer-events: none;

    transition:
      max-height 260ms ease,
      opacity 180ms ease,
      transform 260ms ease;
    will-change: max-height, opacity, transform;
  }

  /* Open state */
  header.navbar.menu-open .nav-menu {
    max-height: 420px; /* enough for links + socials */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  /* Make taps feel nice on mobile */
  .nav-links a {
    width: 100%;
    padding: 0.45rem 0;
  }

  /* Socials wrap nicely */
  .navbar .socials {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Hero / About section */
#hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0;
  gap: 2rem;
}
.hero-graphic {
  margin: auto;
  flex: 1 1 280px;
  max-width: 420px;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  /* Allow overlay elements (ring and stars) to extend beyond the circle */
  overflow: visible;
}
.hero-graphic .hero-frame {
  position: absolute;
  inset: -0%; /* extend beyond the circle */
  width: 100%;
  height: 100%;
  color: #eee;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;

  transform: scale(0.75);
  transform-origin: 50% 50%; /* keep it centered */
}

/* NEW: smaller centered avatar wrapper */
.hero-graphic .hero-avatar {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50%; /* image is ~40% smaller than the full circle */
  height: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
}

/* UPDATED: target only the avatar img (not “all images inside hero-graphic”) */
.hero-graphic .hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Big SVG star decorations (replaces ✧ text glyphs) */
.hero-graphic .star {
  position: absolute;
  width: clamp(44px, 6vw, 64px);
  height: clamp(44px, 6vw, 64px);
  color: rgba(238, 238, 238, 0.95); /* drives path via currentColor */
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

/* Keep corner vibe but nudge toward the ring */
.hero-graphic .star.top {
  top: 0;
  right: 0;
  transform: translate(-28px, 28px) rotate(12deg) scale(0.8);
}

.hero-graphic .star.bottom {
  bottom: 0;
  left: 0;
  transform: translate(28px, -28px) rotate(-10deg) scale(0.5);
}

.hero-graphic .star path {
  fill: currentColor;
}

.hero-content {
  margin: auto;
  flex: 2 1 400px;
  max-width: 600px;
}
.hero-content h1 {
  font-size: 2.8rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-content h2 {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.08rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.hero-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
}
/* Pill for the contract address shown in its own section */

#contract {
  text-align: center;
  padding: 3rem 0;
}
#contract h3 {
  color: var(--accent);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05rem;
}
#contract p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* --- Contract feather icon (above "Contract Address") --- */
#contract .contract-feather {
  display: block;
  margin: 0 auto 0.65rem; /* centered + spacing */
  width: clamp(34px, 4vw, 44px); /* small, like your star-ish size */
  height: auto;
  color: rgba(255, 255, 255, 0.92); /* feather color */
  opacity: 0.95;
  transform: scale(1.3);
}

#contract .contract-feather path {
  fill: currentColor;
}
/* Contract pill (clickable + nice copy feedback) */
.contract-pill {
  display: inline-flex;
  align-items: center;
  background: #111;
  border-radius: 999px;
  overflow: visible;
  position: relative;

  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.contract-pill:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

/* The address text */
.contract-pill span#contract-address {
  padding: 0.55rem 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  letter-spacing: 0.03rem;
  user-select: text;
}

/* Copy button (no green, matches site vibe) */
.contract-pill #copy-btn {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0.55rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.contract-pill #copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: rgba(255, 255, 255, 0.25);
}
.contract-pill #contract-address {
  display: inline-block;
  max-width: 70vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Smooth “Copied” badge */
.copied-badge {
  position: absolute;
  right: 12px;
  top: -12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;

  /* hidden by default */
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

/* show when JS toggles .copied on the pill */
.contract-pill.copied .copied-badge {
  opacity: 1;
  transform: translateY(0);
}

/* --- Wix-like scribble separator (SVG) --- */
.scribble-sep {
  display: flex;
  justify-content: center;
  margin: 3rem auto;
  width: 100%;
  opacity: 0.95;
}
.scribble-sep svg {
  width: min(240px, 92%);
  height: auto;
  display: block;
}
.scribble-sep path {
  fill: rgba(255, 255, 255, 1);
}

/* --- POWER TO THE PLEB headline block --- */
.promo-heading {
  text-align: center;
  width: 100%;
  padding: 0 0 1rem;
  display: inline-block;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
}

/* --- CTA link (Plebifesto/Audit/Download) --- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0;
  background: transparent;
  border: none;

  /* KEY: anchor owns the color + transition */
  color: var(--accent);
  transition:
    color 0.18s ease,
    opacity 0.18s ease;

  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;

  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06rem;
}

.cta-button:hover {
  color: #fff; /* whole link turns white */
}

/* KEY: make children follow the anchor color */
.cta-button span,
.cta-button .cta-icon,
.cta-button .cta-icon svg {
  color: inherit;
  fill: currentColor;
  stroke: currentColor;
}

.cta-button .cta-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  transition: transform 0.18s ease;
}

.cta-button:hover .cta-icon {
  transform: translateX(6px);
}

.cta-button .cta-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Shared promo sections (Plebifesto / PlebDoodles / Audit) --- */
.promo-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0;
  gap: 2rem;
}

.promo-section.promo--reverse {
  flex-direction: row-reverse;
}

.promo-section .promo-media {
  flex: 1 1 250px;
  max-width: 200px;
  text-align: center;
  margin: auto;
}

.promo-section .promo-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.promo-section .promo-body {
  margin: auto;
  flex: 2 1 400px;
  max-width: 600px;
}

.promo-section .promo-body h3 {
  color: var(--accent);
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.promo-section .promo-body h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.promo-section .promo-body p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.promo-intro {
  margin-bottom: 1rem;
}

.promo-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.promo-list li {
  margin: 0.25rem 0;
}

/* Mobile: stack media above text */
@media (max-width: 720px) {
  .promo-section,
  .promo-section.promo--reverse {
    flex-direction: column;
    text-align: center;
  }

  .promo-section .promo-media {
    max-width: 220px;
  }

  .promo-list {
    text-align: left;
    display: inline-block; /* keeps list tight + readable */
  }
}

/* How to buy (Wix-feel header + responsive repeater vibe) */
:root {
  /* darker again, but still slightly softer than pure black */
  --panel: rgba(0, 0, 0, 0.72);
  --panel-2: rgba(0, 0, 0, 0.5);

  --border: rgba(255, 255, 255, 0.16);
  --border-2: rgba(255, 255, 255, 0.28);

  --mint: #38c68b; /* clean subtle green */
}

#how-to-buy {
  padding: 4.5rem 0 4rem;
}

#how-to-buy .howto-header {
  position: relative;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 2.25rem;
  padding: 0 1rem;
}

#how-to-buy .howto-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06rem;
  font-weight: 900;
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  line-height: 1.1;
}

/* ✅ star half-ish size + full white */
#how-to-buy .howto-star {
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
  opacity: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}
#how-to-buy .howto-star path {
  fill: #fff;
}

#how-to-buy .howto-intro {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

/* Keep intro links simple like you want */
#how-to-buy .howto-intro a {
  color: var(--mint);
  text-decoration: none;
  font-weight: 800;
}
#how-to-buy .howto-intro a:hover {
  text-decoration: underline;
}

/* ✅ Grid: 3x2 → 2x3 sooner → 1x6 sooner */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

@media (max-width: 1020px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Card: darker again, not washed */
.step-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.2rem 1.15rem;
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  transition:
    transform 0.18s,
    border-color 0.18s,
    background 0.18s;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
}

.step-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ✅ Icon circles stay black-ish solid */
.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.step-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

/* Step number + title block */
.step-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.step-number {
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.08rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  text-transform: none;
}

/* Body text */
.step-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* ✅ Simple link style (your preferred vibe) */
.step-card p a {
  color: var(--mint);
  font-weight: 800;
  text-decoration: none;
}
.step-card p a:hover {
  text-decoration: underline;
}

/* Small polish for tiny screens */
@media (max-width: 420px) {
  .step-icon {
    width: 56px;
    height: 56px;
  }
  .step-icon img {
    width: 44px;
    height: 44px;
  }
}

/* Grab your $PP section */
#grab {
  margin: auto;
  max-width: 50%;
  padding: 4rem 0;
  text-align: center;
}
#grab h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
#grab p {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
}
#grab .buy-links {
  margin-top: 14px;
  display: inline-block;
  line-height: 1.75;
}

#grab .buy-links a {
  color: var(--mint);
  font-weight: 800;
  text-decoration: none;
}

#grab .buy-links a:hover {
  text-decoration: underline;
}

/* Gallery / Masonry layout (Option B: CSS Grid + auto row-span JS) */
#gallery-section {
  padding: 4rem 0;
}
#gallery-section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 10px;
  grid-auto-flow: dense;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Each tile is a link so we can open the lightbox */
.masonry a.masonry-item {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: rgba(0, 0, 0, 0.25);
}

/* Image */
.masonry a.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.25s;
}

.masonry a.masonry-item:hover img {
  transform: scale(1.03);
}

/* Wide tiles only on larger screens (avoid awkward 2-col on mobile) */
@media (min-width: 900px) {
  .masonry a.masonry-item.wide {
    grid-column: span 2;
  }
}

/* Lightbox (bigger viewer + arrows + download) */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.lightbox.open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  opacity: 0;
  transition: opacity 0.2s;
}
.lightbox.open .lightbox-backdrop {
  opacity: 1;
}

/* Centered viewer area */
.lightbox-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(94vw, 1300px);
  height: min(84vh, 900px);
  opacity: 0;
  transition:
    transform 0.2s,
    opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* only image gets pointer events */
}
.lightbox.open .lightbox-content {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.lightbox-content img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* IMPORTANT: scales up/down, keeps aspect */
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: block;
  pointer-events: auto;
}

/* Close button pinned to viewport (not on image corner) */
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.03);
}

/* Prev/Next arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 46px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%) scale(1.03);
}
.lightbox-nav.prev {
  left: 18px;
}
.lightbox-nav.next {
  right: 18px;
}

/* Download button bottom center */
.lightbox-download {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  z-index: 2;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.lightbox-download:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateX(-50%) scale(1.03);
}

/* Make arrows slightly smaller on tiny screens */
@media (max-width: 520px) {
  .lightbox-nav {
    width: 54px;
    height: 54px;
    font-size: 40px;
  }
  .lightbox-close {
    width: 50px;
    height: 50px;
    font-size: 38px;
  }
}

/* Footer: stacked + centered */
footer {
  background: #000;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
}
.site-footer .footer-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.site-footer .footer-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
}

/* Universe easter egg centered below */
.site-footer .footer-easteregg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.site-footer .footer-easteregg img {
  height: 92px; /* ~2× bigger (was ~46px) */
  width: auto;
  display: block;
  opacity: 0.98;
  transition:
    transform 120ms ease,
    opacity 120ms ease;
}

.site-footer .footer-easteregg:hover img {
  transform: translateY(-1px) scale(1.03);
  opacity: 1;
}
.site-footer .footer-easteregg:active img {
  transform: translateY(0px) scale(0.98);
}

@media (max-width: 640px) {
  .site-footer .footer-easteregg img {
    height: 74px;
  }
}

/* === Shared extras for PDF pages (audit/plebifesto/plebtimes/plebdoodles) === */
.page-hero,
.hero.doc-hero {
  padding-top: 24px;
  padding-bottom: 30px;
}
.hero.doc-hero .container {
  max-width: 980px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 34px 0; /* keep spacing, but no “box” */
  text-align: center;
}

.hero.doc-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: 0.08em;
}
.hero.doc-hero p {
  margin: 6px auto 0;
  max-width: 72ch;
  color: rgba(255, 255, 255, 0.78);
}
/* PDF template hero layout */
.doc-hero .doc-hero-grid {
  display: flex;
  align-items: center;
  gap: 24px;
}

.doc-hero .doc-hero-media {
  flex: 0 0 auto;
}

.doc-hero .doc-hero-img {
  display: block;
  width: min(240px, 35vw);
  height: auto;
  max-width: 100%;
  border-radius: 12px; /* not a forced circle */
  object-fit: contain; /* keep original ratio */
}
@media (max-width: 820px) {
  .doc-hero .doc-hero-grid {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .doc-hero .doc-hero-media {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .doc-hero .doc-hero-img {
    width: min(240px, 80vw);
  }
}

/* Right-side text stays centered within its column */
.doc-hero .doc-hero-text {
  flex: 1 1 auto;
  text-align: center;
}

/* No image case: center everything */
.doc-hero.no-hero-img .doc-hero-grid {
  justify-content: center;
}
.doc-hero.no-hero-img .doc-hero-media {
  display: none;
}
#docTitle {
  font-size: 3rem;
  margin-bottom: 1rem;
}
#docIntro {
  white-space: pre-line;
  text-align: left;
  max-width: 52ch;
  margin: 0 auto;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
}

/* (legacy) keep class name but remove forced circle/bg/border */
.doc-hero-img {
  width: auto;
  height: auto;
  border-radius: 0;
  margin: 0;
  border: none;
  background: transparent;
}

.doc-content {
  padding: 10px 0 40px;
}

.doc-content .container {
  max-width: 960px;
  border-radius: 22px;
  padding: 14px;
}

/* === PDF.js inline viewer === */
.pdfjs-wrap {
  width: 100%;
  border-radius: 16px;
}

/* PDF.js canvas area */
.pdfjs-canvas-wrap {
  width: 100%;
  height: fit-content; /* shrink to the rendered page if smaller */
  max-height: min(82vh, 980px);
  overflow: auto;

  /* IMPORTANT: don't paint a full white slab behind the canvas */
  background: transparent;

  border: none;
  border-radius: 22px;

  /* Center canvas when it is smaller than the viewport (zoomed out) */
  display: flex;
  justify-content: center;
  align-items: flex-start;

  position: relative; /* needed for loading/error overlays */
}

/* Put the canvas first and the controls beneath (visual reorder) */
.pdfjs-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdfjs-toolbar {
  order: 2; /* toolbar beneath viewer */
  display: flex;
  flex-direction: column; /* mobile default: stack */
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 0;

  background: transparent;
  border: none;
  border-radius: 0;
}

/* Rows inside toolbar */
.pdfjs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

/* Desktop: nav + zoom on ONE row (side-by-side) */
@media (min-width: 821px) {
  .pdfjs-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px;
  }
  .pdfjs-row {
    width: auto;
  }
  .pdfjs-row-status {
    flex-basis: 100%;
    justify-content: center;
  }
}
/* Page nav row */
.pdfjs-row-nav .pdfjs-page {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

/* Big left/right buttons (if your HTML uses pdfjs-btn-big) */
.pdfjs-btn-big {
  font-size: 28px;
  padding: 12px 18px;
  border-radius: 14px;
}

/* Round zoom buttons (if your HTML uses pdfjs-btn-round) */
.pdfjs-btn-round {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  font-size: 26px;
  display: grid;
  place-items: center;
  padding: 0;
}

/* Zoom label */
.pdfjs-zoom {
  min-width: 72px;
  text-align: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
}

/* Status row */
.pdfjs-row-status {
  opacity: 0.85;
  font-size: 13px;
}

.pdfjs-btn {
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}
/* Page arrows */
.pdfjs-btn-big {
  width: 60px;
  height: 60px;
  font-size: 38px;
  border-radius: 30px;
  padding: 0;
}

/* Zoom buttons */
.pdfjs-btn-round {
  width: 52px;
  height: 52px;
  font-size: 30px;
  border-radius: 999px;
  padding: 0;
}

.pdfjs-btn:active {
  transform: translateY(1px);
}

.pdfjs-page {
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

/* status is mostly for debugging; hide for clean centered UX */
.pdfjs-status {
  display: none;
}

/* PDF.js canvas area */
.pdfjs-canvas-wrap {
  order: 1;
  width: 100%;
  height: fit-content; /* shrink to page if smaller */
  max-height: min(82vh, 980px); /* cap on desktop */
  overflow: auto; /* internal scroll when page is taller */
  border: none;
  border-radius: 22px;
  /* background: #fff; */
}

/* loading + error overlays */
.pdfjs-canvas-wrap.is-loading::before {
  content: 'Loading PDF…';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

.pdfjs-canvas-wrap.is-error::before {
  content: attr(data-error);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: rgba(0, 0, 0, 0.75);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

#pdfCanvas {
  display: block;
  margin: 0 auto;
  max-width: none; /* WAS 100% — that broke zoom >100 */
  height: auto;
  position: relative;
  z-index: 1;

  /* "page" look */
  background: #fff;
  border-radius: 16px;
}

/* Make footer stick to bottom on short pages */
html,
body {
  height: 100%;
}
main,
.content {
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
}
