/* GRNN TRADING landing page: 3D hero, marquee, scroll-driven engine scene, reveal-on-scroll.
   Works with styles.css (Tailwind build) and landing3d.js. */
:root {
  --blue: #0A84FF; --indigo: #5E5CE6; --violet: #BF5AF2; --cyan: #64D2FF; --pink: #FF375F; --yellow: #FFD60A;
  --ink: #F5F5F7; --muted: #A1A1AA; --dim: #6B6B73;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --grad: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 55%, #BF5AF2 100%);
}

/* ---------------------------------------------------------------- header: floating glass bar, same language as the members platform */
.site-hdr { position: fixed; z-index: 60; top: 14px; left: 16px; right: 16px; pointer-events: none; }
.hdr-bar { pointer-events: auto; max-width: 1240px; margin: 0 auto; height: 60px; padding: 0 10px 0 14px; display: flex; align-items: center; gap: 14px; border-radius: 20px;
  background: rgba(16, 18, 28, .58); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 50px -18px rgba(0, 0, 0, .8);
  transition: background-color .35s, border-color .35s, box-shadow .35s; }
.site-hdr.at-top .hdr-bar { background: rgba(255, 255, 255, .035); border-color: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.hdr-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.hdr-brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 6px 20px -6px rgba(10, 132, 255, .6); transition: transform .25s; }
.hdr-brand:hover img { transform: rotate(-8deg) scale(1.05); }
.hdr-brand .word { font-weight: 800; font-size: 15.5px; letter-spacing: -.02em; white-space: nowrap; }
.hdr-brand .word span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hdr-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.hdr-nav a, .hdr-drawer a:not(.hdr-btn) { padding: 9px 14px; border-radius: 12px; border: 1px solid transparent; color: #A1A1AA; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: color .2s, background-color .2s, border-color .2s; }
.hdr-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .1); }
.hdr-nav a.active { color: #fff; background: var(--grad); border-color: rgba(255, 255, 255, .2); box-shadow: 0 8px 24px -10px rgba(10, 132, 255, .8); }
.hdr-cta { display: flex; align-items: center; gap: 8px; flex: none; }
.hdr-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: background-color .2s, filter .2s, transform .2s; }
.hdr-btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.hdr-btn.primary { background: var(--grad); border-color: rgba(255, 255, 255, .22); box-shadow: 0 10px 28px -10px rgba(10, 132, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.hdr-btn.primary:hover { filter: brightness(1.1); }
.hdr-menu { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font-size: 18px; cursor: pointer; align-items: center; justify-content: center; }
.hdr-drawer { pointer-events: auto; display: none; max-width: 1240px; margin: 8px auto 0; padding: 10px; border-radius: 20px; flex-direction: column; gap: 4px;
  background: rgba(16, 18, 28, .86); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
.hdr-drawer .hdr-btn { justify-content: center; margin-top: 6px; }
.site-hdr.open .hdr-drawer { display: flex; }
section { scroll-margin-top: 96px !important; }
@media (max-width: 980px) {
  .hdr-nav { display: none; }
  .hdr-menu { display: inline-flex; }
  .hdr-cta { margin-left: auto; }
  .hdr-cta > .hdr-btn:not(.primary) { display: none; }
}
@media (max-width: 420px) { .hdr-brand .word { font-size: 14px; } .hdr-btn { padding: 0 12px; } }

/* ---------------------------------------------------------------- hero */
.hero3d { position: relative; min-height: 100vh; min-height: 100svh; padding-top: 74px; overflow: hidden; background: #000; isolation: isolate; }
.hero3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.hero-glow { position: absolute; z-index: 0; left: -10%; right: -10%; bottom: -14%; height: 78%; pointer-events: none;
  background:
    radial-gradient(62% 78% at 50% 100%, rgba(10, 132, 255, .92), rgba(94, 92, 230, .66) 38%, rgba(191, 90, 242, .3) 64%, transparent 84%),
    radial-gradient(30% 50% at 16% 100%, rgba(100, 210, 255, .6), transparent 72%),
    radial-gradient(30% 55% at 86% 100%, rgba(191, 90, 242, .7), transparent 72%);
  filter: blur(24px); animation: glowDrift 16s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes glowDrift { 0% { transform: translateX(-3%) scale(1); } 50% { transform: translateX(2%) scale(1.06); } 100% { transform: translateX(4%) scale(.97); } }
.hero-grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .33; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.hero3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, transparent, #000); }
.hero-inner { position: relative; z-index: 3; max-width: 1280px; margin: 0 auto; padding: 0 32px; min-height: calc(100svh - 74px); display: flex; align-items: center; pointer-events: none; }
.hero-copy { max-width: 640px; padding: 48px 0 110px; pointer-events: auto; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font: 600 11px var(--mono); letter-spacing: .06em;
  color: #D4D4D8; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-tag.live { color: #fff; background: var(--grad); border-color: rgba(255, 255, 255, .25); box-shadow: 0 8px 30px -8px rgba(10, 132, 255, .7); }
.hero-tag.live i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.hero-title { margin: 0; font-size: clamp(46px, 7.2vw, 104px); line-height: .96; font-weight: 800; letter-spacing: -.055em; color: #fff; }
.hero-title span { display: block; background: linear-gradient(100deg, #64D2FF 0%, #0A84FF 30%, #8E8CFF 62%, #BF5AF2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.hero-kicker { margin: 22px 0 0; font: 600 13px var(--mono); letter-spacing: .14em; color: var(--cyan); }
.hero-lede { margin: 14px 0 0; max-width: 540px; color: #C7C7CC; font-size: 16.5px; line-height: 1.6; }
.hero-lede b { color: #fff; font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn-glow, .btn-glass { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .2s, box-shadow .2s, background-color .2s, filter .2s; }
.btn-glow { color: #fff; background: var(--grad); box-shadow: 0 14px 40px -12px rgba(10, 132, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-glow:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 20px 50px -12px rgba(94, 92, 230, .95), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-glass { color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.btn-glass:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.hero-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 38px; max-width: 560px; }
.hero-specs div { padding: 12px 14px; border-radius: 16px; background: rgba(10, 12, 20, .55); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero-specs b { display: block; font: 700 19px var(--mono); color: #fff; }
.hero-specs span { display: block; margin-top: 2px; font: 500 10.5px var(--mono); color: var(--muted); letter-spacing: .02em; }
.hero-scroll { position: absolute; z-index: 4; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 600 10px var(--mono); letter-spacing: .3em; color: rgba(255, 255, 255, .7); text-decoration: none; }
.hero-scroll i { width: 22px; height: 36px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .5); position: relative; }
.hero-scroll i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-width: 899px) {
  .hero-inner { align-items: flex-end; padding: 0 18px; }
  .hero-copy { padding: calc(48svh + 20px) 0 96px; }
  .hero-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-lede { font-size: 15px; }
}
.no-webgl .hero-copy { padding-top: 64px; }

/* ---------------------------------------------------------------- marquee */
.marquee { position: relative; overflow: hidden; background: #000; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; }
.marquee-track { display: flex; width: max-content; gap: 46px; animation: marquee 38s linear infinite; font: 700 15px var(--mono); letter-spacing: .12em; color: #fff; white-space: nowrap; }
.marquee-track span { display: inline-flex; align-items: center; gap: 46px; }
.marquee-track span::after { content: "✦"; color: var(--violet); }
.marquee-track span:nth-child(3n+2) { color: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- engine scene (scroll-pinned 3D) */
.engine3d { position: relative; height: 430vh; background: #000; }
.engine-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: radial-gradient(60% 55% at 70% 45%, rgba(10, 132, 255, .12), transparent 70%), radial-gradient(40% 40% at 90% 90%, rgba(191, 90, 242, .1), transparent 70%), #000; }
.engine-sticky canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.engine-sticky::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: min(54%, 760px); pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 55%, transparent 100%); }
@media (max-width: 899px) { .engine-sticky::before { display: none; } }
.engine-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.l3 { position: absolute; left: 0; top: 0; padding: 5px 9px; border-radius: 9px; font: 700 11px var(--mono); letter-spacing: .03em; white-space: nowrap; color: #fff;
  background: rgba(8, 10, 18, .78); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .25s; will-change: transform; }
.l3 em { font-style: normal; color: var(--muted); font-weight: 600; margin-left: 6px; }
.l3.buy { border-color: rgba(100, 210, 255, .55); color: var(--cyan); } .l3.sell { border-color: rgba(255, 55, 95, .55); color: #FF6482; }
.l3.fill { background: var(--grad); border-color: rgba(255, 255, 255, .3); } .l3.stop { border-color: rgba(255, 214, 10, .5); color: var(--yellow); }
.l3.exit { background: #30D158; color: #00210B; border-color: rgba(255, 255, 255, .3); }
.engine-copy { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); left: max(28px, calc((100vw - 1280px) / 2 + 32px)); width: min(410px, 36vw); }
.eyebrow { font: 700 11px var(--mono); letter-spacing: .22em; color: var(--cyan); }
.engine-copy h2 { margin: 12px 0 22px; font-size: clamp(34px, 4vw, 56px); line-height: 1; font-weight: 800; letter-spacing: -.05em; color: #fff; }
.engine-copy h2 span { background: linear-gradient(100deg, #64D2FF, #8E8CFF 55%, #BF5AF2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.engine-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.engine-steps li { padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .02); opacity: .38; transition: opacity .35s, background-color .35s, border-color .35s, transform .35s; }
.engine-steps li b { display: block; font: 700 12px var(--mono); letter-spacing: .06em; color: #fff; }
.engine-steps li p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: #C7C7CC; }
.engine-steps li.on { opacity: 1; background: rgba(10, 132, 255, .09); border-color: rgba(100, 210, 255, .35); transform: translateX(6px); }
.engine-steps li.on b { color: var(--cyan); }
.engine-progress { margin-top: 16px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.engine-progress i { display: block; height: 100%; width: 0; background: var(--grad); }
.engine-note { margin: 12px 0 0; font: 500 10.5px var(--mono); color: var(--dim); }
.engine-hud { position: absolute; z-index: 3; right: max(24px, calc((100vw - 1280px) / 2 + 32px)); top: 92px; min-width: 230px; padding: 14px 16px; border-radius: 18px;
  background: rgba(8, 10, 18, .7); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-family: var(--mono); }
.engine-hud .k { font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--dim); }
.engine-hud .px { font-size: 26px; font-weight: 700; color: #fff; margin-top: 4px; }
.engine-hud .st { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; background: rgba(255, 255, 255, .07); color: var(--muted); }
.engine-hud .st.live { color: var(--cyan); background: rgba(100, 210, 255, .12); } .engine-hud .st.in { color: #fff; background: var(--grad); } .engine-hud .st.done { color: #00210B; background: #30D158; }
.engine-hud .r { font-size: 13px; font-weight: 700; margin-top: 8px; color: var(--muted); } .engine-hud .r b { font-size: 20px; color: #fff; }
@media (max-width: 899px) {
  .engine3d { height: 380vh; }
  .engine-copy { top: auto; bottom: 18px; transform: none; left: 14px; right: 14px; width: auto; padding: 16px; border-radius: 20px; background: rgba(6, 8, 14, .82); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .engine-copy h2 { font-size: 26px; margin: 6px 0 10px; }
  .engine-steps li { display: none; padding: 0; border: 0; background: none; transform: none !important; }
  .engine-steps li.on { display: block; background: none; }
  .engine-hud { top: 78px; right: 14px; min-width: 0; padding: 10px 12px; }
  .engine-hud .px { font-size: 18px; }
  .l3 { font-size: 9.5px; padding: 3px 7px; }
}
.no-webgl .engine3d { height: auto; } .no-webgl .engine-sticky { position: relative; height: auto; padding: 80px 0; }
.no-webgl .engine-copy { position: relative; transform: none; top: auto; left: auto; margin: 0 auto; width: min(560px, 92vw); }
.no-webgl .engine-steps li { opacity: 1; display: block; } .no-webgl .engine-hud, .no-webgl .engine-sticky canvas { display: none; }

/* ---------------------------------------------------------------- reveal on scroll (classes added by JS only) */
.rv { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { transform: none; transition: opacity .4s; }
  .hero-glow, .marquee-track, .hero-scroll i::after, .hero-tag.live i { animation: none; }
}
