:root {
  --bg: #0c1220;
  --bg-alt: #111a2b;
  --text: #e7edf7;
  --muted: #9fb0cb;
  --accent: #2ec4ff;
  --accent-dark: #1c96c7;
  --card: #141f34;
  --border: #213250;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0a101b 0%, #0c1220 100%);
  line-height: 1.6;
}

/* Hero band — min height improves mobile LCP stability */
.hero {
  min-height: 60vh;
  padding: 110px 0 90px;
  border-bottom: 1px solid var(--border);
}

/* Above-the-fold hero: visible immediately (no JS wait for fade-in) */
.hero.section.fade-in,
.hero.section.fade-in-left {
  opacity: 1;
  transform: none;
}

/* Striped borders only — no background-color here (Unsplash shows through) */
.section-alt {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Roofing photography — desktop/tablet only; mobile uses solid color (see media query) */
.section-bg-roof-1 {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("https://images.unsplash.com/photo-1493832801686-357ba6c950b3?auto=format&fit=crop&w=1200&q=70");
  background-size: cover;
  background-position: center;
}

.section-bg-roof-2 {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1726589004565-bedfba94d3a2?auto=format&fit=crop&w=1200&q=70");
  background-size: cover;
  background-position: center;
}

.section-bg-roof-3 {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1755779233161-f1de807d17a8?auto=format&fit=crop&w=1200&q=70");
  background-size: cover;
  background-position: center;
}

.section-bg-roof-4 {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1686227829172-608dde465459?auto=format&fit=crop&w=1200&q=70");
  background-size: cover;
  background-position: center;
}

.section-bg-roof-5 {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1605450099279-533bd3ce379a?auto=format&fit=crop&w=1200&q=70");
  background-size: cover;
  background-position: center;
}

[class*="section-bg-roof"] h1,
[class*="section-bg-roof"] h2,
[class*="section-bg-roof"] h3 {
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

[class*="section-bg-roof"] .eyebrow {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

[class*="section-bg-roof"] p a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.container.contact-narrow {
  max-width: 560px;
}

.thanks-wrap {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.thanks-wrap h1 {
  margin-bottom: 1rem;
  color: var(--text);
}

.thanks-wrap p {
  max-width: 420px;
  margin-bottom: 1.5rem;
}

section {
  padding: 80px 0;
}

.section {
  padding: 80px 0;
}

.hero.section {
  padding: 110px 0 90px;
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 30px;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(8, 13, 22, 0.92);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
}

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

.main-nav a {
  color: var(--muted);
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--text);
}

.hero-content {
  max-width: 820px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
}

.subheadline {
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
}

.hero .subheadline {
  color: rgba(231, 237, 247, 0.96);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 1px solid transparent;
  background: var(--accent);
  color: #04111a;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  background: #5dd5ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(46, 196, 255, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: rgba(46, 196, 255, 0.14);
}

.btn-small {
  padding: 10px 16px;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}

.card-soft {
  background: rgba(20, 31, 52, 0.72);
}

.city-link {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 90px;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.city-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.quote-name {
  color: var(--text);
  font-weight: 600;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: start;
}

.lead-form {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 10px;
}

.lead-form label {
  font-size: 0.94rem;
  color: var(--text);
}

.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  border: 1px solid #2a3a5a;
  border-radius: 10px;
  padding: 11px 12px;
  background: #0f1829;
  color: var(--text);
  font: inherit;
}

.lead-form textarea {
  min-height: 120px;
  resize: vertical;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: 2px solid rgba(46, 196, 255, 0.28);
  border-color: var(--accent);
}

.hidden-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #09101b;
}

.footer-wrap {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-wrap p {
  margin: 0;
}

.mobile-call {
  display: none;
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  text-align: center;
  background: var(--accent);
  color: #04111a;
  font-weight: 800;
  padding: 14px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(46, 196, 255, 0.25);
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal — left slide, toggles on scroll up/down */
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-left {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile: no hero background images — fastest LCP; lighter UI */
@media (max-width: 768px) {
  body {
    background: #0c1220;
  }

  .section-bg-roof-1,
  .section-bg-roof-2,
  .section-bg-roof-3,
  .section-bg-roof-4,
  .section-bg-roof-5 {
    background: #0b1220 !important;
  }

  [class*="section-bg-roof"] h1,
  [class*="section-bg-roof"] h2,
  [class*="section-bg-roof"] h3 {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  }

  [class*="section-bg-roof"] .eyebrow {
    text-shadow: none;
  }

  .hero .subheadline {
    text-shadow: none;
  }

  .site-header {
    backdrop-filter: none;
    background: rgba(8, 13, 22, 0.98);
  }

  .btn {
    box-shadow: none;
  }

  .btn:hover {
    box-shadow: none;
  }

  .mobile-call {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .main-nav {
    display: none;
  }

  .btn-small {
    display: none;
  }

  .section,
  section {
    padding: 72px 0;
  }

  .hero.section {
    padding: 96px 0 80px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .mobile-call {
    display: inline-flex;
    justify-content: center;
    padding: 14px;
    font-size: 1.04rem;
    font-weight: 800;
    width: calc(100% - 28px);
    max-width: 100%;
  }

  .hero-cta .btn,
  .lead-form .btn,
  .thanks-wrap .btn,
  .card .btn {
    width: 100%;
    max-width: 100%;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
