/* SX Electrical - custom styles (plain CSS, used alongside the Tailwind CDN) */

:root {
  --brand: #0F3D6E;
  --brand-dark: #0A2C50;
  --brand-light: #E7EEF6;
  --amber: #F5B700;
  --ink: #111827;
  --mist: #F7F9FC;
  --neutral: #6B7280;
}

@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.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Focus states */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 0.375rem;
}
#main:focus, #legal:focus { outline: none; }

/* Hero background */
.hero-bg {
  background-color: var(--brand);
  background-image:
    radial-gradient(circle at 85% 20%, rgba(245, 183, 0, 0.18), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #0F3D6E 0%, #0A2C50 100%);
  background-size: auto, 32px 32px, 32px 32px, auto;
}

/* Navigation */
.nav-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--brand); border-bottom-color: var(--amber); }

.mobile-link {
  display: block;
  padding: 0.75rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
}
.mobile-link:hover { background: var(--brand-light); color: var(--brand); }

/* Buttons */
.btn-amber,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #FFC933; }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* Section headings */
.eyebrow {
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.875rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
}
.eyebrow-light { color: var(--amber); }

.section-title {
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.15;
  color: var(--ink);
}
@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
}

/* Cards */
.service-card,
.fact-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1rem;
  padding: 1.5rem;
}
.service-card { border-top: 4px solid var(--amber); }
.fact-card { background: var(--mist); }

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--brand-light);
  color: var(--brand);
}
.service-card .icon-wrap { margin-bottom: 1rem; }

.card-title {
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--brand);
  line-height: 1.2;
}
.card-text { margin-top: 0.5rem; color: #374151; line-height: 1.6; }

.fact-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral);
}
.fact-value {
  margin-top: 0.5rem;
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--brand);
}
.fact-note { margin-top: 0.375rem; color: #374151; }

/* Footer */
.footer-link {
  font: inherit;
  font-weight: 600;
  color: #E5E7EB;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.footer-link:hover { color: var(--amber); }

/* Legal dialogs */
.legal-dialog {
  width: min(42rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.legal-dialog::backdrop { background: rgba(17, 24, 39, 0.7); }
.legal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}
.legal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
}
.legal-body h3 {
  font-family: "Barlow Semi Condensed", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand);
  margin-top: 1.25rem;
}
.legal-body p { margin-top: 0.5rem; }
.legal-body ul { margin-top: 0.5rem; padding-left: 1.25rem; list-style: disc; }
.legal-body li { margin-top: 0.25rem; }

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.dialog-close:hover { background: var(--brand-light); }

body.dialog-open { overflow: hidden; }

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