/* AX AMBASSADOR LTD - component styles (plain CSS, used alongside the Tailwind CDN) */

:root {
  --navy: #1F3A5F;
  --navy-600: #264770;
  --navy-800: #182E4B;
  --brass: #B8893B;
  --brass-dark: #7A5A1F;
  --ink: #14202E;
  --paper: #F6F4EF;
  --mist: #8A94A3;
  --steel: #4F5A68;
}

html {
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

@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 1.25rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}

/* Programmatic focus targets should not show a ring */
[tabindex="-1"]:focus { outline: none; }

/* Navigation */
.nav-link {
  display: inline-flex;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: rgba(31, 58, 95, 0.07); color: var(--navy); }
.nav-link:focus-visible,
.mobile-link:focus-visible,
.footer-link:focus-visible,
.modal-close:focus-visible,
.legal a:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.mobile-link {
  display: block;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid rgba(20, 32, 46, 0.08);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: 0.25rem;
}
.mobile-link:hover { color: var(--navy); }
#mobile-menu li:last-child .mobile-link { border-bottom: 0; }

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.75rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--navy); color: var(--paper); }
.btn-primary:hover { background: var(--navy-800); }
.btn-secondary { border: 1.5px solid rgba(31, 58, 95, 0.35); color: var(--navy); background: rgba(255, 255, 255, 0.6); }
.btn-secondary:hover { border-color: var(--navy); background: #fff; }
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

/* Section headings */
.eyebrow {
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-dark);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 2px;
  margin-right: 0.75rem;
  vertical-align: middle;
  background: var(--brass);
}
.eyebrow-on-dark { color: var(--brass); }

.section-title {
  font-family: "DM Serif Display", Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1.15;
  color: var(--navy);
}

/* Backgrounds */
.hero-wash {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(184, 137, 59, 0.14), transparent 60%),
    radial-gradient(40rem 30rem at -10% 110%, rgba(31, 58, 95, 0.08), transparent 60%);
}
.why-pattern {
  background:
    radial-gradient(50rem 26rem at 100% 0%, rgba(184, 137, 59, 0.16), transparent 60%),
    linear-gradient(135deg, rgba(20, 32, 46, 0.4), transparent 55%);
}

/* Service cards */
.service-card {
  position: relative;
  padding: 2rem;
  border: 1px solid rgba(20, 32, 46, 0.08);
  border-radius: 1.25rem;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  border-color: rgba(184, 137, 59, 0.45);
  box-shadow: 0 18px 40px -24px rgba(20, 32, 46, 0.35);
  transform: translateY(-2px);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
  background: var(--navy);
  color: var(--brass);
}
.tick {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.5;
}
.tick::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 9999px;
  background: rgba(184, 137, 59, 0.18);
  box-shadow: inset 0 0 0 1.5px var(--brass);
}
.tick::after {
  content: "";
  position: absolute;
  left: 0.31rem;
  top: 0.5rem;
  width: 0.28rem;
  height: 0.45rem;
  border: solid var(--brass-dark);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Why cards */
.why-card {
  padding: 1.75rem;
  border: 1px solid rgba(246, 244, 239, 0.14);
  border-radius: 1.25rem;
  background: rgba(20, 32, 46, 0.28);
}

/* Footer */
.footer-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: rgba(246, 244, 239, 0.85);
  text-align: left;
  cursor: pointer;
  border-radius: 0.2rem;
}
.footer-link:hover { color: var(--brass); text-decoration: underline; text-underline-offset: 4px; }

/* Modals */
.modal {
  width: min(100% - 2rem, 46rem);
  max-height: min(88vh, 54rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(20, 32, 46, 0.55);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(20, 32, 46, 0.72);
}
.modal-inner {
  max-height: min(88vh, 54rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(20, 32, 46, 0.1);
  background: #fff;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 9999px;
  color: var(--navy);
  background: rgba(31, 58, 95, 0.06);
}
.modal-close:hover { background: rgba(31, 58, 95, 0.12); }
body.modal-open { overflow: hidden; }

.legal { padding: 1.5rem 1.5rem 2rem; font-size: 0.95rem; line-height: 1.7; color: var(--steel); }
.legal-meta { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--steel); }
.legal h3 { margin-top: 1.6rem; margin-bottom: 0.4rem; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.legal p + p { margin-top: 0.75rem; }
.legal ul { margin: 0.6rem 0 0.75rem; padding-left: 1.25rem; list-style: disc; }
.legal li + li { margin-top: 0.35rem; }
.legal strong { color: var(--ink); font-weight: 500; }
.legal a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; border-radius: 0.15rem; }
.legal a:hover { color: var(--navy-600); }

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::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; }
}
