/* ==========================================================================
   MIDAS — cinematic landing styles (layers on top of style.css tokens)
   ========================================================================== */

html { scroll-behavior: auto; } /* Lenis owns scrolling on this page */

/* ------------------------------------------------ cinematic sticky sections */
.cine-sec { position: relative; }
#cineHero { height: 430vh; }
#cineFlow { height: 320vh; }

.cine-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  /* Base background image — always present so the section is never black,
     even before/without the canvas (fallback mode, slow JS, reduced motion). */
  background-color: #050504;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
#cineHero .cine-sticky { background-image: url("../assets/img/hero-coin.jpg"); }
#cineFlow .cine-sticky { background-image: url("../assets/img/gold-flow.jpg"); }
.cine-sticky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cine-copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
/* readability scrim between plate and copy */
.cine-copy::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse 68% 52% at 50% 52%, rgba(5,5,4,0.82), rgba(5,5,4,0) 74%);
  pointer-events: none;
}
.cine-line { position: relative; }
.cine-line {
  grid-area: 1 / 1;
  max-width: 900px;
  opacity: 0;
  will-change: opacity, transform;
}
.cine-line .btn { pointer-events: auto; }

.cine-eyebrow {
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-bright);
  font-weight: 600;
  margin-bottom: 22px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.8);
}
.cine-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 0 4px 40px rgba(0,0,0,0.85);
}
.cine-title .text-gold {
  background: linear-gradient(120deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* drop-shadow works on gradient-clipped text where text-shadow can't */
.cine-title { filter: drop-shadow(0 4px 22px rgba(0,0,0,0.9)) drop-shadow(0 1px 4px rgba(0,0,0,0.8)); }
.cine-sub {
  font-size: clamp(17px, 2vw, 24px);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 0 2px 14px rgba(0,0,0,0.9);
}
.cine-sub strong { color: var(--gold-bright); font-weight: 600; }
.cine-ctas {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: opacity 0.5s var(--ease);
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: hintdrop 2s infinite var(--ease);
}
@keyframes hintdrop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ------------------------------------------------ marquee */
.marquee {
  border-top: 1px solid rgba(197,162,111,0.16);
  border-bottom: 1px solid rgba(197,162,111,0.16);
  background: rgba(197,162,111,0.03);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  z-index: 2;
}
.marquee__track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee__item {
  display: flex;
  align-items: center;
  gap: 64px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.marquee__item b { color: var(--gold-bright); font-weight: 600; }
.marquee__item span::before {
  content: "◆";
  color: var(--gold-dim);
  font-size: 8px;
  margin-right: 64px;
  vertical-align: 2px;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------ stats band */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 84px 0;
}
.stat-block { text-align: center; }
.stat-num {
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 600;
  color: var(--gold-bright);
  display: block;
  line-height: 1;
}
.stat-cap {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------------------------------ section polish */
.sec-num {
  font-family: var(--font-serif);
  color: var(--gold-dim);
  font-size: 15px;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 14px;
}
.reveal { opacity: 1; transform: none; }
.fx .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.fx .reveal.in { opacity: 1; transform: none; }
.fx .reveal.d1 { transition-delay: 0.08s; }
.fx .reveal.d2 { transition-delay: 0.16s; }
.fx .reveal.d3 { transition-delay: 0.24s; }

/* 30-day diamond rule explainer */
.diamond {
  margin-top: 56px;
  border-top: 1px solid rgba(197,162,111,0.18);
  padding-top: 44px;
}
.diamond__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.diamond__lead {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.75;
  max-width: 780px;
  margin-bottom: 28px;
}
.diamond__lead strong { color: var(--text); font-weight: 600; }
.diamond__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.diamond__card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 24px 26px;
}
.diamond__tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 14px;
}
.diamond__tag--gold {
  color: var(--gold-bright);
  border-color: rgba(197,162,111,0.4);
  background: rgba(197,162,111,0.08);
}
.diamond__card p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
}
.diamond__card p strong { font-weight: 700; }
.diamond__note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
}
@media (max-width: 620px) {
  .diamond__cards { grid-template-columns: 1fr; }
}

/* real-world yield loop */
.rwa-loop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 18px;
  margin-top: 48px;
}
.rwa-node {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 30px 26px;
}
.rwa-node__num {
  font-family: var(--font-serif);
  color: var(--gold-bright);
  font-size: 15px;
  letter-spacing: 0.12em;
}
.rwa-node h3 { font-family: var(--font-serif); font-size: 21px; font-weight: 600; margin: 12px 0 10px; }
.rwa-node p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.rwa-node p code { color: var(--gold-bright); font-size: 12.5px; background: rgba(0,0,0,0.35); padding: 1px 5px; border-radius: 4px; }
.rwa-arrow { align-self: center; color: var(--gold-dim); font-size: 26px; }
.rwa-note { margin-top: 24px; font-size: 12.5px; color: var(--text-faint); max-width: 780px; line-height: 1.65; }
@media (max-width: 900px) {
  .rwa-loop { grid-template-columns: 1fr; }
  .rwa-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ecosystem cards */
.grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .grid--2 { grid-template-columns: 1fr; } }
.eco-card { display: flex; flex-direction: column; align-items: flex-start; }
.eco-ico { font-size: 30px; margin-bottom: 16px; line-height: 1; }
.eco-tag {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; color: var(--text-dim);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); margin-bottom: 18px;
}
.eco-tag--live { color: #6FCF97; background: rgba(111,207,151,0.1); border-color: rgba(111,207,151,0.3); }
.eco-card h3 { margin-bottom: 10px; }
.eco-card > p { flex: 1; }
.eco-card__btn { margin-top: 20px; width: 100%; }
.eco-soon { margin-top: 20px; font-size: 12px; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }

/* treasury / distribution proof band */
.treasury-proof {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
  background: linear-gradient(135deg, rgba(197,162,111,0.10), rgba(197,162,111,0.02));
  border: 1px solid rgba(197,162,111,0.28);
  border-radius: 20px;
  padding: 32px 36px;
}
.treasury-proof__counter { display: flex; flex-direction: column; gap: 6px; }
.treasury-proof__label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.treasury-proof__value { font-family: var(--font-serif); font-size: clamp(40px, 5vw, 56px); font-weight: 600; color: var(--gold-bright); line-height: 1; }
.treasury-proof__sub { font-size: 12.5px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.treasury-proof__live { width: 7px; height: 7px; border-radius: 50%; background: #6FCF97; box-shadow: 0 0 8px rgba(111,207,151,0.7); }
.treasury-proof__links { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .treasury-proof { flex-direction: column; align-items: stretch; }
  .treasury-proof__links { flex-direction: column; }
  .treasury-proof__links .btn { width: 100%; }
}

/* app showcase */
.showcase {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.showcase__panel {
  border-radius: 24px;
  padding: 8px;
  background: linear-gradient(140deg, rgba(197,162,111,0.35), rgba(197,162,111,0.05) 40%, rgba(197,162,111,0.18));
}
.showcase__inner {
  border-radius: 18px;
  background: #0a0908;
  padding: 28px;
}
.showcase__row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.showcase__row:last-child { border-bottom: 0; }
.showcase__label { color: var(--text-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.showcase__val { font-family: var(--font-serif); font-size: 20px; color: var(--text); }
.showcase__val.gold { color: var(--gold-bright); }

/* static (no-fx) fallback: cinematic sections collapse to plain hero panels.
   IDs (#cineHero/#cineFlow) beat a bare class rule, so these overrides are
   ID-qualified to actually win the height fight and avoid huge black gaps. */
html:not(.fx) #cineHero,
html:not(.fx) #cineFlow { height: auto; }
html:not(.fx) .cine-sticky { position: relative; height: auto; min-height: 82vh; }
html:not(.fx) .cine-sticky canvas { display: none; }
html:not(.fx) .cine-copy { position: relative; padding: 16vh 24px; display: flex; flex-direction: column; gap: 30px; }
html:not(.fx) .cine-line { opacity: 1 !important; transform: none !important; }
html:not(.fx) .scroll-hint { display: none; }
html:not(.fx) .cine-sticky::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(5,5,4,0.72), rgba(5,5,4,0.4));
  z-index: 1;
}
html:not(.fx) .cine-copy { z-index: 2; }

@media (max-width: 980px) {
  .stats-band { grid-template-columns: repeat(2, 1fr); padding: 64px 0; }
  .showcase { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 620px) {
  #cineHero { height: 360vh; }
  #cineFlow { height: 280vh; }
  .cine-ctas .btn { width: 100%; }
  .stats-band { grid-template-columns: 1fr 1fr; gap: 24px; }
}
