:root {
  color-scheme: dark;

  --bg: #050608;

  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.06);

  --text-main: #f5f5f7;
  --text-soft: #a5a5b0;

  --accent: #30f0b0;
  --accent-soft: rgba(48, 240, 176, 0.18);

  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 999px;

  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.7);

  --font: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-main);
}

a { color: inherit; }
button { font-family: inherit; }

/* =========================
   ✅ VIDEO BACKGROUND (FIXED)
   ========================= */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -9;            /* behind everything */
  pointer-events: none;
  opacity: 0.35;          /* keep it subtle */
  filter: grayscale(1) contrast(1.05) brightness(0.9);
  transform: translateZ(0);
}

/* =========================
   ALIVE GROK BACKGROUND
   ========================= */

/* moving canvas (monochrome) */
.grok-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -6;
  pointer-events: none;
  opacity: 0.95;
}

/* subtle aurora base */
.aurora-bg {
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,0.06) 0, transparent 58%),
    radial-gradient(circle at 88% 18%, rgba(255,255,255,0.04) 0, transparent 60%),
    radial-gradient(circle at 20% 92%, rgba(48,240,176,0.05) 0, transparent 62%),
    radial-gradient(circle at 90% 84%, rgba(255,255,255,0.03) 0, transparent 62%);
  background-size: 160% 160%;
  animation: drift 34s linear infinite alternate;
  z-index: -7;
  filter: saturate(0.25);
}

/* slow sheen to make it feel alive (very subtle) */
.sheen {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -5;
  opacity: 0.10;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.14), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.10), transparent 55%);
  animation: sheenMove 22s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

/* vignette for cinematic depth */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -4;
  background: radial-gradient(circle at 50% 30%,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.35) 58%,
    rgba(0,0,0,0.62) 100%);
}

/* grain */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  background-size: 220px;
  z-index: -3;
}

@keyframes drift {
  0%   { transform: translate3d(-18px, -18px, 0) scale(1.04); }
  50%  { transform: translate3d(16px, 10px, 0) scale(1.03); }
  100% { transform: translate3d(-12px, 16px, 0) scale(1.05); }
}

@keyframes sheenMove {
  0%   { transform: translate3d(-1.5%, -1%, 0) scale(1.02); }
  100% { transform: translate3d(1.5%, 1%, 0) scale(1.05); }
}

/* =========================
   LAYOUT / HEADER
   ========================= */

.page {
  min-height: 100vh;
  padding: 96px 20px 72px;
  max-width: 1120px;
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1120px;
  margin: 0 auto;
  backdrop-filter: blur(22px);
  background: linear-gradient(to bottom, rgba(5, 6, 8, 0.88), transparent);
  z-index: 10;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 14px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

/* =========================
   LIVE MARKETS TOP STRIP
   ========================= */

.top-strip {
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  padding: 14px 14px 10px;
  box-shadow: var(--shadow-soft);
}

.top-strip-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.top-strip-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}

.top-strip-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

/* =========================
   HERO (Press)
   ========================= */

.hero {
  margin-top: 18px;
  padding: 32px 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(48, 240, 176, 0.08), transparent 55%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.04), transparent 60%),
    rgba(5, 6, 8, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

.hero-tag {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(26px, 4vw, 32px);
  margin: 0 0 10px;
}

.hero-text {
  color: var(--text-soft);
  max-width: 680px;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* buttons */
.btn-primary,
.btn-ghost {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffffff);
  color: #050608;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}
.btn-primary:hover { filter: brightness(1.04); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

/* =========================
   SECTIONS
   ========================= */

.section { margin-top: 40px; }

.section-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.section-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

/* search + filter */
.controls {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search {
  flex: 1;
  min-width: 240px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.02);
  color: var(--text-main);
  outline: none;
}

.search::placeholder { color: rgba(255,255,255,0.35); }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.02);
  color: var(--text-soft);
  cursor: pointer;
}

.filter:hover { border-color: rgba(255,255,255,0.22); }

.filter.active {
  color: var(--text-main);
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.06);
}

/* =========================
   BLOG CARDS
   ========================= */

.cards-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(255,255,255,0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  transform: translate3d(-10px, -10px, 0);
}

.card:hover::before {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.card-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.08);
}

.card-date {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-variant-numeric: tabular-nums;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  position: relative;
  z-index: 1;
  line-height: 1.25;
}

.card-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.card-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.card-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
}

.card-link {
  font-size: 12px;
  color: rgba(255,255,255,0.78);
}

/* =========================
   DOWNLOAD STRIP
   ========================= */

.download-strip {
  margin-top: 24px;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at left, rgba(255,255,255,0.10), transparent 60%),
    rgba(9, 12, 18, 0.92);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.download-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.download-text {
  font-size: 13px;
  color: var(--text-soft);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.store-badge:hover {
  border-color: rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.03);
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.footer-col h4 {
  font-size: 11px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: var(--text-soft);
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.footer-col a:hover { color: var(--text-main); }

.footer-bottom {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-soft);
}

.footer-links a:hover { color: var(--text-main); }

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 720px) {
  .site-header { padding-inline: 16px; }
  .nav-links { display: none; }
  .page { padding-top: 88px; }
  .hero { padding: 24px 18px; }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-strip-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-columns { grid-template-columns: 1fr 1fr; }
}
