:root {
  --red: #94181d;
  --red-dark: #5f0f14;
  --gold: #f4aa31;
  --ink: #172026;
  --slate: #41525e;
  --mist: #eef3f4;
  --paper: #fffaf0;
  --green: #526f5a;
  --line: rgba(23, 32, 38, 0.14);
  --shadow: 0 18px 48px rgba(23, 32, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 300px;
}

.brand img {
  width: 118px;
  height: auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.06rem;
  letter-spacing: 0;
}

.brand small {
  color: var(--slate);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  color: var(--slate);
  font-weight: 700;
  font-size: 0.92rem;
}

.main-nav a,
.header-cta,
.button,
.contact-options a {
  text-decoration: none;
}

.header-cta,
.button,
.lead-form button {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}

.header-cta {
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(22, 12, 11, 0.9), rgba(31, 41, 45, 0.62) 46%, rgba(31, 41, 45, 0.18)),
    linear-gradient(0deg, rgba(23, 32, 38, 0.88), rgba(23, 32, 38, 0) 46%);
}

.hero-content {
  position: relative;
  width: min(820px, calc(100% - 36px));
  margin: 0 clamp(18px, 7vw, 96px) 108px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 5vw, 5.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2rem, 3.2vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button.secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 70px);
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  width: min(720px, calc(100% - 36px));
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-panel div {
  padding: 20px;
  border-left: 1px solid var(--line);
}

.hero-panel div:first-child {
  border-left: 0;
}

.hero-panel span {
  display: block;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.intro,
.standards-band,
.systems,
.history,
.joe-section,
.future-section,
.contact {
  padding: clamp(58px, 8vw, 110px) clamp(18px, 5vw, 72px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background: var(--paper);
}

.intro > p {
  max-width: 720px;
  font-size: 1.15rem;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 38px;
}

.standards-band {
  background: var(--ink);
  color: #fff;
}

.standards-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.standards-grid article {
  min-height: 260px;
  padding: 28px;
  background: #202c33;
}

.number {
  display: block;
  margin-bottom: 34px;
  color: var(--gold);
  font-weight: 900;
}

.standards-grid p,
.system-card p,
.joe-list p,
.contact-copy p,
.site-footer p {
  color: var(--slate);
}

.standards-grid p {
  color: rgba(255, 255, 255, 0.74);
}

.systems {
  background: #f5f8f8;
}

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

.system-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 26px;
  background: #fff;
}

.system-card.feature {
  grid-column: span 2;
  background: var(--green);
  color: #fff;
}

.system-card.feature p {
  color: rgba(255, 255, 255, 0.82);
}

.resource-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: auto;
  color: var(--red);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

.text-link {
  display: inline-flex;
  margin: 4px 0 18px;
  color: var(--red);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

.system-card.feature .resource-link {
  color: #fff;
}

.history {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
  background: #fff;
}

.history img {
  width: 100%;
  min-height: 520px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.timeline {
  display: grid;
  gap: 1px;
  margin-top: 32px;
  border: 1px solid var(--line);
  background: var(--line);
}

.timeline div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 16px;
  background: #fff;
}

.timeline strong {
  color: var(--red);
}

.joe-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background: var(--mist);
}

.joe-list {
  display: grid;
  gap: 18px;
}

.joe-list p {
  margin: 0;
  padding: 22px;
  background: #fff;
  border-left: 5px solid var(--gold);
}

.future-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background: #fff;
}

.future-links {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.future-links a {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: var(--mist);
  text-decoration: none;
}

.future-links strong {
  color: var(--red);
}

.future-links span {
  color: var(--slate);
}

.contact {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 80px);
  background: var(--red-dark);
  color: #fff;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.8);
}

.contact-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.contact-options a {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #fff;
  font-weight: 800;
}

.lead-form {
  display: grid;
  gap: 15px;
  padding: 28px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.lead-form label {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.lead-form textarea {
  resize: vertical;
}

.lead-form button {
  margin-top: 4px;
  width: 100%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: #10171b;
  color: #fff;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span,
.site-footer p {
  font-size: 0.9rem;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
}

.site-footer a {
  color: #fff;
}

.subpage-hero {
  padding: clamp(70px, 10vw, 132px) clamp(18px, 5vw, 72px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(23, 32, 38, 0.92), rgba(95, 15, 20, 0.76)),
    url("assets/roof-hero.jpg") center/cover;
}

.subpage-hero h1 {
  max-width: 980px;
}

.subpage-hero p:not(.section-kicker) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.content-page {
  padding: clamp(54px, 7vw, 96px) clamp(18px, 5vw, 72px);
  background: #fff;
}

.content-page article {
  max-width: 920px;
}

.content-page p {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-content {
    margin-bottom: 188px;
  }

  .hero-panel {
    left: 18px;
    right: 18px;
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    padding: 14px 18px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .hero-panel div:first-child {
    border-top: 0;
  }

  .intro,
  .history,
  .joe-section,
  .future-section,
  .contact {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .site-header {
    position: static;
    gap: 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 88px;
  }

  .header-cta {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    margin: 0 18px 210px;
  }

  .hero-actions,
  .contact-options {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .contact-options a {
    text-align: center;
  }

  .standards-grid,
  .system-grid {
    grid-template-columns: 1fr;
  }

  .system-card.feature {
    grid-column: auto;
  }

  .history img {
    min-height: 320px;
  }

  .timeline div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    display: grid;
  }
}
