/* ============================================================
   $GINNAN — matcha scrapbook
   palette: matcha green + washi cream + ginkgo gold + warm ink
   ============================================================ */

:root {
  --matcha: #7a8b5a;
  --matcha-deep: #485732;
  --matcha-dark: #32401f;
  --cream: #f5f1e3;
  --washi: #fbf9f0;
  --ink: #2e2a24;
  --gold: #d9a441;
  --paper: #fffdf6;
  --display: "Baloo 2", "Zen Maru Gothic", sans-serif;
  --hand: "Gochi Hand", cursive;
  --body: "Nunito", "Zen Maru Gothic", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--washi);
  color: var(--ink);
  overflow-x: hidden;
  /* subtle washi paper grain */
  background-image:
    radial-gradient(rgba(122, 139, 90, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(217, 164, 65, 0.04) 1px, transparent 1px);
  background-size: 28px 28px, 44px 44px;
  background-position: 0 0, 14px 22px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hand { font-family: var(--hand); }
.h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--matcha-deep);
  letter-spacing: 0.02em;
}
.sub { color: var(--matcha); font-size: 1.25rem; margin-top: 4px; }

/* ============ PRELOADER ============ */
.gate {
  position: fixed; inset: 0; z-index: 100;
  background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.gate.done { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-badge { width: 110px; height: 110px; animation: bob 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 18px rgba(72, 87, 50, 0.25)); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
.gate-loader { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gl-bar { width: 220px; height: 10px; border-radius: 99px; background: rgba(72, 87, 50, 0.15); overflow: hidden; }
.gl-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--matcha); transition: width 0.2s; }
.gate-loader .hand { color: var(--matcha-deep); font-size: 1.2rem; }

/* ============ NAV ============ */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 240, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(72, 87, 50, 0.12);
}
.nav { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 900; font-size: 1.2rem; color: var(--matcha-deep); }
.brand img { width: 38px; height: 38px; }
.nav-links { display: flex; gap: 20px; margin-left: 8px; font-weight: 700; font-size: 0.92rem; color: var(--matcha-deep); }
.nav-links a:hover { color: var(--gold); }
.nav-mcap {
  margin-left: auto; font-size: 0.8rem; font-weight: 700; color: var(--matcha-deep);
  background: rgba(122, 139, 90, 0.15); padding: 7px 12px; border-radius: 99px; white-space: nowrap;
}
.nav-mcap b { color: var(--matcha-dark); }
.nav-mcap[hidden] { display: none; }
.nav-mcap:not([hidden]) ~ .btn-x { margin-left: 0; }
.btn-x {
  margin-left: auto;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: var(--ink); color: var(--washi); font-size: 1.05rem; font-weight: 700;
}
.nav-mcap:not([hidden]) + .btn-x { margin-left: 0; }
.btn-x:hover { background: var(--matcha-deep); }
.btn-buy {
  background: var(--matcha-deep); color: var(--washi);
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  padding: 10px 18px; border-radius: 14px;
  box-shadow: 0 4px 0 var(--matcha-dark);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-buy:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--matcha-dark); }

/* ============ HERO ============ */
.hero {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  padding: 60px 24px 0;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: center;
  min-height: 78vh;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.leaf { position: absolute; width: 70px; fill: var(--gold); opacity: 0.35; animation: drift 9s ease-in-out infinite; }
.leaf.l1 { top: 8%; left: 4%; transform: rotate(-20deg); }
.leaf.l2 { top: 60%; left: 12%; width: 44px; animation-delay: -3s; opacity: 0.25; }
.leaf.l3 { top: 14%; right: 10%; width: 56px; fill: var(--matcha); animation-delay: -5s; opacity: 0.28; }
.leaf.l4 { bottom: 10%; right: 4%; width: 80px; animation-delay: -7s; opacity: 0.2; }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(-14deg); } 50% { transform: translateY(-18px) rotate(10deg); } }

.hero-inner { position: relative; z-index: 2; }
.eyebrow { font-family: var(--hand); font-size: 1.4rem; color: var(--matcha); margin-bottom: 6px; }
.wordmark {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(4rem, 11vw, 8.2rem);
  line-height: 0.95; color: var(--matcha-deep);
  text-shadow: 4px 4px 0 rgba(217, 164, 65, 0.35);
  letter-spacing: 0.01em;
}
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 500; color: var(--ink); margin-top: 14px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }

.ca-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 2px dashed var(--matcha);
  border-radius: 99px; padding: 10px 16px;
  font-family: var(--body); font-size: 0.85rem;
  transition: transform 0.12s;
}
.ca-pill:hover { transform: scale(1.02); }
.ca-pill.copied { border-style: solid; background: #eef3e2; }
.ca-tag { font-weight: 900; color: var(--matcha-deep); }
.ca-value { font-weight: 500; color: var(--ink); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-hint { font-family: var(--hand); color: var(--matcha); }
.ca-pill.center { margin: 26px auto 0; display: flex; width: fit-content; }

.pf-ico { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; margin-right: 7px; }
.btn-solid {
  background: var(--gold); color: var(--matcha-dark);
  font-family: var(--display); font-weight: 900; font-size: 1rem;
  padding: 13px 24px; border-radius: 16px;
  box-shadow: 0 5px 0 #b9871f;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn-solid:hover { transform: translateY(2px); box-shadow: 0 3px 0 #b9871f; }
.btn-solid.big { font-size: 1.2rem; padding: 16px 32px; }
.btn-ghost {
  background: transparent; color: var(--matcha-deep);
  border: 3px solid var(--matcha-deep);
  font-family: var(--display); font-weight: 900;
  padding: 13px 24px; border-radius: 16px;
}
.btn-ghost:hover { background: var(--matcha-deep); color: var(--washi); }
.btn-ghost.big { font-size: 1.2rem; padding: 13px 32px; }

.rise { opacity: 0; transform: translateY(24px); animation: rise 0.7s ease forwards; }
.r1 { animation-delay: 0.1s; } .r2 { animation-delay: 0.22s; }
.r3 { animation-delay: 0.34s; } .r4 { animation-delay: 0.46s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.hero-stage { position: relative; z-index: 2; min-height: 460px; }
.hero-cat {
  position: absolute; bottom: 0; right: 10%;
  width: min(270px, 58%);
  filter: drop-shadow(0 18px 30px rgba(50, 64, 31, 0.28));
  animation: catIn 0.9s cubic-bezier(0.18, 0.9, 0.32, 1.2) 0.35s backwards;
}
@keyframes catIn { from { opacity: 0; transform: translateY(40px) rotate(-4deg); } }
.hero-pol {
  position: absolute; top: 4%; left: 0;
  width: 190px; transform: rotate(-7deg);
  animation: rise 0.8s ease 0.55s backwards;
}
.polaroid {
  background: var(--paper); padding: 10px 10px 8px;
  box-shadow: 0 10px 26px rgba(46, 42, 36, 0.18);
  border-radius: 4px;
}
.polaroid img { border-radius: 2px; }
.polaroid figcaption { text-align: center; padding-top: 8px; color: var(--ink); font-size: 1.05rem; }
.note { position: absolute; color: var(--matcha-deep); font-size: 1.35rem; }
.note svg { width: 54px; stroke: var(--matcha-deep); stroke-width: 3; fill: none; stroke-linecap: round; }
.note-him { top: 24%; right: 2%; transform: rotate(6deg); animation: rise 0.8s ease 0.7s backwards; }
.sticker {
  position: absolute; z-index: 3;
  font-family: var(--display); font-weight: 900; font-size: 0.8rem;
  background: var(--gold); color: var(--matcha-dark);
  padding: 8px 13px; border-radius: 99px;
  box-shadow: 0 4px 12px rgba(46, 42, 36, 0.2);
  animation: rise 0.7s ease 0.8s backwards;
}
.st-left { bottom: 30%; left: 2%; transform: rotate(-8deg); background: var(--paper); border: 2px solid var(--matcha); color: var(--matcha-deep); }
.st-right { bottom: 6%; right: 0; transform: rotate(5deg); }

/* ============ MARQUEE ============ */
.marquee { overflow: hidden; background: var(--matcha-deep); padding: 13px 0; transform: rotate(-1deg) scale(1.02); margin: 30px 0; }
.marquee-track { display: flex; gap: 26px; width: max-content; animation: mq 26s linear infinite; align-items: center; }
.mq { color: var(--cream); font-size: 1.45rem; white-space: nowrap; }
.dot { font-size: 0.9rem; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ============ STORY ============ */
.story { padding: 80px 0 40px; }
.story-head { text-align: center; margin-bottom: 60px; }
.beat {
  position: relative;
  display: grid; grid-template-columns: 300px 1fr; gap: 44px;
  align-items: center; margin-bottom: 90px;
}
.beat.rev { grid-template-columns: 1fr 300px; }
.beat.rev .polaroid { order: 2; }
.beat.rev .beat-copy { order: 1; }
.p-left { transform: rotate(-4deg); }
.p-right { transform: rotate(4deg); }
.beat .polaroid { transition: transform 0.25s; }
.beat .polaroid:hover { transform: rotate(0) scale(1.03); }
.beat-copy .hand { font-size: 1.45rem; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.big-hand { font-size: 1.75rem !important; color: var(--matcha-deep) !important; }
.story-shout {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  color: #bd851f;
  margin: 12px 0;
  transform: rotate(-1deg);
}
.arrow { position: absolute; width: 90px; stroke: var(--matcha); stroke-width: 3.5; fill: none; stroke-linecap: round; opacity: 0.8; }
.a1 { bottom: -60px; left: 26%; }
.a2 { bottom: -60px; right: 30%; transform: scaleX(1); }

.plaque {
  background: var(--cream);
  border: 2px solid rgba(72, 87, 50, 0.25);
  border-radius: 18px;
  padding: 28px 32px;
  max-width: 640px; margin: 0 auto;
  box-shadow: 0 12px 30px rgba(46, 42, 36, 0.1);
  transform: rotate(-0.5deg);
}
.plaque-title { font-size: 1.6rem; color: var(--matcha-deep); margin-bottom: 10px; }
.plaque p { line-height: 1.65; font-size: 1rem; }
.plaque b { color: var(--matcha-deep); }
.plaque-cto { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(72, 87, 50, 0.3); }

/* ============ ALBUM BAND ============ */
.albumband { overflow: hidden; padding: 26px 0; background: var(--matcha); transform: rotate(1deg) scale(1.02); }
.albumband-track { display: flex; gap: 18px; width: max-content; animation: mq 32s linear infinite; }
.albumband img {
  width: 190px; height: 190px; object-fit: cover;
  border: 8px solid var(--paper); border-radius: 4px;
  box-shadow: 0 8px 18px rgba(46, 42, 36, 0.25);
  transform: rotate(-2deg);
}
.albumband img:nth-child(even) { transform: rotate(2deg); }

/* ============ GINNANOMICS ============ */
.nomics { position: relative; padding: 100px 0; overflow: hidden; text-align: center; }
.watermark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--display); font-weight: 900;
  font-size: clamp(5rem, 16vw, 13rem);
  color: rgba(122, 139, 90, 0.08);
  white-space: nowrap; pointer-events: none;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 46px; position: relative; z-index: 2;
}
.stat-card {
  background: var(--paper);
  border: 2px solid rgba(72, 87, 50, 0.2);
  border-radius: 18px;
  padding: 26px 14px;
  box-shadow: 0 10px 24px rgba(46, 42, 36, 0.1);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  transition: transform 0.2s;
}
.tilt-l { transform: rotate(-1.6deg); } .tilt-r { transform: rotate(1.6deg); }
.stat-card:hover { transform: rotate(0) translateY(-6px); }
.stat-label { font-size: 0.75rem; font-weight: 900; letter-spacing: 0.12em; color: var(--matcha); }
.stat-value { font-family: var(--display); font-weight: 900; font-size: 2.4rem; color: var(--matcha-deep); }
.stat-note { color: var(--gold); font-size: 1.05rem; }

/* ============ HOW TO ============ */
.howto { padding: 60px 0 90px; text-align: center; }
.steps { max-width: 720px; margin: 40px auto 0; }
.step-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.step-tab {
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  background: var(--cream); color: var(--matcha-deep);
  border: 2px solid rgba(72, 87, 50, 0.25);
  padding: 10px 20px; border-radius: 99px;
  transition: all 0.15s;
}
.step-tab.active { background: var(--matcha-deep); color: var(--washi); border-color: var(--matcha-deep); }
.step-panes {
  margin-top: 26px; background: var(--paper);
  border: 2px solid rgba(72, 87, 50, 0.2); border-radius: 20px;
  padding: 34px 30px; min-height: 150px;
  box-shadow: 0 10px 24px rgba(46, 42, 36, 0.08);
}
.step-pane { display: none; }
.step-pane.active { display: block; animation: rise 0.4s ease; }
.step-pane h3 { font-family: var(--display); font-weight: 900; color: var(--matcha-deep); font-size: 1.4rem; margin-bottom: 10px; }
.step-pane p { line-height: 1.6; color: var(--ink); max-width: 52ch; margin: 0 auto; }

/* ============ ALBUM / FILMSTRIP ============ */
.album { padding: 20px 0 60px; }
.album .wrap { text-align: center; margin-bottom: 34px; }
.filmstrip { overflow: hidden; background: var(--ink); padding: 22px 0; }
.filmstrip-track { display: flex; gap: 14px; width: max-content; animation: mq 40s linear infinite; }
.filmstrip img {
  height: 240px; width: auto; border-radius: 6px; cursor: zoom-in;
  border: 4px solid rgba(251, 249, 240, 0.14);
  transition: transform 0.2s;
}
.filmstrip img:hover { transform: scale(1.04); }

/* ============ CTA ============ */
.cta { padding: 100px 0; text-align: center; }
.cta-title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  color: var(--matcha-deep);
  text-shadow: 3px 3px 0 rgba(217, 164, 65, 0.4);
}
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ============ FOOTER ============ */
.footer {
  position: relative; overflow: hidden;
  background: var(--matcha-dark); color: var(--cream);
  padding: 60px 0 110px; text-align: center;
}
.foot-links { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; font-weight: 700; }
.foot-links a:hover { color: var(--gold); }
.dex-link { display: inline-flex; align-items: center; gap: 8px; }
.dex-icon {
  width: 20px; height: 20px; flex: none;
  background: currentColor;
  -webkit-mask: url("images/dexscreener.svg") no-repeat center / contain;
          mask: url("images/dexscreener.svg") no-repeat center / contain;
}
.foot-note { max-width: 560px; margin: 26px auto 0; font-size: 0.82rem; line-height: 1.6; color: rgba(245, 241, 227, 0.65); }
.foot-wordmark {
  position: absolute; bottom: -38px; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-weight: 800;
  font-size: clamp(6rem, 20vw, 15rem); line-height: 1;
  color: rgba(245, 241, 227, 0.09);
  white-space: nowrap; pointer-events: none;
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(30, 34, 22, 0.92);
  display: grid; place-items: center; padding: 4vh 4vw;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lb-close {
  position: absolute; top: 18px; right: 26px;
  background: none; border: none; color: var(--cream); font-size: 2.6rem; line-height: 1;
}

/* ============ COIN RAIN ============ */
.coin-rain { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.coin-rain .rain-coin {
  position: absolute; top: -80px;
  width: var(--size, 40px); height: var(--size, 40px);
  left: var(--x, 50%);
  background: url("images/coin.png") no-repeat center / contain;
  filter: drop-shadow(0 4px 8px rgba(50, 64, 31, 0.25));
  animation: coinfall var(--dur, 9s) linear var(--delay, 0s) infinite;
  opacity: 0;
}
@keyframes coinfall {
  0%   { transform: translateY(0) rotateY(0deg) rotate(var(--tilt, 0deg)); opacity: 0; }
  5%   { opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(115vh) rotateY(1080deg) rotate(var(--tilt, 0deg)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .coin-rain { display: none; } }

/* ============ REVEALS ============ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.on { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 40px; min-height: 0; }
  .hero-stage { min-height: 540px; margin-top: 18px; }
  .hero-cat { right: 50%; transform: translateX(50%); width: min(230px, 52%); }
  .hero-pol { left: 2%; width: 150px; }
  .note-him { display: none; }
  .beat, .beat.rev { grid-template-columns: 1fr; gap: 26px; margin-bottom: 70px; }
  .beat.rev .polaroid { order: 0; }
  .beat .polaroid { max-width: 300px; margin: 0 auto; }
  .arrow { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-mcap { display: none; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 1.8rem; }
  .filmstrip img { height: 180px; }
  .ca-value { max-width: 130px; }
}
