/* ============================================================
   hero.css — BrickCapital hero market grid (2×2 preview)
   ============================================================
   A condensed, high-end extension of the Market Intelligence page:
   ONE cohesive gold-accented glass module (not four separate widgets).
   Same layout + content + functionality as before — this is a pure
   visual refinement to match the site's Market Intelligence language
   (gold mono eyebrows with a glowing dot, cream→gold headings, dark
   gradient glass, gold + blue radial glows, a faint market grid, the
   graph as an understated gold centerpiece). Loaded after styles.css
   on index only. Motion off under prefers-reduced-motion.
   ============================================================ */

:root {
  --hx-green: #63d6a2; --hx-green-soft: rgba(99,214,162,0.14);
  --hx-red: #ec6a7f; --hx-red-soft: rgba(236,106,127,0.14);
  --hx-gold: var(--gold-light);
  --hx-line: rgba(255,255,255,0.055);
}

.hero-inner, .hero-visual, .hero-text { min-width: 0; }
.hx-mount, .hx-tilt, .hxg, .hxc { min-width: 0; max-width: 100%; }

/* left entrance + CTA */
.hero-text .hero-tag, .hero-text h1, .hero-text > p, .hero-text .hx-pulse, .hero-text .hero-actions { animation: hxRise 0.72s var(--ease-out) both; }
.hero-text .hero-tag { animation-delay: 0.05s; }
.hero-text h1 { animation-delay: 0.12s; letter-spacing: -0.025em; }
.hero-text > p { animation-delay: 0.2s; }
.hero-text .hx-pulse { animation-delay: 0.28s; }
.hero-text .hero-actions { animation-delay: 0.35s; flex-wrap: wrap; gap: 12px; }
.hero .hero-actions .btn-primary { position: relative; overflow: hidden; }
.hero .hero-actions .btn-primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 45%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-18deg); transition: left 0.6s var(--ease-out); pointer-events: none; }
.hero .hero-actions .btn-primary:hover::after { left: 130%; }

/* ---------- mount + depth ---------- */
.hx-mount { position: relative; width: 100%; }
.hx-mount::before { content: ""; position: absolute; inset: 26px -14px -22px 18px; border-radius: 30px; background: linear-gradient(160deg, rgba(232,203,106,0.045), rgba(255,255,255,0.006)); border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 44px 100px rgba(0,0,0,0.46); opacity: 0.6; z-index: 0; pointer-events: none; }
.hx-tilt { position: relative; z-index: 1; transform-style: preserve-3d; transition: transform 0.5s var(--ease-out); will-change: transform; }

/* ---------- ONE cohesive module ---------- */
.hxg {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 1.28fr 1fr; grid-auto-rows: minmax(0, auto);
  gap: 14px; padding: 20px;
  border-radius: 26px; border: 1px solid var(--glass-border);
  background:
    radial-gradient(520px 300px at 14% 2%, rgba(232,203,106,0.11), transparent 58%),
    radial-gradient(560px 380px at 98% 42%, rgba(0,113,227,0.085), transparent 60%),
    linear-gradient(165deg, #17171b 0%, #101013 60%, #141419 100%),
    var(--near-black);
  box-shadow: 0 48px 110px rgba(0,0,0,0.55), 0 14px 34px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.09), inset 0 0 0 1px rgba(255,255,255,0.015);
  overflow: hidden;
}
/* faint market grid behind the module — quiet brand texture */
.hxg::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask: radial-gradient(120% 100% at 72% 12%, #000 18%, transparent 74%);
  mask: radial-gradient(120% 100% at 72% 12%, #000 18%, transparent 74%);
}
/* soft top sheen */
.hxg::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 4; background: linear-gradient(90deg, transparent, rgba(232,203,106,0.4), rgba(255,255,255,0.2), transparent); pointer-events: none; }
.hxg > * { position: relative; z-index: 1; }
.hxg-glare { position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: 26px; opacity: 0; background: radial-gradient(circle at var(--gx,50%) var(--gy,0%), rgba(255,255,255,0.08), transparent 46%); mix-blend-mode: screen; transition: opacity 0.4s var(--ease); }

/* ---------- inner zones (not separate cards) ---------- */
.hxc {
  position: relative; display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit;
  padding: 17px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.4s var(--ease-out), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.hxg-in .hxc { opacity: 1; transform: none; transition-delay: calc(var(--i) * 0.09s); }
.hxg-in .hxc:hover { transform: translateY(-2px); border-color: rgba(232,203,106,0.32); background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.016)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 14px 34px rgba(0,0,0,0.34); transition-delay: 0s; }
.hxc :where(.hx-num, .hxc-val-num, .hxc-snap-v) { font-variant-numeric: tabular-nums; }

/* consistent gold eyebrow w/ glowing dot — the brand tie */
.hxc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.hxc-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; color: var(--gold-light); font-weight: 700; white-space: nowrap; }
.hxc-eyebrow::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 8px rgba(232,203,106,0.85); flex: none; }
.hxc-eyebrow-gold { color: var(--gold-light); }
.hxc-head-s { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,0.4); letter-spacing: 0.03em; white-space: nowrap; }

.hx-delta { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-mono); font-weight: 600; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.hx-delta-lg { font-size: 13.5px; padding: 3px 9px; }
.hx-delta-sm { font-size: 10.5px; padding: 1px 6px; }
.hx-up { color: var(--hx-green); background: var(--hx-green-soft); }
.hx-down { color: var(--hx-red); background: var(--hx-red-soft); }
.hx-flat { color: var(--ink-muted); background: rgba(255,255,255,0.06); }

/* ---------- INDEX card (gold graph centerpiece) ---------- */
.hxc-index { grid-column: 1; grid-row: 1; }
.hxc-index .hxp-tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.07); }
.hx-tab { font-family: var(--font-mono); font-size: 9px; color: rgba(255,255,255,0.5); background: transparent; border: 0; padding: 4px 6px; border-radius: 6px; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.hx-tab:hover { color: var(--ink); }
.hx-tab.on { background: rgba(232,203,106,0.15); color: var(--gold-light); }
.hxc-val { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.hxc-val-num { font-family: var(--font-mono); font-size: 32px; font-weight: 600; letter-spacing: -0.025em; line-height: 0.9; color: #fff; }
.hxc-live { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; color: rgba(255,255,255,0.45); margin-left: auto; }
.hxp-live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 0 0 rgba(232,203,106,0.5); animation: hxPulse 2.2s ease-out infinite; }
.hxc-chart { position: relative; color: var(--gold-light); margin-top: 14px; flex: 1; display: flex; flex-direction: column; }
/* soft underglow gives the graph presence */
.hxc-chart::before { content: ""; position: absolute; left: -6%; right: -6%; bottom: 14px; height: 60%; z-index: 0; background: radial-gradient(120% 100% at 50% 100%, rgba(232,203,106,0.12), transparent 70%); filter: blur(6px); pointer-events: none; }
.hxc-plot { position: relative; z-index: 1; height: 100%; min-height: 128px; border-radius: 10px; overflow: hidden; cursor: crosshair; }
.hx-chart-svg { display: block; width: 100%; height: 100%; }
.hx-grid { stroke: rgba(255,255,255,0.045); stroke-width: 1; }
.hx-line { filter: drop-shadow(0 4px 16px rgba(232,203,106,0.4)); }
.hx-enddot { filter: drop-shadow(0 0 9px var(--gold-light)); }
.hx-runner { opacity: 0; filter: drop-shadow(0 0 9px rgba(232,203,106,0.95)); }
.hxc-yhi, .hxc-ylo { position: absolute; left: 4px; font-family: var(--font-mono); font-size: 8.5px; color: rgba(255,255,255,0.38); pointer-events: none; z-index: 2; }
.hxc-yhi { top: 3px; } .hxc-ylo { bottom: 22px; }
.hxc-xlabels { display: flex; justify-content: space-between; margin-top: 7px; font-family: var(--font-mono); font-size: 8.5px; color: rgba(255,255,255,0.36); }
.hx-cross { position: absolute; top: 0; bottom: 22px; width: 1px; background: linear-gradient(rgba(255,255,255,0.05), rgba(232,203,106,0.55), rgba(255,255,255,0.05)); opacity: 0; transition: opacity 0.18s var(--ease); pointer-events: none; }
.hx-hdot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #fff7e2; box-shadow: 0 0 0 4px rgba(232,203,106,0.22), 0 2px 8px rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.18s var(--ease); pointer-events: none; transform: translate(-50%, -50%); }
.hx-tip { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 8px; border-radius: 8px; background: rgba(18,17,15,0.94); border: 1px solid rgba(232,203,106,0.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.18s var(--ease); pointer-events: none; min-width: 86px; z-index: 3; }
.hx-tip b { font-family: var(--font-mono); font-size: 11px; color: var(--ink); }
.hx-tip span { font-size: 8px; color: rgba(255,255,255,0.5); white-space: nowrap; }
.hxc-chart.hx-probing .hx-cross, .hxc-chart.hx-probing .hx-hdot, .hxc-chart.hx-probing .hx-tip { opacity: 1; }

/* ---------- TRENDING card ---------- */
.hxc-trend { grid-column: 2; grid-row: 1; }
.hxc-trend-list { display: flex; flex-direction: column; gap: 2px; flex: 1; justify-content: center; }
.hxc-trend-row { display: grid; grid-template-columns: 10px 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 6px 5px; border-radius: 10px; text-decoration: none; color: inherit; transition: background 0.22s var(--ease); }
.hxc-trend-row:hover { background: rgba(232,203,106,0.06); }
.hxc-trend-rank { font-family: var(--font-mono); font-size: 10px; color: var(--gold-light); opacity: 0.7; text-align: center; }
.hxc-trend-thumb { width: 26px; height: 26px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); background: rgba(0,0,0,0.25); display: block; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.hxc-trend-thumb .thumb, .hxc-trend-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hxc-trend-name { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hxc-trend-row:hover .hxc-trend-name { color: var(--ink); }

/* ---------- SNAPSHOT card ---------- */
.hxc-snap { grid-column: 1; grid-row: 2; }
.hxc-snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; flex: 1; }
.hxc-snap-cell { display: flex; flex-direction: column; gap: 3px; padding: 4px 0; position: relative; }
.hxc-snap-cell + .hxc-snap-cell::after { content: none; }
.hxc-snap-v { font-family: var(--font-mono); font-size: 21px; font-weight: 600; line-height: 1; color: var(--ink); }
.hxc-snap-v.hx-up { color: var(--hx-green); background: none; padding: 0; }
.hxc-snap-v.hx-down { color: var(--hx-red); background: none; padding: 0; }
.hxc-snap-v.hxc-cyan { color: var(--gold-light); }
.hxc-snap-k { font-size: 9.5px; color: rgba(255,255,255,0.45); letter-spacing: 0.03em; text-transform: uppercase; font-family: var(--font-mono); }

/* ---------- INSIGHT card ---------- */
.hxc-insight { grid-column: 2; grid-row: 2; }
.hxc-ins-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--gold-light); background: rgba(232,203,106,0.14); box-shadow: 0 0 14px rgba(232,203,106,0.12); }
.hxc-ins-ico svg { width: 13px; height: 13px; }
.hxc-ins-label { font-size: 10px; color: rgba(255,255,255,0.48); font-family: var(--font-mono); letter-spacing: 0.02em; }
.hxc-ins-name { font-size: 18px; font-weight: 750; letter-spacing: -0.015em; margin: 4px 0 10px; line-height: 1.1; background: linear-gradient(118deg, #f6eccf, var(--gold-light) 52%, var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hxc-ins-stat { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.hxc-ins-sub { font-size: 10px; color: rgba(255,255,255,0.42); font-family: var(--font-mono); }

/* ---------- left pulse pill ---------- */
.hx-pulse { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); font-size: 12.5px; color: var(--ink-soft); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (max-width: 900px) { .hx-pulse { margin-left: auto; margin-right: auto; } }
.hx-pulse strong { color: var(--ink); font-weight: 650; }
.hx-pulse-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hx-pulse-up .hx-pulse-dot { background: var(--gold-light); animation: hxPulse 2.4s ease-out infinite; }
.hx-pulse-down .hx-pulse-dot { background: var(--hx-red); animation: hxPulse 2.4s ease-out infinite; }

/* ---------- keyframes ---------- */
@keyframes hxRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hxPulse { 0% { box-shadow: 0 0 0 0 rgba(232,203,106,0.5); } 70% { box-shadow: 0 0 0 6px rgba(232,203,106,0); } 100% { box-shadow: 0 0 0 0 rgba(232,203,106,0); } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .hxc-val-num { font-size: 28px; } }
@media (max-width: 900px) {
  .hx-mount { max-width: 560px; margin: 0 auto; }
  .hx-mount::before { inset: 18px -6px -14px 10px; }
  .hx-tilt { transform: none !important; }
}
@media (max-width: 600px) {
  .hxg { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; border-radius: 22px; }
  .hxc-index { grid-column: 1 / -1; grid-row: 1; }
  .hxc-trend { grid-column: 1 / -1; grid-row: 2; }
  .hxc-snap { grid-column: 1; grid-row: 3; }
  .hxc-insight { grid-column: 2; grid-row: 3; }
  .hxc-val-num { font-size: 28px; }
  .hxc-plot { min-height: 132px; }
  .hx-mount::before { display: none; }
}
@media (max-width: 400px) {
  .hxg { grid-template-columns: 1fr; }
  .hxc-snap, .hxc-insight { grid-column: 1 / -1; }
  .hxc-snap { grid-row: 3; } .hxc-insight { grid-row: 4; }
}

/* ---------- mobile: two primary CTAs side-by-side (one row, equal halves) ----
   Keeps Browse (red) + Analyze (green) on a single row so both core
   experiences are visible without extra vertical scroll. Balanced at
   375 / 390 / 430 / 440px. Desktop is untouched. */
@media (max-width: 600px) {
  .hero-text .hero-actions {
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
  }
  .hero-text .hero-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 14px;
    line-height: 1.2;
  }
}
@media (max-width: 390px) {
  .hero-text .hero-actions .btn {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
  }
  .hero-text .hero-actions .hero-cta-mi { gap: 5px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-text .hero-tag, .hero-text h1, .hero-text > p, .hero-text .hx-pulse, .hero-text .hero-actions { animation: none; }
  .hero .hero-actions .btn-primary::after { display: none; }
  .hxc { opacity: 1; transform: none; transition: none; }
  .hx-tilt { transform: none !important; transition: none; }
  .hxg-glare { display: none; }
  .hxp-live-dot, .hx-pulse-dot { animation: none; }
  .hx-line { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .hx-runner { display: none; }
  .hxg-in .hxc:hover { transform: none; }
}
