/* Echorial Unified Brand Design System (v0.2.0-dev.2)
 * Palette: Deep Sea Blue + Highlight Electric Cyan + Ice Signal + Cool Slate Paper
 * Kinetic Motion System: Beacon pulse, ambient sonar drift, scroll reveal, tactile lift.
 * Zero external fonts/CDNs — strict CSP ('self') compliant.
 */
:root {
  --ech-obsidian: #06131e;
  --ech-ink-deep: #091b2a;
  --ech-surface-dark: #0f273b;
  --ech-surface-raised: #15354e;
  --ech-surface-hover: #1d4564;
  --ech-line-dark: rgba(126, 224, 242, 0.18);
  --ech-line-strong: rgba(94, 242, 228, 0.52);

  --ech-cyan: #5ef2e4;
  --ech-cyan-hover: #96f8ee;
  --ech-cyan-ink: #05202b;
  --ech-cyan-soft: rgba(94, 242, 228, 0.14);

  /* Semantic aliases so existing modules resolve to Highlight Electric Cyan & Deep Sea Blue */
  --ech-lime: var(--ech-cyan);
  --ech-lime-hover: var(--ech-cyan-hover);
  --ech-lime-ink: var(--ech-cyan-ink);
  --ech-lime-soft: var(--ech-cyan-soft);

  --ech-blue: #0d5c8c;
  --ech-blue-bright: #3aa8de;
  --ech-ice: #9ce0f7;
  --ech-violet: var(--ech-blue);
  --ech-violet-bright: var(--ech-blue-bright);
  --ech-lavender: var(--ech-ice);

  --ech-mint: #7ef2cd;
  --ech-amber: #ffd788;
  --ech-coral: #ff9ba7;

  --ech-paper: #f1f6fa;
  --ech-paper-elevated: #ffffff;
  --ech-paper-subtle: #e4eff7;
  --ech-paper-line: #cadce9;
  --ech-ink: #0b2031;
  --ech-ink-secondary: #415d74;

  --ech-font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ech-font-display: "Inter", "Segoe UI Variable Display", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ech-font-mono: "JetBrains Mono", "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;

  --ech-radius-sm: 10px;
  --ech-radius-md: 16px;
  --ech-radius-lg: 24px;
  --ech-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ech-shadow-dark: 0 20px 56px rgba(3, 12, 22, 0.46);
  --ech-shadow-card: 0 14px 36px rgba(9, 28, 46, 0.08);
}

/* Unified Brand Lockup */
.ech-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: #f3fafe;
  text-decoration: none;
  transition: transform 0.22s var(--ech-ease-out);
}

.ech-brand:hover,
.brand:hover {
  transform: translateY(-1px);
}

.ech-brand img,
.brand img {
  flex: none;
  display: block;
  border: 1px solid rgba(94, 242, 228, 0.34);
  border-radius: 12px;
  background: #091e30;
  box-shadow: 0 6px 18px rgba(3, 11, 20, 0.38);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.ech-brand:hover img,
.brand:hover img {
  border-color: var(--ech-cyan);
  box-shadow: 0 0 18px rgba(94, 242, 228, 0.28);
}

.ech-brand b,
.brand b {
  display: block;
  font: 800 21px/1.05 var(--ech-font-display);
  letter-spacing: -0.025em;
  color: #f6fbff;
}

.ech-brand small,
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--ech-ice);
  font: 600 11px/1.15 var(--ech-font-sans);
  letter-spacing: 0.16em;
}

/* Unified Echo (艾可) Companion Badge with Live Pulse */
.ech-echo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border: 1px solid rgba(94, 242, 228, 0.38);
  border-radius: 999px;
  background: rgba(94, 242, 228, 0.11);
  color: var(--ech-cyan);
  font: 700 12px/1.3 var(--ech-font-sans);
  letter-spacing: 0.03em;
}

.ech-echo-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ech-cyan);
  box-shadow: 0 0 10px rgba(94, 242, 228, 0.85);
  animation: ech-beacon-pulse 2.2s ease-in-out infinite;
}

@keyframes ech-beacon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px rgba(94, 242, 228, 0.75); }
  50% { transform: scale(1.28); opacity: 0.82; box-shadow: 0 0 16px rgba(94, 242, 228, 1); }
}

@keyframes ech-aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-2%, 1.5%, 0) scale(1.04); }
  100% { transform: translate3d(1.5%, -1%, 0) scale(0.98); }
}

/* Scroll-Reveal Kinetic Entrance */
.ech-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.52s var(--ech-ease-out), transform 0.52s var(--ech-ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.ech-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Embedded & Fallback ICP Filing Link Styling */
.filing-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.18s ease;
}

.filing-link:hover {
  color: var(--ech-cyan);
  text-decoration: underline;
}

.public-filing {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--ech-obsidian);
  border-top: 1px solid var(--ech-line-dark);
  color: #a9cada;
  font: 500 12px/1.5 var(--ech-font-sans);
}

.public-filing a {
  color: #d6eef8;
  text-decoration: none;
}

.public-filing a:hover {
  color: var(--ech-cyan);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .ech-echo-badge::before {
    animation: none !important;
  }
  .ech-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
