/*
Theme Name: POPBULL
Theme URI: https://x.com/popbullcto
Author: POPBULL
Description: Landing page for $POPBULL on Solana.
Version: 2.8
Requires at least: 6.0
Tested up to: 6.8
Text Domain: popbull
*/

:root {
  --parchment: #e5d1b4;
  --ink: #1a1612;
  --ink-soft: #3a342c;
  --red: #c23b22;
  --line: #d4c6a8;
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Zen Kaku Gothic New", "Noto Serif JP", system-ui, sans-serif;
  background: var(--parchment);
  color: var(--ink);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 28px);
  padding-right: clamp(16px, 4vw, 28px);
}

header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(229,209,180,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--header-h);
  gap: 12px;
  position: relative;
}
.brand { display: none; }
.nav-links {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(18px, 3.2vw, 32px);
  font-size: 12px; letter-spacing: .16em; font-weight: 700;
}
.nav-links .nav-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
}
.nav-links .nav-icon svg { width: 16px; height: 16px; fill: currentColor; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: none;
  cursor: pointer;
  padding: 10px;
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
}
.nav-toggle span {
  display: block; height: 2px; background: #1a1612;
  margin: 6px 0; border-radius: 1px;
}
body.nav-open { overflow: hidden; }
.nav-social { display: flex; gap: 8px; align-items: center; }
.nav-social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
}
.nav-social svg { width: 16px; height: 16px; fill: currentColor; }

.hero {
  position: relative;
  min-height: min(52vh, 520px);
  max-height: 560px;
  background: #8b2a14 var(--hero) center / cover no-repeat;
  color: #f7efe0;
}
.hero-banner { display: none; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  min-height: min(52vh, 520px);
  padding: clamp(20px, 4vh, 40px) 0;
}
.hero-copy { max-width: 36rem; }
.hero h1 {
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  font-size: clamp(42px, 8vw, 104px);
  line-height: .82;
  letter-spacing: -0.04em;
  transform: rotate(-3deg);
  transform-origin: left center;
  text-shadow: 0 6px 0 rgba(0,0,0,.2);
}
.hero .sub {
  margin: 18px 0 28px;
  letter-spacing: .2em;
  font-size: clamp(10px, 1.6vw, 12px);
  font-weight: 700;
}
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 12px 22px; font-size: 12px; letter-spacing: .14em;
  font-weight: 700; border: 1.5px solid #1a1612; cursor: pointer;
}
.btn-dark, .btn-dark-solid { background: #16120e; color: #f3ead6; border-color: #16120e; }
.btn-ghost { background: transparent; color: #f7efe0; border-color: #f7efe0; }
.hero-note {
  margin-top: clamp(20px, 5vh, 48px);
  font-family: "Shippori Mincho", serif;
  font-style: italic;
  font-size: clamp(20px, 3vw, 28px);
  display: flex; align-items: center; gap: 10px;
}
.seal {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; flex: 0 0 auto;
  border: 1.5px solid currentColor;
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
}

section { padding: clamp(48px, 8vw, 88px) 0; }
.kicker {
  font-size: 11px; letter-spacing: .28em; font-weight: 700; color: var(--red);
  margin-bottom: 8px;
}
h2 {
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 52px);
  letter-spacing: .04em;
  line-height: 1.05;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
}
.about p {
  max-width: 460px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-top: 16px;
  font-size: clamp(15px, 2vw, 17px);
}
.aside-art img, .comic-art img { width: 100%; max-width: 600px; height: auto; margin-left: auto; object-fit: contain; }

.token { text-align: center; padding-top: 20px; }
.token h3 {
  font-family: "Noto Serif JP", serif; color: var(--red);
  letter-spacing: .2em; font-size: clamp(18px, 3vw, 22px);
}
.token .on { letter-spacing: .3em; font-size: 11px; margin: 6px 0 22px; color: #6b6154; }
.ca-box {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid #c9ba9a; background: #ead6b8;
  padding: 12px 16px;
  width: min(420px, 100%);
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(12px, 3vw, 14px);
  word-break: break-all;
}
.copy {
  border: 0; background: none; cursor: pointer;
  font-size: 16px; width: 44px; height: 44px;
}
.token .btn { margin: 18px auto 16px; min-width: min(240px, 100%); }
.meta {
  font-size: 11px;
  letter-spacing: .12em;
  color: #6b6154;
  line-height: 1.6;
}

.comic {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  overflow: hidden;
  padding: 0;
}
.comic-copy { padding: clamp(32px, 6vw, 64px) clamp(20px, 4vw, 48px); background: var(--parchment); }
.comic-copy .tiny { letter-spacing: .28em; font-size: 11px; margin-bottom: 10px; }
.vol { margin: 10px 0 6px; letter-spacing: .2em; font-size: 12px; color: #6b6154; }
.comic-title { font-weight: 800; letter-spacing: .08em; margin-bottom: 16px; }
.comic-blurb { max-width: 420px; margin: 0 0 24px; }
.comic-blurb p { margin: 0 0 12px; line-height: 1.65; color: var(--ink-soft); font-size: clamp(14px, 1.8vw, 16px); }
.comic-art img {
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.join {
  text-align: center;
  min-height: 220px;
  padding: 72px 0 48px;
  background: var(--parchment) center / 100% auto no-repeat;
  margin: 0;
}
.join .wrap {
  background: none;
  padding: 0;
}
.join h2 { letter-spacing: .18em; font-size: clamp(20px, 4vw, 28px); margin-bottom: 22px; }
.join-social { display: flex; gap: 12px; justify-content: center; align-items: center; }
.join-social a { width: 48px; height: 48px; display: grid; place-items: center; }
.join-social svg { width: 26px; height: 26px; fill: currentColor; }
.tagline { margin-top: 20px; letter-spacing: .18em; font-size: 11px; color: #6b6154; }
.site-foot {
  padding: 18px 20px 28px;
  text-align: center;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .02em;
  color: #8a7d68;
  border-top: 1px solid var(--line);
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .about-grid, .comic { grid-template-columns: 1fr; }
  .aside-art img { margin: 0 auto; }
  .comic-art img { min-height: 240px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; order: 3; }
  .nav-social { order: 2; margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: var(--header-h);
    flex-direction: column;
    gap: 0;
    background: rgba(229,209,180,.98);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 16px;
    max-height: calc(100dvh - var(--header-h));
    overflow: auto;
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a {
    padding: 16px clamp(16px, 4vw, 28px);
    min-height: 48px;
    display: flex; align-items: center;
  }

  .hero {
    min-height: 0;
    background: none;
    color: var(--ink);
  }
  .hero-banner { display: block; }
  .hero-inner {
    display: block;
    min-height: 0;
    padding: 24px 0 8px;
  }
  .hero h1 { transform: none; text-shadow: none; }
  .hero .btn-ghost { color: var(--ink); border-color: var(--ink); }
  .comic { display: flex; flex-direction: column; }
  .comic-art { order: -1; }
}

@media (max-width: 640px) {
  .btns { flex-direction: column; }
  .btns .btn, .token .btn { width: 100%; }
  .hero-note { flex-wrap: wrap; }
  .ca-box { font-size: 12px; }
}

@media (max-width: 400px) {
  .nav-social a { width: 40px; }
  .hero h1 { font-size: 34px; }
  .meta { letter-spacing: .06em; }
}

@media (min-width: 861px) {
  .hero h1, .hero .sub, .hero-note { display: none; }
}

.verify { padding: 28px 0 12px; }
.verify-box {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  background: #eadcca;
  border: 1px solid #b0543a;
  border-radius: 10px;
  padding: 22px 20px 20px;
}
.verify-kicker {
  color: var(--red);
  letter-spacing: .16em;
  font-size: 13px;
  font-weight: 700;
}
.verify-sub { margin: 8px 0 14px; color: #6b6154; }
.ca-pill {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  width: min(640px, 100%);
  margin: 0 auto;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #d2c2a0;
  background: #ece0c6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(12px, 2.6vw, 15px);
  color: var(--ink);
  cursor: pointer;
}
.ca-pill.copied { outline: 2px solid var(--red); }
.copy-mark { flex: 0 0 auto; }
.verify-note { margin: 14px 0 8px; color: #6b6154; }

.howto { padding: 12px 0 36px; }
.howto-title {
  text-align: center;
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 20px;
}
.howto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.howto-grid img {
  width: 100%;
  height: auto;
  display: block;
}

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

.join { position: relative; }
.join-hits {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 118px 0 72px;
}
.join-hits a {
  width: 64px;
  height: 64px;
  display: block;
}
.join-social { display: none; }

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.story-copy p { max-width: 42rem; line-height: 1.65; color: var(--ink-soft); margin-top: 12px; }
.story-art img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}
.chapter-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px !important;
  color: var(--ink) !important;
  font-family: "Noto Serif JP", "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 20px);
  letter-spacing: .02em;
}
.chapter-rule::before,
.chapter-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink);
  opacity: .55;
}
.chapter-rule span { white-space: nowrap; }
@media (max-width: 860px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-art { order: -1; }
}


/* Inner pages (Comic flipbook, etc.) */
.page-canvas { padding: 48px 0 80px; min-height: 70vh; }
.page-title {
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: .04em;
  margin: 0 0 28px;
}
.page-body { width: 100%; }
.page-body .dflip-container,
.page-body ._df_container,
.page-body .df-container,
.page-body iframe {
  width: 100% !important;
  max-width: 100%;
}
