/* Celtic Protective Services — black / dark blue + ADA-focused styles */
:root {
  --bg: #070b14;
  --bg-2: #0c1220;
  --surface: #111827;
  --surface-2: #162033;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f1f5f9;
  --muted: #cbd5e1; /* brighter for WCAG contrast on dark bg */
  --blue: #60a5fa;
  --blue-btn: #2563eb;
  --blue-btn-text: #ffffff;
  --blue-deep: #1e3a5f;
  --focus: #fbbf24;
  --error: #fca5a5;
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: #fff; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Skip link — visible on keyboard focus */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--focus);
  color: #111;
  font-weight: 800;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Visible focus for all interactive controls */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Logo — never stretch */
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  border-radius: 4px;
}
.logo img {
  width: auto;
  height: 40px;
  max-width: min(240px, 55vw);
  object-fit: contain;
  object-position: left center;
}
.logo-footer img {
  height: 36px;
  max-width: 200px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  padding: 0.65rem 0;
  position: relative;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.35rem;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
}
.nav a:hover,
.nav a:focus-visible { color: #fff; }
.nav-phone {
  color: var(--text) !important;
  font-weight: 750 !important;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  min-height: 44px; /* touch target */
  min-width: 44px;
}
.btn-primary {
  background: var(--blue-btn);
  color: var(--blue-btn-text) !important;
  border-color: var(--blue-btn);
}
.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff !important;
}
.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border-color: rgba(203, 213, 225, 0.35);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: #fff !important;
  background: rgba(59, 130, 246, 0.1);
}
.btn-nav {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  min-height: 40px;
}
.menu-btn {
  display: none;
  background: var(--surface);
  border: 2px solid rgba(203, 213, 225, 0.35);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-weight: 750;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 85% 15%, rgba(59, 130, 246, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(30, 58, 95, 0.45), transparent 50%),
    linear-gradient(165deg, #070b14 0%, #0c1220 50%, #0a1628 100%);
}
.hero-inner {
  display: grid;
  gap: 1.35rem;
  max-width: 40rem;
}
.kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.8);
  color: #93c5fd;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
}
.hero > .hero-inner > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.35rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.trust li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* Sections */
section { padding: 4rem 0; }
.section-head {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}
.section-head-tight { margin-bottom: 0; max-width: none; }
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
}
.section-head p,
.section-head .mt {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.mt { margin-top: 0.85rem !important; }
.mt-lg { margin-top: 1.5rem; }
.band {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem 1.3rem;
}
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 750;
  color: #fff;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
}
.panel h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: #fff;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  display: flex;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.98rem;
}
.list li:last-child { border-bottom: 0; }
.list li strong { color: #fff; font-weight: 750; }
.list li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}
.contact-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: 0; }
.contact-label {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 750;
}
.contact-value {
  margin: 0;
  color: var(--text);
  font-weight: 650;
}
.contact-item a {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.contact-item a:hover { color: var(--blue); }

.form { display: grid; gap: 0.95rem; }
.form-field { display: grid; gap: 0.35rem; }
.form label {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--muted);
}
.form .req { color: #fca5a5; }
.form .optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid rgba(203, 213, 225, 0.28);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  font: inherit;
  min-height: 48px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:hover,
.form select:hover,
.form textarea:hover {
  border-color: rgba(203, 213, 225, 0.45);
}
.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--blue);
}
.form input.invalid,
.form select.invalid,
.form textarea.invalid {
  border-color: var(--error);
}
.form-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.form-status {
  min-height: 1.25rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: #86efac;
}
.form-status.is-error { color: var(--error); }

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--surface-2), var(--blue-deep));
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.cta-strip h2 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.cta-strip p { margin: 0; color: #e2e8f0; font-size: 0.98rem; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 1.5rem;
  background: #050810;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover,
.footer-links a:focus-visible { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.a11y-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.a11y-note a { color: #93c5fd; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1rem;
    gap: 0;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 0.9rem 0.35rem;
    border-bottom: 1px solid var(--line);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .nav .btn-nav {
    margin-top: 0.65rem;
    justify-content: center;
    border-bottom: 0;
  }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 3.25rem 0 3rem; }
  .logo img { height: 34px; }
}

/* High contrast preference */
@media (prefers-contrast: more) {
  :root {
    --muted: #e2e8f0;
    --line: rgba(255, 255, 255, 0.35);
  }
  .btn-primary { border: 2px solid #fff; }
  .card, .panel { border-color: rgba(255, 255, 255, 0.4); }
}
