/**
 * Sovereign Dark Brutalism UI Kit (SDB-01) - Canonical Design System
 * Heurístico Lab (c) 2026
 */

:root {
  /* Surface & Background Hierarchy */
  --bg-void: #060608;          /* zinc-950 base */
  --bg-surface: #0c0c0e;       /* zinc-925 surface */
  --bg-card: #111116;          /* zinc-900 card */
  --bg-elevated: #181820;      /* elevated overlay */
  --bg-terminal: #050507;      /* terminal block background */

  /* Structural Borders */
  --border-subtle: #1c1c24;
  --border-card: #1f1f2a;
  --border-muted: #2a2a38;
  --border-bright: #3d3d52;

  /* Sovereign Color Palette */
  --cyan-400: #22d3ee;
  --cyan-500: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --cyan-glow-subtle: rgba(0, 240, 255, 0.12);

  --emerald-400: #34d399;
  --emerald-500: #00ff66;
  --emerald-glow: rgba(0, 255, 102, 0.35);
  --emerald-glow-subtle: rgba(0, 255, 102, 0.12);

  --yellow-400: #facc15;
  --amber-500: #ffaa00;
  --amber-glow: rgba(255, 170, 0, 0.35);
  --amber-glow-subtle: rgba(255, 170, 0, 0.12);

  --red-400: #f87171;
  --red-500: #ff4444;
  --red-glow: rgba(255, 68, 68, 0.35);
  --red-glow-subtle: rgba(255, 68, 68, 0.12);

  /* Typography Scale */
  --font-sans: "Geist Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "Fira Code", monospace;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
}

/* Background Texture Grid (SDB-01 Radial Blueprint) */
.bg-grid-sovereign {
  background-color: var(--bg-void);
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Keyframe Animations */
@keyframes led-beacon {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 5px currentColor);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
    filter: drop-shadow(0 0 1px currentColor);
  }
}

@keyframes modal-reveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes scanline {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(1000%);
  }
}

/* Utility Animation Classes */
.animate-led {
  animation: led-beacon 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.modal-enter {
  animation: modal-reveal 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.shimmer-seal {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(0, 240, 255, 0.18) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: merkle-shimmer 2.8s infinite linear;
}

/* Glow Utilities */
.text-glow-cyan {
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.text-glow-emerald {
  text-shadow: 0 0 12px rgba(0, 255, 102, 0.6);
}

.text-glow-amber {
  text-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
}

.border-glow-cyan:hover {
  border-color: rgba(0, 240, 255, 0.6) !important;
  box-shadow: 0 0 24px -2px rgba(0, 240, 255, 0.35) !important;
}

.border-glow-emerald:hover {
  border-color: rgba(0, 255, 102, 0.6) !important;
  box-shadow: 0 0 24px -2px rgba(0, 255, 102, 0.35) !important;
}

.border-glow-amber:hover {
  border-color: rgba(255, 170, 0, 0.6) !important;
  box-shadow: 0 0 24px -2px rgba(255, 170, 0, 0.35) !important;
}

/* Micro-LED Pill Tags */
.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
}

.pill-tag-cyan {
  background: var(--cyan-glow-subtle);
  border-color: rgba(0, 240, 255, 0.3);
  color: var(--cyan-400);
}

.pill-tag-emerald {
  background: var(--emerald-glow-subtle);
  border-color: rgba(0, 255, 102, 0.3);
  color: var(--emerald-400);
}

.pill-tag-amber {
  background: var(--amber-glow-subtle);
  border-color: rgba(255, 170, 0, 0.3);
  color: var(--yellow-400);
}

.pill-tag-red {
  background: var(--red-glow-subtle);
  border-color: rgba(255, 68, 68, 0.3);
  color: var(--red-400);
}

/* Tactical Action Buttons */
.btn-tactical-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--cyan-500);
  color: #000000;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-tactical-primary:hover {
  background: #38f8ff;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
  transform: translateY(-1px);
}

.btn-tactical-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tactical-secondary:hover {
  border-color: var(--cyan-500);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-tactical-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--amber-500);
  color: #000000;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-tactical-amber:hover {
  background: #ffbe33;
  box-shadow: 0 0 30px rgba(255, 170, 0, 0.6);
  transform: translateY(-1px);
}

/* Brutalist Cards */
.brutalist-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.brutalist-card:hover {
  border-color: var(--border-muted);
}

.brutalist-card-highlight {
  background: linear-gradient(180deg, #0e1017 0%, var(--bg-surface) 100%);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 30px -5px rgba(0, 240, 255, 0.15);
}

/* Monospace Ledger Data Rows */
.monospace-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #050507;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Symmetrical 4-Column Cyber-Brutalist Grid */
.tier-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
}

@media (min-width: 640px) and (max-width: 1079px) {
  .tier-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (min-width: 1080px) {
  .tier-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
  }
}

.tier-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: 100% !important;
}

/* Card Glows & Chromatic Borders */
.tier-card[data-tier="00"] {
  border: 1px solid rgba(0, 240, 255, 0.6) !important;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.12), inset 0 0 15px rgba(0, 240, 255, 0.03) !important;
}
.tier-card[data-tier="00"]:hover {
  border-color: #00f0ff !important;
  box-shadow: 0 0 45px rgba(0, 240, 255, 0.22), inset 0 0 20px rgba(0, 240, 255, 0.06) !important;
}

.tier-card[data-tier="01"] {
  border: 1px solid rgba(255, 0, 127, 0.6) !important;
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.15), inset 0 0 15px rgba(255, 0, 127, 0.04) !important;
}
.tier-card[data-tier="01"]:hover {
  border-color: #ff007f !important;
  box-shadow: 0 0 50px rgba(255, 0, 127, 0.25), inset 0 0 20px rgba(255, 0, 127, 0.08) !important;
}

.tier-card[data-tier="02"] {
  border: 1px solid rgba(0, 255, 136, 0.6) !important;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.12), inset 0 0 15px rgba(0, 255, 136, 0.03) !important;
}
.tier-card[data-tier="02"]:hover {
  border-color: #00ff88 !important;
  box-shadow: 0 0 45px rgba(0, 255, 136, 0.22), inset 0 0 20px rgba(0, 255, 136, 0.06) !important;
}

.tier-card[data-tier="03"] {
  border: 1px solid rgba(255, 183, 0, 0.6) !important;
  box-shadow: 0 0 30px rgba(255, 183, 0, 0.12), inset 0 0 15px rgba(255, 183, 0, 0.03) !important;
}
.tier-card[data-tier="03"]:hover {
  border-color: #ffb700 !important;
  box-shadow: 0 0 45px rgba(255, 183, 0, 0.22), inset 0 0 20px rgba(255, 183, 0, 0.06) !important;
}

/* High-Contrast Solid Action Buttons */
.btn-tier-00 {
  background: #00f0ff !important;
  color: #000000 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35) !important;
}
.btn-tier-00:hover {
  background: #5df5ff !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.55) !important;
}

.btn-tier-01 {
  background: #ff007f !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 0 20px rgba(255, 0, 127, 0.4) !important;
}
.btn-tier-01:hover {
  background: #ff3399 !important;
  box-shadow: 0 0 30px rgba(255, 0, 127, 0.6) !important;
}

.btn-tier-02 {
  background: #00ff88 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.35) !important;
}
.btn-tier-02:hover {
  background: #4dffa6 !important;
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.55) !important;
}

.btn-tier-03 {
  background: #ffb700 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 18px rgba(255, 183, 0, 0.35) !important;
}
.btn-tier-03:hover {
  background: #ffc933 !important;
  box-shadow: 0 0 28px rgba(255, 183, 0, 0.55) !important;
}

/* Base Structural Wall Cards */
.wall-card,
.comparison-card {
  border-radius: var(--radius-lg, 10px) !important;
  padding: 1.75rem 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

.wall-card[data-wall-card="legacy"] {
  background: #0a0709 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.08) !important;
}
.wall-card[data-wall-card="legacy"]:hover {
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.15) !important;
}

.wall-card[data-wall-card="saas"] {
  background: #0a0907 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.08) !important;
}
.wall-card[data-wall-card="saas"]:hover {
  border-color: rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.15) !important;
}

/* Sovereign Hero Card in Structural Wall */
.wall-card-sovereign,
.comparison-card.card-featured,
[data-wall-card="sovereign"] {
  background: var(--bg-surface, #0a0f1d) !important;
  border: 1px solid rgba(0, 240, 255, 0.7) !important;
  border-radius: var(--radius-lg, 10px) !important;
  padding: 1.75rem 1.5rem !important;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.14), inset 0 0 15px rgba(0, 240, 255, 0.03) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

.wall-card-sovereign:hover,
.comparison-card.card-featured:hover,
[data-wall-card="sovereign"]:hover {
  border-color: #00f0ff !important;
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.25), inset 0 0 20px rgba(0, 240, 255, 0.06) !important;
  transform: translateY(-2px) !important;
}

/* Universal Dark Modal Input Enforcement */
#intake-modal input,
#intake-modal select,
#intake-modal textarea,
.form-input,
.form-select,
.form-textarea {
  color-scheme: dark !important;
  background-color: #080811 !important;
  background: #080811 !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  font-family: inherit !important;
}

#intake-modal input:focus,
#intake-modal select:focus,
#intake-modal textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #00f0ff !important;
  outline: none !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25) !important;
}

#intake-modal input::placeholder,
#intake-modal textarea::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

/* Select & Options Dark Theming */
#intake-tier,
#intake-tier option,
select,
select option,
.form-select,
.form-select option {
  color-scheme: dark !important;
  background-color: #080811 !important;
  background: #080811 !important;
  color: #f8fafc !important;
}

#intake-tier option:hover,
#intake-tier option:focus,
#intake-tier option:checked,
select option:hover,
select option:focus,
select option:checked {
  background-color: #1e293b !important;
  color: #00f0ff !important;
}



