/* ==========================================================================
   GLOBAL: theme variables, reset, base typography, layout helpers
   Component styles live in their own files. Keep this file lean.
   ========================================================================== */

:root {
  /* Theme colors (from the Weather Tech Roofing logo) */
  --primary-color: #7ac4e0;
  --secondary-color: #231f20;
  --accent-color: #f2a900;

  --nav-background-color: #1c191a;
  --footer-background-color: #151314;
  --hero-banner-background-color: #231f20;

  /* Derived colors (color-mix keeps the variable list short) */
  --primary-strong: color-mix(in srgb, var(--primary-color) 70%, #0b4f6c);
  --primary-soft: color-mix(in srgb, var(--primary-color) 14%, white);
  --surface-color: #f5f3ef;
  --surface-alt: color-mix(in srgb, var(--surface-color) 70%, var(--primary-soft));
  --text-color: var(--secondary-color);
  --text-muted: color-mix(in srgb, var(--secondary-color) 68%, white);
  --text-on-dark: #f4f2ee;
  --text-on-dark-muted: color-mix(in srgb, var(--text-on-dark) 72%, var(--secondary-color));
  --border-color: color-mix(in srgb, var(--secondary-color) 12%, transparent);
  --border-on-dark: color-mix(in srgb, white 14%, transparent);

  /* Type */
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Google Sans", system-ui, sans-serif;

  /* Layout */
  --container-width: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(64px, 9vw, 120px);
  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 18px 50px -20px color-mix(in srgb, var(--secondary-color) 45%, transparent);

  /* The logo's signature slant, reused for angled edges */
  --slant: 64px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-color);
  background: var(--surface-color);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

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

a {
  color: inherit;
}

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

/* Small uppercase lead-in used above headings across the site */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-strong);
  margin-bottom: 14px;

  &::before {
    content: "";
    width: 22px;
    height: 10px;
    background: currentColor;
    clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

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