/* ============================================================
   Mobile Axe — base
   Resets, typography, generic element styling. Page-agnostic.
   Phase 1: typographic upgrade — fluid sizes, balanced wrapping,
   tabular numerals on stat-class numbers, cleaner anchor styling.
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bone);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  max-width: 880px;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 0.9;
  font-weight: 900;
}

h2 {
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 0.96;
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

p {
  color: var(--muted);
  line-height: 1.58;
  text-wrap: pretty;
}

strong { font-weight: 800; }

/* Big stat numbers should be tabular */
.stat strong,
.review-stat strong,
.estimate-result strong,
.live-estimate strong,
.package strong {
  font-variant-numeric: tabular-nums;
}

section {
  padding: var(--section-pad-y) var(--section-pad-x);
}

/* Generic inputs — used on dark sections (.quote-section). Page sheets override
   for light surfaces (estimator card on home, lead-form on checklist, etc). */
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-button);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 140, 42, 0.22);
}

select option { color: var(--ink); }

input::placeholder,
textarea::placeholder { color: rgba(255, 255, 255, 0.55); }

textarea { resize: vertical; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  border-radius: var(--r-button);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Selection */
::selection {
  background: var(--gold);
  color: var(--ink);
}
