/* XD Services Ltd - custom styles (supplements Tailwind CDN) */

:root {
  --xd-primary: #1F4E5F;
  --xd-accent: #C8963E;
  --xd-accent-light: #E3B96B;
  --xd-dark: #17232B;
  --xd-light: #F5F3EE;
  --xd-slate: #4A5660;
}

h1, h2, h3 {
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

#main:focus {
  outline: none;
}

/* Focus states */
:focus-visible {
  outline: 3px solid var(--xd-primary);
  outline-offset: 3px;
}
.on-dark :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--xd-accent-light);
}

/* Nav links */
.nav-link {
  position: relative;
  color: var(--xd-dark);
  padding: 0.25rem 0;
  border-radius: 0.25rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--xd-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover::after {
  transform: scaleX(1);
}
.nav-link:hover {
  color: var(--xd-primary);
}

/* Hero background glow */
.hero-glow {
  background:
    radial-gradient(60rem 30rem at 90% -10%, rgba(31, 78, 95, 0.85), transparent 60%),
    radial-gradient(40rem 25rem at -10% 110%, rgba(200, 150, 62, 0.16), transparent 60%);
}

/* Section eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xd-primary);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--xd-accent);
}
.eyebrow-dark {
  color: var(--xd-accent-light);
}

/* Service cards */
.service-card {
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid rgba(23, 35, 43, 0.08);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(23, 35, 43, 0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
@media (min-width: 640px) {
  .service-card { padding: 2.25rem; }
}
.service-card:hover {
  box-shadow: 0 18px 40px -24px rgba(23, 35, 43, 0.35);
  transform: translateY(-2px);
}
.service-icon {
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--xd-primary), #2B6477);
  color: var(--xd-accent-light);
}
.service-icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

/* Check list */
.check-list {
  display: grid;
  gap: 0.6rem;
  color: var(--xd-dark);
}
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: rgba(31, 78, 95, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.2 4.7-5' fill='none' stroke='%231F4E5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.9rem no-repeat;
}

/* Key facts */
.fact-dot {
  flex: none;
  margin-top: 0.5rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--xd-accent-light);
}

/* Principle cards */
.principle-card {
  border-radius: 1.5rem;
  border: 1px solid rgba(23, 35, 43, 0.1);
  background: #fff;
  padding: 1.75rem;
}
.principle-num {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--xd-primary);
  border-bottom: 2px solid var(--xd-accent);
  padding-bottom: 0.2rem;
}

/* Legal modals */
.legal-modal {
  width: calc(100% - 2rem);
  max-width: 46rem;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: none;
  border-radius: 1.25rem;
  background: var(--xd-light);
  color: var(--xd-dark);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
}
.legal-modal::backdrop {
  background: rgba(17, 26, 32, 0.7);
}
.legal-modal__inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
}
.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(23, 35, 43, 0.1);
}
.legal-modal__close {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--xd-dark);
}
.legal-modal__close:hover {
  background: rgba(23, 35, 43, 0.08);
}
.legal-modal__body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
  line-height: 1.65;
}
@media (min-width: 640px) {
  .legal-modal__header { padding: 1.5rem 2rem; }
  .legal-modal__body { padding: 1.5rem 2rem 2.25rem; }
}
.legal-modal__body h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--xd-primary);
}
.legal-modal__body p {
  margin-top: 0.5rem;
}
.legal-modal__body ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-modal__body li + li {
  margin-top: 0.35rem;
}

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