/* =============================================================
   Nation Roofing LLC — base.css
   Design system: tokens, reset, typography, layout, buttons
   Direction: American red, white and blue from the logo — bold, polished
   ============================================================= */

/* ---------- Design tokens ---------------------------------- */
:root {
  /* Palette — sampled from the Nation Roofing logo */
  --ink: #0a1a44;          /* logo navy — dark sections and body text */
  --ink-800: #10255c;
  --ink-700: #1a2f6b;
  --steel: #2b3d6f;        /* blue steel — illustrations, map */
  --steel-300: #7d8aa8;
  --paper: #ffffff;        /* clean white */
  --paper-200: #f0f3f9;    /* cool silver tint — alt sections */
  --paper-300: #dfe5f0;
  --red: #cf0a14;          /* logo red — primary accent, white text passes AA */
  --red-deep: #a30008;     /* red for text and links on white */
  --red-200: #ff5a50;      /* brightened red for navy surfaces */
  --blue: #0b47c4;         /* logo royal blue — secondary accent */
  --blue-deep: #08318c;
  --blue-200: #7aa5ff;
  --sky: #9dbcf0;          /* illustration highlight */
  --sky-100: #d9e5fa;
  --success: #1c7a4d;
  --danger: #b3001b;

  /* Semantic roles */
  --bg: var(--paper);
  --bg-alt: var(--paper-200);
  --bg-invert: var(--ink);
  --text: var(--ink);
  --text-muted: #4a5670;
  --text-invert: var(--paper);
  --text-invert-muted: #c1cbe2;
  --accent: var(--red);
  --accent-text: var(--red-deep);
  --border: #d3dae8;
  --border-invert: #2a3d75;
  --focus: var(--red);

  /* Type */
  --font-display: "Anton", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.13vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.19rem, 1.09rem + 0.45vw, 1.44rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.65rem + 1.75vw, 3rem);
  --step-4: clamp(2.6rem, 1.95rem + 3.2vw, 4.4rem);
  --step-5: clamp(3rem, 1.9rem + 5.6vw, 6.6rem);

  /* Spacing (8pt rhythm) */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --section: clamp(3.5rem, 2.6rem + 4.5vw, 7rem);

  --container: 1200px;
  --measure: 66ch;

  --radius: 2px;
  --radius-lg: 5px;
  --border-w: 1.5px;

  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 440ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-1: 0 1px 2px rgba(10, 26, 68, 0.06), 0 3px 10px rgba(10, 26, 68, 0.05);
  --shadow-2: 0 10px 34px rgba(10, 26, 68, 0.13);

  --seam: 92px;            /* standing-seam panel width */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

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

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

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

ul,
ol {
  padding: 0;
}

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

/* ---------- Typography ----------------------------------- */
h1,
h2,
h3,
h4 {
  line-height: 1.05;
  font-weight: 400;
  text-wrap: balance;
}

.display,
.h1 {
  font-family: var(--font-display);
  font-size: var(--step-5);
  letter-spacing: 0.005em;
  text-transform: uppercase;
  line-height: 0.94;
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--step-4);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
}

.h3 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--step-2);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.kicker {
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.kicker::before {
  content: "";
  width: 2rem;
  height: var(--border-w);
  background: var(--red);
}

.kicker--invert {
  color: var(--red-200);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text-muted);
  font-weight: 400;
}

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

.measure {
  max-width: var(--measure);
}

.measure-tight {
  max-width: 52ch;
}

strong {
  font-weight: 700;
}

/* ---------- Layout -------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 0.6rem + 2.5vw, 2.5rem);
}

.section {
  padding-block: var(--section);
}

.section--tight {
  padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem);
}

.section--invert {
  background: var(--bg-invert);
  color: var(--text-invert);
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 62ch;
  margin-bottom: var(--space-2xl);
}

.section-head .lead {
  margin-top: var(--space-2xs);
}

.stack > * + * {
  margin-top: var(--space-md);
}

.stack-lg > * + * {
  margin-top: var(--space-lg);
}

/* ---------- Buttons ------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-bd: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 3rem;
  padding: 0.85em 1.5em;
  font-weight: 700;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: var(--border-w) solid var(--btn-bd);
  border-radius: var(--radius);
  transition: transform var(--dur-fast) var(--ease),
    background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

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

.btn:active {
  transform: translateY(0);
}

.btn--accent {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  --btn-bd: var(--red);
}

.btn--accent:hover {
  --btn-bg: var(--red-deep);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--ink);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}

.btn--invert {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--paper);
}

.btn--ghost-invert {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: rgba(255, 255, 255, 0.5);
}

.btn--ghost-invert:hover {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-bd: var(--paper);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--step--1);
  text-decoration: none;
  color: var(--accent-text);
}

.link-arrow svg {
  transition: transform var(--dur) var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.link-arrow--invert {
  color: var(--red-200);
}

/* ---------- Accessibility helpers ----------------------- */
.visually-hidden {
  position: absolute !important;
  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;
  left: 1rem;
  top: -100%;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

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

.section--invert :focus-visible {
  outline-color: var(--red-200);
}

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