/* ═══════════════════════════════════════
   NEUROETHICS.CL — SHARED STYLES
   PEM Security Ecosystem
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Palette — warm slate darks, high-contrast accents for OLED */
  --bg:           #0f1215;
  --bg-elevated:  #181c21;
  --bg-card:      #1e2329;
  --bg-card-h:    #262c33;
  --bg-surface:   #2a3038;

  --border:       #2e353e;
  --border-light: #3d4652;

  /* Primary accent — warm crimson, readable on dark */
  --accent:       #ef4444;
  --accent-soft:  rgba(239,68,68,0.10);
  --accent-med:   rgba(239,68,68,0.20);
  --accent-text:  #fca5a5;

  /* Semantic colors — all tested for WCAG AA on --bg-card */
  --blue:    #60a5fa;
  --amber:   #fbbf24;
  --emerald: #34d399;
  --violet:  #a78bfa;
  --cyan:    #22d3ee;
  --rose:    #fb7185;

  /* Text hierarchy */
  --text:       #edf0f4;
  --text-sec:   #a3aebb;
  --text-dim:   #6b7a8d;

  /* Type */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'SF Mono', monospace;

  /* Spacing scale */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 40px;
  --s-2xl: 64px;
  --s-3xl: 96px;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ─── LAYOUT ─── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--s-lg);
}
section {
  padding: var(--s-3xl) 0;
}
.section-border {
  border-top: 1px solid var(--border);
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,18,21,0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 var(--s-lg);
  max-width: 1080px;
  margin: 0 auto;
}
.nav-logo {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}
.nav-links {
  display: flex;
  gap: 2px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sec);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
}
.nav-lang {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-lang:hover {
  color: var(--text-sec);
  border-color: var(--border-light);
}
.nav-cta-link {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 6px 14px !important;
}
.nav-cta-link:hover { opacity: 0.9; background: var(--accent) !important; }

/* ─── MOBILE NAV ─── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-sec);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
  }
  .nav-inner { position: relative; }
}

/* ─── TYPOGRAPHY ─── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.heading-xl {
  font-size: clamp(32px, 6vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.2px;
}
.heading-lg {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.6px;
}
.heading-md {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.subtitle {
  font-size: 15px;
  color: var(--text-sec);
  max-width: 580px;
  line-height: 1.7;
  margin-top: 14px;
}
em, .accent { font-style: normal; color: var(--accent); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #dc2626; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { background: var(--bg-card); border-color: var(--text-dim); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--s-lg) 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--border-light);
}
.card-interactive:hover {
  transform: translateY(-2px);
}
.card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.card p {
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.65;
}

/* ─── ICON CIRCLE ─── */
.icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

/* ─── TAG ─── */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  display: inline-block;
  margin-top: 14px;
}

/* ─── GRID HELPERS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-md); }
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-md);
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── STATS ROW ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: var(--s-xl);
}
@media (max-width: 500px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
}
.stat-num { font-size: 28px; font-weight: 900; letter-spacing: -1px; }
.stat-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ─── PIPELINE STAGE ─── */
.stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px var(--s-lg);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: var(--s-md);
  align-items: start;
}
@media (max-width: 600px) { .stage { grid-template-columns: 1fr; } }
.stage-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding-top: 3px;
}
.stage-body h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.stage-body p { font-size: 12px; color: var(--text-sec); line-height: 1.65; }

/* ─── FLOW STEPS ─── */
.flow-steps { display: flex; flex-direction: column; }
.flow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--s-md);
  padding-bottom: 28px;
  position: relative;
}
.flow-step:last-child { padding-bottom: 0; }
.flow-step::before {
  content: '';
  position: absolute;
  left: 21px; top: 48px; bottom: 0;
  width: 1px;
  background: var(--border);
}
.flow-step:last-child::before { display: none; }
.flow-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  position: relative; z-index: 1;
}
.flow-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.flow-body p { font-size: 13px; color: var(--text-sec); line-height: 1.65; }

/* ─── TIERS ─── */
.tier-card {
  position: relative;
}
.tier-card.featured {
  border-color: var(--accent);
  background: linear-gradient(to bottom, var(--accent-soft), var(--bg-card));
}
.tier-card.featured::after {
  content: attr(data-badge);
  position: absolute;
  top: -10px; right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
}
.tier-name { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.tier-plea {
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: var(--s-md);
}
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-list li {
  font-size: 12px;
  color: var(--text-sec);
  padding-left: 16px;
  position: relative;
  line-height: 1.55;
}
.tier-list li::before {
  content: '✓'; position: absolute; left: 0;
  font-size: 11px; font-weight: 700;
  color: var(--emerald);
}

/* ─── DIFF COMPARE ─── */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
@media (max-width: 600px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card { border-radius: 12px; padding: 28px var(--s-lg); }
.compare-card blockquote {
  font-size: 16px; font-weight: 600;
  font-style: italic; line-height: 1.5;
  margin: 0; padding-left: 16px;
  border-left: 2px solid var(--border);
}

/* ─── LEGAL CARDS ─── */
.legal-source {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 500;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-xl) 0;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--s-lg);
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-sec);
  font-weight: 500;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ─── HERO SPECIFICS ─── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 54px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-med) 0%, transparent 65%);
  opacity: 0.35;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-med);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-desc {
  font-size: 16px;
  color: var(--text-sec);
  max-width: 520px;
  line-height: 1.7;
  margin: 20px 0 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-credentials {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.hero-cred {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}
.hero-cred strong { color: var(--text-sec); font-weight: 700; }

/* ─── CONTACT PROFILES ─── */
.contact-card {
  text-align: center;
  transition: all 0.2s;
}
.contact-card:hover { transform: translateY(-2px); }
.contact-icon { font-size: 28px; margin-bottom: 12px; }
.contact-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }

/* ─── UTILITIES ─── */
.mt-sm { margin-top: var(--s-sm); }
.mt-md { margin-top: var(--s-md); }
.mt-lg { margin-top: var(--s-lg); }
.mt-xl { margin-top: var(--s-xl); }
.mt-2xl { margin-top: var(--s-2xl); }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-blue { color: var(--blue); }
.text-amber { color: var(--amber); }
.text-emerald { color: var(--emerald); }
.text-violet { color: var(--violet); }
.text-cyan { color: var(--cyan); }
.text-rose { color: var(--rose); }
.text-dim { color: var(--text-dim); }
.text-sec { color: var(--text-sec); }
.border-top-accent { border-top: 3px solid var(--accent); }
.border-top-blue { border-top: 3px solid var(--blue); }
.border-top-amber { border-top: 3px solid var(--amber); }
.border-top-emerald { border-top: 3px solid var(--emerald); }
.border-top-violet { border-top: 3px solid var(--violet); }
.border-top-rose { border-top: 3px solid var(--rose); }
.border-top-cyan { border-top: 3px solid var(--cyan); }
