:root {
  --black: #090b0f;
  --ink: #121720;
  --blue: #245da8;
  --blue-deep: #061835;
  --blue-bright: #58a6ff;
  --blue-soft: #e8f0fb;
  --paper: #f4f6f8;
  --white: #fff;
  --muted: #657281;
  --line: #d7dde5;
  --shadow: rgba(6, 24, 53, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(36, 93, 168, .16), rgba(36, 93, 168, 0) 430px), var(--paper);
}

a { color: inherit; }

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  color: #d7e4f7;
  background: linear-gradient(90deg, var(--black), var(--blue-deep));
}

.topbar .wrap,
.nav .wrap,
.hero .wrap,
.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar .wrap {
  min-height: 42px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(36, 93, 168, .24);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(9, 11, 15, .06);
}

.nav .wrap { min-height: 76px; }

.brand img {
  display: block;
  width: 168px;
  height: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 27px 13px;
  color: #283442;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 1px solid var(--blue);
  padding: 15px 20px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  background: var(--blue);
  transition: transform .18s ease, background .18s ease;
}

.button:hover {
  background: var(--blue-deep);
  transform: translateY(-2px);
}

.button.secondary {
  border-color: rgba(255, 255, 255, .7);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--blue-deep);
}

.hero-slideshow,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slideshow {
  overflow: hidden;
  z-index: 0;
}

.hero-slide {
  opacity: 0;
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  animation: heroSlideShow 24s infinite;
  transform: scale(1.04);
}

.slide-luxury-home {
  background-image: url("assets/hero-metal-roof-luxury-home.png");
  animation-delay: 0s;
}

.slide-commercial {
  background-image: url("assets/hero-metal-roof-commercial.png");
  animation-delay: 8s;
}

.slide-ranch {
  background-image: url("assets/hero-metal-roof-ranch.png");
  animation-delay: 16s;
}

@keyframes heroSlideShow {
  0% { opacity: 0; transform: scale(1.04); }
  8% { opacity: 1; }
  33% { opacity: 1; transform: scale(1.1) translate3d(-16px, -7px, 0); }
  41% { opacity: 0; }
  100% { opacity: 0; transform: scale(1.04); }
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 66% 35%, rgba(88, 166, 255, .28), rgba(88, 166, 255, 0) 26%),
    linear-gradient(108deg, rgba(4, 12, 31, .99), rgba(6, 24, 53, .91) 43%, rgba(36, 93, 168, .42));
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(118deg, transparent 0 56%, rgba(88, 166, 255, .38) 56.1% 57%, transparent 57.1%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 92px),
    linear-gradient(90deg, rgba(4, 12, 31, .22), rgba(4, 12, 31, 0) 58%);
  pointer-events: none;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    animation: none;
    opacity: 0;
  }

  .slide-luxury-home { opacity: 1; }
}

.hero .wrap {
  position: relative;
  z-index: 3;
  align-items: stretch;
  min-height: 690px;
  padding: 88px 0 108px;
}

.hero-copy {
  display: grid;
  align-content: center;
  max-width: 750px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: #dbe8fb;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 42px;
  height: 1px;
  content: "";
  background: var(--blue-bright);
}

h1 {
  max-width: 800px;
  margin: 0 0 20px;
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 750;
  line-height: 1.01;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  text-transform: uppercase;
}

.intro {
  max-width: 660px;
  margin: 0;
  color: #dbe8fb;
  font-size: 18px;
  line-height: 1.72;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-panel {
  align-self: end;
  width: min(380px, 34vw);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)), rgba(4, 12, 31, .78);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .24);
}

.hero-panel img {
  display: block;
  width: min(100%, 280px);
  margin-bottom: 22px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .28));
}

.hero-panel h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: 0; }
.hero-panel p { margin: 0; color: #d7e2f2; line-height: 1.65; }

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 650px;
}

.metric {
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 14px;
  background: rgba(255, 255, 255, .08);
}

.metric strong { display: block; color: #fff; font-size: 24px; line-height: 1; }
.metric span {
  display: block;
  margin-top: 8px;
  color: #cbd7e7;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.quick-strip {
  position: relative;
  z-index: 2;
  margin-top: -42px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(36, 93, 168, .08), rgba(255, 255, 255, 0)), var(--white);
  box-shadow: 0 14px 34px var(--shadow);
}

.quick-card {
  min-height: 136px;
  border-right: 1px solid var(--line);
  padding: 24px;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.quick-card:last-child { border-right: 0; }
.quick-card span {
  display: block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.quick-card strong { display: block; font-size: 19px; letter-spacing: 0; }
.quick-card:hover { color: #fff; background: var(--blue); transform: translateY(-4px); }
.quick-card:hover span { color: #fff; }

.section { padding: 72px 0; }

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 78% 28%, rgba(88, 166, 255, .28), transparent 28%),
    linear-gradient(110deg, var(--black), var(--blue-deep) 78%, var(--blue));
}

.page-hero .wrap {
  padding: 84px 0;
}

.page-hero h1 {
  max-width: 880px;
}

.page-hero p {
  max-width: 720px;
  color: #dbe8fb;
  font-size: 18px;
  line-height: 1.7;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading.centered-heading {
  display: block;
  text-align: center;
}

.section-heading.centered-heading h2 {
  max-width: 980px;
  margin: 0 auto;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.why-grid {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(420px, 1.18fr);
  gap: 18px;
}

.dark-panel,
.surface-panel,
.product-card,
.quote-form,
.estimate-panel {
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px var(--shadow);
}

.dark-panel {
  padding: 34px;
  color: #fff;
  background: linear-gradient(145deg, rgba(9, 11, 15, .98), rgba(6, 24, 53, .96)), var(--blue-deep);
}

.dark-panel h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.dark-panel p { color: #d7dfeb; line-height: 1.72; }
.surface-panel { padding: 30px; background: var(--white); }

.proof-grid,
.commitment-grid,
.product-grid,
.industry-grid {
  display: grid;
  gap: 14px;
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.proof-card,
.commitment-card,
.industry-card {
  border: 1px solid var(--line);
  padding: 22px;
  background: var(--paper);
}

.proof-card span,
.product-card span {
  display: block;
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.proof-card p,
.product-card p,
.industry-card p { color: var(--muted); line-height: 1.62; }

.blue-band {
  color: #fff;
  background: linear-gradient(110deg, rgba(9, 11, 15, .98), rgba(6, 24, 53, .94) 70%, rgba(36, 93, 168, .96)),
    url("assets/hero-home.png") center / cover no-repeat;
}

.blue-band .section-heading p { color: #cbd7e7; }
.commitment-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.commitment-card {
  min-height: 210px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.commitment-card h3 { margin: 0 0 12px; color: #fff; }
.commitment-card p { color: #d7dfeb; line-height: 1.62; }

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

.product-card {
  min-height: 238px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(36, 93, 168, .08), rgba(255, 255, 255, 0)), var(--white);
  transition: transform .18s ease, border-color .18s ease;
}

.product-card:hover { border-color: var(--blue); transform: translateY(-4px); }
.industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.industry-card { min-height: 184px; background: var(--white); }

.estimates-section {
  color: #fff;
  background: radial-gradient(circle at 28% 26%, rgba(88, 166, 255, .22), rgba(88, 166, 255, 0) 28%),
    linear-gradient(110deg, var(--black), var(--blue-deep) 74%, var(--blue));
}

.estimates-section .section-heading p { color: #cbd7e7; }

.estimate-stage {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border: 1px solid rgba(6, 24, 53, .26);
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

.estimate-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(rgba(9, 11, 15, .42) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .55;
  pointer-events: none;
}

#roofCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 640px;
  cursor: grab;
}

#roofCanvas:active { cursor: grabbing; }

.estimate-caption {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  max-width: 380px;
  border: 1px solid rgba(6, 24, 53, .16);
  padding: 16px;
  color: #dbe8fb;
  background: rgba(4, 12, 31, .82);
  backdrop-filter: blur(12px);
}

.estimate-caption strong { display: block; margin-bottom: 6px; color: #fff; }

.takeoff-section {
  background: var(--paper);
}

.takeoff-layout {
  display: grid;
  gap: 22px;
}

.takeoff-grid {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(440px, 1.22fr);
  gap: 22px;
  align-items: stretch;
}

.takeoff-copy {
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  padding: 30px;
  color: #fff;
  background: linear-gradient(140deg, var(--black), var(--blue-deep) 78%, var(--blue));
  box-shadow: 0 18px 42px var(--shadow);
}

.takeoff-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: 0;
}

.takeoff-copy p {
  color: #d7dfeb;
  line-height: 1.7;
}

.estimate-form-section {
  background: linear-gradient(180deg, rgba(36, 93, 168, .1), rgba(255, 255, 255, 0)), var(--paper);
}

.pdf-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 18px 42px var(--shadow);
}

.pdf-panel.wide-preview {
  width: min(1320px, calc(100vw - 28px));
  margin-left: calc(50% - min(660px, calc(50vw - 14px)));
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
  background: linear-gradient(90deg, var(--black), var(--blue-deep));
}

.pdf-toolbar strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pdf-viewer {
  display: block;
  width: 100%;
  min-height: 1380px;
  border: 0;
  background: #dfe6ef;
}

.pdf-viewer.compact {
  min-height: 1680px;
}

.quote-section {
  color: #fff;
  background: radial-gradient(circle at 78% 26%, rgba(88, 166, 255, .26), rgba(88, 166, 255, 0) 28%),
    linear-gradient(110deg, var(--black), var(--blue-deep) 76%, var(--blue));
}

.quote-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(380px, 1.15fr);
  gap: 22px;
  align-items: center;
}

.quote-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0;
}

.quote-copy p { color: #d7dfeb; line-height: 1.7; }

.contact-card {
  margin-top: 24px;
  border-left: 4px solid var(--blue-bright);
  padding: 18px;
  color: var(--ink);
  background: var(--white);
}

.contact-card strong { display: block; margin-bottom: 6px; }

.quote-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 24px;
  background: rgba(255, 255, 255, .96);
}

label {
  display: grid;
  gap: 8px;
  color: #3d4a58;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.wide { grid-column: 1 / -1; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--ink);
  font: inherit;
  background: var(--paper);
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.quote-form button {
  justify-self: start;
  border: 1px solid var(--blue);
  padding: 14px 18px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--blue);
  cursor: pointer;
}

.footer {
  padding: 20px 0;
  color: #d0d7e3;
  background: var(--black);
}

.footer .wrap {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .wrap { width: min(100% - 30px, 1180px); }

  .topbar .wrap,
  .nav .wrap,
  .hero .wrap,
  .footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel { width: 100%; }

  .quick-grid,
  .why-grid,
  .proof-grid,
  .commitment-grid,
  .product-grid,
  .industry-grid,
  .quote-grid {
    display: block;
  }

  .quick-card,
  .proof-card,
  .commitment-card,
  .product-card,
  .industry-card,
  .dark-panel,
  .surface-panel {
    margin-bottom: 16px;
  }

  .quote-form { display: block; }
  .quote-form label { margin-bottom: 12px; }
  .estimate-stage { min-height: 520px; }
  #roofCanvas { height: 520px; }
  .takeoff-grid,
  .takeoff-layout { display: block; }
  .takeoff-copy { margin-bottom: 16px; }
  .pdf-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .pdf-viewer,
  .pdf-viewer.compact { min-height: 1120px; }
}
