/* ============================================================
   BAIHU THE TIGER — 白虎
   Direction: White Tiger dojo / shrine. Lime is the FIELD (the
   collection's own background) not an accent, so cutout art reads
   as one continuous surface with the page. Ink black + cinnabar
   red + gold as the accent triad. NOT paper-editorial (siblings
   already own that), NOT neon-on-dark.
   ============================================================ */

@font-face {
  font-family: "ChineseRocks";
  src: url("./assets/fonts/ChineseRocks.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Wonton";
  src: url("./assets/fonts/Wonton.woff2") format("woff2");
  font-display: swap;
}

:root {
  --lime: #c6ff3e;
  --lime-deep: #a8e01f;
  --lime-dark: #7ba300;
  --ink: #0d0f0a;
  --ink-soft: #171b10;
  --cinnabar: #e2402c;
  --gold: #d9a52b;
  --gold-1: #d9a52b;
  --bone: #f4f1e4;
  --mono: "Spline Sans Mono", "Noto Serif SC", ui-monospace, monospace;
  --serif: "Fraunces", "Noto Serif SC", Georgia, serif;
  --cjk: "Noto Serif SC", serif;
  --disp: "ChineseRocks", "Noto Serif SC", "Impact", sans-serif;
  --brush: "Wonton", "Noto Serif SC", cursive;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#petals {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 3;
}

/* ---------- vertical CJK rails ---------- */
.rail {
  position: fixed; top: 0; bottom: 0;
  width: 46px; z-index: 20;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 96px 0 28px;
  pointer-events: none;
  mix-blend-mode: difference;
}
.rail-l { left: 0; }
.rail-r { right: 0; }
.rail-cjk {
  font-family: var(--cjk); font-weight: 900;
  font-size: 20px; letter-spacing: 8px;
  writing-mode: vertical-rl; color: var(--bone); opacity: .55;
}
.rail-code {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 3px; writing-mode: vertical-rl;
  color: var(--lime); opacity: .8;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 64px;
  background: linear-gradient(to bottom, rgba(13,15,10,.92), rgba(13,15,10,0));
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-cjk {
  font-family: var(--cjk); font-weight: 900; font-size: 24px;
  color: var(--lime); line-height: 1;
}
.brand-name {
  font-family: var(--disp); font-size: 21px;
  letter-spacing: 3px; color: var(--bone);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--bone); text-decoration: none;
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  opacity: .85; transition: opacity .2s, color .2s;
}
.nav-links a:hover { opacity: 1; color: var(--lime); }
.nav-cta {
  border: 1px solid var(--lime); color: var(--lime) !important;
  padding: 8px 18px; opacity: 1 !important;
}
.nav-cta:hover { background: var(--lime); color: var(--ink) !important; }
/* X / social link — icon + label, sits between Ranks and the Mint CTA */
.nav-x { display: inline-flex; align-items: center; padding: 3px; opacity: .85; }
.nav-x svg { width: 14px; height: 14px; fill: var(--bone); display: block; }
.nav-x:hover { opacity: 1; }
.nav-x:hover svg { fill: var(--lime); }

/* ---------- HERO : art stage ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: grid; grid-template-columns: 1.02fr .98fr;
  align-items: center; gap: 20px;
  padding: 120px 78px 60px;
  /* the lime field: art background colour IS the stage floor */
  background:
    radial-gradient(95% 78% at 86% 44%, var(--lime) 0%, var(--lime-deep) 34%, transparent 64%),
    radial-gradient(70% 55% at 8% 90%, rgba(226,64,44,.24) 0%, transparent 58%),
    var(--ink);
  overflow: hidden;
}
.hero-atmos {
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 72% 46%, rgba(255,255,255,.30), transparent 62%);
  filter: blur(46px); z-index: 1;
}
.hero-mist {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(to top, var(--ink) 6%, rgba(13,15,10,.55) 42%, transparent 100%);
  z-index: 4;
}
.hero-glyph {
  position: absolute; right: 2%; top: 44%;
  transform: translateY(-50%);
  font-family: var(--cjk); font-weight: 900;
  font-size: min(46vw, 620px); line-height: .8;
  color: rgba(13,15,10,.14);
  z-index: 2; user-select: none; pointer-events: none;
}
.hero-copy {
  position: relative; z-index: 6; max-width: 620px;
}
.hero-copy::before {
  content: ""; position: absolute;
  inset: -40px -80px -40px -90px; z-index: -1;
  background: radial-gradient(70% 62% at 34% 46%, rgba(13,15,10,.9) 0%, rgba(13,15,10,.72) 46%, transparent 78%);
  filter: blur(8px);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10.5px; letter-spacing: 3.6px;
  color: var(--lime); margin-bottom: 22px;
  border: 1px solid rgba(198,255,62,.34);
  padding: 7px 14px;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cinnabar); box-shadow: 0 0 10px var(--cinnabar);
  animation: pulse 1.9s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.28} }

.hero-title {
  font-family: var(--disp);
  font-size: clamp(64px, 10.5vw, 158px);
  line-height: .82; letter-spacing: 1px;
  color: var(--bone);
  text-shadow:
    3px 3px 0 var(--cinnabar),
    0 0 60px rgba(198,255,62,.30);
}
.hero-title-sub {
  display: inline-block;
  color: var(--lime);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
}
.hero-lede {
  font-family: var(--serif); font-style: italic;
  font-size: 19px; line-height: 1.55;
  color: rgba(244,241,228,.86);
  margin: 20px 0 26px; max-width: 500px;
}
.hero-lede em { color: var(--lime); font-style: italic; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 2.4px; text-transform: uppercase;
  padding: 15px 30px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s, background .2s, color .2s;
  display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--lime); color: var(--ink); font-weight: 600;
  box-shadow: 5px 5px 0 var(--ink);
}
.btn-primary:hover { background: var(--bone); }
.btn-ghost { border-color: rgba(244,241,228,.4); color: var(--bone); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.hero-meta {
  display: flex; gap: 38px; margin-top: 30px;
  padding-top: 22px; border-top: 1px solid rgba(244,241,228,.16);
  position: relative; z-index: 7;
}
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta b {
  font-family: var(--disp); font-size: 24px;
  letter-spacing: 1.5px; color: var(--lime);
}
.hero-meta span {
  font-size: 9.5px; letter-spacing: 2.2px;
  text-transform: uppercase; color: rgba(244,241,228,.68);
}

.hero-stage {
  position: relative; z-index: 5;
  height: 78vh; display: flex;
  align-items: flex-end; justify-content: center;
}
.hero-art {
  position: absolute; bottom: 0;
  filter: drop-shadow(0 26px 40px rgba(13,15,10,.55));
}
.hero-art-main {
  height: 100%; z-index: 3;
  animation: float 7s ease-in-out infinite;
}
.hero-art-back {
  height: 72%; left: 2%; z-index: 1;
  opacity: .48; filter: blur(2.5px) drop-shadow(0 20px 30px rgba(13,15,10,.5));
  animation: float 9s ease-in-out infinite .8s;
}
.hero-art-back2 {
  height: 66%; right: 1%; z-index: 1;
  opacity: .4; filter: blur(3.5px) drop-shadow(0 20px 30px rgba(13,15,10,.5));
  animation: float 8s ease-in-out infinite .4s;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-13px)} }

.hero-code {
  position: absolute; bottom: 22px; left: 78px; z-index: 7;
  font-size: 10px; letter-spacing: 2.6px; color: rgba(244,241,228,.66);
}

/* ---------- shared section head ---------- */
.section-head { margin-bottom: 52px; }
.sec-idx {
  display: block; font-size: 10px; letter-spacing: 3.6px;
  color: var(--lime); margin-bottom: 14px; text-transform: uppercase;
}
.section-head h2 {
  font-family: var(--disp);
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: .92; letter-spacing: .5px; color: var(--bone);
}

/* ---------- LORE ---------- */
.lore { padding: 118px 78px; background: var(--ink); position: relative; }
.lore-lead {
  font-family: var(--serif); font-style: italic;
  font-size: 25px; line-height: 1.5; max-width: 780px;
  color: rgba(244,241,228,.9); margin-bottom: 56px;
}
.lore-lead b { color: var(--lime); font-style: normal; font-weight: 600; }
.lore-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.lore-card {
  border: 1px solid rgba(244,241,228,.14);
  padding: 30px 26px 32px; position: relative;
  background: linear-gradient(160deg, rgba(198,255,62,.05), transparent 60%);
  transition: border-color .25s, transform .25s;
}
.lore-card:hover { border-color: var(--lime); transform: translateY(-4px); }
.lc-num {
  font-family: var(--cjk); font-weight: 900; font-size: 44px;
  color: var(--lime); opacity: .85; display: block; margin-bottom: 14px;
  line-height: 1;
}
.lore-card h3 {
  font-family: var(--disp); font-size: 21px; letter-spacing: 1.4px;
  margin-bottom: 10px; color: var(--bone);
}
.lore-card p { font-size: 13px; line-height: 1.65; color: rgba(244,241,228,.66); }

/* ---------- GALLERY ---------- */
.gallery { padding: 110px 78px; background: var(--ink-soft); }
.gal-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.gal-item {
  position: relative; overflow: hidden;
  border: 1px solid rgba(13,15,10,.6);
  aspect-ratio: 1; cursor: pointer;
  transition: transform .3s, box-shadow .3s, z-index 0s;
}
.gal-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.gal-item:hover {
  transform: scale(1.11) translateY(-5px); z-index: 9;
  box-shadow: 0 18px 40px rgba(0,0,0,.6);
}
.gal-id {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 7px 9px; font-size: 9.5px; letter-spacing: 1.6px;
  background: linear-gradient(to top, rgba(13,15,10,.9), transparent);
  color: var(--lime); opacity: 0; transition: opacity .25s;
}
.gal-item:hover .gal-id { opacity: 1; }

/* ---------- RARITY ---------- */
.rarity { padding: 118px 78px; background: var(--ink); }
.rank-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.rank {
  border: 1px solid rgba(244,241,228,.14);
  padding: 32px 24px; position: relative; overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.rank:hover { transform: translateY(-5px); border-color: var(--lime); }
.rk-cjk {
  font-family: var(--cjk); font-weight: 900; font-size: 58px;
  line-height: 1; display: block; margin-bottom: 16px;
  color: rgba(244,241,228,.2);
}
.rank h3 {
  font-family: var(--disp); font-size: 20px;
  letter-spacing: 1.6px; margin-bottom: 10px; color: var(--bone);
}
.rank p { font-size: 12.5px; line-height: 1.6; color: rgba(244,241,228,.62); margin-bottom: 20px; }
.rank b {
  font-family: var(--disp); font-size: 27px;
  letter-spacing: 1px; color: var(--lime);
}
.rank-top {
  background: linear-gradient(165deg, rgba(226,64,44,.18), transparent 62%);
  border-color: rgba(226,64,44,.5);
}
.rank-top .rk-cjk { color: var(--cinnabar); opacity: .55; }
.rank-top b { color: var(--cinnabar); }

/* ---------- MINT ---------- */
.mint {
  padding: 118px 78px 130px; position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(198,255,62,.14), transparent 62%),
    var(--ink-soft);
}
.mint-glyph {
  right: auto; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  color: rgba(198,255,62,.05);
  font-size: min(52vw, 700px);
}
.mint-card {
  position: relative; z-index: 5;
  max-width: 620px; margin: 0 auto;
  border: 1px solid rgba(198,255,62,.3);
  background: rgba(13,15,10,.86);
  backdrop-filter: blur(10px);
  padding: 44px 42px 40px;
  box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.mint-head { margin-bottom: 30px; }
.mint-head h2 { font-size: clamp(32px,4vw,50px); }

.phase-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
.phase {
  background: transparent; cursor: pointer;
  border: 1px solid rgba(244,241,228,.2);
  padding: 18px 14px; text-align: left;
  color: var(--bone); font-family: var(--mono);
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color .2s, background .2s;
}
.phase:hover { border-color: rgba(198,255,62,.55); }
.phase.active { border-color: var(--lime); background: rgba(198,255,62,.09); }
.ph-cjk {
  font-family: var(--cjk); font-weight: 900; font-size: 22px;
  color: var(--lime); line-height: 1;
}
.ph-name { font-size: 13px; letter-spacing: 1.4px; font-weight: 600; }
.ph-price { font-size: 10.5px; letter-spacing: 1.4px; color: rgba(244,241,228,.6); }

.qty-row {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 0; border-top: 1px solid rgba(244,241,228,.14);
  border-bottom: 1px solid rgba(244,241,228,.14);
  margin-bottom: 22px;
}
.qty-label { font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase; color: rgba(244,241,228,.6); flex: 1; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid rgba(244,241,228,.28); }
.qty-ctrl button {
  width: 40px; height: 40px; cursor: pointer;
  background: transparent; border: none; color: var(--lime);
  font-size: 19px; font-family: var(--mono);
  transition: background .18s;
}
.qty-ctrl button:hover { background: rgba(198,255,62,.16); }
#qty {
  width: 56px; height: 40px; text-align: center;
  background: transparent; border: none; color: var(--bone);
  font-family: var(--disp); font-size: 20px; letter-spacing: 1px;
}
.qmax {
  background: transparent; border: 1px solid rgba(198,255,62,.45);
  color: var(--lime); font-family: var(--mono); font-size: 10px;
  letter-spacing: 1.8px; padding: 11px 14px; cursor: pointer;
  transition: background .2s;
}
.qmax:hover { background: rgba(198,255,62,.16); }

.mint-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 26px; }
.mint-summary div { display: flex; flex-direction: column; gap: 5px; }
.mint-summary span { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: rgba(244,241,228,.68); }
.mint-summary b { font-family: var(--disp); font-size: 21px; letter-spacing: .8px; color: var(--lime); }

.btn-mint { width: 100%; text-align: center; font-size: 13px; padding: 18px; }
.mint-note {
  text-align: center; font-size: 10px; letter-spacing: 1.8px;
  color: rgba(244,241,228,.66); margin-top: 14px;
}

.supply-bar { margin-top: 30px; }
.supply-track { height: 5px; background: rgba(244,241,228,.14); overflow: hidden; }
.supply-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--lime-dark), var(--lime));
  transition: width .8s ease;
}
.supply-meta {
  margin-top: 10px; font-size: 10px; letter-spacing: 2px;
  color: rgba(244,241,228,.6); text-align: right;
}

/* ---------- FOOTER ---------- */
.foot {
  padding: 60px 78px 44px; background: var(--ink);
  border-top: 1px solid rgba(244,241,228,.12);
  text-align: center;
}
.foot-cjk {
  font-family: var(--cjk); font-weight: 900;
  font-size: 15px; letter-spacing: 6px;
  color: var(--lime); margin-bottom: 16px;
}
.foot-meta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  font-size: 10.5px; letter-spacing: 2px;
  color: rgba(244,241,228,.6); margin-bottom: 12px;
}
.foot-mono { font-size: 10px; letter-spacing: 1.6px; color: rgba(244,241,228,.36); }
#footContract a { color: rgba(244,241,228,.52); text-decoration: none; border-bottom: 1px solid rgba(190,242,100,.28); }
#footContract a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.foot-x {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 auto 16px; padding: 9px 20px;
  border: 1px solid rgba(198,255,62,.4); border-radius: 2px;
  color: var(--lime); text-decoration: none;
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.foot-x svg { width: 14px; height: 14px; fill: currentColor; display: block; }
.foot-x:hover { background: var(--lime); color: var(--ink); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding: 108px 44px 50px; }
  .hero-stage { height: 56vh; order: 2; margin-top: 30px; }
  .hero-code { left: 44px; }
  .gal-grid { grid-template-columns: repeat(4,1fr); }
  .rank-row { grid-template-columns: repeat(2,1fr); }
  .lore, .gallery, .rarity, .mint, .foot { padding-left: 44px; padding-right: 44px; }
  .nav { padding: 14px 44px; }
  .rail { display: none; }
}
@media (max-width: 680px) {
  .hero { padding: 96px 20px 40px; }
  .hero-title { font-size: clamp(46px, 15vw, 78px); }
  /* 3 stats clipped at 390px in one flex row. Tight 3-col grid + dark scrim
     so no orphan row AND no lime-glow wash-out on the middle stat. */
  .hero-meta {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; flex-wrap: nowrap;
    padding: 16px 12px 14px;
    background: rgba(13,15,10,.82);
    border: 1px solid rgba(244,241,228,.14);
    border-top-color: rgba(244,241,228,.16);
  }
  .hero-meta b { font-size: 15px; letter-spacing: .5px; }
  .hero-meta span { font-size: 8px; letter-spacing: 1.1px; line-height: 1.3; }
  .lore-cols { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
  .rank-row { grid-template-columns: 1fr; }
  .nav-links { gap: 15px; }
  .nav-links a { font-size: 10px; letter-spacing: 1.5px; }
  .lore, .gallery, .rarity, .mint, .foot { padding-left: 20px; padding-right: 20px; }
  .nav { padding: 12px 20px; }
  .mint-card { padding: 30px 22px 28px; }
  .mint-summary { grid-template-columns: 1fr; gap: 14px; }
  .hero-code { left: 20px; font-size: 9px; }
  .hero-glyph { font-size: 62vw; top: 30%; right: -8%; opacity: .6; }
  /* keep the hero art centered + fully inside viewport on phones */
  .hero-stage { justify-content: center; }
  .hero-art-main { height: 96%; max-width: 92vw; object-fit: contain; }
  .hero-art-back, .hero-art-back2 { display: none; }
}
