/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Color Palette */
  --color-background: #f4f6f9; /* subtle cool light background */
  --color-surface: #ffffff;

  --color-text: #121826;
  --color-text-muted: #6b7280;

  --color-primary: #0b1c3d; /* deep navy blue */
  --color-primary-soft: #162a55;

  --color-accent: #ff7a1a; /* safety orange */
  --color-accent-soft: #ffe4cf;

  --color-success: #1ea672;
  --color-warning: #f5a623;
  --color-danger: #e02424;

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

  --color-border: #d1d5db;
  --color-outline: #ff7a1a;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --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 */

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

  /* Spacing Scale (px) */
  --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;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.15);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: 1.25rem; /* 20px */
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
}

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

ul[role='list'],
ol[role='list'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

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

textarea {
  resize: vertical;
}

/* Remove default link underline; we'll style explicitly */
a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   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);
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-primary);
}

h1 { font-size: clamp(2.2rem, 3vw, 2.75rem); margin-bottom: var(--space-4); }
h2 { font-size: clamp(1.8rem, 2.5vw, 2.25rem); margin-bottom: var(--space-3); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-3); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-2); }
h5 { font-size: 1.125rem; margin-bottom: var(--space-2); }
h6 { font-size: 1rem; margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

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

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

strong {
  font-weight: 600;
}

a {
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

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

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

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

/* ==========================================================================
   Accessibility & Motion
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-outline);
  outline-offset: 3px;
}

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

/* 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;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

/* Flex utilities */
.flex {
  display: flex;
}

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

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

/* Grid utilities */
.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;
  }
}

/* Spacing utilities (margin/padding) - minimal, extend in components if needed */
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1;
  border: 1px solid transparent;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #ff9d4d);
  color: #111827;
  box-shadow: var(--shadow-md);
}

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

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

.btn-outline {
  background-color: #ffffff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: rgba(11, 28, 61, 1);
    color: #ffffff;
  border-color: #ffffff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-accent);
}

.btn[disabled],
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

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

/* Form Inputs */
.input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.35);
}

.input[disabled],
select[disabled],
textarea[disabled] {
  cursor: not-allowed;
  background-color: var(--gray-100);
  color: var(--gray-500);
}

/* Cards (for services, testimonials, pricing, etc.) */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.card--subtle {
  box-shadow: var(--shadow-sm);
}

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

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

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

/* Alert-like emphasis (for emergency contact, urgent info) */
.badge-urgent {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent-soft);
  color: #8a3a05;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Hero-like section helper (optional but generic) */
.section-hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

@media (max-width: 768px) {
  .section-hero {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }
}

/* Simple tag for subtle emphasized text (e.g., service areas, 24/7) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-size: var(--font-size-xs);
  font-weight: 500;
}

/* Footer helper */
.site-footer {
  padding: var(--space-8) 0;
  background-color: #0b1220;
  color: var(--gray-200);
  font-size: var(--font-size-sm);
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: #ffffff;
}
