/* =============================================================================
   Variables
   ========================================================================== */

:root {
  /* Colors */
  --color-background: #f7f9fc;
  --color-surface: #ffffff;
  --color-text: #1a2333;
  --color-text-muted: #6b7280;

  --color-primary: #1f4fb8; /* confident blue */
  --color-primary-soft: #e3edff;
  --color-primary-dark: #173b89;

  --color-accent: #ffb400; /* energized yellow */
  --color-accent-soft: #fff6dd;

  --color-success: #15803d;
  --color-success-soft: #dcfce7;

  --color-warning: #d97706;
  --color-warning-soft: #fef3c7;

  --color-danger: #b91c1c;
  --color-danger-soft: #fee2e2;

  --color-border-subtle: #e5e7eb;
  --color-border-strong: #d1d5db;

  /* Neutral grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-medium: 0 14px 40px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 18px 60px rgba(15, 23, 42, 0.18);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }
}


/* =============================================================================
   Reset / Normalize
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: none;
  background: none;
}

textarea {
  resize: vertical;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* =============================================================================
   Base Styles
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  background-color: var(--color-background);
  color: var(--color-text);
}

main {
  min-height: 60vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--space-4);
  }

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

/* Links: professional and subtle */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal),
              text-decoration-color var(--transition-normal),
              background-color var(--transition-normal);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}


/* =============================================================================
   Accessibility & Focus
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

:focus {
  outline: none;
}

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


/* =============================================================================
   Utilities
   ========================================================================== */

/* Layout: container */

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px; /* Comfortable width for service details & imagery */
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* Flex helpers */

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-row {
  flex-direction: row;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid helpers */

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Text alignment */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

/* Spacing utilities (common) */

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-4 { padding-top: var(--space-4); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-4 { padding-bottom: var(--space-4); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

/* Visually hidden (screen-reader only) */

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


/* =============================================================================
   Components
   ========================================================================== */

/* Buttons: primary CTAs for contact & rapid response */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: var(--font-size-sm);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary-soft);
  background-image: linear-gradient(135deg, rgba(31, 79, 184, 0.06), rgba(31, 79, 184, 0));
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-soft);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #1a1a1a;
}

.btn-accent:hover {
  background-color: #e5a400;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Inputs: consistent fields for contact & quote forms */

.input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition: border-color var(--transition-normal),
              box-shadow var(--transition-normal),
              background-color var(--transition-normal);
}

.input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
  outline: none;
}

.input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px var(--color-danger-soft);
}

label {
  display: inline-block;
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.field-help {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Card: for services, qualifications, testimonials, response highlights */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-soft);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* Badge: for certifications, response time indicators */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-safe {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.badge-warning {
  background-color: var(--color-warning-soft);
  color: var(--color-warning);
}

.badge-primary {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-dark);
}

/* Section helpers: ensure breathable layout */

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-light {
  background-color: var(--color-surface);
}

.section-muted {
  background-color: var(--gray-50);
}

.section-header {
  margin-bottom: var(--space-8);
}

.section-eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
}

.section-description {
  max-width: 60ch;
  color: var(--color-text-muted);
}

/* Testimonial text sizing */

.testimonial-quote {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.testimonial-author {
  margin-top: var(--space-3);
  font-weight: 500;
}

.testimonial-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero-specific helper: keep hero content comfortable */

.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.hero-kicker {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: var(--space-2);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
}

/* Navigation helpers */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background-color: rgba(247, 249, 252, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--font-size-sm);
}

.nav-link {
  position: relative;
  padding: 0.1rem 0;
  color: var(--color-text-muted);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

.nav-link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  font-size: var(--font-size-sm);
}

.site-footer-muted {
  color: var(--color-text-muted);
}

/* Subtle safety / trust stripe background */

.trust-strip {
  background-image: linear-gradient(135deg, rgba(31, 79, 184, 0.04), rgba(255, 180, 0, 0.04));
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.trust-strip strong {
  color: var(--color-primary-dark);
}
