/* MCC LTD - custom styles (plain CSS, used alongside the Tailwind CDN) */

:root {
  --navy: #1E3A5F;
  --teal: #14B8A6;
  --teal-dark: #0F766E;
  --ink: #0F172A;
  --mist: #F8FAFC;
}

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

/* Visible focus states */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
main:focus {
  outline: none;
}

/* Navigation */
.nav-link {
  position: relative;
  padding: 0.25rem 0;
  color: inherit;
  text-decoration: none;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* Hero background */
.hero-bg {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
    radial-gradient(40rem 25rem at -10% 110%, rgba(20, 184, 166, 0.12), transparent 60%),
    linear-gradient(160deg, #0F172A 0%, #1E3A5F 100%);
}

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(20, 184, 166, 0.5);
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.18);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-dark);
}

/* Footer links and buttons */
.footer-link {
  color: #CBD5E1;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Legal modals */
.legal-modal {
  width: min(42rem, calc(100% - 2rem));
  max-height: min(85vh, 48rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px 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);
}
.legal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
  color: #334155;
}
.legal-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}
.legal-body p {
  margin: 0;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  color: var(--navy);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.modal-close:hover {
  background: #F1F5F9;
}

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;
  }
}
