/* ═══════════════════════════════════════════════════════
   Dossier Enclave — Design System
   Version: 1.0
   ═══════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ─── Root Tokens ─── */
:root {
  /* Colors — Dark Theme */
  --bg-base: #060a14;
  --bg-primary: #0b1020;
  --bg-elevated: #101828;
  --bg-card: #121a31;
  --bg-card-hover: #182040;
  --bg-surface: #1a2340;
  --bg-input: #0d1529;

  --border-subtle: #1e2a48;
  --border-default: #25304f;
  --border-strong: #33456f;
  --border-accent: rgba(79, 124, 255, 0.3);

  --text-primary: #f5f7fb;
  --text-secondary: #d0d8ea;
  --text-muted: #8b9dc3;
  --text-disabled: #4a5a80;

  --accent: #4f7cff;
  --accent-hover: #6b94ff;
  --accent-active: #3a66e0;
  --accent-subtle: rgba(79, 124, 255, 0.12);
  --accent-glow: rgba(79, 124, 255, 0.25);

  --link: #9bc1ff;
  --link-hover: #c4ddff;

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);

  --gradient-hero: linear-gradient(
    135deg,
    #0b1020 0%,
    #0f1a3a 40%,
    #141e45 70%,
    #0b1020 100%
  );
  --gradient-accent: linear-gradient(135deg, #4f7cff 0%, #7b5cff 100%);
  --gradient-card: linear-gradient(
    145deg,
    rgba(18, 26, 49, 0.8) 0%,
    rgba(16, 24, 40, 0.6) 100%
  );

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(79, 124, 255, 0.15);
  --shadow-glow-strong: 0 0 60px rgba(79, 124, 255, 0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --max-width: 1200px;
  --max-width-text: 720px;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--link-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.02em;
}
h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
}
h3 {
  font-size: var(--text-2xl);
}
h4 {
  font-size: var(--text-xl);
}
h5 {
  font-size: var(--text-lg);
}
h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Container ─── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--max-width-text);
}

/* ─── Glassmorphism ─── */
.glass {
  background: rgba(18, 26, 49, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glass--strong {
  background: rgba(18, 26, 49, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-default);
}

/* ─── Cards ─── */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.card--interactive {
  cursor: pointer;
}

.card--flat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.card--flat:hover {
  background: var(--bg-card-hover);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
  line-height: 1;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}

.btn--primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 2px 12px rgba(79, 124, 255, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 4px 20px rgba(79, 124, 255, 0.5);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px rgba(79, 124, 255, 0.3);
}

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

.btn--secondary:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn--small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge--success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.badge--info {
  background: var(--accent-subtle);
  color: var(--accent-hover);
  border: 1px solid var(--border-accent);
}

/* ─── Banner ─── */
.banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.banner--warning {
  background: var(--warning-bg);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

.banner--info {
  background: var(--accent-subtle);
  border: 1px solid var(--border-accent);
  color: var(--accent-hover);
}

/* ─── Input Fields ─── */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--duration-fast) var(--ease-out);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input::placeholder {
  color: var(--text-disabled);
}

/* ─── Code / Pre ─── */
pre,
code {
  font-family: var(--font-mono);
}

pre {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  background: var(--accent-subtle);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--accent-hover);
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

/* ─── Pill Links ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: var(--accent-subtle);
}

/* ─── Dividers ─── */
.divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-8) 0;
}

/* ─── Utility ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.text-small {
  font-size: var(--text-sm);
}

.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-3 {
  gap: var(--space-3);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mt-12 {
  margin-top: var(--space-12);
}
.mt-16 {
  margin-top: var(--space-16);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

.grid {
  display: grid;
}
.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(79, 124, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(79, 124, 255, 0.25);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s var(--ease-out) both;
}
.animate-fade-in-up {
  animation: fadeInUp 0.6s var(--ease-out) both;
}
.animate-fade-in-down {
  animation: fadeInDown 0.4s var(--ease-out) both;
}
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
.animate-spin {
  animation: spin 1s linear infinite;
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-delay-1 {
  animation-delay: 0.1s;
}
.animate-delay-2 {
  animation-delay: 0.2s;
}
.animate-delay-3 {
  animation-delay: 0.3s;
}
.animate-delay-4 {
  animation-delay: 0.4s;
}

/* ─── Skeleton Loader ─── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-surface) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  h1 {
    font-size: var(--text-4xl);
  }
  h2 {
    font-size: var(--text-2xl);
  }
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }
  h1 {
    font-size: var(--text-3xl);
  }
  h2 {
    font-size: var(--text-xl);
  }
  .container {
    padding: 0 var(--space-4);
  }
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
  .card {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: var(--text-2xl);
  }
  .btn--large {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }
}

/* ─── Scroll-triggered Reveals ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Print ─── */
@media print {
  body {
    background: white;
    color: black;
  }
  .glass,
  .card {
    background: white;
    border: 1px solid #ccc;
    backdrop-filter: none;
  }
  nav,
  .banner {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════
   Terminal Forense (Labor Illusion)
   ═══════════════════════════════════════════════════════ */
.labor-terminal {
  background-color: #000000;
  color: #00ff41;
  font-family: "Courier New", Courier, monospace;
  padding: var(--space-8);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0,0,0,0.5);
  border: 1px solid #1a1a1a;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.labor-terminal::before {
  content: "DOSSIER ENCLAVE FORENSIC ENGINE v1.0.0-SECURE";
  display: block;
  color: #C5A059;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
  border-bottom: 1px dashed #333;
  padding-bottom: var(--space-2);
}

.terminal-line {
  margin-bottom: var(--space-2);
  line-height: 1.5;
  opacity: 0;
  animation: fadeInLine 0.1s forwards;
}

@keyframes fadeInLine {
  to { opacity: 1; }
}

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background-color: #00ff41;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════
   Muro de Pago (Paywall)
   ═══════════════════════════════════════════════════════ */
.paywall-container {
  position: relative;
}

.paywall-content {
  position: relative;
}

.paywall-content.blurred {
  filter: blur(12px);
  user-select: none;
  pointer-events: none;
}

.paywall-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(13, 17, 23, 0.95);
  border: 1px solid #C5A059;
  border-radius: var(--radius-md);
  padding: var(--space-8);
  text-align: center;
  z-index: 20;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.paywall-overlay h3 {
  color: #C5A059;
  margin-top: 0;
}

.iolta-badge {
  background-color: rgba(5, 150, 105, 0.1);
  border: 1px solid #059669;
  color: #059669;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  margin-top: var(--space-6);
  text-align: left;
}
