/* ===========================================================================
 * home.css — index.php only (loaded via layout_header css option).
 * Everything is scoped under body.home so no other page is affected.
 *
 * Calm, precise, credible. Token-driven. One decorative background layer, one
 * gradient accent on the H1, soft scroll-reveal. No neon, no glow, no video.
 * ======================================================================== */

/* ---- navbar: subtle solidify on scroll ------------------------------------ */
body.home .app-header {
  background: rgba(18, 22, 28, .6);
  border-bottom-color: transparent;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  transition: background .25s ease, border-color .25s ease;
}
body.home.is-scrolled .app-header {
  background: var(--bg-secondary);
  border-bottom-color: var(--border-color);
}

/* ---- shared section rhythm --------------------------------------------- */
body.home .home-section { padding: clamp(48px, 8vw, 88px) 0; }
body.home .home-section > .container > h2 {
  font-size: clamp(22px, 3.4vw, 30px); text-align: center; margin: 0 0 8px;
}
body.home .home-lead {
  text-align: center; color: var(--text-muted); max-width: 560px;
  margin: 0 auto clamp(28px, 5vw, 44px); font-size: var(--fs-md);
}
body.home .home-section--alt { background: var(--bg-secondary); }

/* ---- reveal on scroll ------------------------------------------------------ */
body.home .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
body.home .reveal.in { opacity: 1; transform: none; }

/* ===========================================================================
 * HERO
 * ======================================================================== */
body.home .home-hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 11vw, 128px) 0 clamp(40px, 7vw, 72px);
}
body.home .home-hero::before {                       /* decorative grid + glow */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--border-color) 1px, transparent 1px) 0 0 / 100% 52px,
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px) 0 0 / 52px 100%,
    radial-gradient(ellipse at 12% 0%, rgba(47,111,237,.16), transparent 55%),
    radial-gradient(ellipse at 90% 30%, rgba(123,63,242,.12), transparent 50%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 82%);
  opacity: .5;
}
body.home .home-hero > .container { position: relative; }
body.home .home-hero-grid {
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 48px);
  align-items: center;
}
body.home .home-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-hover);
  padding: 5px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--accent-soft);
}
body.home .home-hero h1 {
  font-size: clamp(30px, 6vw, 52px); line-height: 1.08; letter-spacing: -.02em;
  margin: 18px 0 16px; max-width: 620px;
}
body.home .home-hero h1 .accent {
  background: linear-gradient(100deg, var(--accent-hover), #9a7bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.home .home-hero-sub {
  font-size: var(--fs-lg); color: var(--text-secondary); max-width: 520px; line-height: 1.6; margin: 0 0 26px;
}
body.home .home-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero visual — three live market cards */
body.home .home-hero-visual {
  border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-card), var(--bg-secondary));
  padding: 16px; box-shadow: var(--shadow-lg);
}
body.home .home-hero-visual-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 12px; padding: 0 2px;
}
body.home .home-hero-visual-head .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  display: inline-block; margin-right: 6px; vertical-align: middle;
}
body.home .home-hero-cards { display: grid; gap: 10px; }
body.home .home-hero-cards .mkt-card { background: var(--bg-elevated); }
body.home .home-hero-skel {
  height: 96px; border-radius: var(--radius-lg); background: var(--bg-elevated);
  border: 1px solid var(--border-color);
}

@media (min-width: 960px) {
  body.home .home-hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; }
  body.home .home-hero-visual { padding: 18px; }
}

/* ===========================================================================
 * TICKER
 * ======================================================================== */
body.home .home-ticker-wrap { border-block: 1px solid var(--border-color); background: var(--bg-secondary); }
body.home .ticker-strip {
  display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden;
  padding: 12px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
body.home .ticker-strip::-webkit-scrollbar { display: none; }
body.home .ticker-pill {
  flex: 0 0 auto; min-width: 170px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 10px 14px;
  transition: border-color .15s ease;
}
body.home .ticker-pill:hover { border-color: var(--border-strong); }
body.home .ticker-pill .sym { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--text-secondary); }
body.home .ticker-pill .px  { font-family: var(--font-mono); font-size: var(--fs-md); font-weight: 600; margin-top: 3px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
body.home .ticker-pill .chg { font-size: var(--fs-xs); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
body.home .ticker-pill .chg.up   { color: var(--success); }
body.home .ticker-pill .chg.down { color: var(--danger); }
body.home .ticker-pill .chg.flat { color: var(--text-muted); }
body.home .home-ticker-note { font-size: var(--fs-xs); color: var(--warning); padding: 0 2px 8px; }

/* ===========================================================================
 * CARDS — products + features (shared container/icon system)
 * ======================================================================== */
body.home .home-cardgrid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
body.home .home-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 22px;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
body.home .home-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
body.home .home-ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-size: 17px;
  background: var(--accent-soft); color: var(--accent-hover);
  border: 1px solid var(--border-strong); margin-bottom: 14px;
}
body.home .home-card h3 { font-size: var(--fs-lg); margin: 0 0 6px; }
body.home .home-card p  { color: var(--text-secondary); font-size: var(--fs-md); line-height: 1.55; margin: 0; }

/* Fixed-Time product card — visually distinct so it is not read as spot/perp */
body.home .home-card--ft { border-color: rgba(243,175,74,.4); background: linear-gradient(180deg, var(--warning-soft), var(--bg-card) 60%); }
body.home .home-card--ft .home-ico { background: var(--warning-soft); color: var(--warning); border-color: rgba(243,175,74,.45); }
body.home .home-badge {
  display: inline-block; margin-top: 12px;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: var(--warning-soft); color: var(--warning); border: 1px solid rgba(243,175,74,.45);
}

/* ===========================================================================
 * TRUST
 * ======================================================================== */
body.home .home-trust-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 44px); align-items: start; }
body.home .home-trust-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
body.home .home-trust-list li { display: flex; gap: 12px; color: var(--text-secondary); font-size: var(--fs-md); line-height: 1.5; }
body.home .home-trust-list li i {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px;
  background: var(--success-soft); color: var(--success);
}
body.home .home-trust-note { margin-top: 18px; font-size: var(--fs-sm); color: var(--text-muted); }
body.home .home-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--border-color); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden;
}
body.home .home-stats > div { background: var(--bg-card); padding: 22px 18px; text-align: center; }
body.home .home-stats .n { font-size: clamp(24px, 4vw, 32px); font-weight: 800; font-family: var(--font-mono); color: var(--accent-hover); }
body.home .home-stats .l { color: var(--text-muted); font-size: var(--fs-sm); margin-top: 4px; }

@media (min-width: 900px) {
  body.home .home-trust-grid { grid-template-columns: 1.1fr .9fr; }
}

/* ===========================================================================
 * EXPLORE MARKETS
 * ======================================================================== */
body.home .mk-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-card); margin: 0 auto clamp(20px, 4vw, 28px); }
body.home .mk-tabs-wrap { text-align: center; }
body.home .mk-tab {
  padding: 7px 16px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-muted); background: none; border: 0; cursor: pointer; transition: color .15s ease, background-color .15s ease;
}
body.home .mk-tab:hover { color: var(--text-secondary); }
body.home .mk-tab.active { color: var(--text-primary); background: var(--accent-soft); }
body.home .mk-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.home .mk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
body.home .mk-grid .mkt-card { min-width: 0; }
body.home .mk-unavail, body.home .mk-skel { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 28px 0; }
body.home .mk-more { text-align: center; margin-top: 22px; }

/* ===========================================================================
 * FINAL CTA
 * ======================================================================== */
body.home .home-cta {
  text-align: center; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 56px) clamp(20px, 5vw, 40px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(47,111,237,.14), transparent 65%),
    var(--bg-card);
}
body.home .home-cta h2 { font-size: clamp(22px, 3.6vw, 30px); margin: 0 0 8px; }
body.home .home-cta p { color: var(--text-muted); margin: 0 auto 22px; max-width: 460px; }
body.home .home-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===========================================================================
 * FAQ (reuse .faq-item; light restyle)
 * ======================================================================== */
body.home #faq .container { max-width: 780px; }
body.home .faq-q i { transition: transform .2s ease; }
body.home .faq-item.open .faq-q i { transform: rotate(45deg); }

/* ===========================================================================
 * REDUCED MOTION
 * ======================================================================== */
@media (prefers-reduced-motion: reduce) {
  body.home .reveal { opacity: 1; transform: none; transition: none; }
  body.home .home-card, body.home .ticker-pill, body.home .app-header { transition: none; }
}
