/*
Theme Name: Logic Node
Theme URI: https://logic-node.com
Author: Logic Node LLC
Author URI: https://logic-node.com
Description: The official Logic Node theme — dark cyber aesthetic with NodeAI chatbot integration.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: logicnode
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --bg-base:       #080c10;
  --bg-surface:    #0d1117;
  --bg-card:       #111820;
  --bg-hover:      #161f2a;
  --border:        #1e2d3d;
  --border-bright: #2a4060;
  --accent:        #00d4ff;
  --accent-dim:    #0099cc;
  --accent-glow:   rgba(0, 212, 255, 0.15);
  --green:         #00ff88;
  --green-dim:     rgba(0, 255, 136, 0.1);
  --text-primary:  #e8f0fe;
  --text-secondary:#8899aa;
  --text-muted:    #445566;
  --font-display:  'Share Tech Mono', 'Courier New', monospace;
  --font-body:     'Exo 2', 'Segoe UI', sans-serif;
  --radius:        4px;
  --radius-lg:     8px;
  --transition:    0.2s ease;
  --glow:          0 0 20px rgba(0, 212, 255, 0.3);
  --glow-sm:       0 0 10px rgba(0, 212, 255, 0.2);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9998;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

p { margin-bottom: 1.2em; color: var(--text-secondary); }

ul, ol { padding-left: 1.5em; margin-bottom: 1.2em; }
li { color: var(--text-secondary); margin-bottom: 0.4em; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 1em 1.5em;
  margin: 1.5em 0;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-style: italic;
}

code, pre {
  font-family: var(--font-display);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
code { padding: 0.1em 0.4em; font-size: 0.9em; color: var(--accent); }
pre { padding: 1.5em; overflow-x: auto; margin-bottom: 1.5em; }
pre code { background: none; border: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-main {
  flex: 1;
  padding: 60px 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent);
  box-shadow: var(--glow-sm);
  position: relative;
  overflow: hidden;
}
.logo-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}
.logo-text span { color: var(--accent); }

/* Nav */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius);
  letter-spacing: 0.06em;
  transition: all var(--transition);
  text-transform: uppercase;
}
.site-nav a:hover,
.site-nav a.current-menu-item {
  color: var(--accent);
  background: var(--accent-glow);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent) !important;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition);
  flex-shrink: 0;
}
.header-cta:hover {
  background: var(--accent-glow);
  box-shadow: var(--glow-sm);
  color: var(--accent) !important;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  transition: all var(--transition);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 0%, transparent 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--border-bright);
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  background: var(--bg-card);
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  max-width: 800px;
}
.hero-title .accent { color: var(--accent); }
.hero-title .dim { color: var(--text-muted); }

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--bg-base) !important;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  transition: all var(--transition);
}
.btn-primary:hover {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(0,255,136,0.3);
  color: var(--bg-base) !important;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-secondary) !important;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-glow);
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
.services-section { padding: 80px 0; }

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(28px, 4vw, 48px);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 56px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-surface);
  padding: 36px 28px;
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover { background: var(--bg-hover); }
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
  background: var(--bg-card);
  color: var(--accent);
}

.service-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.service-card p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.service-price {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--green);
  letter-spacing: 0.05em;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 40px 0;
}
.stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
  text-align: center;
}
.stat-item {}
.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================================
   PRIVACY SECTION
   ============================================================ */
.privacy-section {
  padding: 80px 0;
  position: relative;
}
.privacy-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.privacy-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 2;
  position: relative;
  overflow: hidden;
}
.privacy-visual::before {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}
.pv-line { color: var(--text-muted); }
.pv-line .ok { color: var(--green); }
.pv-line .key { color: var(--accent); }
.pv-line .warn { color: #ff6b6b; }
.privacy-points { list-style: none; padding: 0; }
.privacy-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
}
.privacy-points li:last-child { border-bottom: none; }
.privacy-points li::before {
  content: '✓';
  color: var(--green);
  font-family: var(--font-display);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 80px 0;
  text-align: center;
  position: relative;
}
.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 50%, rgba(0,255,136,0.05));
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.cta-box h2 { font-size: clamp(24px, 4vw, 40px); margin-bottom: 16px; }
.cta-box p { font-size: 17px; color: var(--text-secondary); margin-bottom: 36px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 14px; color: var(--text-muted); margin-top: 12px; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.footer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--green);
}
.footer-status::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

/* ============================================================
   STANDARD PAGE / SINGLE POST
   ============================================================ */
.page-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.page-header h1 { font-size: clamp(28px, 4vw, 48px); }
.post-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.post-meta span {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.post-meta a { color: var(--accent); }

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.content-layout.no-sidebar { grid-template-columns: 1fr; max-width: 760px; }

.entry-content h1, .entry-content h2, .entry-content h3 { margin-bottom: 0.6em; margin-top: 1.4em; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; color: var(--accent); }
.entry-content ul, .entry-content ol { margin-bottom: 1.2em; }
.entry-content a { color: var(--accent); border-bottom: 1px solid var(--border-bright); }
.entry-content a:hover { color: var(--green); border-color: var(--green); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.widget-title {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { font-size: 14px; color: var(--text-secondary); }
.widget ul li a:hover { color: var(--accent); }

/* Posts archive */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.post-card-body { padding: 24px; }
.post-card h2 { font-size: 18px; margin-bottom: 10px; }
.post-card h2 a { color: var(--text-primary); }
.post-card h2 a:hover { color: var(--accent); }
.post-card .excerpt { font-size: 14px; margin-bottom: 16px; }
.read-more {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.read-more::after { content: ' →'; }

/* 404 */
.error-404 { text-align: center; padding: 100px 24px; }
.error-code {
  font-family: var(--font-display);
  font-size: 120px;
  color: var(--border-bright);
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}
.error-404 h2 { font-size: 28px; margin-bottom: 12px; }

/* ============================================================
   WOOCOMMERCE OVERRIDES
   ============================================================ */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--accent) !important;
  color: var(--bg-base) !important;
  font-family: var(--font-display) !important;
  border-radius: var(--radius) !important;
  border: none !important;
  letter-spacing: 0.06em;
  padding: 10px 22px !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--green) !important;
  color: var(--bg-base) !important;
}
.woocommerce .price { color: var(--green) !important; font-family: var(--font-display); }
.woocommerce table.shop_table { background: var(--bg-card); border: 1px solid var(--border) !important; }
.woocommerce table.shop_table th { color: var(--accent); font-family: var(--font-display); font-size: 12px; letter-spacing: 0.1em; }
.woocommerce table.shop_table td { color: var(--text-secondary); border-top: 1px solid var(--border) !important; }
.woocommerce .woocommerce-message { background: var(--bg-card); border-top: 3px solid var(--green); color: var(--text-primary); }
.woocommerce .woocommerce-error { background: var(--bg-card); border-top: 3px solid #ff6b6b; color: var(--text-primary); }
.woocommerce-account .woocommerce-MyAccount-navigation {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li a { color: var(--text-secondary); font-size: 14px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a { color: var(--accent); }

/* ============================================================
   FORMS
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 6px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text-muted); }
.mono { font-family: var(--font-display); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .privacy-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 680px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    z-index: 999;
  }
  .menu-toggle { display: flex; }
  .hero { padding: 60px 0 50px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 24px; }
}
