:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #334155;
  --brand: #0b5ed7;
  --brand-dark: #0a4cb0;
  --accent: #deebff;
  --card: #ffffff;
  --line: #d1dced;
  --dark: #0b1220;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  top: 0;
}

.topbar {
  background: #081229;
  color: #dbeafe;
  font-size: 0.9rem;
  border-bottom: 1px solid #1f2f4d;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.topbar a {
  color: #dbeafe;
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(7px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  color: var(--brand);
  font-size: 2rem;
  line-height: 1;
}

.brand-title {
  margin: 0;
  font-weight: 700;
}

.brand-subtitle {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.15rem;
}

.nav-list a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover {
  color: var(--brand-dark);
}

.nav-list a.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.btn {
  display: inline-block;
  border-radius: 0.6rem;
  padding: 0.7rem 1rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-outline {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.btn-dark {
  background: var(--dark);
  color: #fff;
}

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-bg {
  position: relative;
  min-height: 620px;
  padding: 5.5rem 0 4rem;
  background:
    linear-gradient(105deg, rgba(7, 18, 37, 0.72), rgba(7, 18, 37, 0.36)),
    url("assets/images/roof-placeholder.jpg") center/cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 34px;
  background: linear-gradient(to right bottom, rgba(255, 255, 255, 0) 49%, var(--bg) 50%);
  pointer-events: none;
}

.hero-panel {
  max-width: 700px;
  background: rgba(248, 252, 255, 0.9);
  border: 1px solid rgba(219, 234, 254, 0.9);
  border-radius: 0.9rem;
  padding: 1.4rem 1.3rem;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.hero-panel h1 {
  margin-bottom: 0.75rem;
}

.hero-badges {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-badges span {
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 24ch;
}

.hero-image {
  width: 100%;
  border-radius: 1rem;
  min-height: 360px;
  object-fit: cover;
  background: linear-gradient(135deg, #d7e4ff, #eef4ff);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.25rem 0;
}

.trust-list {
  display: grid;
  gap: 0.4rem;
  padding-left: 1.1rem;
}

.trust-list.compact {
  margin: 0;
}

.section {
  padding: 3.4rem 0;
  scroll-margin-top: 6.25rem;
}

.section-muted {
  background: #eff4fb;
}

.section-accent-break {
  background:
    linear-gradient(180deg, #f5f9ff, #ebf2fc),
    radial-gradient(920px 180px at 84% 0, rgba(11, 94, 215, 0.08), transparent 60%);
}

.section-accent {
  background: var(--accent);
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.cta-band {
  background: #0b5ed7;
  color: #fff;
  padding: 1.15rem 0;
}

.cta-band-dark {
  background: #0d1b35;
}

.inline-cta {
  background: #eef4fb;
  border-top: 1px solid #d5dfef;
  border-bottom: 1px solid #d5dfef;
}

.cta-band-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-band h3 {
  margin: 0;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.rating-score {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  color: var(--brand);
}

.rating-label {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.testimonial-grid,
.service-grid,
.badge-grid,
.footer-grid {
  display: grid;
  gap: 1rem;
}

.testimonial-grid,
.service-grid,
.badge-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 1rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.services-layout {
  display: grid;
  gap: 1rem;
}

.service-featured {
  padding: 1.2rem;
  border-color: #9ec2f4;
  background: linear-gradient(170deg, #ffffff, #f3f8ff);
  box-shadow: 0 14px 28px rgba(11, 94, 215, 0.12);
}

.services-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.author {
  font-weight: 700;
  margin-bottom: 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.2rem;
  align-items: stretch;
}

.form {
  display: grid;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bec9db;
  border-radius: 0.5rem;
  padding: 0.72rem;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.estimate-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.estimate-copy {
  display: grid;
  align-content: center;
  padding: 0.3rem 0;
}

.estimate-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  align-content: start;
}

.helper-text {
  margin: 0;
  grid-column: span 2;
  color: var(--muted);
  font-size: 0.92rem;
}

.estimate-form textarea,
.estimate-form .helper-text,
.estimate-form .btn {
  grid-column: span 2;
}

.estimate-form .btn {
  width: 100%;
}

.site-footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 2.2rem 0 0;
  border-top: 1px solid #25344f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.site-footer a {
  color: #93c5fd;
}

.footer-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-bottom: 1.2rem;
}

.footer-bottom {
  margin-top: 0.6rem;
  border-top: 1px solid #283850;
  background: #0b1220;
}

.footer-bottom p {
  margin: 0;
  padding: 0.75rem 0;
  color: #cfe1fb;
  font-size: 0.92rem;
}

.process-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.compact-form {
  gap: 0.85rem;
}

.emergency-hero {
  padding: 2.8rem 0 2.1rem;
  background:
    linear-gradient(180deg, #edf3fb 0%, #f6f9fe 58%, #eff4fb 100%);
}

.emergency-hero h1 {
  font-weight: 820;
}

.emergency-call-btn {
  padding: 0.84rem 1.2rem;
  font-size: 1.02rem;
}

.emergency-steps-section {
  padding-top: 3rem;
  padding-bottom: 3.25rem;
}

.emergency-steps {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.emergency-steps article {
  padding: 1.2rem 1rem 1.15rem;
  background: transparent;
  border-right: 1px solid var(--line);
}

.emergency-steps article:last-child {
  border-right: 0;
}

.step-number {
  width: 2rem;
  height: 2rem;
  margin: 0 0 0.65rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  color: #1e3a8a;
  background: #e7f0ff;
  border: 1px solid #bfd3f6;
}

.emergency-trust-card {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.rating-stars {
  margin: 0;
  letter-spacing: 0.16em;
  color: #f59e0b;
  font-size: 1.02rem;
}

.emergency-quote {
  margin-top: 0.5rem;
  color: #1f2937;
  font-weight: 500;
}

.finance-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
  align-items: stretch;
}

.finance-feature {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1.2rem 1.1rem;
  border-color: #b8ceec;
}

.finance-feature h2 {
  max-width: 28ch;
}

.muted-copy {
  color: #334155;
  margin-bottom: 0;
}

.finance-support-grid {
  display: grid;
  gap: 1rem;
}

.finance-support-grid .card {
  padding: 1rem;
}

.finance-process {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.finance-process article {
  padding: 1.15rem 1rem;
  border-right: 1px solid var(--line);
}

.finance-process article:last-child {
  border-right: 0;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
}

.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.7rem 0.8rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 0.55rem 0 0;
  color: #334155;
}

.why-points {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.why-points article {
  padding: 1rem 0.9rem;
  border-right: 1px solid var(--line);
}

.why-points article:last-child {
  border-right: 0;
}

.resource-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
}

.resource-columns article {
  padding: 0.95rem 0.95rem 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
}

.link-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.city-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.city-links a {
  padding: 0.5rem 0.75rem;
  border: 1px solid #b7c9e6;
  border-radius: 0.6rem;
  background: #f7fbff;
  color: #0b3f94;
  font-weight: 700;
}

.city-links a:hover {
  background: #ebf3ff;
}

.roof-transformations .section-intro {
  max-width: 74ch;
}

.transformations-support {
  margin: 0 0 0.35rem;
  color: #475569;
  font-size: 0.94rem;
  font-weight: 600;
}

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

.compare-card {
  margin: 0;
}

.compare-slider {
  position: relative;
  border: 1px solid #d6e1f2;
  border-radius: 0.55rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #eaf1fb;
  touch-action: none;
}

.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  overflow: hidden;
  transition: width 180ms ease-out;
}

.compare-card.is-dragging .compare-after {
  transition: none;
}

.compare-divider {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(15, 23, 42, 0.26);
  transform: translateX(-50%);
  z-index: 2;
  transition: left 180ms ease-out;
}

.compare-card.is-dragging .compare-divider {
  transition: none;
}

.compare-label {
  position: absolute;
  top: 0.5rem;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(199, 214, 234, 0.9);
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
}

.compare-label-before {
  left: 0.5rem;
}

.compare-label-after {
  right: 0.5rem;
}

.compare-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--brand);
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  cursor: ew-resize;
  transition: left 180ms ease-out;
}

.compare-handle::before,
.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.3rem;
  height: 0.12rem;
  background: #fff;
  transform: translateY(-50%);
}

.compare-handle::before {
  left: 0.28rem;
}

.compare-handle::after {
  right: 0.28rem;
}

.compare-card.is-dragging .compare-handle {
  transition: none;
}

.compare-card figcaption {
  margin-top: 0.6rem;
  color: #334155;
  font-weight: 700;
  font-size: 0.94rem;
}

.google-reviews h2 {
  margin-bottom: 1rem;
}

.google-rating-head {
  margin-bottom: 1rem;
}

.google-rating-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.google-rating-score {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  color: #0b3f94;
}

.google-rating-label {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #c4d6f2;
  background: #f3f8ff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.google-stars {
  margin: 0.25rem 0 0.2rem;
  color: var(--brand);
  letter-spacing: 0.18em;
  font-size: 1.05rem;
}

.google-rating-meta {
  margin: 0;
  color: #334155;
  font-weight: 600;
}

.google-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.google-review-card {
  background: #fff;
  border: 1px solid #d9e4f3;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.05);
}

.google-review-card p {
  margin: 0;
}

.google-review-attribution {
  margin-top: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.emergency-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem;
}

.finance-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem;
}

.about-main .section-intro {
  max-width: 72ch;
}

.about-story {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.4rem;
  align-items: start;
}

.about-story-points {
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem;
}

.about-story-points h3 {
  margin-bottom: 0.5rem;
}

.about-standards {
  margin-top: 1.5rem;
  border: 1px solid #d9e3f1;
  border-radius: 0.8rem;
  padding: 1.15rem;
}

.about-standards h2 {
  margin-bottom: 0.85rem;
}

.about-standards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-standards-grid article {
  padding: 1rem 0.9rem 0.95rem;
  border-right: 1px solid var(--line);
}

.about-standards-grid article:last-child {
  border-right: 0;
}

.about-local {
  margin-top: 1.5rem;
  padding: 1.2rem 0;
}

.about-local p {
  margin: 0;
  max-width: 82ch;
  color: #1f2937;
}

.about-cta {
  margin-top: 1.45rem;
  background: linear-gradient(180deg, #eef4fb, #e8f0fb);
  border: 1px solid #d4e0f2;
  border-radius: 0.8rem;
  padding: 1rem 1.1rem;
}

@media (max-width: 900px) {
  .nav-list {
    display: none;
  }

  .hero-grid,
  .two-col,
  .estimate-content,
  .estimate-form,
  .cta-band-content,
  .process-row {
    grid-template-columns: 1fr;
  }

  .hero-bg {
    min-height: 560px;
    padding-top: 4.3rem;
  }

  .hero-panel {
    padding: 1.05rem;
  }

  .services-secondary {
    grid-template-columns: 1fr;
  }

  .finance-layout {
    grid-template-columns: 1fr;
  }

  .why-points {
    grid-template-columns: 1fr;
    border-top: 0;
    border-bottom: 0;
  }

  .why-points article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.9rem 0;
  }

  .why-points article:last-child {
    border-bottom: 0;
  }

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

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

  .compare-handle {
    width: 1.75rem;
    height: 1.75rem;
  }

  .google-review-grid {
    grid-template-columns: 1fr;
  }

  .about-story {
    grid-template-columns: 1fr;
  }

  .about-standards-grid {
    grid-template-columns: 1fr;
    border-top: 0;
    border-bottom: 0;
  }

  .about-standards-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.95rem 0;
  }

  .about-standards-grid article:last-child {
    border-bottom: 0;
  }

  .emergency-steps,
  .finance-process {
    border-top: 0;
    border-bottom: 0;
  }

  .emergency-steps article,
  .finance-process article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.95rem 0;
  }

  .emergency-steps article:last-child,
  .finance-process article:last-child {
    border-bottom: 0;
  }

  .cta-band-content {
    display: grid;
  }

  .estimate-form textarea,
  .estimate-form .helper-text,
  .estimate-form .btn {
    grid-column: auto;
  }

  .topbar-content {
    flex-direction: column;
    gap: 0.2rem;
  }
}
