/* AX Consulting - custom styles (plain CSS, works alongside the Tailwind CDN) */

:root {
  --navy: #1E3A5F;
  --accent: #14B8A6;
  --ink: #0F172A;
  --mist: #F8FAFC;
  --grey: #64748B;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Visible focus states */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.375rem;
}
#main:focus,
section:focus {
  outline: none;
}

/* Hero background */
.hero-bg {
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgba(20, 184, 166, 0.18), transparent 60%),
    radial-gradient(40rem 30rem at 0% 100%, rgba(30, 58, 95, 0.9), transparent 70%),
    linear-gradient(135deg, #0F172A 0%, #162B47 55%, #1E3A5F 100%);
}

/* Navigation links */
.nav-link {
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--navy);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Section eyebrow label */
.eyebrow {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0F766E; /* darker teal for contrast on light backgrounds */
}
.eyebrow-dark {
  color: var(--accent);
}

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  background: #fff;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.18);
  transform: translateY(-2px);
}
@media (min-width: 1024px) {
  .service-card {
    padding: 2rem;
  }
}
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, var(--navy), #2B5283);
  color: #fff;
}
.service-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}
.service-list {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #E2E8F0;
  display: grid;
  gap: 0.6rem;
  color: #334155;
  font-size: 0.95rem;
}
.service-list li {
  position: relative;
  padding-left: 1.5rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 9999px;
  border: 2px solid var(--accent);
}

/* Approach icons */
.approach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent);
}
.approach-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* Footer links and buttons */
.footer-link {
  color: #CBD5E1;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Legal modals */
.legal-modal {
  width: min(100% - 2rem, 46rem);
  max-height: min(100% - 2rem, 85vh);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.45);
  overflow: hidden;
}
.legal-modal[open] {
  display: flex;
  flex-direction: column;
}
.legal-modal::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}
.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
  background: var(--mist);
}
.legal-modal__body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
  line-height: 1.65;
  color: #334155;
}
.legal-modal__body h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.legal-modal__body p + p {
  margin-top: 0.75rem;
}
.legal-modal__body ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-modal__body li + li {
  margin-top: 0.4rem;
}
.legal-modal__body a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-modal__body a:hover {
  color: #0F766E;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  color: var(--navy);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.modal-close:hover {
  background: #E2E8F0;
}
body.modal-open {
  overflow: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .service-card:hover {
    transform: none;
  }
}
