/* =====================================================================
   zenflare.digital — ZenFlare brand layer (2026-09-06)
   Loaded LAST on every page. Retunes each page's own gold to the flame-Z
   render, adds the atmosphere + HUD chrome shared with
   trade.zenflare.digital, and swaps the nav mark. No page logic touched.
   Everything calms down under prefers-reduced-motion.
   ===================================================================== */

:root {
  --zf-gold: #f2c14e;
  --zf-gold-deep: #b8801a;
  --zf-gold-pale: #fbe9b0;
  --zf-ink: #0b0a08;
  --zf-ease: cubic-bezier(.16, 1, .3, 1);
  /* retune every page's own tokens to the render's gold */
  --gold: #e9bb4d; --g1: #fbe9b0; --g2: #f2c14e; --g3: #b8801a;
  --amber: #e9bb4d; --bg: #0b0a08; --bg2: #100e0a; --raise: #14110b;
  --line: #2a2318; --line2: #3a3020;
}

html { scroll-behavior: smooth; }
::selection { background: rgba(242, 193, 78, .3); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(242, 193, 78, .22); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- atmosphere (injected by brand.js) ------------------------ */
.zf-field {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 14% -12%, rgba(242, 193, 78, .13), transparent 60%),
    radial-gradient(48rem 34rem at 90% 6%, rgba(184, 128, 26, .10), transparent 62%),
    radial-gradient(56rem 44rem at 50% 110%, rgba(242, 193, 78, .08), transparent 60%);
}
.zf-field::after {
  content: ""; position: absolute; inset: -25%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(242, 193, 78, .06) 80deg, transparent 190deg, rgba(184, 128, 26, .05) 290deg, transparent 360deg);
  animation: zf-spin 52s linear infinite;
}
.zf-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(to right, rgba(242, 193, 78, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(242, 193, 78, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70rem 50rem at 50% 0%, #000 18%, transparent 76%);
  mask-image: radial-gradient(70rem 50rem at 50% 0%, #000 18%, transparent 76%);
}
.zf-signal { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.zf-grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.zf-cursor {
  position: fixed; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: 34rem; height: 34rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 193, 78, .09), transparent 70%);
  opacity: 0; transition: opacity .6s ease;
}
@keyframes zf-spin { to { transform: rotate(360deg); } }

/* pages that have their own body background — let the atmosphere through */
body { background-color: var(--zf-ink) !important; }

/* ---------- the mark ------------------------------------------------ */
.zf-mark { display: inline-block; width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; flex: none; }
.zf-mark img { display: block; width: 100%; height: 100%; }
nav .brand, .topbar .brand, .brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .zf-mark { width: 30px; height: 30px; }
.brand > svg { display: none !important; } /* the old drawn flame — replaced by the render */
.brand .wm, nav .brand { color: var(--zf-gold-pale); }
.brand .wm b, .brand b { color: var(--zf-gold); }

/* ---------- type ---------------------------------------------------- */
.zf-gradient-text {
  background-image: linear-gradient(100deg, #fff 0%, var(--zf-gold-pale) 28%, var(--zf-gold) 52%, var(--zf-gold-deep) 74%, var(--zf-gold-pale) 100%);
  background-size: 220% 100%; background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: zf-pan 9s ease-in-out infinite;
}
@keyframes zf-pan { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- HUD chrome on the panels every page already has --------- */
.tile, .stat, .card, .chart-card, .verify, .grave, .panel, .tileb {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)) !important;
  border: 1px solid rgba(242, 193, 78, .14) !important;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .5s var(--zf-ease), border-color .3s ease, box-shadow .3s ease;
}
.tile:hover, .stat:hover, .card:hover, .chart-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 193, 78, .34) !important;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .75), 0 0 40px -16px rgba(242, 193, 78, .35);
}
.tile::before, .stat::before, .card::before, .chart-card::before, .verify::before {
  content: ""; position: absolute; top: 7px; left: 7px; width: 12px; height: 12px; pointer-events: none;
  border-top: 1.5px solid rgba(242, 193, 78, .7); border-left: 1.5px solid rgba(242, 193, 78, .7);
}
.tile::after, .stat::after, .card::after, .chart-card::after, .verify::after {
  content: ""; position: absolute; bottom: 7px; right: 7px; width: 12px; height: 12px; pointer-events: none;
  border-bottom: 1.5px solid rgba(242, 193, 78, .7); border-right: 1.5px solid rgba(242, 193, 78, .7);
}

/* gold buttons */
.navbtn, .cta, .btn.primary, .go, button.primary, a.button.primary, .cbtn.go, .zf-btn {
  background: linear-gradient(180deg, var(--zf-gold-pale), var(--zf-gold) 55%, var(--zf-gold-deep)) !important;
  color: #14110b !important; border-color: transparent !important; font-weight: 700;
  box-shadow: 0 12px 30px -12px rgba(242, 193, 78, .55), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .28s var(--zf-ease), filter .2s ease;
}
.navbtn:hover, .cta:hover, .btn.primary:hover, .zf-btn:hover { transform: translateY(-1.5px); filter: brightness(1.06); }

/* the live dot + a gold divider */
.zf-live { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: #5ef38c; animation: zf-pulse 2.4s ease-out infinite; vertical-align: middle; margin-right: 6px; }
@keyframes zf-pulse { 0% { box-shadow: 0 0 0 0 rgba(94, 243, 140, .45); } 70% { box-shadow: 0 0 0 12px rgba(94, 243, 140, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 243, 140, 0); } }
.zf-divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(242, 193, 78, .45), transparent); background-size: 200% 100%; animation: zf-pan 6s ease-in-out infinite; margin: 28px 0; }

/* ---------- emblem hero (record + trading pages) --------------------- */
.zf-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin: 26px 0 6px; }
.zf-emblem { position: relative; width: 190px; height: 190px; justify-self: end; }
.zf-emblem img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 0 28px rgba(242, 193, 78, .35)); animation: zf-float 7s ease-in-out infinite; }
.zf-emblem .glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(242, 193, 78, .3), transparent 72%); filter: blur(22px); animation: zf-breathe 5s ease-in-out infinite; }
.zf-emblem svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.zf-emblem .r1 { animation: zf-spin 40s linear infinite; transform-origin: 50% 50%; }
.zf-emblem .r2 { animation: zf-spin 26s linear infinite reverse; transform-origin: 50% 50%; }
@keyframes zf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes zf-breathe { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@media (max-width: 640px) { .zf-hero { grid-template-columns: 1fr; } .zf-emblem { justify-self: center; width: 150px; height: 150px; } }

/* cross-link band to the trading platform */
.zf-band {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  margin: 28px 0; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015));
  border: 1px solid rgba(242, 193, 78, .2);
}
.zf-band::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--zf-a, 0deg), transparent 0 70%, var(--zf-gold) 86%, #fff 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: zf-orbit 6s linear infinite;
}
@property --zf-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes zf-orbit { to { --zf-a: 360deg; } }
.zf-band .t { font-weight: 700; font-size: 1.05rem; color: var(--zf-gold-pale); }
.zf-band .s { font-size: .86rem; color: var(--dim, #a49b83); margin-top: 2px; }
.zf-band a.zf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; text-decoration: none !important; font-size: .9rem; }

/* reveal on scroll (brand.js adds .in) */
.zf-reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--zf-ease), transform .8s var(--zf-ease); }
.zf-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zf-field::after, .zf-gradient-text, .zf-live, .zf-divider, .zf-emblem img, .zf-emblem .glow, .zf-emblem .r1, .zf-emblem .r2, .zf-band::before { animation: none !important; }
  .zf-signal, .zf-cursor { display: none !important; }
  .zf-reveal { opacity: 1; transform: none; transition: none; }
}
