/* =========================================================
   Tru Roofing — Global styles
   Palette: navy / gray / white (no accent colors)
   ========================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

/* ---- Tokens ---- */
:root {
  --navy-900: #0B2545;
  --navy-800: #13315C;
  --navy-700: #1E3A5F;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --ink:      #111827;
  --white:    #FFFFFF;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);

  --container: 1180px;
  --gutter: 24px;
}

/* ---- Base typography ---- */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
h4 { font-size: 1rem;    font-weight: 700; line-height: 1.3;  }
p  { color: var(--gray-600); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-500); }

/* ---- Containers ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Sections ---- */
section { padding: 72px 0; }
@media (min-width: 1024px) { section { padding: 96px 0; } }

.section-light { background: var(--gray-50); }
.section-dark  { background: var(--navy-900); color: var(--white); }
.section-dark p, .section-dark .eyebrow { color: var(--gray-400); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease;
  min-height: 48px;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--white); color: var(--navy-900); }
.btn-primary:hover { background: var(--gray-100); }
.btn-primary-inverse { background: var(--navy-900); color: var(--white); }
.btn-primary-inverse:hover { background: var(--navy-800); }
.btn-ghost { color: var(--white); border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-ghost-dark { color: var(--navy-900); border: 1px solid var(--navy-900); }
.btn-ghost-dark:hover { background: var(--navy-900); color: var(--white); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---- Focus ring (keyboard users) ---- */
:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.section-dark :is(a, button, input, select, textarea):focus-visible { outline-color: var(--white); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy-900); color: var(--white);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Visually hidden (screen-reader only) ---- */
.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;
}

/* ---- Site nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-nav__logo { display: inline-flex; align-items: center; gap: 10px; }
.site-nav__mark { height: 40px; width: auto; }
.site-nav__wordmark { color: var(--white); font-weight: 800; font-size: 18px; letter-spacing: 0.2px; }
.site-nav__links { display: none; gap: 28px; }
.site-nav__links a {
  font-size: 15px; font-weight: 600; color: var(--white); opacity: 0.85;
}
.site-nav__links a:hover { opacity: 1; }
.site-nav__actions { display: flex; align-items: center; gap: 12px; }
.site-nav__phone {
  font-weight: 700; font-size: 15px; color: var(--white); opacity: 0.9;
  display: none;
}
.site-nav__cta { display: none; padding: 10px 18px; font-size: 14px; min-height: 40px; }
.site-nav__toggle {
  width: 44px; height: 44px; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
}
.site-nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav__mobile {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px var(--gutter) 16px;
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.site-nav__mobile a {
  padding: 12px 4px; color: var(--white); font-weight: 600; font-size: 16px;
}
.site-nav__mobile a.btn { margin-top: 8px; }

@media (min-width: 768px) {
  .site-nav__phone { display: inline-block; }
}
@media (min-width: 1024px) {
  .site-nav__links { display: flex; }
  .site-nav__cta { display: inline-flex; }
  .site-nav__toggle { display: none; }
  .site-nav__mobile { display: none !important; }
}

/* ---- Eyebrow on dark background ---- */
.eyebrow--light { color: var(--gray-400); }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  padding: 64px 0 72px;
}
@media (min-width: 1024px) { .hero { padding: 96px 0 120px; } }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.15fr 1fr; gap: 56px; }
}

.hero__logo { display: block; margin-bottom: 24px; max-width: 420px; }
.hero__logo img { width: 100%; height: auto; }
.hero__copy h1 { margin: 10px 0 14px; color: var(--white); }
.hero__subhead { color: #B0B7C3; font-size: 17px; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: 18px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px; color: var(--gray-400); font-weight: 600; letter-spacing: 0.3px;
}

/* ---- Hero form card ---- */
.hero__form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
}
.hero__form-title { font-size: 1.4rem; color: var(--navy-900); margin-bottom: 4px; }
.hero__form-sub { font-size: 14px; color: var(--gray-500); margin-bottom: 18px; }

/* ---- Form primitives (used here and in Final CTA form) ---- */
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-form .field { display: flex; flex-direction: column; gap: 6px; }
.lead-form .field > span { font-size: 13px; font-weight: 600; color: var(--navy-900); }
.lead-form input,
.lead-form select,
.lead-form textarea {
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  min-height: 44px;
}
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus { border-color: var(--navy-900); }
.lead-form__submit { margin-top: 8px; width: 100%; }
.lead-form__fine { font-size: 12px; color: var(--gray-500); text-align: center; margin-top: 4px; }
.lead-form__honeypot { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Trust bar ---- */
.trust-bar { background: var(--gray-100); padding: 18px 0; }
.trust-bar__list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px 28px;
  font-size: 13px; font-weight: 600; color: var(--gray-600); letter-spacing: 0.2px;
  text-align: center;
}

/* ---- Section header ---- */
.section-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-header h2 { margin-top: 6px; color: var(--navy-900); }
.section-header__sub { margin-top: 10px; font-size: 17px; }

/* ---- Services grid ---- */
.service-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; } }

.service-card {
  background: var(--white);
  padding: 24px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  color: var(--navy-900);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.service-card__icon { color: var(--navy-900); margin-bottom: 12px; }
.service-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.service-card p { font-size: 14px; color: var(--gray-600); line-height: 1.5; }

/* ---- Why Tru ---- */
.why__grid {
  display: grid; gap: 32px; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .why__grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.why__photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.why__copy h2 { margin-top: 6px; color: var(--navy-900); }
.why__pillars { margin-top: 20px; display: grid; gap: 18px; }
@media (min-width: 640px) { .why__pillars { grid-template-columns: 1fr 1fr; gap: 24px; } }
.why__pillars h3 { color: var(--navy-900); margin-bottom: 4px; font-size: 1.05rem; }
.why__pillars p { font-size: 14px; line-height: 1.55; }

/* ---- Testimonials ---- */
.testimonial-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px)  { .testimonial-grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial {
  background: var(--white);
  padding: 24px 22px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--navy-900);
  box-shadow: var(--shadow-sm);
}
.testimonial__stars { color: var(--navy-900); font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; }
.testimonial blockquote { font-size: 15px; color: var(--ink); line-height: 1.55; margin-bottom: 12px; }
.testimonial cite { font-size: 13px; font-weight: 700; color: var(--gray-600); font-style: normal; }

/* ---- Service area ---- */
.service-area__grid {
  display: grid; gap: 32px; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .service-area__grid { grid-template-columns: 1.3fr 1fr; gap: 48px; } }
.service-area h2 { color: var(--navy-900); margin-top: 6px; }
.county-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  padding: 24px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
.county-list li {
  font-weight: 700; color: var(--navy-900); font-size: 15px;
  padding-left: 16px; position: relative;
}
.county-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; background: var(--navy-900); border-radius: 50%;
}

/* ---- Final CTA ---- */
.final-cta__inner {
  max-width: 760px; margin: 0 auto; text-align: center;
}
.final-cta__logo { margin: 0 auto 28px; height: 70px; width: auto; max-width: 320px; }
.final-cta h2 { color: var(--white); font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
.final-cta__sub { color: var(--gray-400); font-size: 17px; margin: 10px 0 32px; }

.lead-form--wide {
  background: var(--white);
  color: var(--ink);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.lead-form--wide .lead-form__row {
  display: grid; gap: 12px; grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lead-form--wide .lead-form__row { grid-template-columns: 1fr 1fr; }
}
.lead-form--wide textarea {
  font: inherit; resize: vertical; min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

/* ---- Footer ---- */
.site-footer { background: #0a0f1a; color: var(--gray-400); padding: 48px 0 28px; }
.site-footer__grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h3 { color: var(--white); font-size: 14px; margin-bottom: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.site-footer a { color: var(--gray-200); }
.site-footer a:hover { color: var(--white); }
.site-footer p { font-size: 14px; color: var(--gray-400); line-height: 1.6; }
.site-footer__bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center; font-size: 13px;
}

/* ---- Thank-you page ---- */
.thanks {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0;
}
.thanks__inner { text-align: center; max-width: 560px; }
.thanks__logo { margin: 0 auto 32px; height: 70px; width: auto; }
.thanks h1 { color: var(--white); font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem); margin-bottom: 16px; }
.thanks p { color: var(--gray-400); font-size: 17px; margin-bottom: 12px; }
.thanks__meta { margin: 20px 0 32px; font-size: 15px; }
.thanks__meta a { color: var(--white); }
