/* base.css — professional plumbing service site. Reset + tokens + base elements. */

:root {
  /* Colour — professional trust palette */
  --bg: #FFFFFF;
  --bg-soft: #F4F6F9;        /* subtle gray-blue surface */
  --bg-muted: #EDF1F6;
  --bg-dark: #0F2942;        /* deep navy — trust */
  --bg-darker: #081A2B;

  --ink: #0B1E33;            /* near-black with blue undertone */
  --ink-2: #1F3854;
  --text: #36475F;           /* body text */
  --text-muted: #5A6A82;
  --line: #DCE2EC;           /* hairlines */
  --line-strong: #B7C2D3;

  --primary: #1B3A5C;        /* navy primary */
  --primary-hover: #102841;
  --acc: #C2410C;            /* deep rust orange — emergency/CTA, AA contrast on white */
  --acc-hover: #9A2F08;
  --success: #15803D;
  --warn: #B45309;

  /* Type */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-h1: clamp(2rem, 4.5vw, 3.25rem);
  --fs-h2: clamp(1.625rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-h4: 1.125rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-eyebrow: 0.75rem;

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-body: 1.55;
  --lh-relaxed: 1.7;

  --tr-tight: -0.02em;
  --tr-display: -0.025em;
  --tr-normal: -0.005em;
  --tr-wide: 0.06em;
  --tr-widest: 0.14em;

  /* Spacing — 4px base */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Radii — sensible, not rounded-pill, not 0 */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Layout */
  --max-w: 1240px;
  --max-w-narrow: 880px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --header-h: 88px;
  --emerg-bar-h: 40px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 140ms;
  --t-med: 240ms;

  /* Elevation — subtle */
  --shadow-xs: 0 1px 2px rgba(15, 41, 66, 0.06);
  --shadow-sm: 0 2px 6px rgba(15, 41, 66, 0.06), 0 1px 2px rgba(15, 41, 66, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 41, 66, 0.08), 0 2px 4px rgba(15, 41, 66, 0.04);
  --shadow-lg: 0 18px 44px rgba(15, 41, 66, 0.14);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
  margin: 0;
  max-width: 65ch;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover { color: var(--acc); }

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

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg { fill: currentColor; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

::selection {
  background: var(--acc);
  color: #fff;
}

/* ===== FOCUS ===== */
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--max-w-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  background: var(--ink);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md);
  z-index: 100;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.skip-link:focus { top: var(--s-2); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tr-widest);
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow--acc { color: var(--acc); }
.eyebrow--inv { color: rgba(255, 255, 255, 0.7); }

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
