/* =========================================================
   Energy Crisis Alpha — Theme
   ========================================================= */

/* === TOKENS === */
:root {
  --bg: #060911;
  --bg-surface: #0B1220;
  --bg-card: #0F1729;
  --amber: #F59E0B;
  --amber-dim: rgba(245, 158, 11, 0.15);
  --amber-border: rgba(245, 158, 11, 0.25);
  --cyan: #22D3EE;
  --cyan-dim: rgba(34, 211, 238, 0.12);
  --cyan-border: rgba(34, 211, 238, 0.2);
  --green: #10B981;
  --green-dim: rgba(16, 185, 129, 0.15);
  --red: #EF4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-dim: #4A5568;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --border-cyan: rgba(34, 211, 238, 0.2);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

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

/* === NOISE OVERLAY === */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* === GRID BACKGROUND === */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
  z-index: 0;
}

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(6, 9, 17, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}
.navbar__logo-img {
  height: 40px;
  width: auto;
}
.navbar__logo-icon {
  width: 32px;
  height: 32px;
}
.navbar__logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.navbar__logo-text span {
  color: var(--cyan);
}
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar__link {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.navbar__link:hover {
  color: var(--text-primary);
  background: var(--border);
}
.navbar__link--cta {
  background: var(--amber);
  color: #000;
  font-weight: 600;
}
.navbar__link--cta:hover {
  background: #fbbf24;
  color: #000;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(34,211,238,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245,158,11,0.05) 0%, transparent 50%),
    var(--bg);
}
.hero__content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
  padding: 6px 14px;
  background: var(--amber-dim);
  border: 1px solid var(--amber-border);
  border-radius: 100px;
}
.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.hero__title em {
  font-style: normal;
  color: var(--cyan);
}
.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  pointer-events: none;
  opacity: 0.6;
}
.hero__radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: radar-sweep 4s linear infinite;
}
.hero__radar-ring:nth-child(1) {
  inset: 0;
  border-color: rgba(34, 211, 238, 0.15);
}
.hero__radar-ring:nth-child(2) {
  inset: 80px;
  border-color: rgba(34, 211, 238, 0.1);
  animation-delay: -1s;
}
.hero__radar-ring:nth-child(3) {
  inset: 160px;
  border-color: rgba(245, 158, 11, 0.08);
  animation-delay: -2s;
}
@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--amber);
  color: #000;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.3);
}
.btn--primary:hover {
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.5);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn--secondary:hover {
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* === SECTION === */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}
.section--alt {
  background: var(--bg-surface);
}
.section__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 48px;
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.06);
}
.card--amber:hover {
  border-color: var(--amber-border);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.06);
}
.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 1.25rem;
}
.card__icon--cyan { background: var(--cyan-dim); color: var(--cyan); }
.card__icon--amber { background: var(--amber-dim); color: var(--amber); }
.card__icon--green { background: var(--green-dim); color: var(--green); }
.card__icon--red { background: var(--red-dim); color: var(--red); }
.card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.card__body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.card__meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 12px;
}

/* === GRID === */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* === SIGNAL BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--critical { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.badge--warning { background: var(--amber-dim); color: var(--amber); border: 1px solid var(--amber-border); }
.badge--low { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.badge--info { background: var(--cyan-dim); color: var(--cyan); border: 1px solid var(--border-cyan); }

/* === REPORT TABLE === */
.report-table {
  width: 100%;
  border-collapse: collapse;
}
.report-table th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.report-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.report-table tr:hover td {
  background: var(--bg-surface);
}
.report-table .signal-name {
  font-weight: 600;
  color: var(--text-primary);
}
.report-table .confidence {
  font-weight: 700;
  font-family: var(--font-display);
}
.confidence--high { color: var(--red); }
.confidence--medium { color: var(--amber); }
.confidence--low { color: var(--green); }

/* === COMMUNITY SECTION === */
.skool-section {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.skool-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(34,211,238,0.04) 0%, transparent 50%);
  pointer-events: none;
}
.skool-section__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.skool-section__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}
.skool-section__channels {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.channel-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.channel-chip--active {
  border-color: var(--cyan-border);
  color: var(--cyan);
  background: var(--cyan-dim);
}

/* === FOOTER === */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__copy {
  font-size: 0.875rem;
  color: var(--text-dim);
}
.footer__tagline {
  font-size: 0.875rem;
  color: var(--text-dim);
  font-style: italic;
}

/* === REPORT PAGE === */
.report-hero {
  padding: 80px 0 40px;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(34,211,238,0.06) 0%, transparent 60%);
}
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.report-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.report-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.report-period {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 4px;
}

/* === STAT BLOCKS === */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.stat-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-block__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.stat-block__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}
.stat-block__sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.stat-block__value--amber { color: var(--amber); }
.stat-block__value--cyan { color: var(--cyan); }
.stat-block__value--red { color: var(--red); }
.stat-block__value--green { color: var(--green); }

/* === SIGNAL CARD === */
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}
.signal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.signal-card__title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}
.signal-card__body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.signal-card__footer {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.signal-card__correlation {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* === BACK LINK === */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--cyan); }

/* === DIVIDER === */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* === ASIDE / SIDEBAR === */
.aside-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.aside-card__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 100px 24px 60px; }
  .hero__visual { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .skool-section { padding: 32px 20px; }
  .section { padding: 60px 0; }
  .report-header { flex-direction: column; }
}
@media (max-width: 480px) {
  .stat-row { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
}