/*
 * Base — Global resets and GeneratePress overrides.
 * Applies the Botcrawl dark theme to the GP shell.
 */

/* ── Google Fonts preconnect is handled by wp_enqueue_style in functions.php ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@700;900&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Box model ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Body ────────────────────────────────────────────────── */
body.botcrawl-theme {
  font-family: var(--bc-font-body);
  background-color: var(--bc-bg);
  background-image:
    radial-gradient(ellipse at top left, rgba(34, 211, 238, 0.05) 0%, transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(239, 68, 68, 0.04) 0%, transparent 40%);
  color: var(--bc-text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle scanline overlay — SOC aesthetic, very light */
body.botcrawl-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.025) 2px,
    rgba(0, 0, 0, 0.025) 4px
  );
}

/* ── GP structural elements ──────────────────────────────── */
body.botcrawl-theme .site,
body.botcrawl-theme .site-content,
body.botcrawl-theme .content-area,
body.botcrawl-theme .inside-site-info,
body.botcrawl-theme .site-footer {
  background: transparent;
}

body.botcrawl-theme .site-header {
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bc-line);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ── Typography ──────────────────────────────────────────── */
body.botcrawl-theme h1,
body.botcrawl-theme h2,
body.botcrawl-theme h3,
body.botcrawl-theme h4,
body.botcrawl-theme h5,
body.botcrawl-theme h6 {
  font-family: var(--bc-font-display);
  color: var(--bc-text-strong);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

body.botcrawl-theme p {
  color: var(--bc-text-soft);
  margin-bottom: 1rem;
}

body.botcrawl-theme a {
  color: var(--bc-cyan);
  text-decoration: none;
  transition: color var(--bc-ease);
}

body.botcrawl-theme a:hover {
  color: var(--bc-red);
}

body.botcrawl-theme code,
body.botcrawl-theme kbd {
  font-family: var(--bc-font-mono);
  background: var(--bc-bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: var(--bc-radius-xs);
  font-size: 0.875em;
  color: var(--bc-cyan);
}

body.botcrawl-theme pre {
  font-family: var(--bc-font-mono);
  background: var(--bc-bg);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

body.botcrawl-theme pre code {
  background: none;
  padding: 0;
  color: inherit;
}

body.botcrawl-theme blockquote {
  border-left: 4px solid var(--bc-red);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bc-bg-card);
  border-radius: 0 var(--bc-radius) var(--bc-radius) 0;
  color: var(--bc-text-soft);
  font-style: italic;
}

/* ── GP navigation overrides ─────────────────────────────── */
body.botcrawl-theme .main-navigation a {
  color: var(--bc-text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--bc-ease), background var(--bc-ease);
  border-radius: var(--bc-radius-sm);
}

body.botcrawl-theme .main-navigation a:hover,
body.botcrawl-theme .main-navigation .current-menu-item > a,
body.botcrawl-theme .main-navigation .current-menu-parent > a {
  color: var(--bc-cyan);
  background: rgba(34, 211, 238, 0.06);
}

body.botcrawl-theme .main-navigation .sub-menu {
  background: var(--bc-bg-card);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  box-shadow: var(--bc-shadow-lg);
}

body.botcrawl-theme .main-navigation .sub-menu a {
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8rem;
}

/* ── GP site logo ────────────────────────────────────────── */
body.botcrawl-theme .site-title a,
body.botcrawl-theme .site-title {
  font-family: var(--bc-font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bc-text-strong);
}

/* ── GP footer ───────────────────────────────────────────── */
body.botcrawl-theme .site-footer {
  background: var(--bc-bg-soft);
  border-top: 1px solid var(--bc-line);
  color: var(--bc-text-dim);
  font-size: 0.875rem;
  padding: 2rem 0;
}

body.botcrawl-theme .site-footer a {
  color: var(--bc-text-soft);
}

body.botcrawl-theme .site-footer a:hover {
  color: var(--bc-cyan);
}

/* ── GP sidebar widgets ──────────────────────────────────── */
body.botcrawl-theme .widget {
  background: var(--bc-bg-card);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

body.botcrawl-theme .widget-title {
  font-family: var(--bc-font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bc-text-strong);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bc-line);
  margin-bottom: 1rem;
}

/* ── Images ──────────────────────────────────────────────── */
body.botcrawl-theme img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Forms ───────────────────────────────────────────────── */
body.botcrawl-theme input[type="text"],
body.botcrawl-theme input[type="email"],
body.botcrawl-theme input[type="url"],
body.botcrawl-theme input[type="search"],
body.botcrawl-theme input[type="password"],
body.botcrawl-theme textarea,
body.botcrawl-theme select {
  background: var(--bc-bg-input);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-radius);
  color: var(--bc-text);
  padding: 0.6rem 0.9rem;
  font-family: var(--bc-font-body);
  font-size: 0.9rem;
  transition: border-color var(--bc-ease);
  width: 100%;
}

body.botcrawl-theme input:focus,
body.botcrawl-theme textarea:focus,
body.botcrawl-theme select:focus {
  outline: none;
  border-color: var(--bc-cyan-border);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

/* ── GP search modal ─────────────────────────────────────── */
body.botcrawl-theme .search-modal {
  background: rgba(10, 14, 23, 0.97);
  backdrop-filter: blur(20px);
}

body.botcrawl-theme .search-modal input[type="search"] {
  background: var(--bc-bg-elevated);
  border-color: var(--bc-line);
  color: var(--bc-text);
  font-size: 1.25rem;
}
