/* ============================================================
   Eagle Bridge Builder, LLC — Design System
   Palette derived from the logo: deep navy, flag red, gold,
   off-white, steel blue.
   ============================================================ */

:root {
  --navy: #1B3A5C;
  --navy-dark: #12283F;
  --red: #B22A2E;
  --red-dark: #8E2124;
  --gold: #E8A33D;
  --steel: #A8C3D9;
  --off-white: #F7F5F0;
  --white: #FFFFFF;
  --ink: #22303C;
  --ink-soft: #55636F;
  --line: #DDD8CE;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --shadow: 0 2px 12px rgba(18, 40, 63, 0.10);
  --shadow-lg: 0 8px 28px rgba(18, 40, 63, 0.16);
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  font-size: 16px;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-call { background: var(--navy); color: var(--white); padding: 10px 16px; font-size: 14px; white-space: nowrap; }
.btn-call:hover { background: var(--navy-dark); }

/* ---------- 1. Emergency strip ---------- */
.emergency-strip {
  background: var(--red);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  flex-wrap: wrap;
  text-align: center;
}
.emergency-call {
  color: var(--white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- 2. Sticky nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { height: 46px; width: 46px; object-fit: contain; }
.nav-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nav-name-accent { color: var(--red); }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--red); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 24px; height: 3px; background: var(--navy); border-radius: 2px; }

/* ---------- 3. Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(18, 40, 63, 0.88), rgba(27, 58, 92, 0.82)),
    /* Hero image placeholder: replace the SVG below with a real
       job-site photo, e.g. url("../assets/hero.jpg") */
    url("../assets/portfolio/placeholder-hero.svg") center / cover no-repeat,
    var(--navy);
  color: var(--white);
  padding: 72px 0 84px;
  text-align: center;
}
.hero-logo { height: 170px; width: 170px; object-fit: contain; margin: 0 auto 24px; border-radius: 50%; background: var(--white); padding: 6px; box-shadow: var(--shadow-lg); }
.hero h1 {
  color: var(--white);
  font-size: clamp(30px, 5vw, 52px);
  max-width: 800px;
  margin: 0 auto 16px;
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--steel);
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-secondary { color: var(--white); border-color: var(--white); }
.hero .btn-secondary:hover { background: var(--white); color: var(--navy); }

/* ---------- 4. Trust bar ---------- */
.trust-bar { background: var(--navy-dark); color: var(--white); padding: 18px 0; }
.trust-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.trust-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}
.trust-item span { font-size: 13px; color: var(--steel); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-title { font-size: clamp(26px, 3.6vw, 38px); text-align: center; }
.section-lede { text-align: center; color: var(--ink-soft); max-width: 620px; margin: 0 auto 40px; }

/* ---------- 5. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
}
.section-alt .service-card { background: var(--off-white); }
.service-icon {
  width: 46px; height: 46px;
  color: var(--navy);
  margin-bottom: 14px;
}
.service-card h3 { font-size: 19px; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- 6. Portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 34px;
}
.portfolio-card {
  background: var(--off-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.portfolio-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.portfolio-card figcaption { padding: 14px 18px; }
.portfolio-card figcaption strong { font-family: var(--font-head); color: var(--navy); text-transform: uppercase; font-size: 15px; letter-spacing: 0.03em; display: block; }
.portfolio-card figcaption span { font-size: 14px; color: var(--ink-soft); }

/* Before/After slider */
.before-after-wrap { display: grid; gap: 26px; max-width: 780px; margin: 0 auto; }
.ba-slider { position: relative; }
.ba-title {
  text-align: center;
  font-family: var(--font-head);
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  font-weight: 600;
}
.ba-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
}
.ba-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-after-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
  /* width controlled by JS via --ba-pos */
  clip-path: inset(0 0 0 var(--ba-pos, 50%));
}
.ba-handle-line {
  position: absolute; top: 0; bottom: 0;
  left: var(--ba-pos, 50%);
  width: 3px;
  background: var(--white);
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
  pointer-events: none;
}
.ba-handle-line::after {
  content: "◀ ▶";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: var(--navy);
  font-size: 11px;
  padding: 7px 9px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.ba-range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}
.ba-label {
  position: absolute;
  top: 12px;
  background: rgba(18, 40, 63, 0.82);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  pointer-events: none;
}
.ba-label-before { left: 12px; }
.ba-label-after { right: 12px; }

/* ---------- 7. About ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 44px;
  align-items: center;
}
.about-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}
.about-copy .section-title { text-align: left; }
.about-copy p { color: var(--ink-soft); margin: 0 0 16px; }

/* ---------- 8. Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testimonial-card {
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.testimonial-card blockquote { margin: 0 0 16px; font-size: 15px; color: var(--ink); flex: 1; }
.testimonial-card blockquote::before { content: "\201C"; color: var(--gold); font-size: 34px; font-family: Georgia, serif; line-height: 0; vertical-align: -10px; margin-right: 4px; }
.testimonial-meta strong { color: var(--navy); display: block; font-size: 14px; }
.testimonial-meta span { font-size: 13px; color: var(--ink-soft); }
.reviews-link-wrap { text-align: center; margin-top: 30px; }

/* ---------- 9. Intake form ---------- */
.section-cta { background: var(--navy); }
.section-cta .section-title { color: var(--white); }
.section-cta .section-lede { color: var(--steel); }
.intake-form, #airtableEmbed, .form-fallback {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
#airtableEmbed iframe { width: 100%; height: 900px; border: none; border-radius: var(--radius); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.intake-form label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 16px;
}
.intake-form input,
.intake-form select,
.intake-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--off-white);
  color: var(--ink);
}
.intake-form input:focus,
.intake-form select:focus,
.intake-form textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.intake-form .invalid { border-color: var(--red); }
.form-error { color: var(--red); font-weight: 600; font-size: 14px; }
.form-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.form-fallback { text-align: center; }
.form-fallback h3 { font-size: 22px; }

/* ---------- 10. FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--red); font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--ink-soft); }

/* ---------- 11. Service area ---------- */
.towns-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.towns-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
}

/* ---------- 12. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  border-top: 4px solid var(--navy);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 18px; }
.contact-big {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--red);
  text-decoration: none;
  margin-bottom: 8px;
  word-break: break-word;
  cursor: pointer;
}
.contact-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 4px; }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--navy-dark); color: var(--steel); padding: 48px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-logo { height: 62px; width: 62px; object-fit: contain; background: var(--white); border-radius: 50%; padding: 3px; }
.footer-brand strong { color: var(--white); }
.footer-brand p { margin: 0; font-size: 14px; line-height: 1.7; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--steel); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 14px; align-items: flex-start; }
.footer-social a { color: var(--steel); font-size: 14px; text-decoration: none; border: 1px solid var(--steel); border-radius: 999px; padding: 6px 16px; }
.footer-social a:hover { color: var(--gold); border-color: var(--gold); }
.footer-legal { border-top: 1px solid rgba(168, 195, 217, 0.25); padding: 18px 20px; text-align: center; }
.footer-legal p { margin: 0; font-size: 13px; }

/* ============================================================
   Mobile (most GC leads come from phones)
   ============================================================ */
@media (max-width: 900px) {
  .services-grid, .testimonials-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: 14px; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 340px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .nav-name { font-size: 16px; }
  .btn-call span { display: none; }          /* icon-only call button on small screens */
  .btn-call { padding: 12px; }
  .services-grid, .testimonials-grid, .contact-grid, .portfolio-grid, .form-row { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 52px 0 60px; }
  .hero-logo { height: 130px; width: 130px; }
  .intake-form, .form-fallback { padding: 22px 18px; }
}
