body {
  margin: 0;
  background: #FAF6EA;
  color: #2B2620;
  font-family: 'Nunito', sans-serif;
}
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }
h1, h2, h3, p { margin: 0; }
.accent { color: #2E86B8; }
.faint { color: #A29B8A; }

.eyebrow {
  color: #2E86B8;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
}
h2 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 52px;
  line-height: 1.05;
}
.section-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}

/* NAV */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 64px;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}
.wordmark {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 26px;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-weight: 800;
  font-size: 16px;
  align-items: center;
}
.nav-pill {
  background: #2E86B8;
  color: #FFF;
  padding: 10px 24px;
  border-radius: 999px;
}

/* HERO */
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
}
.hero-content {
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 80px 48px;
  gap: 24px;
}
.badge {
  background: #E4F1F8;
  color: #2E86B8;
  font-weight: 800;
  font-size: 15px;
  padding: 8px 20px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
h1 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 92px;
  line-height: 1.02;
  max-width: 840px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 21px;
  line-height: 1.5;
  color: #6B675C;
  max-width: 560px;
  font-weight: 600;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  align-items: center;
}
.btn-primary {
  background: #2E86B8;
  color: #FFF;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 15px 34px;
  border-radius: 999px;
}
.btn-secondary {
  border: 2px solid #D8D2C2;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 13px 30px;
  border-radius: 999px;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* LORE */
.lore {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 64px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  box-sizing: border-box;
}
.lore-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
}
.lore-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.lore-text p {
  font-size: 19px;
  line-height: 1.6;
  color: #6B675C;
  font-weight: 600;
}

/* GALLERY */
.gallery {
  background: #F1EBDC;
  padding: 100px 64px;
}
.marquee-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 48px -64px 0;
  overflow: hidden;
}
.marquee-clip { overflow: hidden; }
.marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  /* Keeps iOS Safari rasterizing the animated track; without it the row
     starting at translateX(-50%) can be invisible until a touch. */
  will-change: transform;
}
.marquee-left { animation: marquee-left 170s linear infinite; }
.marquee-right { animation: marquee-right 170s linear infinite; }
@keyframes marquee-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee-track img {
  display: block;
  height: 320px;
  width: auto;
  border-radius: 20px;
  cursor: pointer;
  transition: filter 0.35s ease;
}
body.lb-open .marquee-track { animation-play-state: paused; }
@media (hover: hover) {
  .marquee-track:hover { animation-play-state: paused; }
  .marquee-track:hover img { filter: grayscale(1) brightness(1.06) contrast(0.92); }
  .marquee-track:hover img:hover { filter: none; }
}

/* HOW TO STAY OK */
.how {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 64px 20px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  box-sizing: border-box;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  background: #FFF;
  border: 2px solid #EDE7D8;
  border-radius: 24px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #E4F1F8;
  color: #2E86B8;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card h3 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 26px;
}
.step-card p {
  font-size: 17px;
  line-height: 1.6;
  color: #6B675C;
  font-weight: 600;
}

/* TOKEN INFO */
.token-info {
  background: url('assets/capy-5.webp') center / cover no-repeat;
  padding: 120px 64px 100px;
}
.token-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stat-card {
  background: #FFF;
  border: 2px solid #EDE7D8;
  border-radius: 24px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.stat-value {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: #2E86B8;
}
.stat-card h3 {
  font-size: 18px;
  font-weight: 800;
}
.stat-card p {
  font-size: 17px;
  line-height: 1.6;
  color: #6B675C;
  font-weight: 600;
  max-width: 260px;
}

/* CONTRACT */
.contract {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  box-sizing: border-box;
}
.contract-body {
  font-size: 19px;
  line-height: 1.6;
  color: #6B675C;
  max-width: 520px;
  font-weight: 600;
}
.ca-box {
  background: #FFF;
  border: 2px solid #D8D2C2;
  border-radius: 18px;
  padding: 22px 36px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: monospace;
  font-size: 19px;
  font-weight: 700;
  color: #A29B8A;
}
.ca-copy {
  background: #2E86B8;
  color: #FFF;
  font-family: 'Baloo 2', sans-serif;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.caption {
  font-size: 15px;
  color: #A29B8A;
  font-weight: 700;
}

/* COMMUNITY */
.community {
  background: url('assets/capy-banner-4.webp') center / cover no-repeat #2E86B8;
  padding: 110px 64px;
}
.community-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.community h2 {
  font-size: 60px;
  color: #FFF;
}
.community p {
  font-size: 20px;
  line-height: 1.55;
  color: #D6EAF5;
  max-width: 520px;
  font-weight: 600;
}
.community-buttons {
  display: flex;
  gap: 16px;
}
.btn-community-primary {
  background: #FFF;
  color: #2E86B8;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 19px;
  padding: 16px 38px;
  border-radius: 999px;
}
.btn-community-ghost {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #FFF;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 19px;
  padding: 14px 36px;
  border-radius: 999px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(24, 21, 16, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 82vw;
  max-height: 84vh;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.lb-btn {
  position: fixed;
  border-radius: 999px;
  background: rgba(250, 246, 234, 0.14);
  color: #FAF6EA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 30px;
}
.lb-prev { left: 32px; }
.lb-next { right: 32px; }
.lb-close {
  top: 28px;
  right: 32px;
  width: 48px;
  height: 48px;
  font-size: 20px;
}
.lb-btn:hover { background: rgba(250, 246, 234, 0.32); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.12); }
.lb-close:hover { transform: scale(1.12); }

/* FOOTER */
.footer {
  padding: 44px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}
.wordmark-small {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 20px;
}
.footer-note {
  font-size: 14px;
  color: #A29B8A;
  font-weight: 700;
}

/* RESPONSIVE — tablet */
@media (max-width: 900px) {
  .nav { padding: 24px 32px; }
  .nav-links { gap: 24px; font-size: 15px; }
  .hero-content { padding: 48px 32px 40px; }
  h1 { font-size: 64px; }
  h2 { font-size: 40px; }
  .hero-sub { font-size: 19px; }
  .lore { grid-template-columns: 1fr; gap: 40px; padding: 80px 32px 64px; }
  .token-info { padding: 80px 32px 64px; }
  .stats { grid-template-columns: 1fr; }
  .gallery { padding: 72px 32px; }
  .marquee-rows { margin: 40px -32px 0; }
  .marquee-track img { height: 260px; }
  .how { padding: 80px 32px 8px; }
  .steps { grid-template-columns: 1fr; }
  .contract { padding: 80px 32px; }
  .community { padding: 80px 32px; }
  .community h2 { font-size: 44px; }
  .footer { padding: 36px 32px; }
}

/* RESPONSIVE — phone */
@media (max-width: 560px) {
  .nav { padding: 18px 20px; }
  .nav-links a:not(.nav-pill) { display: none; }
  .wordmark { font-size: 22px; }
  .hero-content { padding: 40px 20px 36px; gap: 18px; }
  h1 { font-size: 42px; }
  h2 { font-size: 31px; }
  .hero-sub { font-size: 17px; }
  .hero-buttons { flex-direction: column; }
  .lore { padding: 64px 20px 56px; gap: 28px; }
  .token-info { padding: 64px 20px 56px; background-image: url('assets/capy-tokeninfo-mobile.webp'); }
  .gallery { padding: 60px 20px; }
  .marquee-rows { margin: 36px -20px 0; }
  .marquee-track img { height: 200px; }
  .how { padding: 64px 20px 0; }
  .contract { padding: 64px 20px; }
  .ca-box { flex-wrap: wrap; justify-content: center; word-break: break-all; padding: 18px 20px; font-size: 15px; }
  .community { padding: 64px 20px; background-image: url('assets/capy-mobile-footer.webp'); }
  .community h2 { font-size: 34px; }
  .community-buttons { flex-wrap: wrap; justify-content: center; }
  .footer { flex-direction: column; gap: 10px; text-align: center; padding: 32px 20px; }
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 24px; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-close { top: 16px; right: 16px; }
  .lightbox img { max-width: 90vw; }
}
