/* ---------- Gappy world tokens ---------- */
@font-face {
  font-family: "Gappy 04b30";
  src: url("assets/fonts/04B_30.TTF") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --deep-green: #103e2b;
  --dark-green: #174b35;
  --fwog-green: #a6d98c;
  --light-green: #dcebd4;
  --cream: #edf3e8;
  --soft-black: #13231a;
  --ink: var(--deep-green);
  --ink-soft: #315d45;
  --display: "Anton", Impact, sans-serif;
  --pixel: "Silkscreen", "Courier New", monospace;
  --body: "Space Grotesk", system-ui, sans-serif;
  --shell: min(1160px, calc(100% - 48px));
  --radius: 18px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  color: var(--ink);
  background: #6f8e68;
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -3;
  background: url("assets/gappy-bg.jpg") center / cover no-repeat;
}

body::after {
  z-index: -2;
  background: linear-gradient(180deg, rgba(9, 22, 15, .25), rgba(9, 22, 15, .38));
}

::selection { color: var(--soft-black); background: var(--fwog-green); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.shell { width: var(--shell); margin-inline: auto; }
.section { position: relative; z-index: 2; padding: 88px 0; }
.page-background { display: none; }

/* ---------- Fixed ambient heads ---------- */
.floating-heads {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.floating-head {
  position: absolute;
  left: var(--head-left);
  top: var(--head-top);
  width: var(--size);
  height: auto;
  object-fit: contain;
  opacity: var(--opacity);
  filter: blur(var(--blur));
  transform-origin: center;
  animation: float-head var(--duration) ease-in-out infinite alternate;
  animation-delay: var(--delay);
  will-change: transform;
}

@keyframes float-head {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(.96);
  }
  to {
    transform: translate3d(var(--move-x), var(--move-y), 0)
      rotate(var(--rotation)) scale(1.04);
  }
}

/* ---------- Hero composition ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 0;
  text-align: center;
  background: transparent;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-2vh);
}

.hero-logo {
  width: min(clamp(600px, 64vw, 780px), calc(100vw - 40px));
  height: auto;
  max-height: none;
  object-fit: contain;
  margin: 0 0 8px;
  filter: drop-shadow(3px 5px 0 rgba(16, 62, 43, .16));
  animation: hero-arrive 1s cubic-bezier(.22, .8, .25, 1) both;
}

@keyframes hero-arrive {
  from { opacity: 0; transform: translateY(18px) scale(.96) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}

h1, h2, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; }

h1 {
  margin-bottom: 17px;
  color: var(--cream);
  font-family: "Gappy 04b30", "Courier New", monospace;
  font-size: clamp(3.8rem, 7.8vw, 8rem);
  font-synthesis: none;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: .92;
  text-align: center;
  text-shadow: 3px 3px 0 rgba(24, 63, 44, .78);
  text-wrap: balance;
  white-space: nowrap;
}

.hero-copy {
  margin-bottom: 25px;
  color: var(--cream);
  font-size: clamp(.95rem, 1.5vw, 1.08rem);
  font-weight: 600;
  text-shadow: 1px 2px 0 rgba(16, 62, 43, .68);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Custom organic buttons ---------- */
.button {
  min-width: 108px;
  padding: 11px 19px;
  border: 2px solid var(--deep-green);
  border-radius: 999px 999px 920px 999px;
  color: var(--deep-green);
  background: rgba(225, 240, 211, .82);
  box-shadow: 4px 4px 0 rgba(10, 46, 30, .75);
  font: 700 .75rem/1 var(--body);
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.button:nth-child(even) { transform: rotate(.45deg); }
.button-primary { background: var(--fwog-green); }

.button:hover,
.button:focus-visible {
  background: #bee5a9;
  box-shadow: 2px 2px 0 rgba(10, 46, 30, .82);
  transform: translateY(-3px) rotate(-1deg);
}

.button:nth-child(even):hover,
.button:nth-child(even):focus-visible { transform: translateY(-3px) rotate(1deg); }
.button:active { transform: translateY(1px); box-shadow: 1px 1px 0 rgba(10, 46, 30, .8); }

.hero-ca {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: min(100%, 620px);
  margin-top: 29px;
  padding: .6rem 1rem;
  border: 1px solid rgba(214, 237, 199, .55);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(7, 24, 15, .58);
  backdrop-filter: blur(5px);
  font: 600 .7rem/1.2 var(--body);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.hero-ca:hover,
.hero-ca:focus-visible { transform: translateY(-2px); border-color: rgba(237, 245, 231, .9); background: rgba(7, 24, 15, .72); }
.hero-ca-label, .hero-ca-copy { color: var(--fwog-green); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-ca-address { overflow-wrap: anywhere; }

/* ---------- Compact translucent marquee ---------- */
.marquee {
  position: relative;
  z-index: 4;
  overflow: hidden;
  border-block: 1px solid rgba(16, 62, 43, .5);
  background: rgba(185, 221, 163, .78);
  backdrop-filter: blur(4px);
  transform: rotate(-.55deg) scale(1.01);
}

.marquee-track { display: flex; width: max-content; opacity: 0; will-change: transform; }
.marquee.is-ready .marquee-track { opacity: 1; animation: hero-ticker 28s linear infinite; }
.marquee-group { display: flex; flex-shrink: 0; align-items: center; width: max-content; gap: 24px; padding: 13px 12px; box-sizing: border-box; }
.marquee span { color: var(--deep-green); font-size: clamp(.76rem, 1.3vw, .9rem); font-weight: 700; letter-spacing: .09em; white-space: nowrap; }
.marquee i { color: var(--deep-green); font-size: .75rem; font-style: normal; }
@keyframes hero-ticker {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--ticker-distance)), 0, 0); }
}

/* ---------- Editorial section headings ---------- */
.section-heading {
  position: relative;
  z-index: 3;
  margin-bottom: 52px;
  text-align: center;
}

h2 {
  margin-bottom: 10px;
  color: var(--cream);
  font-size: clamp(3.8rem, 7.5vw, 7.4rem);
  letter-spacing: -.035em;
  line-height: .88;
  text-shadow: 3px 4px 0 rgba(16, 62, 43, .86);
}

#chart-title {
  font-family: "Gappy 04b30", "Courier New", monospace;
  font-size: clamp(3.2rem, 7vw, 7rem);
  font-synthesis: none;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: .94;
  text-shadow: 2px 2px 0 rgba(24, 63, 44, .78);
}

.section-copy {
  margin-bottom: 0;
  color: var(--cream);
  font-size: clamp(.86rem, 1.5vw, 1rem);
  font-weight: 500;
  text-shadow: 1px 2px 0 rgba(16, 62, 43, .78);
}

/* ---------- Live market panel ---------- */
.chart-section { padding: 88px 0 82px; background: transparent; }

.market-shell {
  position: relative;
  z-index: 3;
  width: min(1120px, 100%);
  margin-inline: auto;
  overflow: hidden;
  border: 3px solid var(--deep-green);
  border-radius: var(--radius);
  background: rgba(4, 18, 10, .82);
  box-shadow: 10px 10px 0 rgba(126, 180, 101, .55);
  backdrop-filter: blur(5px);
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(201, 233, 185, .12);
}

.market-pair { display: flex; flex-direction: column; gap: 3px; }
.market-symbol { color: var(--cream); font: 700 clamp(.9rem, 2vw, 1.15rem) var(--pixel); letter-spacing: -.04em; }
.market-network { color: #adc6a4; font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.dex-link {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 2px solid #8fc37a;
  border-radius: 999px;
  color: var(--deep-green);
  background: #b6e69c;
  box-shadow: 3px 3px 0 rgba(10, 46, 30, .8);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease;
}

.dex-link:hover { transform: translateY(-2px); box-shadow: 1px 1px 0 rgba(10, 46, 30, .8); }
.dex-link.is-disabled { opacity: .45; pointer-events: none; }

.market-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid rgba(201, 233, 185, .12);
}

.market-stat { min-width: 0; padding: 16px 13px; border-right: 1px solid rgba(201, 233, 185, .1); }
.market-stat:last-child { border-right: 0; }
.market-stat span { display: block; margin-bottom: 5px; color: #8eaa86; font-size: .57rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.market-stat strong { display: block; overflow: hidden; color: var(--cream); font-size: clamp(.76rem, 1.3vw, .95rem); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.market-stat strong.positive { color: #b6e69c; }
.market-stat strong.negative { color: #dc9384; }

.custom-chart-container {
  position: relative;
  height: clamp(360px, 50vw, 600px);
  min-height: 360px;
  overflow: hidden;
}

.gappy-line-chart { position: relative; width: 100%; max-width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; cursor: default; touch-action: pan-x pan-y; scrollbar-width: none; }
.gappy-line-chart::-webkit-scrollbar { width: 0; height: 0; }
.gappy-line-chart__svg { width: var(--chart-content-width, 100%); min-width: 100%; height: 100%; display: block; overflow: hidden; shape-rendering: geometricPrecision; text-rendering: geometricPrecision; }
.chart-grid line { stroke: rgba(169, 218, 154, .07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis-labels text { fill: rgba(219, 239, 211, .58); font: 500 10px var(--body); }
.chart-area { pointer-events: none; }
.chart-line { fill: none; stroke: #b7f59a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart-current-price circle,
.chart-crosshair circle { fill: #b7f59a; stroke: #183f2c; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-current-price text { fill: #eef6e7; font: 600 10px var(--body); }
.chart-crosshair line { stroke: rgba(183, 245, 154, .35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-hit-area { pointer-events: all; }

.chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 138px;
  padding: 8px 10px;
  border: 1px solid rgba(183, 245, 154, .28);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(3, 25, 14, .94);
  font-size: .66rem;
  line-height: 1.45;
  pointer-events: none;
}

.chart-tooltip strong { display: block; color: #b7f59a; font-size: .72rem; }
.chart-tooltip span { color: #adc6a4; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.chart-waiting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font: 400 clamp(.62rem, 1.4vw, .78rem) var(--pixel);
  letter-spacing: -.03em;
  text-align: center;
  pointer-events: none;
}

.chart-waiting.hidden { display: none; }
.chart-waiting.is-error { gap: 16px; }
.chart-waiting:not(.is-error) .chart-state-message { animation: chart-state-pulse 1.6s ease-in-out infinite; }
@keyframes chart-state-pulse { 50% { opacity: .5; } }
.chart-retry {
  padding: 8px 13px;
  border: 1px solid rgba(214, 237, 199, .65);
  border-radius: 999px;
  color: var(--deep-green);
  background: rgba(225, 240, 211, .9);
  font: 700 .62rem var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}
.market-footer { display: flex; justify-content: space-between; gap: 16px; padding: 13px 22px; border-top: 1px solid rgba(201, 233, 185, .12); color: #adc6a4; font-size: .58rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.live-label { font-family: var(--pixel); letter-spacing: -.03em; }
.chart-status.error { color: #dc9384; }

/* ---------- Full-width artwork marquee ---------- */
.gallery-marquee {
  --gallery-gap: clamp(12px, 1.15vw, 22px);
  --gallery-image-height: clamp(180px, 13vw, 245px);
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 58px 0 84px;
  overflow: hidden;
}

.gallery-row {
  --gallery-duration: 140s;
  width: 100%;
  overflow: hidden;
}
.gallery-row + .gallery-row { margin-top: 22px; }
.gallery-row:nth-child(2) { --gallery-duration: 156s; }
.gallery-row:nth-child(3) { --gallery-duration: 148s; }
.gallery-row:nth-child(4) { --gallery-duration: 164s; }

.gallery-track {
  display: flex;
  width: max-content;
  gap: var(--gallery-gap);
  opacity: 0;
  will-change: transform;
}
.gallery-row--left .gallery-track { transform: translate3d(0, 0, 0); }
.gallery-row--right .gallery-track { transform: translate3d(calc(-1 * var(--gallery-distance, 0px)), 0, 0); }
.gallery-row.is-ready .gallery-track { opacity: 1; }
.gallery-row--left.is-ready .gallery-track { animation: gallery-move-left var(--gallery-duration) linear infinite; }
.gallery-row--right.is-ready .gallery-track { animation: gallery-move-right var(--gallery-duration) linear infinite; }

.gallery-sequence { display: flex; flex: none; gap: var(--gallery-gap); }
.gallery-tile {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  transition: filter .25s ease, transform .25s ease;
}
.gallery-tile img {
  display: block;
  width: auto;
  height: var(--gallery-image-height);
  max-width: none;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
}
.gallery-tile.is-broken { display: none; }

@media (hover: hover) and (pointer: fine) {
  .gallery-tile:hover { filter: brightness(1.035) contrast(1.015); transform: scale(1.015); }
}

@keyframes gallery-move-left {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--gallery-distance)), 0, 0); }
}
@keyframes gallery-move-right {
  from { transform: translate3d(calc(-1 * var(--gallery-distance)), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* ---------- Footer and reveals ---------- */
.footer { position: relative; z-index: 2; padding: 66px 0 48px; background: transparent; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; }
.footer img { width: 130px; height: auto; max-height: 88px; object-fit: contain; margin-bottom: 8px; }
.footer p { margin-bottom: 1px; color: var(--cream); font: 400 1.2rem var(--display); letter-spacing: .1em; text-shadow: 2px 2px 0 var(--deep-green); }
.footer span { color: var(--cream); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-shadow: 1px 1px 0 var(--deep-green); }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .72, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  padding: 11px 18px;
  border: 2px solid var(--fwog-green);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(16, 62, 43, .94);
  box-shadow: 3px 3px 0 rgba(10, 46, 30, .7);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive composition ---------- */
@media (max-width: 800px) {
  :root { --shell: min(100% - 28px, 680px); --radius: 16px; }
  .section { padding: 70px 0; }
  .hero { min-height: 100svh; padding: 24px 0; }
  .hero-content { transform: translateY(-2vh); }
  .hero-logo { width: min(clamp(460px, 76vw, 660px), calc(100vw - 28px)); margin-bottom: 6px; }
  h1 { font-size: clamp(3.5rem, 12vw, 6.4rem); }
  .hero-copy { margin-bottom: 23px; }
  .hero-actions { width: min(100%, 410px); gap: 10px; }
  .button { min-width: calc(50% - 5px); }
  .hero-ca { margin-top: 27px; }
  .section-heading { margin-bottom: 42px; }
  .chart-section { padding: 72px 0 70px; }
  .market-shell { box-shadow: 6px 6px 0 rgba(126, 180, 101, .55); }
  .market-stats { grid-template-columns: repeat(4, 1fr); }
  .market-stat { border-bottom: 1px solid rgba(201, 233, 185, .1); }
  .gallery-marquee { --gallery-gap: 18px; --gallery-image-height: 165px; padding: 50px 0 76px; }
  .gallery-row + .gallery-row { margin-top: 20px; }
}

@media (max-width: 520px) {
  .hero-actions { width: min(100%, 360px); gap: 9px; }
  .button { min-width: calc(33.333% - 6px); padding: 10px 9px; }
  .hero-ca { width: min(100%, 360px); gap: 8px; padding-inline: 12px; }
  .hero-ca-address { font-size: 0; }
  .hero-ca-address::after { content: attr(data-short); font-size: .68rem; }
  .hero-logo { width: min(clamp(360px, 96vw, 500px), calc(100vw - 16px)); }
  .market-shell,
  .market-toolbar,
  .market-stats,
  .custom-chart-container,
  .gappy-line-chart { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
  .market-toolbar { align-items: flex-start; gap: 10px; padding: 15px 14px; }
  .market-pair { min-width: 0; }
  .dex-link { padding: 8px 10px; font-size: .56rem; }
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-stat { min-height: 0; padding: 14px 12px; border-right: 1px solid rgba(201, 233, 185, .1); }
  .market-stat:nth-child(even) { border-right: 0; }
  .market-stat:last-child { grid-column: 1 / -1; border-right: 0; }
  .market-stat span { margin-bottom: 4px; font-size: .62rem; line-height: 1.2; }
  .market-stat strong { font-size: .9rem; line-height: 1.25; }
  .custom-chart-container { height: clamp(330px, 92vw, 430px); min-height: 330px; }
  .chart-axis-labels text,
  .chart-current-price text { font-size: 9px; }
  .market-footer { flex-direction: column; gap: 5px; padding-inline: 16px; }
  .gallery-marquee { --gallery-gap: 14px; --gallery-image-height: 120px; padding: 42px 0 68px; }
  .gallery-row + .gallery-row { margin-top: 16px; }
}

@media (max-width: 599px) {
  .floating-head {
    display: var(--mobile-display, block);
    left: var(--mobile-left, var(--head-left));
    top: var(--mobile-top, var(--head-top));
    width: var(--mobile-size, var(--size));
  }
}

@media (max-width: 620px) {
  h1 { max-width: 95vw; font-size: clamp(3.1rem, 15vw, 5.2rem); line-height: 1; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; overscroll-behavior-x: contain; }
  .marquee-track { opacity: 1; transform: none !important; animation: none !important; will-change: auto; }
  .marquee-group[aria-hidden="true"] { display: none; }
  .gallery-marquee { overflow: visible; }
  .gallery-row { overflow: visible; }
  .gallery-row .gallery-track { width: 100%; opacity: 1; transform: none !important; animation: none !important; will-change: auto; }
  .gallery-sequence { width: 100%; flex-wrap: wrap; justify-content: center; }
  .gallery-sequence[aria-hidden="true"] { display: none; }
}
