/* Cerclay custom styles (complements Tailwind CDN) */

html {
  scroll-padding-top: 5rem;
}

@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.6rem 1rem;
  border-radius: 0.375rem;
  background: #F2A33A;
  color: #0F1B2B;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Focus states: navy on light backgrounds, amber on dark ones */
:focus-visible {
  outline: 3px solid #1F3A5F;
  outline-offset: 3px;
}
[data-theme="dark"] :focus-visible {
  outline-color: #F2A33A;
}
main:focus {
  outline: none;
}

/* Section headings */
.eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1F3A5F;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: #F2A33A;
}
.section-title {
  margin-top: 0.75rem;
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #0F1B2B;
}

/* Hero background */
.hero {
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(31, 58, 95, 0.9), transparent 60%),
    radial-gradient(40rem 25rem at -10% 110%, rgba(242, 163, 58, 0.12), transparent 60%),
    linear-gradient(180deg, #0F1B2B 0%, #13233a 100%);
}

/* Tick list items */
.tick {
  position: relative;
  padding-left: 1.6rem;
}
.tick::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45em;
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2.5px solid #1F3A5F;
  border-bottom: 2.5px solid #1F3A5F;
  transform: rotate(-45deg);
}

/* Service cards */
.service-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 30px -12px rgba(15, 27, 43, 0.25);
}

/* Animated route line in hero illustration */
.route-line {
  animation: route-dash 2.4s linear infinite;
}
@keyframes route-dash {
  to { stroke-dashoffset: -40; }
}

/* Legal dialogs */
.legal-dialog {
  width: calc(100% - 2rem);
  max-width: 44rem;
  max-height: 85vh;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 25px 60px -15px rgba(15, 27, 43, 0.5);
}
.legal-dialog::backdrop {
  background: rgba(15, 27, 43, 0.65);
}
.legal-dialog__inner {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.legal-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.legal-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 0.5rem;
  color: #1F3A5F;
}
.legal-dialog__close:hover {
  background: #F5F7FA;
}
.legal-dialog__body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
}
.legal-dialog__body h3 {
  margin-top: 1.4rem;
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0F1B2B;
}
.legal-dialog__body p {
  margin-top: 0.4rem;
}
.legal-dialog__body a {
  color: #1F3A5F;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.dialog-open {
  overflow: hidden;
}

/* Respect reduced-motion preferences */
@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;
  }
}
