/* SemantiCord Main Styles (extracted from index.html)
   Performance improvements: external file for caching, utility classes.
*/
:root {
  /* DARK THEME (default) */
  --ink: #080a0f; /* base */
  --fg: #f5f7ff; /* text */
  --muted: #aeb6c2; /* subtext improved contrast */
  --g1: #6a5af9; /* gradient 1 */
  --g2: #00d4ff; /* gradient 2 */
  --g3: #22d3ee; /* gradient 3 */
  --g4: #8b5cf6; /* gradient 4 */
  --accent: #93e5ff; /* neon accent */
  --card: #0e121a; /* card bg */
  --border: rgba(255, 255, 255, 0.08);
  --blur: 10px;
  --radius: 18px;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  --grid: rgba(147, 229, 255, 0.06);
  --bg: radial-gradient(
      1200px 800px at 15% -10%,
      rgba(138, 92, 246, 0.18),
      transparent
    ),
    radial-gradient(
      1000px 700px at 90% 0%,
      rgba(34, 211, 238, 0.14),
      transparent
    ),
    linear-gradient(180deg, #090b12, #0a0c14 60%);
  /* Schema group colors (used in graph + legend) */
  --core: #6a5af9;
  --domain: #00d4ff;
  --market: #ffb347;
  --trust: #8b5cf6;
  --impact: #10b981;
  --finance: #0ea5e9;
  --actor: #f59e0b;
  --data: #22d3ee;
  --documents: #6366f1;
  --legal: #d946ef;
  --evaluation: #fb7185;
  --security: #f97316;
  --ml: #14b8a6;
  --audit: #eab308;
}
html[data-theme="light"] {
  --ink: #f7f8fc;
  --fg: #0b0c10;
  --muted: #4b5563;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
  --grid: rgba(99, 102, 241, 0.08);
  --bg: radial-gradient(
      1200px 800px at 10% -10%,
      rgba(99, 102, 241, 0.25),
      transparent
    ),
    radial-gradient(
      1000px 700px at 90% 0%,
      rgba(14, 165, 233, 0.22),
      transparent
    ),
    linear-gradient(180deg, #ffffff, #f6f7fb 70%);
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 88px; /* Header height + spacing */
  scroll-behavior: smooth;
  height: 100%;
}
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter,
    Ubuntu, Helvetica, Arial, sans-serif;
  /* background: var(--bg); */
  color: var(--fg);
  overflow-x: hidden;
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 22px;
}
a {
  color: inherit;
  text-decoration: none;
}
.graph-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.graph-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #0a0b10;
  box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
  overflow: hidden;
}
.graph-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.4),
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.graph-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 212, 255, 0.32);
}
.graph-link:hover::after {
  opacity: 0.5;
}
.graph-link span.icon {
  font-size: 16px;
  line-height: 1;
}
.graph-link.alt {
  background: linear-gradient(135deg, var(--g4), var(--g3));
  box-shadow: 0 6px 18px rgba(138, 92, 246, 0.28);
}
.graph-link.alt:hover {
  box-shadow: 0 12px 28px rgba(138, 92, 246, 0.38);
}
html[data-theme="light"] .graph-link,
html[data-theme="light"] .graph-link.alt {
  color: #0b0c10;
}
@media (prefers-reduced-motion: reduce) {
  .graph-link,
  .graph-link:hover {
    transform: none !important;
  }
}
.muted {
  color: var(--muted);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(0px);
  background: radial-gradient(
      600px 400px at 80% 10%,
      rgba(147, 229, 255, 0.08),
      transparent 60%
    ),
    repeating-linear-gradient(
      to bottom,
      var(--grid),
      var(--grid) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      to right,
      var(--grid),
      var(--grid) 1px,
      transparent 1px,
      transparent 24px
    );
  mask-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.4) 30%,
    rgba(255, 255, 255, 0.2) 60%,
    rgba(255, 255, 255, 0)
  );
}
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(var(--blur));
  background: rgba(10, 12, 18, 0.8);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  will-change: transform;
}
header.scrolled {
  background: rgba(10, 12, 18, 0.95);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] header {
  background: rgba(255, 255, 255, 0.8);
}
html[data-theme="light"] header.scrolled {
  background: rgba(255, 255, 255, 0.95);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav a {
  font-size: 13px;
  opacity: 0.95;
}
.nav .links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav .links a {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav .links a:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
html[data-theme="light"] .nav .links a:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Desktop nav enhancements for wider screens */
@media (min-width: 1200px) {
  .nav .links {
    gap: 4px;
  }
  .nav .links a {
    padding: 8px 14px;
    font-size: 13.5px;
  }
}

/* Active section indicator (optional enhancement) */
.nav .links a.active {
  background: linear-gradient(135deg, rgba(106, 90, 249, 0.2), rgba(0, 212, 255, 0.2));
  color: var(--accent);
  font-weight: 600;
  position: relative;
}
.nav .links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  border-radius: 2px;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
html[data-theme="light"] .nav .links a.active {
  color: var(--g1);
}

/* Mobile hamburger menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 50;
}
.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 10px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile navigation responsive */
@media (max-width: 992px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav .links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 12, 18, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
  
  html[data-theme="light"] .nav .links {
    background: rgba(255, 255, 255, 0.98);
  }
  
  .nav .links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav .links a {
    margin: 0;
    padding: 14px 22px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    
  }
  
  .nav .links a:last-child {
    border-bottom: none;
  }
  
  .nav .links a:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  
  html[data-theme="light"] .nav .links a:hover {
    background: rgba(0, 0, 0, 0.06);
  }
  
  /* Active indicator on mobile */
  .nav .links a.active {
    background: linear-gradient(135deg, rgba(106, 90, 249, 0.25), rgba(0, 212, 255, 0.25));
    border-left: 3px solid var(--g2);
  }
  
  .nav .links a.active::after {
    display: none; /* Hide bottom border on mobile */
  }
  
  /* Hide search on small mobile */
  #siteSearch {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .nav {
    height: 56px;
  }
  
  .nav .links {
    top: 56px;
  }
  
  .logo {
    font-size: 15px;
  }
  
  .logo div {
    width: 32px !important;
    height: 32px !important;
  }
}

.hero {
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  padding: 56px 0;
}
.title {
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(38px, 6vw, 64px);
}
.gradient-text {
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--g1),
    var(--g2),
    var(--g4),
    var(--g1)
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holo 14s ease-in-out infinite;
}
@keyframes holo {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.lead {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
  margin-top: 14px;
}
.cta {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn.primary {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #0a0b10;
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.25);
}
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 212, 255, 0.35);
}
.btn.ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="light"] .btn.ghost {
  background: rgba(0, 0, 0, 0.02);
}
.blob {
  position: absolute;
  filter: blur(42px);
  opacity: 0.35;
  pointer-events: none;
}
.b1 {
  top: -120px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(138, 92, 246, 0.9),
    transparent 60%
  );
  animation: float1 16s ease-in-out infinite;
}
.b2 {
  top: -80px;
  right: -140px;
  width: 480px;
  height: 480px;
  background: radial-gradient(
    circle at 60% 40%,
    rgba(34, 211, 238, 0.9),
    transparent 60%
  );
  animation: float2 20s ease-in-out infinite;
}
@keyframes float1 {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(26px);
  }
}
@keyframes float2 {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-22px, 20px);
  }
}
section {
  padding: 48px 0;
  scroll-margin-top: 88px; /* Header height (68px) + spacing (20px) */
}
h2 {
  font-size: 28px;
  margin: 0 0 10px;
}
.sub {
  margin: 0 0 24px;
}
.grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 800px) {
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(147, 229, 255, 0.35),
    rgba(138, 92, 246, 0.25),
    transparent 60%
  );
  opacity: 0.25;
  mix-blend-mode: screen;
}
.card:hover {
  box-shadow: 0 30px 60px rgba(0, 212, 255, 0.18);
}
.card .tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(
    120deg,
    rgba(138, 92, 246, 0.35),
    rgba(34, 211, 238, 0.28)
  );
  color: #0b0c10;
  margin-bottom: 10px;
}
html[data-theme="light"] .card {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.03),
    rgba(0, 0, 0, 0.015)
  );
}
.code {
  background: #0e1117;
  border: 1px solid #1f2430;
  border-radius: 16px;
  padding: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  color: #cbd5e1;
}
html[data-theme="light"] .code {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #111827;
}
footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--muted);
}
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.feed-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 18px;
}
.chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-color: var(--g2);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  font-size: 13px;
  cursor: pointer;
}
.chip.active {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #0a0b10;
  border-color: transparent;
  font-weight: 700;
}
.feed {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 14px;
  padding: 14px;
}
.row .left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: linear-gradient(
    120deg,
    rgba(138, 92, 246, 0.25),
    rgba(34, 211, 238, 0.22)
  );
}
.meta {
  font-size: 12px;
  color: var(--muted);
}
.hash {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 8px;
}
.btn.sm {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}
.load-more {
  margin-top: 16px;
  display: inline-flex;
}
.card pre {
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
:where(a, button, .btn, .chip, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--g2);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .gradient-text,
  .blob {
    animation: none !important;
  }
  .card {
    transition: none !important;
  }
}
/* Utility fields */
.field {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
  color: var(--fg);
  font: inherit;
}
.field-lg {
  padding: 14px;
  border-radius: 14px;
}
.field-area-sm {
  min-height: 70px;
}
.field-area-lg {
  min-height: 90px;
}
.field:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.25);
}
.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}
/* Value prop & social proof */
.value-prop {
  letter-spacing: 0.5px;
}
.social-proof .proof-item strong {
  font-weight: 800;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* FAQ */
#faq details {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 14px;
}
#faq details[open] {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
#faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
#faq summary::-webkit-details-marker {
  display: none;
}

/* Modal (Privacy / Terms) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 16, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 80px;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 780px) {
  .modal-overlay {
    padding: 36px 12px 60px;
  }
}
.modal-panel {
  width: 100%;
  max-width: 880px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 40px 80px -10px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  color: var(--fg);
  max-height: calc(100vh - 140px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.985);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0.2, 0.1, 1), opacity 0.3s ease;
}
.modal-overlay.active .modal-panel {
  transform: none;
  opacity: 1;
}
html[data-theme="light"] .modal-panel {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.04),
    rgba(0, 0, 0, 0.015)
  );
}
.modal-head {
  padding: 24px 30px 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.modal-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
}
.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}
html[data-theme="light"] .modal-close:hover {
  background: rgba(0, 0, 0, 0.06);
}
.modal-body {
  padding: 0 32px 34px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.modal-body::-webkit-scrollbar {
  width: 10px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}
html[data-theme="light"] .modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
}
.modal-body h1 {
  font-size: 26px;
  margin: 0 0 4px;
}
.modal-body .last-updated {
  margin-top: 0;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.modal-body h2 {
  font-size: 20px;
  margin: 28px 0 8px;
}
.modal-body p,
.modal-body li {
  line-height: 1.55;
}
.modal-body ul {
  margin: 10px 0 14px;
  padding-left: 20px;
}
.modal-body code {
  font-size: 13px;
  background: #0e1117;
  padding: 2px 5px;
  border-radius: 6px;
}
html[data-theme="light"] .modal-body code {
  background: #f3f4f6;
}
.fine-print {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 40px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Inline hero SVG animation - SemantiCord Trust Flow */
.media-atlas-svg {
  display: block;
}

/* Signal waves animation */
.media-atlas-svg .wave {
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: wave-flow 2s ease-in-out infinite;
}
.media-atlas-svg .wave-1 {
  animation-delay: 0s;
}
.media-atlas-svg .wave-2 {
  animation-delay: 0.3s;
}
.media-atlas-svg .wave-3 {
  animation-delay: 0.6s;
}

/* Signal dots pulse */
.media-atlas-svg .signal-dot {
  animation: signal-pulse 1.8s ease-in-out infinite;
}

/* Trust layer hexagon subtle glow */
.media-atlas-svg .trust-hex {
  animation: trust-glow 3s ease-in-out infinite;
}

/* Trust layer ring rotation */
.media-atlas-svg .trust-ring {
  animation: ring-rotate 8s linear infinite;
  transform-origin: center;
}

/* Hash symbol slight pulse */
.media-atlas-svg .hash-symbol {
  animation: hash-pulse 2.5s ease-in-out infinite;
}

/* Flow lines animate opacity */
.media-atlas-svg .flow-line {
  animation: flow-pulse 2.5s ease-in-out infinite;
}
.media-atlas-svg .flow-1 { animation-delay: 0s; }
.media-atlas-svg .flow-2 { animation-delay: 0.5s; }
.media-atlas-svg .flow-3 { animation-delay: 1s; }
.media-atlas-svg .flow-4 { animation-delay: 1.5s; }
.media-atlas-svg .flow-5 { animation-delay: 2s; }

/* Document verified badge */
.media-atlas-svg .check-badge {
  animation: check-pulse 2s ease-in-out infinite;
}

/* Keyframe definitions */
@keyframes wave-flow {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 10; }
}

@keyframes signal-pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.8;
  }
  50% { 
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes trust-glow {
  0%, 100% { 
    filter: drop-shadow(0 0 3px rgba(147, 229, 255, 0.3));
  }
  50% { 
    filter: drop-shadow(0 0 6px rgba(147, 229, 255, 0.6));
  }
}

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

@keyframes hash-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

@keyframes flow-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

@keyframes check-pulse {
  0%, 100% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.15);
  }
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .media-atlas-svg .wave,
  .media-atlas-svg .signal-dot,
  .media-atlas-svg .trust-hex,
  .media-atlas-svg .trust-ring,
  .media-atlas-svg .hash-symbol,
  .media-atlas-svg .flow-line,
  .media-atlas-svg .check-badge {
    animation: none !important;
  }
  .media-atlas-svg .trust-ring {
    opacity: 0.3;
  }
}
.media-atlas-badges {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.media-atlas-badges .badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(147, 229, 255, 0.06),
    rgba(138, 92, 246, 0.06)
  );
  border: 1px solid rgba(147, 229, 255, 0.06);
  color: var(--muted);
  font-weight: 700;
}
.media-atlas-badges .badge strong {
  color: var(--fg);
  font-weight: 800;
  margin-right: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .media-atlas-badges {
    transition: none !important;
  }
}
.modal-enter-active *,
.modal-exit-active * {
  transition: none !important;
}

/* Subpage structural helper classes reused by modal content */
.prose {
  max-width: 880px;
  padding: 40px 0 60px;
}
.subpage-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 18, 0.55);
}
html[data-theme="light"] .subpage-header {
  background: rgba(255, 255, 255, 0.65);
}
.subpage-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  height: 68px;
}
.sub-nav {
  display: flex;
  gap: 14px;
  font-size: 14px;
}
.foot-flex {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-links {
  display: flex;
  gap: 16px;
}
.list {
  line-height: 1.5;
}
.last-updated {
  font-size: 13px;
}

/* Spinner & modal utility enhancements */
.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(147, 229, 255, 0.25);
  border-top-color: var(--g2);
  animation: spin 0.9s linear infinite;
  margin: 24px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 0 30px;
}
.loading-block p {
  font-size: 13px;
  margin: 12px 0 0;
  color: var(--muted);
}
.modal-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.modal-tools button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.modal-tools button:hover {
  background: rgba(255, 255, 255, 0.12);
}
html[data-theme="light"] .modal-tools button {
  background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .modal-tools button:hover {
  background: rgba(0, 0, 0, 0.08);
}
.retry-btn {
  margin-top: 16px;
}

/* Responsive improvements for Who Uses section */
@media (max-width: 992px) {
  #who .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  #who .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  #who .card {
    min-height: auto;
  }
}

/* Persona card enhancements */
#who .card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
#who .card p {
  flex: 1;
}
#who .card:hover .tag {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: white;
  transform: scale(1.05);
}
#who .card a {
  color: var(--accent);
  transition: opacity 0.2s;
}
#who .card a:hover {
  opacity: 0.8;
}
