/* TraceByte · Premium Overlay v1.3 — card hero + marquee */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT,WONK@0,9..144,300..900,0..100,0..1;1,9..144,300..900,0..100,0..1&family=Newsreader:ital,opsz,wght@0,6..72,400..700;1,6..72,400..700&family=Inter+Tight:wght@300..800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --serif: 'Fraunces', 'Newsreader', 'Lora', Georgia, serif;
  --serif-italic: 'Newsreader', 'Fraunces', Georgia, serif;
  --sans: 'Inter Tight', 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, ui-monospace, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --tb-navy: #0a1b33;
  --tb-gold: #C9A24B;
  --tb-gold-2: #E5C26B;
}

h1, h2, h3 { letter-spacing: -0.02em; }

/* Scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0%; background: linear-gradient(90deg, var(--tb-gold) 0%, var(--tb-gold-2) 100%); z-index: 100; transition: width 0.06s linear; box-shadow: 0 0 12px rgba(201,162,75,0.55); }

/* ============== CARD HERO (rounded · video · editorial) ============== */
.tb-shell { padding: 24px 16px 0; }

.tb-card-hero {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  height: clamp(560px, 78vh, 680px);
  border-radius: 48px;
  background: #fff;
  border: 1px solid rgba(226,232,240,0.6);
  box-shadow: 0 40px 100px -20px rgba(11,31,58,0.10), 0 8px 24px rgba(11,31,58,0.04);
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 720px) {
  .tb-card-hero { border-radius: 28px; height: clamp(620px, 92vh, 780px); }
}

/* Video background */
.tb-card-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; user-select: none; overflow: hidden; }
.tb-card-video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  transition: transform 6s ease-out;
}
.tb-card-hero:hover .tb-card-video { transform: scale(1.08); }

/* Subtle vignette so left/top text stays legible — NO heavy overlay */
.tb-card-fade {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.75) 26%, rgba(255,255,255,0.20) 56%, rgba(255,255,255,0) 78%),
    linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 70%, rgba(255,255,255,0.50) 100%);
}

/* Grid: left content + right stats panel */
.tb-card-grid {
  position: relative; z-index: 5;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr);
  gap: 40px;
  padding: 64px 64px 110px;
}
@media (max-width: 1080px) {
  .tb-card-grid { grid-template-columns: 1fr; padding: 48px 36px 100px; gap: 28px; }
}
@media (max-width: 720px) {
  .tb-card-grid { padding: 40px 26px 110px; }
}

/* Left content */
.tb-card-content { display: flex; flex-direction: column; align-items: flex-start; }

/* Eyebrow */
.card-meta {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(10,27,51,0.55);
  margin-bottom: 22px;
  animation: card-fade-in 0.8s var(--ease-out-expo) both;
}
.card-meta-bar { flex: 0 0 40px; height: 1px; background: rgba(10,27,51,0.30); }
.card-meta-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--tb-gold); box-shadow: 0 0 0 0 rgba(201,162,75,0.5); animation: card-pulse 2.4s infinite; }
@keyframes card-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,162,75,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(201,162,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,75,0); }
}

/* Headline — Outfit display for the body (cohesive with site brand),
   Fraunces italic only on the gold em (editorial accent) */
.card-h1 {
  font-family: 'Outfit', 'Inter Tight', 'Noto Sans SC', -apple-system, sans-serif;
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--tb-navy);
  max-width: 18ch;
  margin-bottom: 22px;
}
.card-h1 .em {
  font-family: var(--serif-italic);
  font-variation-settings: 'opsz' 72;
  font-style: italic;
  font-weight: 480;
  letter-spacing: -0.015em;
  background: linear-gradient(120deg, var(--tb-gold) 0%, var(--tb-gold-2) 50%, var(--tb-gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%;
  animation: shine 8s ease-in-out infinite;
}
@keyframes shine {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Line reveal (less aggressive — visible quickly) */
.line-reveal { display: block; }
.card-h1 .line-reveal > span {
  display: inline-block;
  animation: line-fade-up 0.8s var(--ease-out-expo) both;
}
.card-h1 .line-reveal:nth-child(1) > span { animation-delay: 0.05s; }
.card-h1 .line-reveal:nth-child(2) > span { animation-delay: 0.18s; }
.card-h1 .line-reveal:nth-child(3) > span { animation-delay: 0.31s; }
.card-h1 .line-reveal:nth-child(4) > span { animation-delay: 0.44s; }
@keyframes line-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Lead — straight sans, no italic, slightly heavier for legibility */
.card-lead {
  font-family: 'Inter Tight', 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  font-style: normal; font-weight: 450;
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.6;
  color: #374151;
  max-width: 44ch;
  margin-bottom: 26px;
  letter-spacing: -0.003em;
  animation: card-fade-in 0.9s var(--ease-out-expo) 0.45s both;
}
.card-lead em { font-style: normal; color: var(--tb-navy); font-weight: 700; background: linear-gradient(180deg, transparent 78%, rgba(201,162,75,0.28) 78%); padding: 0 3px; }

/* CTAs */
.card-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 26px;
  animation: card-fade-in 0.9s var(--ease-out-expo) 0.58s both;
}

.magnetic {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; font-family: var(--sans); font-weight: 600; font-size: 13.5px;
  border-radius: 999px; text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}
.magnetic i { font-size: 16px; }
.magnetic-primary {
  background: var(--tb-navy);
  color: #fff;
  box-shadow: 0 14px 32px rgba(10,27,51,0.22), inset 0 1px 0 rgba(255,255,255,0.10);
}
.magnetic-primary:hover { background: #14304F; box-shadow: 0 20px 44px rgba(10,27,51,0.32); }
.magnetic-ghost-light {
  background: rgba(255,255,255,0.85);
  color: var(--tb-navy);
  border: 1px solid rgba(226,232,240,0.85);
  backdrop-filter: blur(8px);
}
.magnetic-ghost-light:hover { background: #fff; border-color: rgba(201,162,75,0.55); }
.magnetic .arrow { display: inline-block; transition: transform 0.4s var(--ease-out-expo); }
.magnetic:hover .arrow { transform: translateX(4px); }

/* Trust micro-row */
.card-trust {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(10,27,51,0.55);
  animation: card-fade-in 0.9s var(--ease-out-expo) 0.7s both;
}
.trust-tick { color: var(--tb-gold); font-weight: 700; margin-right: 4px; }

/* Right: glass stats panel */
.card-panel {
  align-self: start;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(226,232,240,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(11,31,58,0.10);
  animation: card-fade-in 0.9s var(--ease-out-expo) 0.85s both;
}
.card-panel-h {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(10,27,51,0.55);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.card-panel-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(10,27,51,0.18), transparent); }

.card-stat-list { counter-reset: card-stat; padding-left: 28px; display: flex; flex-direction: column; gap: 16px; }
.card-stat {
  counter-increment: card-stat;
  position: relative;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(10,27,51,0.07);
}
.card-stat:last-child { border-bottom: none; padding-bottom: 0; }
.card-stat::before {
  content: counter(card-stat, decimal-leading-zero);
  position: absolute;
  top: 3px; left: -28px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(201,162,75,0.70);
}
.card-stat-left { flex: 1; min-width: 0; padding-right: 10px; }
.card-stat-label { font-size: 12.5px; color: var(--tb-navy); line-height: 1.45; margin-bottom: 5px; font-weight: 600; }
.card-stat-src {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(10,27,51,0.45);
  line-height: 1.5;
}
.card-stat-src a {
  color: rgba(201,162,75,0.95);
  text-decoration: none;
  border-bottom: 1px dashed rgba(201,162,75,0.32);
  transition: color 0.2s, border-color 0.2s;
}
.card-stat-src a:hover { color: var(--tb-gold); border-bottom-color: rgba(201,162,75,0.85); }
.card-stat-num {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 60;
  font-weight: 420;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--tb-navy);
  text-align: right;
  white-space: nowrap;
  line-height: 1;
}
.card-stat-num .em {
  font-family: var(--serif-italic);
  font-variation-settings: 'opsz' 60;
  font-style: italic;
  background: linear-gradient(120deg, var(--tb-gold), var(--tb-gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ticker-static {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--tb-gold);
}
.card-panel-foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(10,27,51,0.06);
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10,27,51,0.40);
  text-align: center;
}

@media (max-width: 1080px) {
  .card-panel { margin-top: 8px; }
}

/* Floating bottom navbar */
.tb-floating-nav-wrap {
  position: absolute;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 30;
  animation: card-fade-in 0.9s var(--ease-out-expo) 1s both;
}
.tb-floating-nav {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 6px 6px 6px 8px;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(11,31,58,0.12);
  border: 1px solid rgba(226,232,240,0.55);
  gap: 4px;
}
.tb-fn-logo {
  width: 36px; height: 36px; border-radius: 999px;
  background: #fff; border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  display: grid; place-items: center; overflow: hidden;
}
.tb-fn-logo img { width: 22px; height: 22px; }
.tb-fn-link {
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  color: #64748b; transition: color 0.2s ease;
  text-decoration: none;
}
.tb-fn-link:hover { color: var(--tb-navy); }
.tb-fn-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tb-navy);
  padding: 9px 18px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  border: 1px solid var(--tb-navy);
  box-shadow: 0 4px 12px rgba(10,27,51,0.22);
  transition: background 0.2s ease, transform 0.3s ease;
  text-decoration: none;
}
.tb-fn-cta:hover { background: #14304F; transform: translateY(-1px); }
.tb-fn-cta svg { width: 14px; height: 14px; }

@media (max-width: 580px) {
  .tb-floating-nav-wrap { bottom: 16px; }
  .tb-fn-link { display: none; }
}

/* ============== MARQUEE (regulators) ============== */
.tb-marquee {
  max-width: 1400px; margin: 36px auto 0;
  padding: 0 16px;
  position: relative;
}
.tb-marquee-mask {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.tb-marquee-track {
  display: flex; gap: 20px;
  width: max-content;
  animation: tb-marquee 38s linear infinite;
  align-items: center;
}
.tb-marquee:hover .tb-marquee-track { animation-play-state: paused; }
@keyframes tb-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tb-marquee-item {
  flex-shrink: 0;
  height: 84px; min-width: 168px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0 32px;
  background: #fff;
  border: 1px solid rgba(226,232,240,0.7);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(11,31,58,0.03);
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.tb-marquee-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--tb-navy) 0%, #14304F 100%);
  transform: scale(1.5); opacity: 0;
  transition: transform 0.5s var(--ease-out-expo), opacity 0.4s ease;
  z-index: 0;
}
.tb-marquee-item:hover { border-color: rgba(201,162,75,0.45); box-shadow: 0 14px 30px rgba(11,31,58,0.18); }
.tb-marquee-item:hover::before { transform: scale(1); opacity: 1; }
.tb-marquee-item:hover .tb-marquee-name { color: #fff; }
.tb-marquee-item:hover .tb-marquee-sub { color: var(--tb-gold-2); }

.tb-marquee-name {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 36;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--tb-navy);
  position: relative; z-index: 1;
  transition: color 0.3s ease;
}
.tb-marquee-sub {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(10,27,51,0.50);
  position: relative; z-index: 1;
  transition: color 0.3s ease;
}

/* Editorial section types (kept for subpages) */
.section-mark { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #6B7280; margin-bottom: 22px; }
.section-mark::before { content: ''; width: 36px; height: 1px; background: var(--tb-gold); }
.editorial-h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.5vw, 72px); line-height: 0.98; letter-spacing: -0.035em; color: #0B1F3A; max-width: 22ch; margin-bottom: 18px; }
.editorial-h2 .em { font-family: var(--serif-italic); font-style: italic; font-weight: 400; color: var(--tb-gold); }
.editorial-lead { font-family: var(--serif-italic); font-style: italic; font-weight: 400; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.6; color: #4B5563; max-width: 56ch; }

/* Reveal primitives */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-d="1"] { transition-delay: 0.06s; }
.reveal[data-d="2"] { transition-delay: 0.12s; }
.reveal[data-d="3"] { transition-delay: 0.18s; }
.reveal[data-d="4"] { transition-delay: 0.24s; }
.reveal[data-d="5"] { transition-delay: 0.30s; }
.reveal[data-d="6"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in, .line-reveal > span, .card-lead, .card-ctas, .card-panel, .card-trust, .card-meta, .tb-floating-nav-wrap {
    opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important;
  }
  .card-h1 .em, .tb-marquee-track { animation: none !important; }
}

.ticker { display: inline-block; font-variant-numeric: tabular-nums; }

/* ============== FLOATING CTA DOCK (bottom of viewport) ============== */
.tb-dock {
  position: fixed; bottom: 20px; left: 50%;
  transform: translate(-50%, 140%);
  z-index: 90;
  transition: transform 0.6s var(--ease-out-expo), opacity 0.5s ease;
  opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px);
}
.tb-dock-show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.tb-dock-hidden { transform: translate(-50%, 140%) !important; opacity: 0 !important; pointer-events: none !important; }
.tb-dock-inner {
  display: flex; align-items: center; gap: 14px;
  background: rgba(11,31,58,0.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  box-shadow: 0 24px 60px rgba(11,31,58,0.40), inset 0 1px 0 rgba(255,255,255,0.08);
}
.tb-dock-text { display: flex; align-items: center; gap: 10px; padding-right: 14px; border-right: 1px solid rgba(255,255,255,0.10); }
.tb-dock-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--tb-gold); box-shadow: 0 0 0 0 rgba(201,162,75,0.7); animation: dock-pulse 1.8s infinite; }
@keyframes dock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,162,75,0.8); }
  70% { box-shadow: 0 0 0 10px rgba(201,162,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,75,0); }
}
.tb-dock-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.75); white-space: nowrap; }
.tb-dock-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-family: var(--sans); font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, background 0.3s ease; }
.tb-dock-cta i { font-size: 16px; }
.tb-dock-cta-primary { background: linear-gradient(135deg, var(--tb-gold) 0%, var(--tb-gold-2) 100%); color: var(--tb-navy); box-shadow: 0 8px 24px rgba(201,162,75,0.35); }
.tb-dock-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(201,162,75,0.50); }
.tb-dock-cta-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.tb-dock-cta-ghost:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
.tb-dock-close { background: transparent; border: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.2s, color 0.2s; }
.tb-dock-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

@media (max-width: 760px) {
  .tb-dock-inner { padding: 8px 8px 8px 16px; gap: 8px; }
  .tb-dock-text { display: none; }
  .tb-dock-cta { padding: 9px 14px; font-size: 12.5px; }
  .tb-dock-cta i { font-size: 15px; }
}
@media (max-width: 460px) {
  .tb-dock-cta span { display: none; }
  .tb-dock-cta { padding: 11px; }
}

/* ============ ACTIVE NAV STATE (per-page highlight) ============ */
.nav-links a.active:not(.nav-cta) {
  color: var(--navy, #0B1F3A) !important;
  font-weight: 600;
  position: relative;
}
.nav-links a.active:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--tb-gold, #C9A24B) 0%, var(--navy, #0B1F3A) 100%);
  border-radius: 2px;
}
.nav-links a.nav-cta.active {
  box-shadow: 0 0 0 2px rgba(201,162,75,0.45), 0 6px 14px rgba(11,31,58,0.18);
}
@media (max-width: 900px) {
  .nav-links a.active:not(.nav-cta)::after { left: 12px; right: auto; width: 24px; }
}
