/* ============================================================
   KASTLR.CSS — Global Shared Stylesheet
   Brand: Dark tactical / CS2 / Orange + Black + Gunmetal
   Edit CSS variables in :root to restyle the entire site.
   ============================================================ */

/* ── BRAND TOKENS ─────────────────────────────────────────── */
:root {
  /* Core palette */
  --bg:           #0A0A0A;
  --bg2:          #0F0F0F;
  --surface:      #141414;
  --surface2:     #1A1A1A;
  --border:       #242424;
  --border2:      #2E2E2E;

  /* Brand accent — ORANGE */
  --accent:       #FF6B00;
  --accent-hover: #FF8533;
  --accent-dim:   rgba(255,107,0,0.12);
  --accent-glow:  rgba(255,107,0,0.25);

  /* Secondary accent — kept for alerts/movers */
  --accent2:      #FF3333;
  --green:        #00C97A;

  /* Text */
  --text:         #F0F0F0;
  --text2:        #B0B0B0;
  --muted:        #8B949E;
  --muted2:       #555555;

  /* Special */
  --gold:         #F5C842;

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'DM Sans', sans-serif;

  /* Layout */
  --nav-height:   80px;
  --max-width:    1400px;
  --radius:       2px;

  /* Logo — swap this path to change logo everywhere */
  --logo-src:     url('/kastlr_logo_black_transparent.png');
  --logo-height:  36px;
  --logo-filter:  invert(1);
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GRID BACKGROUND ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,107,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* Corner bracket decoration — add class="k-corner" to any section */
.k-corner { position: relative; }
.k-corner::before, .k-corner::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.4;
}
.k-corner::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.k-corner::after  { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* ── ANNOUNCEMENT BANNER ──────────────────────────────────── */
#announcement-banner {
  display: none;
  position: relative; z-index: 101;
  text-align: center;
  padding: 10px 40px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 1px; cursor: pointer;
}
#announcement-banner a { color: inherit; text-decoration: underline; margin-left: 8px; }
#announcement-banner .ann-close {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%); cursor: pointer;
  opacity: 0.6; font-size: 16px;
}

/* ── NAV ──────────────────────────────────────────────────── */
#kastlr-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: top .3s;
}

/* Orange top line on nav */
#kastlr-nav::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

.nav-logo {
  display: flex; align-items: center;
  height: var(--nav-height);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: var(--logo-height);
  width: auto;
  display: block;
  filter: var(--logo-filter);
  transition: filter .2s, opacity .2s;
}
.nav-logo:hover img { opacity: 0.8; }

/* Fallback text logo if image fails */
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: 3px;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex; gap: 28px; align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-badge {
  background: var(--accent) !important;
  color: #000 !important;
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  padding: 7px 14px !important;
  border-radius: var(--radius) !important;
  text-transform: uppercase !important;
  transition: background .2s, opacity .2s !important;
  text-decoration: none !important;
}
.nav-badge::after { display: none !important; }
.nav-badge:hover { background: var(--accent-hover) !important; opacity: 1 !important; color: #000 !important; }

/* ── FOOTER ───────────────────────────────────────────────── */
#kastlr-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 40px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  background: var(--bg2);
}
#kastlr-footer::before {
  content: '';
  position: absolute; top: 0; left: 40px; right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 24px; letter-spacing: 3px;
  color: var(--accent);
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 2px; text-transform: uppercase;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: 1px;
}
.footer-copy a { color: var(--accent); text-decoration: none; }

/* ── AD SLOTS ─────────────────────────────────────────────── */
.ad-banner-top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  height: 90px; position: relative; overflow: hidden;
  margin-top: var(--nav-height);
}
.ad-bottom-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ad-label {
  position: absolute; top: 6px; right: 12px;
  font-size: 9px; letter-spacing: 2px;
  color: var(--muted); text-transform: uppercase;
  font-family: var(--font-mono);
}
.ad-placeholder {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px dashed var(--border2);
  padding: 10px 32px; opacity: 0.3;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: #000;
  padding: 14px 32px; font-family: var(--font-mono);
  font-weight: 700; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius);
  border: none; cursor: pointer;
  transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  padding: 14px 32px; font-family: var(--font-mono);
  font-weight: 500; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius);
  border: 1px solid var(--border2); cursor: pointer;
  transition: border-color .2s, color .2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── CARDS / SURFACES ─────────────────────────────────────── */
.k-card {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: border-color .2s;
}
.k-card:hover { border-color: var(--border2); }
.k-card.k-card-accent:hover { border-color: var(--accent); }

/* Orange top bar on hover */
.k-card-accent::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.k-card-accent:hover::before { transform: scaleX(1); }

/* ── STATS BAR ────────────────────────────────────────────── */
.k-stats-bar {
  position: relative; z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch;
}
.k-stat {
  flex: 1; padding: 20px 24px; text-align: center;
  border-right: 1px solid var(--border);
}
.k-stat:last-child { border-right: none; }
.k-stat-val {
  font-family: var(--font-display);
  font-size: 36px; color: var(--accent);
  letter-spacing: 2px; line-height: 1;
}
.k-stat-label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 3px;
  color: var(--muted); text-transform: uppercase;
  margin-top: 6px;
}

/* ── TICKER ───────────────────────────────────────────────── */
.k-ticker-wrap {
  position: relative; z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden; height: 44px;
  display: flex; align-items: center;
}
.k-ticker-label {
  flex-shrink: 0;
  background: var(--accent); color: #000;
  padding: 0 16px; height: 100%;
  display: flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  white-space: nowrap;
}
.k-ticker-outer { flex: 1; overflow: hidden; }
.k-ticker-track {
  display: flex;
  animation: kticker 40s linear infinite;
  white-space: nowrap;
}
.k-ticker-track:hover { animation-play-state: paused; }
.k-ticker-item {
  padding: 0 28px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.k-ticker-item .name { color: var(--text2); }
.k-ticker-item .up   { color: var(--green); }
.k-ticker-item .down { color: var(--accent2); }
.k-ticker-item .flat { color: var(--muted); }
.k-ticker-sep { color: var(--border2); opacity: 0.6; }
@keyframes kticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ── EYEBROW / SECTION LABELS ─────────────────────────────── */
.k-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 4px;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.k-eyebrow::before {
  content: '';
  display: block; width: 24px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

/* ── LIVE DOT ─────────────────────────────────────────────── */
.k-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  margin-right: 8px;
  animation: kpulse 2s infinite;
}
@keyframes kpulse {
  0%,100%{opacity:1;box-shadow:0 0 0 0 var(--accent-glow)}
  50%{opacity:.7;box-shadow:0 0 0 6px rgba(255,107,0,0)}
}

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.k-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font-mono); font-size: 12px;
  outline: none;
  border-radius: var(--radius);
  transition: border-color .2s;
}
.k-input:focus { border-color: var(--accent); }
.k-input::placeholder { color: var(--muted); }

.k-select {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 8px 12px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 1px; outline: none;
  border-radius: var(--radius); cursor: pointer;
}
.k-select option { background: var(--surface); }

/* ── FILTER BUTTONS ───────────────────────────────────────── */
.k-fbtn {
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 6px 14px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: all .15s;
  border-radius: var(--radius); white-space: nowrap;
}
.k-fbtn:hover { border-color: var(--accent-glow); color: var(--text); }
.k-fbtn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── LOADING SPINNER ──────────────────────────────────────── */
.k-spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: kspin .7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes kspin { to { transform: rotate(360deg); } }

/* ── BADGE LABELS ─────────────────────────────────────────── */
.k-badge {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--radius);
  display: inline-block;
}
.k-badge-orange { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(255,107,0,0.2); }
.k-badge-red    { background: rgba(255,51,51,0.1); color: var(--accent2); border: 1px solid rgba(255,51,51,0.2); }
.k-badge-green  { background: rgba(0,201,122,0.1); color: var(--green); border: 1px solid rgba(0,201,122,0.2); }
.k-badge-gold   { background: rgba(245,200,66,0.1); color: var(--gold); border: 1px solid rgba(245,200,66,0.2); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  #kastlr-nav { padding: 0 20px; }
  .nav-links { display: none; }
  #kastlr-footer { padding: 32px 20px; flex-direction: column; }
}

/* ── FOOTER — Restructured ──────────────────────────────── */
#kastlr-footer {
  position: relative; z-index: 1;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 40px 32px;
  display: flex; flex-direction: column; gap: 24px;
}
#kastlr-footer::before {
  content: '';
  position: absolute; top: 0; left: 40px; right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}

/* Row 1: Logo left + nav links */
.footer-row-1 {
  display: flex; align-items: center;
  gap: 40px; flex-wrap: wrap;
}
.footer-logo-wrap {
  flex-shrink: 0;
  display: flex; align-items: center;
}
.footer-logo-img {
  height: 32px; width: auto;
  filter: invert(1); opacity: 0.85;
  transition: opacity .2s;
}
.footer-logo-img:hover { opacity: 1; }
.footer-logo-text {
  font-family: var(--font-display);
  font-size: 22px; letter-spacing: 3px;
  color: var(--accent);
}
.footer-links {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
}
.footer-links a {
  font-size: 11px; font-family: var(--font-mono);
  color: var(--muted); text-decoration: none;
  letter-spacing: 2px; text-transform: uppercase;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* Row 2: Copyright centered + Tradeit CTA */
.footer-row-2{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
}
.footer-copy {
  font-size: 11px; font-family: var(--font-mono);
  color: var(--muted); letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255,107,0,0.15);
}
.footer-copy a { color: var(--muted); text-decoration: none; }
.footer-copy a:hover { color: var(--accent); }
.footer-tradeit {
  background: var(--accent); color: #000;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 10px 24px; border-radius: 2px;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(255,107,0,0.4);
  transition: all .2s; white-space: nowrap;
}
.footer-tradeit:hover {
  background: #FF8533;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(255,107,0,0.6);
}

@media (max-width: 768px) {
  #kastlr-footer { padding: 32px 20px 24px; }
  .footer-row-1 { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-row-2 { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   KASTLR Ad Slots
   ═══════════════════════════════════════════════════════════ */

.kastlr-ad-slot {
  position: relative;
  display: block;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  line-height: 0;
}

/* Header banner — 90px fixed, image covers */
#kastlr-ad-header_banner {
  height: 90px;
  margin-top: 80px;
}

/* Homepage center — height driven by image, max capped */
#kastlr-ad-homepage_center {
  height: auto;
  max-height: 200px;
}

/* Page footer — 100px fixed, image covers */
#kastlr-ad-page_footer {
  height: 100px;
}

/* Ad label */
.ad-slot-label {
  position: absolute;
  top: 4px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  pointer-events: none;
  line-height: 1;
}

/* ── NEWSLETTER SUBSCRIBE FORM ─────────────────────────────── */
.footer-newsletter{padding:32px 40px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.footer-nl-label{font-family:var(--font-mono);font-size:9px;letter-spacing:4px;color:var(--accent);text-transform:uppercase;margin-bottom:6px}
.footer-nl-sub{font-family:var(--font-mono);font-size:11px;color:var(--muted);letter-spacing:.5px;margin-bottom:14px}
.footer-nl-form{display:flex;gap:0;max-width:420px}
.footer-nl-input{flex:1;background:var(--bg);border:1px solid var(--border2);border-right:none;color:var(--text);padding:10px 14px;font-family:var(--font-mono);font-size:12px;outline:none;transition:border-color .2s;border-radius:2px 0 0 2px}
.footer-nl-input:focus{border-color:var(--accent)}
.footer-nl-input::placeholder{color:var(--muted)}
.footer-nl-btn{background:var(--accent);color:#000;border:none;padding:10px 20px;font-family:var(--font-mono);font-size:10px;font-weight:700;letter-spacing:2px;text-transform:uppercase;cursor:pointer;transition:background .2s;white-space:nowrap;border-radius:0 2px 2px 0;flex-shrink:0}
.footer-nl-btn:hover{background:var(--accent-hover)}
.footer-nl-btn:disabled{opacity:.5;cursor:not-allowed}
.footer-nl-msg{font-family:var(--font-mono);font-size:11px;margin-top:10px;letter-spacing:.5px;min-height:16px}
.footer-nl-msg.success{color:var(--green)}
.footer-nl-msg.error{color:var(--accent2)}
@media(max-width:768px){
  .footer-newsletter{padding:24px 20px}
  .footer-nl-form{flex-direction:column;gap:8px}
  .footer-nl-input{border-right:1px solid var(--border2);border-radius:2px}
  .footer-nl-btn{border-radius:2px;width:100%}
}