/* ==========================================================================
   BRIDGEWATER ROOFER — BASE STYLES & RESET
   ========================================================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.125rem); /* 16px - 18px */
  line-height: 1.65;
  color: var(--slate-700);
  background-color: var(--white);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--orange);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 99999;
  text-decoration: none;
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--white);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy-950);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.35rem, 4.8vw, 4.2rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.95rem, 3.2vw, 2.9rem);
  line-height: 1.24;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  line-height: 1.3;
}

h4 {
  font-size: clamp(1.05rem, 1.25vw, 1.3rem);
  line-height: 1.35;
}

p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease, opacity var(--duration-fast) ease;
}

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

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

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* Focus Visible */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  z-index: 10001;
  transition: width 50ms linear;
  box-shadow: 0 0 10px var(--orange-glow);
}

/* Section Header Eyebrow */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  background: rgba(244, 122, 36, 0.08);
  border: 1px solid rgba(244, 122, 36, 0.2);
  border-radius: var(--radius-full);
}

.section-eyebrow.dark-theme {
  background: rgba(244, 122, 36, 0.14);
  border-color: rgba(244, 122, 36, 0.35);
  color: #FFA35C;
}

.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Common Layout Containers */
.container,
.container-wide {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

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

.section-head-center {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head-center p {
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  color: var(--slate-500);
  margin-top: 0.75rem;
}

.section-head-center.dark-theme h2 {
  color: var(--white);
}

.section-head-center.dark-theme p {
  color: var(--slate-400);
}

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