/* ============================================================
   $ROBIN — The Druid of the Green Candle
   Layered parallax glade hero (sky / stones / druid / title / trees),
   storybook legend trail, signpost robinomics, quest-path onboarding,
   marquee meme stream, vine seams between sections
   ============================================================ */

:root {
  --ink: #17200f;
  --night: #0e1a10;
  --night-2: #132416;
  --cream: #f3ecd4;
  --parch-ink: #34411f;
  --parch-ink-soft: #55643a;
  --moss: #5c7a3a;
  --leaf: #7ac142;
  --glow: #58ff7d;
  --glow-soft: rgba(88, 255, 125, .5);
  --gold: #e8b64c;
  --wood-hi: #6b4f2a;
  --wood-lo: #55391c;
  --outline: 3px solid var(--ink);
  --sticker-shadow: 6px 6px 0 rgba(20, 28, 13, .8);
  --radius: 20px;
  --font-display: "Luckiest Guy", system-ui, sans-serif;
  --font-body: "Baloo 2", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  /* one fixed parchment behind everything except the hero */
  background: linear-gradient(rgba(243, 236, 212, .62), rgba(243, 236, 212, .62)),
              url("images/parchment-bg.jpg") center / cover fixed;
  color: var(--parch-ink);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--glow); color: var(--ink); }

/* ============ NAV ============ */
.nav-wrap {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--cream);
  border: var(--outline);
  border-radius: 999px;
  box-shadow: 5px 5px 0 rgba(20, 28, 13, .55);
  padding: .45rem .9rem;
  max-width: 1080px;
  width: 100%;
}
.nav-brand { display: flex; align-items: center; gap: .5rem; }
.nav-brand img { width: 42px; height: 42px; }
.nav-brand span { font-family: var(--font-display); font-size: 1.35rem; color: var(--parch-ink); letter-spacing: .02em; }
.nav-links { display: flex; gap: 1.1rem; margin-left: auto; }
.nav-links a {
  font-weight: 800;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .05em;
  color: var(--parch-ink);
  transition: color .15s, transform .15s;
}
.nav-links a:hover { color: var(--moss); transform: translateY(-1px); }
.nav-stats {
  display: flex;
  gap: .9rem;
  background: #dfd3ab;
  border-radius: 999px;
  padding: .45rem .85rem;
  font-size: .72rem;
  font-weight: 700;
  color: #6b6136;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.nav-stats b { color: var(--ink); }
.btn-buy {
  font-family: var(--font-display);
  font-size: .95rem;
  color: var(--ink);
  background: var(--glow);
  border: var(--outline);
  border-radius: 999px;
  padding: .55em 1.1em .4em;
  box-shadow: 3px 3px 0 rgba(20, 28, 13, .8), 0 0 18px rgba(88, 255, 125, .35);
  transition: transform .12s, box-shadow .12s;
  white-space: nowrap;
}
.btn-buy:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 rgba(20, 28, 13, .8), 0 0 26px rgba(88, 255, 125, .5); }
.btn-buy:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(20, 28, 13, .8); }

/* ============ HERO — layered parallax glade ============ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--night);
}
.layer, .hero-char, .hero-title, .hero-obj { will-change: transform; }

.layer-sky {
  position: absolute;
  inset: -8% 0 0 0;
  z-index: 0;
  background: #0a1526;
}
.layer-sky svg { width: 100%; height: 100%; display: block; }

.layer-mid {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: max(100%, 1100px);
  z-index: 2;
  pointer-events: none;
}
.hero-char {
  position: absolute;
  left: 50%;
  bottom: -3%;
  margin-left: calc(clamp(345px, 42vmin, 570px) / -2);
  width: clamp(345px, 42vmin, 570px);
  z-index: 3;
}
.hero-char img {
  width: 100%;
  filter: drop-shadow(0 0 22px rgba(88, 255, 125, .3)) drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
  animation: druidBreathe 6s ease-in-out infinite;
  transform-origin: 50% 100%;
}

/* the two link artifacts, flanking the druid */
.hero-obj {
  position: absolute;
  top: 48%;
  z-index: 4;
  width: clamp(70px, 9vmin, 112px);
  transition: transform .18s ease;
}
.hero-obj img { width: 100%; filter: drop-shadow(0 0 14px var(--glow-soft)) drop-shadow(0 10px 16px rgba(0, 0, 0, .5)); }
.hero-obj:hover { transform: scale(1.14) rotate(-4deg); }
.obj-x   { left: calc(50% - clamp(200px, 24vmin, 330px)); animation: floaty 6.5s ease-in-out infinite; }
.obj-dex { left: calc(50% + clamp(200px, 24vmin, 330px) - clamp(70px, 9vmin, 112px)); animation: floaty 7.5s ease-in-out infinite 1s; }

.hero-title {
  position: absolute;
  left: 50%;
  bottom: 4.5%;
  transform: translateX(-50%);
  width: clamp(340px, 44vw, 620px);
  z-index: 7; /* in front of the foreground trees */
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
  pointer-events: none;
}
.layer-fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: 6;
  pointer-events: none;
}
.hero-ca {
  position: absolute;
  left: 4%;
  top: 108px;
  z-index: 8;
}

/* wooden CA sign */
.ca-sign {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: linear-gradient(180deg, var(--wood-hi) 0%, var(--wood-lo) 100%);
  color: var(--cream);
  border: var(--outline);
  border-radius: 12px;
  box-shadow: inset 0 2px 0 rgba(255, 235, 190, .25), 4px 5px 0 rgba(20, 28, 13, .55);
  padding: .6rem 1.1rem;
  transform-origin: 50% -24px;
  animation: signSwing 5.5s ease-in-out infinite;
  transition: transform .12s;
}
.ca-sign::before, .ca-sign::after {
  content: "";
  position: absolute;
  top: -24px;
  width: 3px; height: 26px;
  background: #a88350;
  border-radius: 2px;
}
.ca-sign::before { left: 22%; transform: rotate(8deg); }
.ca-sign::after { right: 22%; transform: rotate(-8deg); }
.ca-sign:hover { animation-play-state: paused; }
.ca-sign:active { transform: translateY(2px); }
.ca-label {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--glow);
  border-radius: 999px;
  padding: .25em .65em .12em;
  font-size: .82rem;
}
.ca-value { font-weight: 700; font-size: .9rem; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-hint { font-size: .66rem; font-weight: 500; opacity: .6; }
.ca-strip { margin-top: 1.8rem; display: flex; justify-content: center; }
.ca-strip .ca-sign { animation: none; }
.ca-strip .ca-sign::before, .ca-strip .ca-sign::after { display: none; }

/* ============ SECTION CHROME ============ */
.section-inner {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5.5rem;
  z-index: 2;
}
.heading-img {
  width: min(640px, 85%);
  margin: 0 auto 2.6rem;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .18));
}
.section-sub { text-align: center; margin: -1.6rem 0 1.6rem; opacity: .75; font-weight: 600; }

/* stacked z so each section's seam decoration paints over the next */
.legend { z-index: 8; }
.tokenomics { z-index: 7; }
.grove { z-index: 6; }
.memes { z-index: 5; }
.chart { z-index: 4; }
.footer { z-index: 3; }

/* endless garland carousel straddling the hero/legend seam */
.band-carousel {
  position: relative;
  z-index: 20;
  margin: -58px 0;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3));
}
.band-static { width: 100%; height: auto; display: block; }

/* sections sit transparent on the body's fixed parchment */
.legend, .tokenomics, .grove, .memes { position: relative; color: var(--parch-ink); }

/* oversized props drifting up across the legend→robinomics seam */
.float-props {
  position: absolute;
  left: 0; right: 0;
  bottom: -45vh;
  height: 90vh;
  z-index: 30;
  pointer-events: none;
}
.fp {
  position: absolute;
  width: min(190px, 20vw);
  filter: blur(2.2px) drop-shadow(0 18px 26px rgba(20, 28, 13, .35));
  will-change: transform;
}
.fp-1 { left: 28%; top: 4%; rotate: -7deg; }
.fp-2 { right: 28%; top: 32%; rotate: 6deg; width: min(110px, 12vw); }
.fp-3 { left: 31%; top: 60%; rotate: -5deg; }

/* ============ THE LEGEND — storybook trail ============ */
.story { display: grid; gap: 2.4rem; }
.beat {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 2.2rem;
  align-items: center;
}
.beat figure {
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--sticker-shadow);
  transform: rotate(-1.4deg);
  transition: transform .2s ease;
}
.beat:hover figure { transform: rotate(0deg) scale(1.02); }
.beat-flip figure { order: 2; transform: rotate(1.4deg); }
.beat figure img { width: 100%; }
.beat-copy { position: relative; padding-left: 3.6rem; }
.beat-no {
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--moss);
  opacity: .85;
}
.beat-copy h3 { font-family: var(--font-display); font-size: 1.5rem; color: #1f2b10; margin-bottom: .4rem; letter-spacing: .02em; }
.beat-copy p { line-height: 1.7; font-size: 1.05rem; font-weight: 500; }
.beat-copy b { color: #4c8a2e; }
.oath {
  margin: 3.2rem auto 0;
  max-width: 56ch;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.8;
  padding: 1.4rem 1.8rem;
  background: rgba(250, 246, 226, .8);
  border: 3px solid var(--parch-ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 rgba(52, 65, 31, .3);
}
.oath span { display: block; margin-top: .5rem; font-size: .9rem; font-weight: 600; opacity: .7; }

/* ============ ROBINOMICS — signposts ============ */
.tokenomics { overflow: visible; }
.signposts {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(1rem, 4vw, 3rem);
  margin-top: 1rem;
}
.signpost { display: grid; justify-items: center; }
.sign {
  display: grid;
  gap: .2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--wood-hi) 0%, var(--wood-lo) 100%);
  border: var(--outline);
  border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(255, 235, 190, .25), 5px 5px 0 rgba(0, 0, 0, .35);
  padding: 1rem 1.6rem;
  transform: rotate(-1.2deg);
  transition: transform .15s ease;
}
.signpost:nth-child(2) .sign { transform: rotate(1.4deg); }
.signpost:hover .sign { transform: rotate(0deg) translateY(-4px); }
.sign span {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  color: #f0c96a;
}
.sign b {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--cream);
  letter-spacing: .04em;
}
.post {
  width: 12px;
  height: 74px;
  background: linear-gradient(180deg, var(--wood-lo), #3c2813);
  border: 2.5px solid var(--ink);
  border-top: none;
  border-radius: 0 0 6px 6px;
}
.signpost-tall .post { height: 110px; }
.tokenomics-note { text-align: center; margin-top: 1.8rem; font-style: italic; opacity: .6; font-weight: 500; }
.prop { position: absolute; pointer-events: none; z-index: 1; }
.prop img { width: 100%; }
.prop-rune { width: clamp(80px, 10vw, 150px); right: 3%; bottom: 8%; animation: bob 6.5s ease-in-out infinite; }

/* fireflies */
.fireflies { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fireflies span {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px 3px var(--glow-soft);
  opacity: 0;
  animation: firefly 9s linear infinite;
}
.fireflies span:nth-child(1) { left: 12%; top: 62%; animation-delay: 0s; }
.fireflies span:nth-child(2) { left: 28%; top: 34%; animation-delay: 1.5s; }
.fireflies span:nth-child(3) { left: 46%; top: 66%; animation-delay: 3s; }
.fireflies span:nth-child(4) { left: 62%; top: 30%; animation-delay: 4.5s; }
.fireflies span:nth-child(5) { left: 76%; top: 58%; animation-delay: 6s; }
.fireflies span:nth-child(6) { left: 90%; top: 38%; animation-delay: 7.5s; }

/* ============ JOIN THE GROVE — quest path ============ */
.quest {
  list-style: none;
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  gap: 2.2rem;
}
.quest::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px; bottom: 10px;
  border-left: 4px dashed rgba(52, 65, 31, .45);
  transform: translateX(-50%);
}
.waypoint {
  position: relative;
  width: calc(50% - 3.2rem);
}
.waypoint-right { margin-left: auto; }
.marker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem; height: 3rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding-top: .2em;
  color: var(--cream);
  background: radial-gradient(circle at 35% 30%, #8a9a83, #5c6b56 60%, #47543f);
  border: 3px solid var(--ink);
  border-radius: 48% 52% 50% 50% / 55% 55% 45% 45%;
  box-shadow: 0 0 14px rgba(88, 255, 125, .45), 3px 3px 0 rgba(20, 28, 13, .4);
  z-index: 2;
}
.waypoint .marker { right: -4.9rem; }
.waypoint-right .marker { left: -4.9rem; }
.quest-card {
  background: rgba(250, 246, 226, .85);
  border: 3px solid var(--parch-ink);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  box-shadow: 4px 4px 0 rgba(52, 65, 31, .28);
  transition: transform .15s ease;
}
.waypoint:hover .quest-card { transform: translateY(-4px); }
.quest-card h3 { font-family: var(--font-display); font-size: 1.12rem; margin-bottom: .3rem; color: #1f2b10; letter-spacing: .02em; }
.quest-card p { line-height: 1.55; font-size: .96rem; font-weight: 500; }
.quest-card b { color: #4c8a2e; }
.quest-end { display: grid; justify-items: center; gap: .3rem; margin-top: 2.4rem; }
.quest-end img { width: 86px; animation: bob 4.5s ease-in-out infinite; }
.quest-end p { font-style: italic; font-weight: 600; opacity: .7; }


/* ============ FOREST FRESH — meme stream ============ */
.memes { padding-bottom: 4rem; }
.memes .section-sub { color: var(--parch-ink-soft); opacity: 1; }
.memes-inner { padding-bottom: 1rem; }
.stream { display: grid; gap: 1.2rem; }
.stream-row { overflow: hidden; }
.stream-track {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  padding: .2rem 0;
  animation: streamLeft 42s linear infinite;
}
.stream-right .stream-track { animation: streamRight 48s linear infinite; }
.stream-row:hover .stream-track { animation-play-state: paused; }
.stream-track img {
  height: clamp(180px, 26vmin, 280px);
  width: auto;
  border: 4px solid var(--ink);
  outline: 3px solid var(--moss);
  outline-offset: -7px;
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 rgba(20, 28, 13, .7);
  transition: transform .18s ease;
}
.stream-track img:hover { transform: scale(1.05) rotate(-1deg); }

/* ============ FOOTER ============ */
.footer { position: relative; padding-top: 2.5rem; color: var(--parch-ink); overflow: hidden; }
.footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: .4rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.4rem;
}
.footer-brand { display: flex; align-items: center; gap: .6rem; }
.footer-brand img { width: 44px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.35rem; color: var(--parch-ink); }
.footer-chain { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .85rem; color: var(--parch-ink-soft); }
.footer-chain img { width: 30px; }
.footer-mail { font-weight: 700; font-size: .85rem; color: #4c8a2e; }
.footer-mail:hover { color: var(--moss); }
.footer-fine {
  width: min(1120px, 100%);
  margin: 1.4rem auto 0;
  padding: 0 1.5rem 1rem;
  font-size: .74rem;
  line-height: 1.6;
  color: rgba(52, 65, 31, .55);
}
.footer .footer-fine { padding-bottom: 2rem; }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  left: 50%; bottom: 2rem;
  transform: translate(-50%, calc(100% + 3rem));
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--glow);
  color: var(--ink);
  font-weight: 800;
  padding: .8rem 1.4rem;
  border: var(--outline);
  border-radius: 16px;
  box-shadow: var(--sticker-shadow);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2);
  z-index: 100;
}
.toast.show { transform: translate(-50%, 0); }
.toast img { width: 28px; }

/* scroll reveal */
.sr { opacity: 0; transform: translateY(34px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.1); }
.sr.in { opacity: 1; transform: none; }

/* ============ KEYFRAMES ============ */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floaty { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -16px; rotate: 3deg; } }
@keyframes druidBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015) translateY(-4px); } }
@keyframes signSwing { 0%, 100% { transform: rotate(-2.4deg); } 50% { transform: rotate(2.4deg); } }
@keyframes skyDrift { from { background-position: 44% center; } to { background-position: 56% center; } }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .95; } }
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: .95; }
  50% { opacity: .55; transform: translate(26px, -34px); }
  85% { opacity: .9; }
  100% { opacity: 0; transform: translate(-14px, -64px); }
}
@keyframes streamLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes streamRight { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes bandScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .nav-stats { display: none; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav { gap: .7rem; }
  .nav-brand { margin-right: auto; }
  .hero-char { width: clamp(300px, 66vw, 440px); margin-left: calc(clamp(300px, 66vw, 440px) / -2); bottom: -2%; }
  .hero-title { width: clamp(280px, 74vw, 460px); bottom: 8%; }
  .layer-mid { bottom: 14%; }
  .band-carousel { margin: -32px 0; }
  .fp { width: 23vw; }
  .fp-1, .fp-3 { left: 10%; }
  .fp-2 { right: 10%; width: 13vw; }
  .hero-obj { width: clamp(58px, 13vw, 84px); top: 34%; }
  .obj-x { left: 5%; }
  .obj-dex { left: auto; right: 5%; }
  .hero-ca { left: 50%; transform: translateX(-50%); top: 96px; width: max-content; }
  .beat, .beat-flip { grid-template-columns: 1fr; gap: 1.1rem; }
  .beat-flip figure { order: 0; }
  .signposts { flex-direction: column; align-items: center; gap: .4rem; }
  .post { height: 30px !important; }
  .quest::before { left: 1.4rem; }
  .waypoint, .waypoint-right { width: auto; margin-left: 3.6rem; }
  .waypoint .marker, .waypoint-right .marker { left: -3.6rem; right: auto; }
  .seam-vine { width: 130%; }
}
