/* ACD Audio – custom styles (plain CSS, used alongside the Tailwind CDN) */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #F2A541;
  color: #111418;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* Focus states */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #F2A541;
  outline-offset: 3px;
  border-radius: 0.375rem;
}
#main:focus { outline: none; }

/* Navigation */
.nav-link {
  position: relative;
  color: #4F5864;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-link:hover { color: #1F3A5F; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: #F2A541;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

/* Buttons */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: #F2A541; color: #111418; }
.btn-primary:hover { background: #F5B865; }
.btn-ghost { border: 1px solid rgba(245, 246, 248, 0.35); color: #F5F6F8; }
.btn-ghost:hover { border-color: #F5F6F8; background: rgba(245, 246, 248, 0.08); }

/* Section headings */
.eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1F3A5F;
}
#facts .eyebrow { color: #F2A541; }
.section-title {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111418;
}
@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
}

/* Cards */
.service-card {
  height: 100%;
  padding: 1.75rem;
  border: 1px solid rgba(17, 20, 24, 0.1);
  border-radius: 1rem;
  background: #F5F6F8;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover {
  border-color: rgba(31, 58, 95, 0.35);
  box-shadow: 0 12px 30px -12px rgba(17, 20, 24, 0.25);
  transform: translateY(-2px);
}
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.75rem;
  background: #1F3A5F;
  color: #F2A541;
}
.fact-card {
  padding: 1.5rem;
  border: 1px solid rgba(245, 246, 248, 0.14);
  border-radius: 1rem;
  background: rgba(17, 20, 24, 0.28);
}

/* Footer links (also used for the legal buttons) */
.footer-link {
  color: rgba(245, 246, 248, 0.8);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer-link:hover { color: #F2A541; text-decoration: underline; text-underline-offset: 4px; }

/* Decorative backgrounds */
.hero-glow {
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(31, 58, 95, 0.75) 0%, rgba(31, 58, 95, 0) 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(242, 165, 65, 0.12) 0%, rgba(242, 165, 65, 0) 70%);
}
.facts-lines {
  opacity: 0.12;
  background-image: repeating-linear-gradient(90deg, #F5F6F8 0 1px, transparent 1px 48px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}

/* Level meter bars */
.meter-bar {
  display: block;
  height: var(--h);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #F2A541 0%, #F2A541 25%, #3B6A9E 26%, #1F3A5F 100%);
  transform-origin: bottom;
}

@media (prefers-reduced-motion: no-preference) {
  .meter-bar { animation: meter 2.4s ease-in-out infinite alternate; }
  .meter-bar:nth-child(2n) { animation-duration: 1.9s; }
  .meter-bar:nth-child(3n) { animation-duration: 2.8s; }
  .draw-curve {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: draw 1.6s ease-out 0.2s forwards;
  }
}
@keyframes meter {
  from { transform: scaleY(0.7); }
  to { transform: scaleY(1); }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Legal modals */
.legal-modal {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #FFFFFF;
  color: #111418;
  box-shadow: 0 30px 60px -20px rgba(17, 20, 24, 0.5);
}
.legal-modal::backdrop {
  background: rgba(17, 20, 24, 0.7);
}
.legal-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3rem);
}
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(17, 20, 24, 0.1);
}
.legal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
  color: #333A42;
}
.legal-body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111418;
}
.legal-body p + p { margin-top: 0.6rem; }
.legal-body ul {
  margin: 0.5rem 0 0.75rem 1.25rem;
  list-style: disc;
}
.legal-body a {
  color: #1F3A5F;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  color: #111418;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.modal-close:hover { background: rgba(17, 20, 24, 0.06); }

@media (min-width: 640px) {
  .legal-head { padding: 1.5rem 2rem; }
  .legal-body { padding: 1.5rem 2rem 2rem; }
}
