/* ============================================================
   EcoBriefing — Ground Zero Foundation
   Bright editorial environmental news system
   All sample content is demonstration only
   ============================================================ */

:root {
  /* Light editorial foundation */
  --bg-page: #f3f7f4;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-warm: rgba(250, 248, 245, 0.95);
  --bg-silver: rgba(238, 241, 245, 0.9);
  --bg-hero: linear-gradient(135deg, rgba(232, 245, 233, 0.95) 0%, rgba(227, 242, 253, 0.9) 40%, rgba(255, 248, 225, 0.92) 100%);
  --nature-overlay: linear-gradient(180deg, rgba(232, 245, 233, 0.55) 0%, rgba(227, 242, 253, 0.35) 45%, rgba(255, 253, 245, 0.5) 100%);
  
  /* Text */
  --text-primary: #1a1d21;
  --text-secondary: #3d4450;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;
  
  /* Meaningful accent colors — never imply absolute truth */
  --accent-urgent: #e53935;      /* Red — urgent / developing */
  --accent-env: #2e7d32;         /* Green — environment / restoration / progress */
  --accent-warning: #ef6c00;     /* Orange — warnings / contested / developing context */
  --accent-evidence: #00838f;    /* Cyan — evidence / data / EcoAlaxy identity */
  --accent-blue: #1565c0;        /* Bright blue — links / EcoAlaxy */
  
  /* Borders & shadows */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  
  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
  --header-height: 64px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-evidence);
  text-decoration: underline;
}

/* ============================================================
   FOUNDATION BANNER — always visible honesty
   ============================================================ */
.foundation-banner {
  background: #1a1d21;
  color: #f0f4f8;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.foundation-banner strong {
  color: #ffcc80;
}

.foundation-banner a {
  color: #80deea;
  text-decoration: underline;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  position: sticky;
  top: 36px; /* below foundation banner */
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-evidence), var(--accent-env));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text .name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-text .sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-main a {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-main a:hover,
.nav-main a.active {
  background: var(--bg-silver);
  color: var(--accent-evidence);
  text-decoration: none;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-evidence);
  color: white;
}

.btn-primary:hover {
  background: #006064;
  color: white;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-medium);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--accent-evidence);
  color: var(--accent-evidence);
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .nav-main {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .header-cta .btn-outline {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--bg-hero);
  padding: 3.5rem 1.25rem 3rem;
  border-bottom: 1px solid var(--border-light);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 131, 143, 0.1);
  color: var(--accent-evidence);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.section {
  padding: 3rem 1.25rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================================
   SAMPLE LABEL SYSTEM
   ============================================================ */
.sample-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff3e0;
  color: #e65100;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid #ffcc80;
}

.sample-label.demo {
  background: #e3f2fd;
  color: #1565c0;
  border-color: #90caf9;
}

.sample-label.foundation {
  background: #f3e5f5;
  color: #7b1fa2;
  border-color: #ce93d8;
}

/* ============================================================
   CATEGORY GRID (Briefing Channel)
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  border-color: var(--accent-evidence);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.category-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.category-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-card .sample-label {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
}

/* ============================================================
   FEATURED SAMPLE BRIEFING CARD
   ============================================================ */
.featured-briefing {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.featured-header {
  background: linear-gradient(90deg, #e0f2f1 0%, #e3f2fd 100%);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.featured-body {
  padding: 1.5rem;
}

.featured-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.featured-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ============================================================
   BRIEFING DETAIL PAGE
   ============================================================ */
.briefing-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .briefing-layout {
    grid-template-columns: 1fr;
  }
}

.briefing-main {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.briefing-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Claim states */
.claim-state {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.claim-state.directly-reported { background: #e8f5e9; color: #2e7d32; }
.claim-state.source-supported { background: #e0f7fa; color: #00838f; }
.claim-state.corroborated { background: #e3f2fd; color: #1565c0; }
.claim-state.contested { background: #fff3e0; color: #ef6c00; }
.claim-state.unverified { background: #fafafa; color: #616161; border: 1px solid #e0e0e0; }
.claim-state.opinion { background: #f3e5f5; color: #7b1fa2; }
.claim-state.unknown { background: #eceff1; color: #546e7a; }
.claim-state.corrected { background: #ffebee; color: #c62828; }
.claim-state.retracted { background: #ffcdd2; color: #b71c1c; }

/* Source comparison cards */
.source-grid {
  display: grid;
  gap: 1rem;
}

.source-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  background: var(--bg-warm);
}

.source-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.source-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.source-claims {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.source-link {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Summary blocks */
.summary-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.summary-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.summary-block h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.summary-block ul {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.summary-block li {
  margin-bottom: 0.35rem;
}

/* Revision history */
.revision-list {
  list-style: none;
  padding: 0;
}

.revision-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.revision-item:last-child {
  border-bottom: none;
}

.revision-time {
  font-weight: 600;
  color: var(--accent-evidence);
  font-size: 0.8rem;
}

.revision-reason {
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ============================================================
   SOURCE DESK
   ============================================================ */
.source-desk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.source-desk-table th,
.source-desk-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.source-desk-table th {
  background: var(--bg-silver);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.source-desk-table td {
  color: var(--text-primary);
}

/* ============================================================
   ECOSAGE
   ============================================================ */
.ecosage-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-evidence), #26a69a);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  border: 3px solid white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ecosage-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 131, 143, 0.35);
}

.ecosage-bubble svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.ecosage-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 8rem));
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  display: none;
  flex-direction: column;
  z-index: 1100;
  overflow: hidden;
}

.ecosage-panel.open {
  display: flex;
}

.ecosage-header {
  background: linear-gradient(90deg, #00695c, #00838f);
  color: white;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ecosage-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ecosage-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.ecosage-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.ecosage-subtitle {
  font-size: 0.7rem;
  opacity: 0.85;
}

.ecosage-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  opacity: 0.9;
}

.ecosage-disclosure {
  background: #fff8e1;
  color: #e65100;
  font-size: 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #ffe082;
  line-height: 1.4;
}

.ecosage-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fafbfc;
}

.ecosage-msg {
  max-width: 92%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ecosage-msg.bot {
  background: white;
  border: 1px solid var(--border-light);
  align-self: flex-start;
  color: var(--text-primary);
}

.ecosage-msg.user {
  background: var(--accent-evidence);
  color: white;
  align-self: flex-end;
}

.ecosage-input-area {
  padding: 0.75rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 0.5rem;
  background: white;
}

.ecosage-input {
  flex: 1;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}

.ecosage-input:focus {
  border-color: var(--accent-evidence);
}

.ecosage-send {
  background: var(--accent-evidence);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.ecosage-send:hover {
  background: #006064;
}

.ecosage-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 1rem 0.75rem;
  background: #fafbfc;
}

.ecosage-chip {
  background: white;
  border: 1px solid var(--border-medium);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.ecosage-chip:hover {
  border-color: var(--accent-evidence);
  color: var(--accent-evidence);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1a1d21;
  color: #b0bec5;
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand .name {
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 320px;
}

.footer-col h4 {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  color: #90a4ae;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: #80deea;
}

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid #37474f;
  font-size: 0.8rem;
  color: #78909c;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ============================================================
   UTILITY
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-silver);
  color: var(--text-secondary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-evidence);
  outline-offset: 2px;
}
/* ============================================================
   OPENING INTRO OVERLAY
   ============================================================ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0e1a24;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.7s ease;
}

.intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-overlay.hidden {
  display: none;
}

.intro-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Side treatment for wide screens */
.intro-side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100% - min(100vw, 464px * (100vh / 688px))) / 2);
  max-width: 40%;
  background: linear-gradient(180deg, 
    #f7f9fc 0%, 
    #e8f0f5 25%, 
    #fff3e0 50%, 
    #e0f7fa 75%, 
    #f7f9fc 100%);
  opacity: 0.92;
  pointer-events: none;
}

.intro-side.left,
.intro-side.right {
  background: transparent;
}

.intro-side {
  opacity: 1;
}

.intro-video-wrap {
  position: relative;
  height: min(92vh, 92vw);
  width: min(92vh, 92vw);
  max-height: 100vh;
  max-width: 100vw;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.intro-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* Skip + controls */
.intro-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.intro-skip,
.intro-enter,
.intro-sound {
  background: rgba(255,255,255,0.92);
  color: #1a1d21;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: background 0.15s, transform 0.15s;
}

.intro-skip:hover,
.intro-enter:hover,
.intro-sound:hover {
  background: #fff;
  transform: translateY(-1px);
}

.intro-skip:focus-visible,
.intro-enter:focus-visible,
.intro-sound:focus-visible {
  outline: 2px solid #00838f;
  outline-offset: 3px;
}

.intro-enter {
  display: none;
}

.intro-overlay.autoplay-failed .intro-enter {
  display: inline-flex;
}

.intro-overlay.autoplay-failed .intro-skip {
  display: none;
}

/* Logo reveal after intro */
.logo-reveal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.logo-reveal.active {
  opacity: 1;
}

.logo-reveal img {
  width: min(280px, 70vw);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}

/* Page starts hidden until intro done (session) */
body.intro-pending .site-header,
body.intro-pending .hero,
body.intro-pending .section,
body.intro-pending .worlds-strip,
body.intro-pending .site-footer,
body.intro-pending .ecosage-bubble {
  opacity: 0;
  pointer-events: none;
}

body.intro-done .site-header,
body.intro-done .hero,
body.intro-done .section,
body.intro-done .worlds-strip,
body.intro-done .site-footer {
  opacity: 1;
  transition: opacity 0.6s ease 0.15s;
}

body.intro-done .ecosage-bubble {
  opacity: 1;
  transition: opacity 0.5s ease 0.8s;
}

/* Logo in header */
.logo-block img.logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.logo-block .logo-mark {
  display: none; /* hide CSS fallback when real logo present */
}

.logo-block.has-logo .logo-text {
  display: flex;
}

/* Footer logo */
.footer-logo {
  height: 64px;
  width: auto;
  margin-bottom: 0.75rem;
  filter: brightness(1.1);
}

.table-scroll-hint {
  display: none;
  margin: 0;
  padding: 0.7rem 1rem;
  background: #eef8fa;
  color: #42636d;
  font-size: 0.8rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}

@media (max-width: 700px) {
  .foundation-banner {
    position: relative;
    top: auto;
  }

  .site-header {
    top: 0;
  }

  .table-scroll-hint {
    display: block;
  }
}

/* EcoSage bubble image */
.ecosage-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ecosage-bubble {
  padding: 0;
  overflow: hidden;
}

.ecosage-bubble svg {
  display: none;
}

/* EcoSage panel avatar */
.ecosage-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ecosage-avatar {
  padding: 0;
  overflow: hidden;
  background: transparent;
}

/* Capability intro area on landing (optional subtle) */
.ecosage-capability {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  margin: 0 auto;
}

.ecosage-capability img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e0f7fa;
}

.ecosage-capability h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ecosage-capability p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

@media (max-width: 600px) {
  .intro-side {
    display: none;
  }
  .intro-video-wrap {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
  .intro-video-wrap video {
    object-fit: contain;
  }
  .ecosage-capability {
    flex-direction: column;
    text-align: center;
  }
}

/* Reduced motion: no forced video */
@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }
  body.intro-pending .site-header,
  body.intro-pending .hero,
  body.intro-pending .section,
  body.intro-pending .worlds-strip,
  body.intro-pending .site-footer,
  body.intro-pending .ecosage-bubble {
    opacity: 1;
    pointer-events: auto;
  }
}


/* Coming Soon / disabled interactive look */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-silver);
  color: var(--text-muted);
  border: 1px dashed var(--border-medium);
  cursor: default;
  user-select: none;
}

.coming-soon-link {
  display: block;
  color: #78909c;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  cursor: default;
  opacity: 0.85;
}

/* EcoSage toolbar */
.ecosage-toolbar {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--border-light);
  background: #fafbfc;
  display: flex;
  justify-content: flex-end;
}

.ecosage-clear {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.ecosage-clear:hover {
  color: var(--accent-urgent);
  background: #ffebee;
}

.ecosage-clear:focus-visible {
  outline: 2px solid var(--accent-evidence);
  outline-offset: 2px;
}

/* Ensure hidden panel does not receive focus */
.ecosage-panel[hidden] {
  display: none !important;
}

/* Mobile nav open state */
.nav-main.is-open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 800;
}


/* Nature atmosphere background — self-contained, no external image required */
body {
  background-color: #e8f0ea;
  background-image:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(46, 125, 50, 0.12), transparent 50%),
    radial-gradient(ellipse 100% 60% at 90% 10%, rgba(2, 119, 189, 0.10), transparent 45%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 193, 7, 0.08), transparent 40%),
    linear-gradient(180deg, #eef6f0 0%, #e8f2f6 40%, #f5f3eb 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(76, 175, 80, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(3, 169, 244, 0.12) 0%, transparent 22%),
    radial-gradient(circle at 60% 80%, rgba(139, 195, 74, 0.1) 0%, transparent 30%);
}

.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero {
  background: var(--bg-hero);
  position: relative;
}

.logo-block img.logo-img {
  background: transparent;
  mix-blend-mode: normal;
}

/* ============================================================
   DESIGN UPGRADE — presence, motion, soul
   Foundation Phase honesty preserved
   ============================================================ */

/* Entrance motion (respects reduced-motion) */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: riseIn 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.4s; }

body.intro-pending .animate-in {
  animation: none;
  opacity: 0;
}

body.intro-done .animate-in {
  animation: riseIn 0.7s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .animate-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Hero logo presence */
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hero-logo {
  width: min(200px, 42vw);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 80, 90, 0.18));
  background: transparent;
}

.hero {
  padding: 3.25rem 1.25rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(243, 247, 244, 0.9));
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--accent-evidence);
  font-weight: 600;
}

.btn-ghost:hover {
  background: rgba(0, 131, 143, 0.08);
  text-decoration: none;
  color: var(--accent-evidence);
}

/* EcoSage capability — stronger presence */
.ecosage-section {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.ecosage-capability-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(224, 247, 250, 0.5) 100%);
  border: 1px solid rgba(0, 131, 143, 0.2);
  border-radius: 20px;
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 32px rgba(0, 80, 90, 0.1);
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.ecosage-capability-visual {
  position: relative;
  flex-shrink: 0;
}

.ecosage-capability-visual img {
  width: 140px;
  height: auto;
  border-radius: 16px;
  display: block;
  border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 24px rgba(0, 100, 110, 0.2);
  position: relative;
  z-index: 1;
}

.ecosage-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.35) 0%, transparent 70%);
  z-index: 0;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.ecosage-capability-copy h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.ecosage-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-evidence);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.ecosage-capability-copy p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.ecosage-disclosure-inline {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  border-left: 3px solid #ffcc80;
  padding-left: 0.75rem;
  margin-bottom: 1rem !important;
}

@media (max-width: 700px) {
  .ecosage-capability-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem;
  }
  .ecosage-capability-visual {
    margin: 0 auto;
  }
  .ecosage-disclosure-inline {
    text-align: left;
  }
}

/* Category cards — slightly more presence */
.category-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 60, 70, 0.12);
}

/* Featured briefing depth */
.featured-briefing {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 131, 143, 0.15);
  box-shadow: 0 10px 36px rgba(0, 60, 70, 0.1);
}

/* Section titles with accent bar */
.section-title {
  position: relative;
  padding-left: 0.85rem;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-evidence), var(--accent-env));
}

/* EcoSage bubble — stronger presence */
.ecosage-bubble {
  width: 64px;
  height: 64px;
  box-shadow: 0 8px 28px rgba(0, 131, 143, 0.4), 0 0 0 3px rgba(255,255,255,0.9);
}

.ecosage-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0, 131, 143, 0.5), 0 0 0 3px #fff;
}

/* Foundation banner — slightly softer so design breathes but stays visible */
.foundation-banner {
  background: linear-gradient(90deg, #1a1d21 0%, #1e3a3a 50%, #1a1d21 100%);
  letter-spacing: 0.03em;
}

/* Cards glass on nature bg */
.sidebar-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

/* Footer stays grounded */
.site-footer {
  background: linear-gradient(180deg, #152025 0%, #1a1d21 100%);
}


/* ============================================================
   Intro stage — silver-blue field + animated geometric lines
   ============================================================ */
.intro-overlay {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(56, 120, 160, 0.35) 0%, transparent 55%),
    linear-gradient(160deg, #0e1a24 0%, #1a2f3f 35%, #243b4a 60%, #1a2834 100%) !important;
}

.intro-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0%, rgba(180, 210, 230, 0.07) 40%, transparent 60%),
    linear-gradient(245deg, transparent 10%, rgba(120, 180, 220, 0.06) 50%, transparent 70%);
  animation: silverSheen 8s ease-in-out infinite alternate;
}

@keyframes silverSheen {
  from { opacity: 0.5; transform: translateX(-2%); }
  to   { opacity: 1; transform: translateX(2%); }
}

/* Animated line network */
.intro-network {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.intro-network svg {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.intro-network .line {
  fill: none;
  stroke: rgba(176, 206, 230, 0.45);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 8 14;
  animation: lineFlow 12s linear infinite;
}

.intro-network .line.alt {
  stroke: rgba(120, 190, 220, 0.35);
  stroke-dasharray: 4 18;
  animation-duration: 16s;
  animation-direction: reverse;
}

.intro-network .node {
  fill: rgba(200, 230, 255, 0.7);
  filter: drop-shadow(0 0 4px rgba(140, 200, 240, 0.8));
  animation: nodePulse 3.5s ease-in-out infinite;
}

.intro-network .node.delay {
  animation-delay: 1.2s;
}

.intro-network .shape {
  fill: none;
  stroke: rgba(160, 200, 230, 0.25);
  stroke-width: 1;
  animation: shapeDraw 10s ease-in-out infinite alternate;
}

@keyframes lineFlow {
  to { stroke-dashoffset: -120; }
}

@keyframes nodePulse {
  0%, 100% { opacity: 0.45; r: 2.5; }
  50% { opacity: 1; r: 4; }
}

@keyframes shapeDraw {
  from { stroke-dasharray: 4 80; opacity: 0.2; }
  to   { stroke-dasharray: 40 20; opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-stage::before,
  .intro-network .line,
  .intro-network .node,
  .intro-network .shape {
    animation: none !important;
  }
}


/* EcoAlaxy constellation interconnection strip */
.worlds-strip {
  background: linear-gradient(90deg, #0e1a24 0%, #1a2f3f 50%, #0e1a24 100%);
  color: #b0bec5;
  padding: 1.75rem 1.25rem;
  border-top: 1px solid #2a4555;
}
.worlds-strip-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.worlds-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #80deea;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.worlds-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  margin-bottom: 0.65rem;
}
.worlds-nav a {
  color: #e0f7fa;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.worlds-nav a:hover { color: #4dd0e1; text-decoration: underline; }
.worlds-here {
  color: #ffcc80;
  font-weight: 600;
  font-size: 0.95rem;
}
.worlds-note {
  font-size: 0.75rem;
  color: #78909c;
  margin: 0;
}
