/* ================================================================
   EARTHSENTINEL.ORG — main.css
   Design Tokens | Typography | Reset | CSS Variables
   CED v3.2.1 — Climate Enforcement Doctrine
   Author: Joedes Machado | earthsentinel.org
================================================================ */

/* ---- GOOGLE FONTS ---- */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS CUSTOM PROPERTIES ---- */
:root {
  /* Core Palette */
  --navy:           #0B1F2A;
  --navy-mid:       #0F2A38;
  --graphite:       #0D0D0D;
  --steel:          #8A9BAE;
  --blue-accent:    #1E6FFF;
  --blue-dim:       rgba(30, 111, 255, 0.12);
  --blue-dim-hover: rgba(30, 111, 255, 0.20);
  --white:          #F0F4F8;

  /* Status Colors */
  --status-green:   #1DB954;
  --status-yellow:  #F59E0B;
  --status-orange:  #F97316;
  --status-red:     #EF4444;
  --status-blue:    #1E6FFF;

  /* Status Backgrounds */
  --status-green-bg:  rgba(29, 185, 84, 0.10);
  --status-yellow-bg: rgba(245, 158, 11, 0.10);
  --status-orange-bg: rgba(249, 115, 22, 0.10);
  --status-red-bg:    rgba(239, 68, 68, 0.10);

  /* Surface & Border */
  --surface:        #0F2A38;
  --surface-2:      #112230;
  --surface-3:      #132840;
  --border:         rgba(255, 255, 255, 0.07);
  --border-active:  rgba(255, 255, 255, 0.14);
  --border-accent:  rgba(30, 111, 255, 0.30);

  /* Typography */
  --font-mono:    'DM Mono', 'Courier New', monospace;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Type Scale */
  --text-xs:      0.68rem;
  --text-sm:      0.80rem;
  --text-base:    0.90rem;
  --text-md:      1.00rem;
  --text-lg:      1.15rem;
  --text-xl:      1.35rem;
  --text-2xl:     1.70rem;
  --text-3xl:     2.20rem;
  --text-4xl:     3.00rem;
  --text-5xl:     4.00rem;

  /* Spacing Scale */
  --space-1:  0.25rem;
  --space-2:  0.50rem;
  --space-3:  0.75rem;
  --space-4:  1.00rem;
  --space-5:  1.25rem;
  --space-6:  1.50rem;
  --space-8:  2.00rem;
  --space-10: 2.50rem;
  --space-12: 3.00rem;
  --space-16: 4.00rem;
  --space-20: 5.00rem;
  --space-24: 6.00rem;

  /* Border Radius */
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 24px rgba(30,111,255,0.20);

  /* Transitions */
  --transition:     0.20s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-width:  1400px;
  --nav-height: 64px;
}

/* ---- RESET ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- SUBTLE GRID OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 111, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 111, 255, 0.012) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ---- BASE ELEMENTS ---- */
a {
  color: var(--blue-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #5592ff;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---- TYPOGRAPHY UTILITIES ---- */
.t-mono {
  font-family: var(--font-mono);
}

.t-display {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.t-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
}

.t-accent {
  color: var(--blue-accent);
}

.t-steel {
  color: var(--steel);
}

.t-white {
  color: var(--white);
}

.t-green  { color: var(--status-green);  }
.t-yellow { color: var(--status-yellow); }
.t-orange { color: var(--status-orange); }
.t-red    { color: var(--status-red);    }

/* ---- HEADING DEFAULTS ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); font-weight: 700; }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  color: var(--steel);
  line-height: 1.75;
  font-weight: 300;
}

strong {
  font-weight: 600;
  color: var(--white);
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 0.1em 0.4em;
  color: var(--blue-accent);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--graphite);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-6);
  overflow-x: auto;
  line-height: 1.6;
  color: var(--white);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ---- LOADING SKELETON ---- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface-2) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s infinite;
  border-radius: var(--r-xs);
  color: transparent !important;
  user-select: none;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- BLINK / PULSE ANIMATIONS ---- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- ACCESSIBILITY ---- */
:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--steel); }