/* ==========================================================================
   RingaRoofer — design tokens
   Palette grounded in roofing materials: weathered copper flashing (accent),
   storm-sky teal (secondary), slate shingle ink, cool paper background.
   Type: Oswald (condensed, sign-painted / job-site stencil feel) for display,
   Public Sans (civic, plain-spoken, U.S. government-grade legible) for body,
   IBM Plex Mono for numerals, badges, phone numbers.
   ========================================================================== */

:root {
  --bg: #EEF1EF;
  --bg-alt: #E2E8E4;
  --paper: #FFFFFF;
  --ink: #1C2B2E;
  --ink-soft: #48585C;
  --ink-faint: #79898C;
  --line: #CBD4CE;
  --line-soft: #DEE5E0;

  --accent: #B5502C;       /* weathered copper flashing */
  --accent-deep: #8A3A1F;
  --accent-tint: #F4E4DB;

  --sky: #2C5860;          /* storm-sky teal */
  --sky-deep: #1D3F45;
  --sky-tint: #E1EAEB;

  --ok: #3C6E4A;

  --radius: 3px;
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(28,43,46,0.08);
  --shadow-md: 0 6px 20px -6px rgba(28,43,46,0.22);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sky-deep); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-transform: none;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

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

/* ---------- layout ---------- */
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--paper); }
.section--ink { background: var(--sky-deep); color: #EAF1F0; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #C6D6D5; }

.grid {
  display: grid;
  gap: 24px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- shingle-lap motif (signature element) ----------
   A row of overlapping parallelogram "shingles" used as a
   structural divider — same lapped, staggered logic a roofer
   uses to shed water, laid out left→right in courses. */
.shingle-course {
  --n: 14;
  display: flex;
  height: 22px;
  width: 100%;
  overflow: hidden;
}
.shingle-course span {
  flex: 1 0 auto;
  width: calc(100% / var(--n) + 10px);
  margin-left: -10px;
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}
.shingle-course span:first-child { margin-left: 0; }
.shingle-course--roof span:nth-child(odd) { background: var(--sky); }
.shingle-course--roof span:nth-child(even) { background: var(--sky-deep); }
.shingle-course--accent span:nth-child(odd) { background: var(--accent); }
.shingle-course--accent span:nth-child(even) { background: var(--accent-deep); }
.shingle-course--line span { background: var(--line); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238,241,239,0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px;
  flex: none;
}
.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
  margin-top: 2px;
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
}
.main-nav a:hover { color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

.phone-link {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  white-space: nowrap;
}
.phone-link:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--sky-deep); border-color: var(--sky-tint); padding: 12px 20px; }
.btn-ghost:hover { border-color: var(--sky); }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-copy .lede { font-size: 1.14rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 0.86rem; color: var(--ink-soft); font-weight: 600;
}
.trust-strip span { display: flex; align-items: center; gap: 7px; }
.trust-strip svg { flex: none; color: var(--accent); }

.hero-art {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3.1;
  background: var(--sky-deep);
  box-shadow: var(--shadow-md);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(15,26,28,0.86), transparent);
  color: #EAF1F0; font-size: 0.78rem; padding: 30px 18px 14px;
  font-family: var(--font-mono); letter-spacing: 0.02em;
}

/* ---------- cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 0.95rem; }
.card-icon { color: var(--accent); margin-bottom: 14px; }
.icon-badge {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.icon-badge--sky { background: var(--sky-tint); color: var(--sky-deep); }

.service-card { position: relative; padding-top: 30px; }
.service-card a.stack-link::after { content: ""; position: absolute; inset: 0; }
.service-card .more { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 700; color: var(--sky-deep); }

/* ---------- steps ---------- */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: none; }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.step-num b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--accent); font-weight: 700; line-height: 1; margin-top: 4px; }

/* ---------- problem list ---------- */
.problem {
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--sky);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 22px;
  background: var(--paper);
}
.problem h3 { font-size: 1.05rem; }

/* ---------- faq ---------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.03rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent);
  flex: none;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a { padding: 0 4px 22px; max-width: 68ch; }
.faq-item .faq-a p { font-size: 0.96rem; }

/* ---------- badges / notes ---------- */
.note {
  border: 1px solid var(--line-soft);
  background: var(--sky-tint);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--sky-deep);
}
.note strong { color: var(--sky-deep); }
.note--accent { background: var(--accent-tint); color: var(--accent-deep); }
.note--accent strong { color: var(--accent-deep); }

.disclosure {
  font-size: 0.86rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 40px;
  max-width: 72ch;
}

/* ---------- form ---------- */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.97rem;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--sky);
  border-color: var(--sky);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.consent { font-size: 0.8rem; color: var(--ink-faint); margin-top: 14px; }

/* ---------- footer ---------- */
.site-footer { background: var(--sky-deep); color: #C6D6D5; padding-top: 0; }
.footer-main { padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.site-footer a { color: #C6D6D5; text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; margin-bottom: 10px; display: block; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 20px 0 90px;
  font-size: 0.8rem;
  color: #93AAA9;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal a { color: #93AAA9; }
.footer-disclosure { font-size: 0.8rem; color: #93AAA9; max-width: 80ch; border-top: 1px solid rgba(255,255,255,0.14); padding-top: 20px; margin-top: 20px; }

/* ---------- sticky mobile cta ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.08);
}
@media (max-width: 720px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 74px; }
  .main-nav, .trust-strip { display: none; }
  .hero .wrap { grid-template-columns: 1fr; }
  .header-cta .btn-outline { display: none; }
}

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { color: var(--ink-faint); }
.crumbs a:hover { color: var(--accent); }

/* ---------- page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  padding: 44px 0 40px;
  background-color: var(--bg-alt);
  background-image: url("/assets/img/roofline-watermark.svg");
  background-repeat: no-repeat;
  background-position: right 0 bottom -6px;
  background-size: 460px auto;
}
.page-hero::after {
  content: "";
  display: block;
  height: 10px;
  margin-top: 8px;
  background: repeating-linear-gradient(115deg, var(--sky) 0 24px, var(--sky-deep) 24px 48px);
}
.page-hero .wrap { position: relative; }
.page-hero .lede { max-width: 62ch; font-size: 1.05rem; }
@media (max-width: 720px) {
  .page-hero { background-size: 300px auto; background-position: right -40px bottom -6px; }
}

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list-check li { display: flex; gap: 10px; font-size: 0.95rem; color: var(--ink-soft); }
.list-check svg { flex: none; margin-top: 3px; color: var(--ok); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--sky-tint);
  color: var(--sky-deep);
  margin: 0 8px 8px 0;
}

.city-card { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; }
.city-card a { font-weight: 700; }

@media (max-width: 620px) {
  .section { padding: 52px 0; }
}
