/*
Theme Name: The Energy Standard
Theme URI: https://standardofenergy.com
Author: Karl Correa
Author URI: https://standardofenergy.com
Description: Custom theme for The Energy Standard — AI Agents & Automation
Version: 1.0.0
License: Proprietary
Text Domain: energy-standard
*/

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

:root {
  --bg: #060a10;
  --bg-elevated: #0c1220;
  --bg-card: #0f1729;
  --border: rgba(56, 189, 248, 0.08);
  --border-hover: rgba(56, 189, 248, 0.2);
  --text: #e2e8f0;
  --text-muted: #7a8ba8;
  --text-dim: #475569;
  --accent: #38bdf8;
  --accent-warm: #f59e0b;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --accent-warm-glow: rgba(245, 158, 11, 0.12);
  --green: #22c55e;
  --red: #ef4444;
  --green-glow: rgba(34, 197, 94, 0.12);
  --gradient-1: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-2: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Playfair Display', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── GRID BACKGROUND ── */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.grid-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.06), transparent 70%);
}

/* ── NAV ── */
nav#site-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 1.25rem 2rem;
  backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(6, 10, 16, 0.75);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
nav#site-nav.scrolled { background: rgba(6, 10, 16, 0.92); }
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo-icon {
  width: 36px; height: 36px; background: var(--gradient-1);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: var(--bg); position: relative;
}
.logo-icon::after {
  content: ''; position: absolute; inset: -2px; border-radius: 10px;
  background: var(--gradient-1); z-index: -1; opacity: 0.4; filter: blur(8px);
}
.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.02em; transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--accent); transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 0.6rem 1.5rem !important; background: var(--accent);
  color: var(--bg) !important; border-radius: 6px;
  font-weight: 600 !important; font-size: 0.85rem; letter-spacing: 0.02em; transition: all 0.2s;
}
.nav-cta:hover { background: #5ccbf5; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }
.nav-links .active-link { color: var(--accent); }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.mobile-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 2rem; background: var(--accent); color: var(--bg);
  border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  letter-spacing: -0.01em; transition: all 0.25s; border: none; cursor: pointer;
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%); transition: transform 0.5s;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(56, 189, 248, 0.3); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 2rem; background: transparent; color: var(--text);
  border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--border-hover); transition: all 0.25s; cursor: pointer;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-glow); transform: translateY(-2px); }

/* ── SECTION SHARED ── */
section { position: relative; z-index: 1; padding: 7rem 2rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.section-label::before { content: ''; width: 24px; height: 1.5px; background: var(--accent); }
.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 1.25rem;
}
.section-desc { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; line-height: 1.7; }
.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── HERO ── */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 8rem 2rem 6rem; z-index: 1; }
.hero-inner { max-width: 1280px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem 0.4rem 0.5rem; border: 1px solid var(--border-hover);
  border-radius: 100px; font-size: 0.75rem; font-weight: 500; color: var(--accent);
  font-family: var(--font-mono); letter-spacing: 0.04em; margin-bottom: 2rem;
  background: var(--accent-glow); animation: fadeInUp 0.8s ease both;
}
.badge-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } }
.hero h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem); font-weight: 900;
  line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.15s both;
}
.hero h1 .serif-accent { font-family: var(--font-serif); font-style: italic; font-weight: 800; }
.hero-desc {
  font-size: 1.15rem; color: var(--text-muted); line-height: 1.7;
  max-width: 520px; margin-bottom: 2.5rem; animation: fadeInUp 0.8s ease 0.3s both;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; animation: fadeInUp 0.8s ease 0.45s both; }
.hero-visual { position: relative; animation: fadeInUp 0.8s ease 0.3s both; }
.hero-terminal { background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 60px var(--accent-glow); }
.terminal-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.9rem 1.2rem; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot:nth-child(1) { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #f59e0b; }
.terminal-dot:nth-child(3) { background: #22c55e; }
.terminal-title { margin-left: 0.75rem; font-size: 0.75rem; color: var(--text-dim); font-family: var(--font-mono); }
.terminal-body { padding: 1.5rem; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.9; min-height: 280px; }
.terminal-line { opacity: 0; animation: typeLine 0.4s ease forwards; }
.terminal-line:nth-child(1) { animation-delay: 0.8s; }
.terminal-line:nth-child(2) { animation-delay: 1.2s; }
.terminal-line:nth-child(3) { animation-delay: 1.6s; }
.terminal-line:nth-child(4) { animation-delay: 2.0s; }
.terminal-line:nth-child(5) { animation-delay: 2.4s; }
.terminal-line:nth-child(6) { animation-delay: 2.8s; }
.terminal-line:nth-child(7) { animation-delay: 3.2s; }
.terminal-line:nth-child(8) { animation-delay: 3.6s; }
@keyframes typeLine { to { opacity: 1; } }
.t-prompt { color: var(--accent); }
.t-cmd { color: #e2e8f0; }
.t-comment { color: var(--text-dim); }
.t-success { color: #22c55e; }
.t-warning { color: var(--accent-warm); }
.t-dim { color: var(--text-muted); }
.hero-glow { position: absolute; width: 400px; height: 400px; background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%); top: -100px; right: -100px; pointer-events: none; z-index: -1; }

/* ── STATS BAR ── */
.stats-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4rem 2rem; z-index: 1; position: relative; }
.stats-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat-item { text-align: center; }
.stat-number { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 900; letter-spacing: -0.03em; background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; font-weight: 500; }

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 4rem; }
.service-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2.5rem 2rem; transition: all 0.4s ease; position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient-1); opacity: 0; transition: opacity 0.4s; }
.service-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); }
.service-card:hover::before { opacity: 1; }
.service-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; background: var(--accent-glow); border: 1px solid rgba(56, 189, 248, 0.1); }
.service-card:nth-child(2) .service-icon { background: var(--accent-warm-glow); border-color: rgba(245, 158, 11, 0.15); }
.service-card:nth-child(3) .service-icon { background: rgba(129, 140, 248, 0.1); border-color: rgba(129, 140, 248, 0.15); }
.service-card h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-tag { padding: 0.3rem 0.75rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 100px; font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-dim); letter-spacing: 0.02em; }

/* ── PROCESS ── */
.process-section { background: var(--bg-elevated); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-top: 4rem; position: relative; }
.process-grid::before { content: ''; position: absolute; top: 36px; left: 60px; right: 60px; height: 1px; background: linear-gradient(90deg, var(--border), var(--border-hover), var(--border)); }
.process-step { text-align: center; position: relative; }
.step-num { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; margin: 0 auto 1.5rem; background: var(--bg); border: 2px solid var(--border-hover); color: var(--accent); position: relative; z-index: 2; transition: all 0.3s; }
.process-step:hover .step-num { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 0 30px var(--accent-glow); }
.process-step h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.process-step p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; max-width: 220px; margin: 0 auto; }

/* ── LUMEN ── */
.lumen-section { overflow: hidden; }
.lumen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-top: 3rem; }
.lumen-visual { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 3rem; position: relative; }
.lumen-visual::after { content: ''; position: absolute; inset: -1px; border-radius: 16px; background: var(--gradient-1); z-index: -1; opacity: 0.08; }
.lumen-letter { font-size: 1.5rem; font-weight: 800; color: var(--accent); margin-bottom: 0.25rem; font-family: var(--font-mono); }
.lumen-word { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.15rem; }
.lumen-meaning { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.5; }
.lumen-item { margin-bottom: 1.5rem; }
.lumen-item:last-child { margin-bottom: 0; }
.lumen-content h3 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.lumen-content h3 em { font-family: var(--font-serif); color: var(--accent-warm); font-weight: 800; }
.lumen-content p { color: var(--text-muted); font-size: 1rem; line-height: 1.75; margin-bottom: 2rem; }
.lumen-features { display: flex; flex-direction: column; gap: 0.75rem; }
.lumen-feature { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--text); font-weight: 500; }
.lumen-check { width: 20px; height: 20px; border-radius: 50%; background: rgba(34, 197, 94, 0.12); display: flex; align-items: center; justify-content: center; color: #22c55e; font-size: 0.7rem; flex-shrink: 0; }

/* ── CTA ── */
.cta-section { text-align: center; padding: 8rem 2rem; }
.cta-section .section-title { max-width: 700px; margin: 0 auto 1rem; }
.cta-section .section-desc { max-width: 500px; margin: 0 auto 2.5rem; }
.cta-box { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── FOOTER ── */
footer#site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-top: 1rem; max-width: 300px; }
.footer-col h4 { font-size: 0.75rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 1rem; font-weight: 600; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.9rem; padding: 0.3rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-dim); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .process-grid::before { display: none; }
  .lumen-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  nav#site-nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--bg-elevated);
    border-bottom: 1px solid var(--border); padding: 1.5rem 2rem; gap: 1rem;
  }
  .hero { min-height: auto; padding: 7rem 1.25rem 4rem; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  section { padding: 5rem 1.25rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
}

/* WordPress overrides - remove admin bar gap */
body.admin-bar nav#site-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar nav#site-nav { top: 46px; } }
