/* ─────────────────────────────────────────────────────────
   Spyder AI — Global Design System
   Layered on top of per-page Bootstrap + inline styles.
   ───────────────────────────────────────────────────────── */

/* ── Google Fonts ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Typography ────────────────────────────────────────── */
body {
  font-family: 'DM Sans', "Segoe UI", Tahoma, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4,
.navbar-brand,
.hero h1,
.section-title,
.brand-title,
.login-title,
.feature-item strong {
  font-family: 'Oxanium', "Segoe UI", sans-serif !important;
}

.hero h1 {
  letter-spacing: -.03em !important;
}

h2.section-title {
  letter-spacing: .06em !important;
}

h3 {
  letter-spacing: -.01em;
}

/* ── Gradient highlight ────────────────────────────────── */
.highlight {
  display: inline-block;
  background: linear-gradient(135deg, #00d9ff 15%, #8b5cf6 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent !important;
}

/* ── Smooth scroll + custom selection ─────────────────── */
html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(0, 217, 255, .22);
  color: #e6f7ff;
}

/* ── Navbar scroll refinement ──────────────────────────── */
.navbar {
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease !important;
}

.navbar.sa-scrolled {
  background: rgba(4, 8, 18, .96) !important;
  box-shadow: 0 4px 28px rgba(0, 0, 0, .55) !important;
  border-bottom-color: rgba(0, 217, 255, .24) !important;
}

.navbar-brand {
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  font-size: 1.15rem !important;
}

/* ── Page-load hero animations ─────────────────────────── */
@keyframes sa-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sa-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-kicker                                            { animation: sa-up .5s ease both; }
.hero h1                                                { animation: sa-up .55s .07s ease both; }
.hero > .container > .row > .col-lg-7 > p              { animation: sa-up .55s .15s ease both; }
.hero > .container > .row > .col-lg-7 > .mt-4          { animation: sa-up .55s .22s ease both; }
.topic-strip, .trust-strip                             { animation: sa-up .55s .3s ease both; }
.hero-stats                                            { animation: sa-up .55s .38s ease both; }
.col-lg-5 .glass-card                                  { animation: sa-fade .9s .15s ease both; }

/* Article page hero */
section.hero .glass-card                               { animation: sa-fade .7s .1s ease both; }

/* ── Scroll reveal (JS adds .sa-watch then .sa-in) ─────── */
.sa-watch {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}

.sa-watch.sa-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger grid children */
.sa-watch:nth-child(2) { transition-delay: .08s; }
.sa-watch:nth-child(3) { transition-delay: .16s; }
.sa-watch:nth-child(4) { transition-delay: .24s; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600 !important;
}

.btn-neon {
  letter-spacing: .02em;
  position: relative;
  overflow: hidden;
}

.btn-neon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .1);
  opacity: 0;
  transition: opacity .22s;
}

.btn-neon:hover::after { opacity: 1; }

/* ── Article link styling ──────────────────────────────── */
.glass-card p a:not(.btn),
.glass-card li a:not(.btn) {
  color: #00d9ff;
  text-decoration: underline;
  text-decoration-color: rgba(0, 217, 255, .3);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}

.glass-card p a:not(.btn):hover,
.glass-card li a:not(.btn):hover {
  text-decoration-color: rgba(0, 217, 255, .85);
}

/* ── Definition block label ────────────────────────────── */
[style*="border-left:4px solid #00d9ff"] > strong {
  font-family: 'Oxanium', sans-serif !important;
  font-size: .72rem !important;
}

/* ── Footer nav links ──────────────────────────────────── */
footer strong {
  font-family: 'Oxanium', sans-serif !important;
  letter-spacing: .04em;
  font-size: .82rem;
}

/* ── Section title left-bar accent ────────────────────── */
h2.section-title {
  position: relative;
  padding-left: .9rem;
}

h2.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: .12em;
  bottom: .08em;
  width: 3px;
  background: linear-gradient(180deg, #00d9ff 0%, #8b5cf6 100%);
  border-radius: 2px;
}

/* No left-bar for centered titles */
.text-center h2.section-title,
.section-head h2.section-title {
  padding-left: 0;
}
.text-center h2.section-title::before,
.section-head h2.section-title::before {
  display: none;
}

/* ── Hero kicker dot — pulsing ping ────────────────────── */
@keyframes sa-ping {
  0%, 100% { box-shadow: 0 0 10px rgba(56,252,168,.7); }
  50%       { box-shadow: 0 0 22px rgba(56,252,168,1), 0 0 38px rgba(56,252,168,.4); }
}

.hero-kicker::before {
  animation: sa-ping 2.2s ease-in-out infinite !important;
}

/* ── Hero H1 sizing boost ───────────────────────────────── */
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem) !important;
}

/* ── Mini-stat number weight ────────────────────────────── */
.mini-stat strong {
  font-family: 'Oxanium', sans-serif !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
}

/* ── Featured card pulsing glow ─────────────────────────── */
@keyframes sa-featured-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(0,217,255,.12), 0 16px 40px rgba(0,0,0,.4); }
  50%       { box-shadow: 0 0 42px rgba(0,217,255,.26), 0 16px 40px rgba(0,0,0,.4); }
}

.featured-card {
  animation: sa-featured-glow 4s ease-in-out infinite;
}

/* ── Category pill arrow ────────────────────────────────── */
.category-pill::after {
  content: '→';
  display: block;
  color: #00d9ff;
  font-size: .82rem;
  margin-top: .7rem;
  opacity: .6;
  transform: translateX(0);
  transition: transform .2s ease, opacity .2s ease;
}

.category-pill:hover::after {
  transform: translateX(5px);
  opacity: 1;
}

/* ── Trust panels left accent ───────────────────────────── */
.trust-panel {
  border-left: 2px solid rgba(0,217,255,.18) !important;
  transition: border-left-color .3s ease !important;
}

.trust-panel:hover {
  border-left-color: rgba(0,217,255,.52) !important;
}

/* ── Newsletter glow orb ────────────────────────────────── */
.newsletter-box {
  overflow: hidden;
}

.newsletter-box::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 220px;
  background: radial-gradient(circle, rgba(0,217,255,.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar brand hover glow ────────────────────────────── */
.navbar-brand {
  transition: text-shadow .25s ease !important;
}
.navbar-brand:hover {
  text-shadow: 0 0 18px rgba(0,217,255,.65) !important;
}

/* ── Feature icon font ──────────────────────────────────── */
.feature-icon {
  font-family: 'Oxanium', sans-serif !important;
  font-size: .7rem !important;
  letter-spacing: .06em;
}

/* ── Route card step label ──────────────────────────────── */
.route-step {
  font-family: 'Oxanium', sans-serif !important;
  font-size: .72rem !important;
  letter-spacing: .08em;
}

/* ── Reading progress bar ───────────────────────────────── */
#sa-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #00d9ff, #8b5cf6);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(0,217,255,.5);
}

/* ── Article body typography ────────────────────────────── */
.glass-card > p,
.glass-card > h3 ~ p,
.glass-card li {
  font-size: 1.045rem;
  line-height: 1.82;
  color: #cad8e8;
}

.glass-card p + p {
  margin-top: .85rem;
}

/* ── Article H3 section accent ──────────────────────────── */
.glass-card h3 {
  position: relative;
  padding-left: 1.1rem;
  margin-top: 2.4rem !important;
  margin-bottom: .85rem;
  color: #e6f7ff;
}

.glass-card h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: .18em;
  bottom: .12em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00d9ff 0%, #8b5cf6 100%);
}

/* ── Strong / key phrase highlight ─────────────────────── */
.glass-card p strong,
.glass-card li strong {
  color: #00d9ff;
  font-weight: 700;
}

/* ── Reading time badge ─────────────────────────────────── */
.sa-read-time {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(0,217,255,.09);
  border: 1px solid rgba(0,217,255,.22);
  color: #8aa3b8;
  font-size: .78rem;
  border-radius: 20px;
  padding: .18rem .7rem;
  margin-left: .5rem;
}

.sa-read-time::before {
  content: '⏱';
  font-size: .82rem;
}

/* ── Back-to-top button ─────────────────────────────────── */
#sa-top {
  position: fixed;
  bottom: 2rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,217,255,.18), rgba(139,92,246,.18));
  border: 1px solid rgba(0,217,255,.35);
  color: #00d9ff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, background .2s;
  backdrop-filter: blur(8px);
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0,217,255,.12);
}

#sa-top.sa-top-visible {
  opacity: 1;
  transform: translateY(0);
}

#sa-top:hover {
  background: linear-gradient(135deg, rgba(0,217,255,.32), rgba(139,92,246,.32));
  color: #fff;
}

/* ── Compare table hover ────────────────────────────────── */
.compare-table tbody tr {
  transition: background .18s ease;
}
.compare-table tbody tr:hover {
  background: rgba(0,217,255,.05);
}

/* ── Blockquote / callout styling ───────────────────────── */
.glass-card blockquote {
  border-left: 3px solid #00d9ff;
  margin: 1.5rem 0;
  padding: .85rem 1.25rem;
  background: rgba(0,217,255,.05);
  border-radius: 0 10px 10px 0;
  color: #cad8e8;
  font-style: italic;
}

/* ── Step badge Oxanium font ────────────────────────────── */
.step-badge {
  font-family: 'Oxanium', sans-serif !important;
  letter-spacing: .04em;
}

/* ── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
