/* SX Developments Ltd - custom styles (plain CSS, used alongside Tailwind CDN) */

:root {
  --primary: #1F3A5F;
  --accent: #C8963E;
  --dark: #14181F;
  --light: #F6F4EF;
}

html { scroll-padding-top: 5rem; }
.section-anchor { scroll-margin-top: 5rem; }
#main:focus { outline: none; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: var(--dark);
  color: #fff;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

/* Focus states */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: .375rem;
}

/* Navigation */
.nav-link {
  display: inline-flex;
  padding: .5rem .875rem;
  border-radius: .5rem;
  font-size: .9375rem;
  font-weight: 500;
  color: #334155;
  transition: background-color .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(31, 58, 95, .08); color: var(--primary); }

.mobile-link {
  display: block;
  padding: .875rem .5rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 500;
  color: var(--dark);
}
.mobile-link:hover { color: var(--primary); }
#mobile-menu li:last-child .mobile-link { border-bottom: 0; }

/* Headings */
.eyebrow {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a6420; /* darker brass for contrast on light backgrounds */
}
.section-title {
  margin-top: .75rem;
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--dark);
}

/* Hero texture */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Service cards */
.card {
  height: 100%;
  padding: 1.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: var(--light);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  border-color: rgba(200, 150, 62, .6);
  box-shadow: 0 12px 30px -12px rgba(20, 24, 31, .18);
  transform: translateY(-2px);
}
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .75rem;
  background: var(--primary);
  color: var(--accent);
}
.card .icon-wrap { margin-bottom: 1.25rem; }
.card-title {
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
}
.card-text {
  margin-top: .625rem;
  line-height: 1.7;
  color: #334155;
}

/* Why list ticks */
.check {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: .125rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--accent);
}

.text-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
.text-link:hover { color: var(--dark); }

/* Key facts */
.fact dt {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.fact dd {
  margin-top: .375rem;
  font-weight: 500;
  line-height: 1.6;
  color: #fff;
}

/* Footer */
.footer-link {
  color: rgba(255, 255, 255, .85);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
.footer-link:hover { color: #fff; text-decoration-color: var(--accent); }

/* Legal dialogs */
.legal-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45);
}
.legal-dialog::backdrop { background: rgba(20, 24, 31, .7); }
.legal-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); }
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.legal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.7;
}
.legal-body h3 {
  margin-top: 1.5rem;
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
}
.legal-body p { margin-top: .5rem; }
.legal-body ul { margin-top: .5rem; padding-left: 1.25rem; list-style: disc; }
.legal-body li { margin-top: .25rem; }
.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .5rem;
  color: #334155;
}
.dialog-close:hover { background: #f1f5f9; }
body.dialog-open { overflow: hidden; }

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