/* =========================================================
   Safe Haven Roofing and Construction
   Design tokens
   Color:  Slate navy #1B2A41 (headers/nav), Storm gray #3E4C59 (body text),
           Copper #C1652F (primary accent/CTA), Weathered gold #C9A24B (secondary accent),
           Ivory #F6F2E9 (background), Cloud white #FFFFFF (cards)
   Type:   Oswald (display, condensed/rugged) + Source Sans 3 (body, readable)
   Signature: the "shingle row" divider — overlapping trapezoids that mimic
              a course of roof shingles, used at section breaks instead of
              a generic gradient or wave.
   ========================================================= */

:root {
  --navy: #1B2A41;
  --navy-light: #24374f;
  --storm: #3E4C59;
  --copper: #C1652F;
  --copper-dark: #A34E22;
  --gold: #C9A24B;
  --ivory: #F6F2E9;
  --white: #FFFFFF;
  --line: #E4DCC9;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

  --radius: 4px;
  --shadow: 0 10px 30px -12px rgba(27, 42, 65, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--storm);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2.4em; }
h3 { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--copper-dark); margin-top: 1.6em; }

p { margin: 0 0 1.2em; }

a { color: var(--copper-dark); }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 780px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--copper);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--copper-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-large {
  padding: 15px 30px;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 3px solid var(--copper);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--white);
  text-decoration: none;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: auto;
}

.logo-mark {
  width: 14px;
  height: 14px;
  background: var(--copper);
  display: inline-block;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  margin-right: 2px;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-weight: 400;
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.85;
}

.main-nav a:hover { opacity: 1; color: var(--gold); }

.nav-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, #2c4463 100%);
  color: var(--white);
  padding: 72px 0 0;
  position: relative;
  overflow: hidden;
}

.hero-inner { padding-bottom: 64px; max-width: 820px; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 1em;
}

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

.hero-lead {
  font-size: 1.1rem;
  color: #DCE3EC;
  max-width: 640px;
}

.hero-lead a { color: var(--gold); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 32px 0 40px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
}

.stat {
  font-size: 0.85rem;
  color: #C7D0DC;
}

.stat span {
  display: block;
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Signature shingle-row divider */
.shingle-row {
  display: flex;
  width: 100%;
}

.shingle-row span {
  flex: 1 0 12.5%;
  height: 26px;
  background: var(--ivory);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  margin-right: -1px;
}

.shingle-row span:nth-child(odd) { opacity: 1; }
.shingle-row span:nth-child(even) { opacity: 0.85; }

/* Article content */
.content-section {
  padding: 64px 0 24px;
}

.content-section p,
.content-section li {
  font-size: 1.02rem;
}

.content-section h2 {
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.35em;
}

/* FAQ accordion */
.faq-list {
  border-top: 1px solid var(--line);
  margin-top: 1.5em;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 18px 30px 18px 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
  cursor: pointer;
  position: relative;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 16px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--copper);
  transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"]::after {
  content: '\2212';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding-bottom: 18px;
  margin: 0;
  color: var(--storm);
}

/* CTA band */
.cta-band {
  background: var(--copper);
  color: var(--white);
  margin-top: 40px;
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 24px;
}

.cta-band h2 {
  color: var(--white);
  margin: 0 0 0.3em;
  border: none;
}

.cta-band p { margin: 0; color: #FBEADE; }

.cta-band .btn-primary {
  background: var(--navy);
}

.cta-band .btn-primary:hover {
  background: #10192a;
}

/* Contact */
.contact-section {
  padding: 64px 0 80px;
  text-align: center;
}

.contact-lead {
  color: var(--storm);
  max-width: 500px;
  margin: 0 auto 2em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 36px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 0.85rem;
  color: var(--copper-dark);
}

.contact-card a,
.contact-card p {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  margin: 0;
}

.contact-cta { margin-top: 8px; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: #C7D0DC;
  padding: 26px 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #C7D0DC;
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold); }

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq-answer { transition: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px 24px 24px;
    gap: 14px;
    border-bottom: 3px solid var(--copper);
  }

  .site-header.nav-open .nav-cta {
    display: inline-flex;
    margin: 0 24px 20px;
  }

  .hero { padding-top: 48px; }
  .hero-inner { padding-bottom: 48px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }

  .cta-band-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .shingle-row span { flex-basis: 25%; }
  .content-section { padding-top: 44px; }
}
