/* =========================================================
   Peak Roofing Co. — stylesheet
   Color palette: navy (trust/roof) + slate + warm accent (safety/action)
   ========================================================= */

:root {
  --navy-900: #0f2842;
  --navy-800: #1e3a5f;
  --navy-700: #2c4a6e;
  --slate-600: #4a5a6b;
  --slate-400: #8a97a3;
  --slate-100: #f4f6f8;
  --white: #ffffff;
  --accent: #e8622c;
  --accent-dark: #c94f1e;
  --success: #2e7d4f;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 40, 66, 0.12);
  --shadow-sm: 0 4px 14px rgba(15, 40, 66, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy-900);
  line-height: 1.6;
  background: var(--white);
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.2;
}

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

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 12px; }
.section-sub { color: var(--slate-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-size: 0.95rem;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 8px 20px rgba(232, 98, 44, 0.35); }

.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-lg { padding: 16px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(15,40,66,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy-900);
}
.logo-icon { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-weight: 500;
  color: var(--navy-800);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.phone-link {
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  transition: 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(15,40,66,0.92), rgba(30,58,95,0.85)),
    linear-gradient(135deg, #16324a, #24486b);
  color: var(--white);
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 860px; padding-top: 60px; padding-bottom: 60px; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-bottom: 32px;
}

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

.hero-badges {
  display: flex;
  gap: 18px 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--navy-900);
  color: var(--white);
  padding: 32px 0;
}
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.trust-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--accent);
}
.trust-item span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* ---------- Services ---------- */
.services { padding: 96px 0; background: var(--slate-100); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.service-icon { font-size: 2.2rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--slate-600); font-size: 0.95rem; }

/* ---------- About ---------- */
.about { padding: 96px 0; }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); }

.about-copy p { color: var(--slate-600); margin-bottom: 20px; }
.about-copy h2 { margin-bottom: 18px; font-size: clamp(1.8rem, 3vw, 2.3rem); }

.checklist { margin-bottom: 28px; }
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--navy-800);
  font-weight: 500;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 800;
}

/* ---------- Gallery ---------- */
.gallery { padding: 96px 0; background: var(--slate-100); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 5/4;
  background: none;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* ---------- Testimonials ---------- */
.testimonials { padding: 96px 0; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid #e6eaee;
  border-radius: var(--radius);
  padding: 32px 28px;
}
.stars { color: #f0a828; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-card p { color: var(--navy-800); margin-bottom: 18px; font-style: italic; }
.testimonial-author { font-weight: 600; color: var(--slate-600); font-size: 0.9rem; }

/* ---------- Quote form ---------- */
.quote { padding: 96px 0; background: var(--navy-900); color: var(--white); }

.quote-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}

.quote-copy h2 { color: var(--white); font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 16px; }
.quote-copy p { color: rgba(255,255,255,0.8); margin-bottom: 20px; }
.quote-copy .checklist li { color: rgba(255,255,255,0.9); }
.quote-copy .checklist li::before { color: var(--accent); }

.contact-quick { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; font-weight: 600; }
.contact-quick a:hover { color: var(--accent); }

.quote-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy-800);
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d7dde3;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy-900);
  background: var(--white);
  transition: border-color 0.15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; }

.field-error {
  display: none;
  color: #c0392b;
  font-size: 0.8rem;
  margin-top: 5px;
}
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: #c0392b;
}
.form-field.invalid .field-error { display: block; }

.form-note { font-size: 0.78rem; color: var(--slate-400); margin-top: 14px; text-align: center; }

/* ---------- Contact strip ---------- */
.contact-strip { background: var(--navy-800); color: var(--white); padding: 40px 0; }
.contact-strip-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.contact-strip h3 { color: var(--white); font-size: 1rem; margin-bottom: 8px; }
.contact-strip p { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.8); padding: 48px 0 0; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand { font-family: var(--font-head); font-weight: 700; color: var(--white); }
.footer-brand p { font-family: var(--font-body); font-weight: 400; color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-top: 8px; }

.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a:hover { color: var(--accent); }


.footer-bottom {
  padding: 20px 24px;
  font-size: 0.8rem;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,32,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 800px); max-height: 75vh; border-radius: 8px; }
.lightbox-caption { color: var(--white); margin-top: 16px; text-align: center; }
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--success);
  color: var(--white);
  padding: 16px 28px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-weight: 600;
  z-index: 1100;
  transition: transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services-grid,
  .gallery-grid,
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner,
  .quote-inner { grid-template-columns: 1fr; }
  .contact-strip-inner { grid-template-columns: 1fr; text-align: center; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .phone-link { display: none; }
  .nav-cta { display: none; }
  .services-grid,
  .gallery-grid,
  .testimonial-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 560px; }
}
