/* ==========================================================================
   RoofMastery.com — Core Stylesheet
   System fonts only. No external requests. No framework.
   Palette + type system defined once here; every page links this file.
   ========================================================================== */

:root {
  /* ---- Palette -----------------------------------------------------------
     Deliberately NOT the generic-AI trio (cream/serif/terracotta) and NOT a
     purple-blue gradient stack. Base is a cool graphite/ink pairing lifted
     from standing-seam metal and slate tile; the single warm accent is a
     caution-amber pulled from job-site signage, used sparingly for action. */
  --ink: #14181d;
  --ink-soft: #363d45;
  --charcoal: #1c2229;
  --charcoal-2: #242c34;
  --steel: #3d5468;
  --steel-light: #6b8299;
  --paper: #f6f6f3;
  --paper-dim: #ececE7;
  --line: #d7d8d2;
  --line-dark: #384049;
  --amber: #c8860a;
  --amber-dark: #9c6a08;
  --white: #ffffff;
  --success: #2e6b46;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --max-width: 1180px;
  --radius: 3px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: var(--ink);
  padding: 12px 18px;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---- Type system ----------------------------------------------------------
   Hierarchy is carried by weight, size, tracking and rule-lines rather than
   mixing typefaces — one family, disciplined scale. */

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.1rem, 5vw + 1rem, 3.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 0.75em;
}

.eyebrow.on-dark {
  color: var(--amber);
}

.rule {
  width: 56px;
  height: 3px;
  background: var(--amber);
  margin: 0 0 1.25em;
  border: none;
}

/* ---- Buttons --------------------------------------------------------------*/
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
}

.btn-outline.on-dark {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}
.btn-outline.on-dark:hover {
  border-color: var(--white);
}

.btn-block {
  width: 100%;
  text-align: center;
}

/* ---- Header ---------------------------------------------------------------*/
.site-header {
  background: var(--ink);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--amber);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  line-height: 1;
}

.brand-mark {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand-mark span {
  color: var(--amber);
}

.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9aa4ad;
  margin-top: 4px;
}

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d7dbde;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--amber);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-phone {
  display: none;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}
.header-phone small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: #9aa4ad;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: inline-flex;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.mobile-nav {
  display: none;
  background: var(--charcoal);
  border-top: 1px solid var(--line-dark);
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 20px 18px;
}
.mobile-nav li {
  border-bottom: 1px solid var(--line-dark);
}
.mobile-nav a {
  display: block;
  padding: 12px 2px;
  text-decoration: none;
  color: #e7e9ea;
  font-weight: 600;
}
.mobile-nav .header-phone {
  display: block;
  padding: 14px 2px 4px;
}

@media (min-width: 900px) {
  .main-nav { display: block; }
  .header-phone { display: block; text-align: right; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
  background: var(--charcoal);
  color: var(--white);
  background-image:
    linear-gradient(180deg, rgba(20,24,29,0.92), rgba(20,24,29,0.96)),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 2px, transparent 2px, transparent 26px);
  padding: 64px 0 56px;
}

.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero h1 {
  color: var(--white);
}

.hero .lede {
  color: #c7ccd1;
  max-width: 46ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.hero-stat {
  background: var(--charcoal-2);
  padding: 22px 18px;
}
.hero-stat .num {
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--amber);
  display: block;
}
.hero-stat .label {
  font-size: 0.78rem;
  color: #b7bec4;
  margin-top: 4px;
}

/* ---- Sections --------------------------------------------------------- */
section {
  padding: 64px 0;
}

.section-dark {
  background: var(--ink);
  color: var(--white);
}
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}
.section-dark p {
  color: #c2c8cd;
}

.section-tint {
  background: var(--paper-dim);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 40px;
}

/* ---- Grids / Cards ------------------------------------------------------*/
.grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px 24px;
  border-radius: var(--radius);
}

.card-dark {
  background: var(--charcoal-2);
  border: 1px solid var(--line-dark);
  padding: 28px 24px;
  border-radius: var(--radius);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card .card-index {
  font-weight: 800;
  color: var(--amber-dark);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}

/* ---- Credential / trust block ------------------------------------------ */
.credential-block {
  display: grid;
  gap: 34px;
  align-items: start;
}

@media (min-width: 900px) {
  .credential-block {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

.credential-badge {
  border: 2px solid var(--amber);
  padding: 26px 24px;
  background: var(--charcoal-2);
}

.credential-badge .cprc-letters {
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: 0.03em;
  color: var(--amber);
  line-height: 1;
}

.credential-badge .cprc-full {
  font-size: 0.85rem;
  color: #cfd4d8;
  margin-top: 8px;
  letter-spacing: 0.03em;
}

.stat-row {
  display: flex;
  gap: 22px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.stat-row .stat-num {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
}
.stat-row .stat-label {
  font-size: 0.75rem;
  color: #9aa4ad;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Lists -------------------------------------------------------------*/
.check-list {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--amber-dark);
  transform: rotate(45deg);
}

.step-list {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 52px;
  border-left: 2px solid var(--line);
  margin-left: 17px;
}
.step-list li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: -19px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--amber);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ---- CTA band ------------------------------------------------------------*/
.cta-band {
  background: linear-gradient(180deg, var(--charcoal), var(--ink));
  color: var(--white);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #c7ccd1; }
.cta-band .btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---- Breadcrumb ---------------------------------------------------------*/
.breadcrumb {
  font-size: 0.82rem;
  padding: 16px 0;
  color: var(--ink-soft);
}
.breadcrumb a {
  color: var(--steel);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Placeholder callouts -------------------------------------------- */
.placeholder {
  background: #fdf3d8;
  border: 1px dashed #b58a1f;
  color: #6b4f0a;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
}

.placeholder-block {
  background: #fdf3d8;
  border: 1px dashed #b58a1f;
  color: #6b4f0a;
  padding: 20px 22px;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.placeholder-block strong { color: #4a3707; }

/* ---- Review cards -------------------------------------------------------*/
.review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  padding: 26px 24px;
}
.review-card .stars {
  letter-spacing: 2px;
  color: var(--line);
  font-size: 1.1rem;
}

/* ---- Forms ---------------------------------------------------------------*/
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--steel-light);
  outline-offset: 1px;
}
.form-hint {
  font-size: 0.78rem;
  color: #7a828a;
  margin-top: 4px;
}
.form-row {
  display: grid;
  gap: 20px;
}
@media (min-width: 640px) {
  .form-row.two { grid-template-columns: 1fr 1fr; }
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success {
  background: #e5f2ea;
  border: 1px solid var(--success);
  color: #1f4a30;
}
.form-status.is-error {
  background: #f8e6e4;
  border: 1px solid #a33a2e;
  color: #6b241a;
}

/* ---- Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #b7bec4;
  padding: 56px 0 26px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  gap: 34px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li {
  margin-bottom: 9px;
}
.footer-grid a {
  color: #b7bec4;
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--white);
}
.footer-legal {
  border-top: 1px solid var(--line-dark);
  margin-top: 42px;
  padding-top: 22px;
  font-size: 0.78rem;
  color: #838c93;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
}
.footer-legal .placeholder {
  background: transparent;
  border: 1px dashed #8a6a1f;
  color: #e0b34c;
  font-weight: 700;
}

/* ---- Utility -------------------------------------------------------------*/
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
