/* ────────────────────────────────────────────────────────────
   AGENT K GATED — positioning tuned to Telegram token-gated
   communities. Same family palette; more teal (community), less
   red (alarm). "Verified clubs" meets "classified access."
   ──────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0a0a;
  --bg-2: #111;
  --bg-3: #181818;
  --gold: #d4a017;
  --gold-light: #f4c027;
  --red: #c41e1e;
  --teal: #00a3b4;
  --teal-bright: #00d4e4;
  --violet: #8b5cf6;
  --green: #4a8;
  --white: #fff;
  --dim: #888;
  --dim-2: #666;
  --dark: #333;
  --border: #222;
  --border-2: #333;
  --font-h: 'Orbitron', sans-serif;
  --font-d: 'JetBrains Mono', monospace;
  --font-b: 'Inter', sans-serif;
  --shadow-gold: 0 0 40px rgba(212, 160, 23, 0.15);
  --shadow-teal: 0 0 40px rgba(0, 163, 180, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-b);
  overflow-x: hidden;
  line-height: 1.65;
  min-height: 100vh;
}

/* Overlays */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(255,255,255,0) 0px, rgba(255,255,255,0) 3px,
    rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 4px
  );
  pointer-events: none;
  z-index: 1000;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 999;
}

/* Container: use explicit left/right so subsequent `padding` shorthand on
   derivative section classes (e.g. .page-hero, .ap-hero) only overrides
   top/bottom when they use `padding: N 0 N` and still keeps horizontal gutters. */
.container { max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: 40px; padding-right: 40px; }
@media (max-width: 960px) { .container { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 540px) { .container { padding-left: 18px; padding-right: 18px; } }
/* Safety net: any element with .container gets its horizontal gutter forced
   back even if another class uses `padding` shorthand. */
section.container { padding-left: 40px !important; padding-right: 40px !important; }
@media (max-width: 960px) { section.container { padding-left: 24px !important; padding-right: 24px !important; } }
@media (max-width: 540px) { section.container { padding-left: 18px !important; padding-right: 18px !important; } }

/* Top bar */
.topbar {
  background: #000;
  border-bottom: 1px solid var(--gold);
  padding: 10px 40px;
  font-family: var(--font-h);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.topbar .blink { color: var(--red); animation: blink 1.4s infinite; }
@keyframes blink { 0%,49% {opacity:1;} 50%,100% {opacity:0.35;} }
@media (max-width: 640px) {
  .topbar { padding: 8px 18px; font-size: 8px; letter-spacing: 2px; }
  .topbar > span:nth-child(2) { display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:50%; }
}

/* Nav */
nav.main {
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
nav.main .inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-h); font-weight: 900;
  font-size: 17px; letter-spacing: 3px;
  color: var(--gold); text-decoration: none;
}
.logo-square {
  width: 40px; height: 40px;
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
  background: rgba(212,160,23,0.08);
  position: relative; transition: all 0.2s;
  color: var(--gold);
}
.logo:hover .logo-square {
  background: rgba(212,160,23,0.2);
  box-shadow: 0 0 20px rgba(212,160,23,0.4);
}
.logo-square::before, .logo-square::after {
  content: ''; position: absolute; width: 6px; height: 6px;
  border: 2px solid var(--gold);
}
.logo-square::before { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.logo-square::after { bottom: -4px; right: -4px; border-left: none; border-top: none; }
.logo .brand-tag {
  font-size: 9px; color: var(--dim); font-weight: 400; letter-spacing: 4px;
  margin-left: 4px;
}

nav.main ul { list-style: none; display: flex; gap: 36px; align-items: center; }
nav.main a.nav-link {
  color: var(--dim); text-decoration: none;
  font-size: 11px; letter-spacing: 3px;
  font-family: var(--font-h); font-weight: 700;
  text-transform: uppercase; transition: color 0.2s;
  position: relative; padding: 4px 0;
}
nav.main a.nav-link:hover { color: var(--gold); }
nav.main a.nav-link.active { color: var(--gold); }
nav.main a.nav-link.active::after {
  content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 2px;
  background: var(--gold);
}

/* Buttons — gold dominant, teal variant available */
.btn {
  font-family: var(--font-h);
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  position: relative;
  min-height: 44px;
}
.btn:hover { background: var(--gold); color: #000; box-shadow: var(--shadow-gold); }
.btn.filled { background: var(--gold); color: #000; border-color: var(--gold); }
.btn.filled:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn.large { padding: 18px 32px; font-size: 12px; }
.btn.teal { border-color: var(--teal); color: var(--teal); }
.btn.teal:hover { background: var(--teal); color: #000; box-shadow: var(--shadow-teal); }
.btn.teal.filled { background: var(--teal); color: #000; }
.btn.teal.filled:hover { background: var(--teal-bright); border-color: var(--teal-bright); }

/* Sections */
section { padding: 96px 0; position: relative; }
@media (max-width: 960px) { section { padding: 64px 0; } }
@media (max-width: 640px)  { section { padding: 48px 0; } }

.sec-head { margin-bottom: 48px; }
.sec-tag {
  font-family: var(--font-h); font-size: 9px; letter-spacing: 3.5px;
  color: var(--gold); font-weight: 700;
  margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}
.sec-tag::before { content: ''; width: 26px; height: 1px; background: var(--gold); }
.sec-head h2 {
  font-family: var(--font-h); font-size: clamp(24px, 3.1vw, 40px);
  font-weight: 900; letter-spacing: -0.3px;
  max-width: 960px; line-height: 1.12; margin-bottom: 16px;
}
.sec-head p {
  color: var(--dim); font-size: 15px;
  max-width: 680px; margin-top: 14px; line-height: 1.65;
}

/* Card */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 36px;
  position: relative;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative; padding: 0;
}
.hamburger:hover { border-color: var(--gold); }
.hamburger span {
  position: absolute; left: 10px; right: 10px;
  height: 2px; background: var(--gold);
  transition: all 0.25s;
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw); background: #000;
  border-left: 1px solid var(--border);
  z-index: 200; padding: 90px 28px 40px;
  transform: translateX(100%); transition: transform 0.3s ease;
  overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: 36px; }
.mobile-drawer a.nav-link {
  display: block; color: var(--dim); text-decoration: none;
  font-family: var(--font-h); font-size: 13px; letter-spacing: 3px;
  font-weight: 700; text-transform: uppercase;
  padding: 16px 0; border-bottom: 1px solid var(--border); min-height: 48px;
}
.mobile-drawer a.nav-link.active { color: var(--gold); }
.mobile-drawer .drawer-cta {
  display: block; text-align: center;
  padding: 16px 20px; background: var(--gold); color: #000;
  font-family: var(--font-h); font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-decoration: none; border: 1px solid var(--gold);
}
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px; background: #000; margin-top: 80px;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px; margin-bottom: 64px;
}
.foot-col h4 {
  font-family: var(--font-h); font-size: 10px; letter-spacing: 3px;
  color: var(--gold); margin-bottom: 22px;
}
.foot-col a {
  display: block; color: var(--dim); text-decoration: none;
  font-size: 13px; padding: 5px 0; transition: color 0.2s;
}
.foot-col a:hover { color: var(--white); }
.foot-about { color: var(--dim); font-size: 13px; max-width: 380px; margin-top: 18px; line-height: 1.8; }
.foot-bottom {
  padding-top: 32px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-family: var(--font-d); font-size: 10px; color: var(--dim);
  letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 960px) {
  nav.main ul { display: none; }
  nav.main .btn.filled { display: none; }
  .hamburger { display: block; }
  .sec-head { margin-bottom: 48px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .sec-head { margin-bottom: 36px; }
  .sec-head h2 { font-size: clamp(26px, 7vw, 36px); line-height: 1.12; }
  .sec-head p { font-size: 14px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
  .logo { font-size: 14px; letter-spacing: 2px; gap: 10px; }
  .logo-square { width: 34px; height: 34px; font-size: 17px; }
  .btn { padding: 12px 18px; font-size: 10px; letter-spacing: 2px; }
  .btn.large { padding: 14px 20px; font-size: 11px; }
}

/* Shared building blocks */
.tier-badge {
  display: inline-block;
  padding: 4px 11px;
  font-family: var(--font-h);
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
  border: 1px solid;
}
.tier-free { color: var(--dim); border-color: var(--dim); }
.tier-pro { color: var(--gold); border-color: var(--gold); background: rgba(212,160,23,0.08); }
.tier-elite { color: #78d; border-color: #78d; background: rgba(100,100,221,0.12); }

.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-family: var(--font-d);
  font-size: 10px;
  letter-spacing: 1px;
}
.verified-chip::before {
  content: '✓';
  width: 18px; height: 18px;
  background: var(--green);
  color: #000;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}
.verified-chip.large { font-size: 11px; }
.verified-chip.large::before { width: 22px; height: 22px; font-size: 13px; }

/* Util */
.glitch { position: relative; display: inline-block; }
.glitch.anim { animation: glitchShake 0.3s; }
@keyframes glitchShake {
  0%,100% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); color: var(--red); }
  60% { transform: translate(-1px, 2px); color: var(--gold); }
  80% { transform: translate(1px, -2px); }
}

/* Hero tag — red/alarm to match Agent K master brand */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(196,30,30,0.12);
  border: 1px solid var(--red);
  padding: 8px 16px;
  font-family: var(--font-h);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 28px;
}
.hero-tag .dot {
  width: 7px; height: 7px; background: var(--red); border-radius: 50%;
  box-shadow: 0 0 10px var(--red);
  animation: blink 1.5s infinite;
}

/* Globe scaffolding (reused from Agent K master) */
.globe-box {
  position: relative;
  width: 100%;
  height: 100%;
}
.globe-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 40%, var(--bg) 92%),
    radial-gradient(circle at center, rgba(212,160,23,0.06), transparent 62%);
  pointer-events: none;
  z-index: 5;
}
.corner-bracket {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  z-index: 10;
  opacity: 0.65;
}
.tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.br { bottom: 20px; right: 20px; border-left: none; border-top: none; }
.globe-hud {
  position: absolute;
  bottom: 34px; left: 34px;
  z-index: 10;
  font-family: var(--font-d);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1.9;
  opacity: 0.85;
}
.globe-hud-right {
  position: absolute;
  top: 34px; right: 34px;
  z-index: 10;
  font-family: var(--font-d);
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 2px;
  text-align: right;
  line-height: 1.9;
}
.globe-hud-right .val { color: var(--white); }
