/* Custom text colors for about page title */
.about-teal {
  color: #00a5a5 !important; /* ensure it overrides inherited white */
}
.about-white {
  color: #fff;
}
/* Common styles for CoreMETRICS Labs */

/* Typography */
body {
  font-family: "Inter", sans-serif;
}

/* Theme colors */
:root {
  --teal: #00a5a5;
  --teal-dark: #006666;
}

.teal-text {
  color: #00a5a5;
}

.bg-teal {
  background-color: #00a5a5;
}

.border-teal {
  border-color: #00a5a5;
}

.hover-bg-teal-dark:hover {
  background-color: #006666;
}

/* Hero background decoration */
.hero-bg {
  background: radial-gradient(
      1200px 500px at 50% -10%,
      rgba(0, 128, 128, 0.25),
      transparent
    ),
    radial-gradient(
      800px 400px at 90% 10%,
      rgba(0, 128, 128, 0.18),
      transparent
    ),
    radial-gradient(
      800px 400px at 10% 10%,
      rgba(0, 128, 128, 0.18),
      transparent
    );
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* CTA hover glow */
.glow-hover {
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.glow-hover:hover {
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.15),
    0 0 14px rgba(0, 128, 128, 0.55);
  transform: translateY(-1px);
}

.glow-hover:focus-visible {
  outline: none;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2),
    0 0 16px rgba(0, 128, 128, 0.65);
}

/* CTA bolt flicker animation */
@keyframes cta-bolt-flicker {
  0% {
    filter: none;
  }
  18% {
    filter: drop-shadow(0 0 6px rgba(0, 128, 128, 0.8));
  }
  28% {
    filter: none;
  }
  42% {
    filter: drop-shadow(0 0 12px rgba(0, 128, 128, 0.95));
  }
  58% {
    filter: none;
  }
  78% {
    filter: drop-shadow(0 0 8px rgba(0, 128, 128, 0.7));
  }
  100% {
    filter: none;
  }
}

/* CoreMetrics branding styles */
.coremetrics-brand {
  font-weight: bold;
  font-family: inherit;
}
.coremetrics-core {
  color: #00a5a5;
}
.coremetrics-metrics {
  color: #fff;
  text-transform: uppercase;
}

.reveal.show .cta-bolt,
.reveal.show .cta-icon {
  animation: cta-bolt-flicker 700ms ease-in-out 1;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .glow-hover,
  .glow-hover:hover,
  .glow-hover:focus-visible {
    transition: none;
    box-shadow: none;
    transform: none;
  }
  .cta-bolt,
  .cta-icon {
    animation: none !important;
  }
}

/* Skip link (keyboard only) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #00a5a5;
  color: #000;
  padding: 8px 12px;
  border-radius: 0 0 6px 0;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Smooth scrolling with reduced-motion respect */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Offset in-page anchor targets for sticky header */
.scroll-offset {
  scroll-margin-top: 80px;
}

/* Mobile side drawer navigation - base (apply globally so it's fixed to viewport) */
.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  z-index: 40; /* below header (z-50) but above content */
  opacity: 0;
  transition: opacity 200ms ease;
}
.mobile-overlay.show {
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 55%;
  max-width: 224px;
  background: #0b0b0b;
  border-right: 1px solid rgba(0, 165, 165, 0.3);
  padding: 72px 16px 24px; /* leave space for sticky header */
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
  transition: transform 200ms ease;
  z-index: 50; /* same as header */
}
.mobile-drawer.open {
  transform: translateX(0);
}

/* Desktop overrides to restore inline nav */
@media (min-width: 768px) {
  .mobile-drawer {
    position: static;
    height: auto;
    width: auto;
    max-width: none;
    background: transparent;
    border-right: 0;
    padding: 0;
    box-shadow: none;
    transform: none;
    z-index: auto;
  }
  .mobile-overlay {
    display: none !important;
  }
}

/* Mobile-only link layout inside the drawer */
@media (max-width: 767.98px) {
  #navLinks a {
    display: block;
    width: 100%;
    border-radius: 8px;
    padding: 10px 12px;
  }
  #navLinks a + a {
    margin-top: 4px;
  }

  /* Narrow, text-width CTA inside the drawer */
  #navLinks .drawer-cta {
    display: inline-block;
    width: auto;
    margin-left: 0;
    margin-right: 0;
    margin-top: 12px;
  }
}
