/* ==========================================================================
   K-3 Spray Foam Insulation — site styles
   Palette sampled from brand: red #c5322c, charcoal #383838, light #f4f4f3
   Display type: Oswald · Body type: Source Sans 3
   ========================================================================== */

:root {
  --red: #c5322c;
  --red-hover: #a92622;
  --red-bright: #d8382f;
  --black: #000000;
  --near-black: #0d0d0c;
  --charcoal: #383838;
  --light: #f4f4f3;
  --white: #ffffff;
  --ink: #1f1f1f;
  --ink-soft: #3c3c3c;
  --on-dark: #e9e8e6;
  --on-dark-soft: #c9c8c5;
  --line-dark: #232323;
  --line-light: #d8d7d4;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --container: 1180px;
  --radius: 6px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 28px rgba(0, 0, 0, 0.09);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Type ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0 0 0.5em;
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 14px;
}

.section-title {
  font-size: clamp(34px, 4.2vw, 48px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.section-title--red { color: var(--red); text-transform: none; letter-spacing: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 16px 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:active { transform: translateY(1px); }

.btn--red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--red:hover { background: var(--red-hover); border-color: var(--red-hover); }

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--outline-light:hover { background: var(--white); color: var(--near-black); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--black);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.site-header__logo img {
  height: 69px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav a:not(.btn) {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:not(.btn):hover { color: var(--on-dark-soft); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--white); }

.site-nav .btn { padding: 12px 22px; font-size: 13px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--white);
  padding: clamp(72px, 10vw, 130px) 0;
  overflow: hidden;
}

.hero--image {
  background-image:
    linear-gradient(90deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.78) 42%, rgba(20, 20, 20, 0.42) 100%),
    linear-gradient(0deg, rgba(20, 20, 20, 0.55) 0%, rgba(20, 20, 20, 0) 55%),
    url("../images/hero.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.hero__inner { max-width: 760px; }

.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero h1 .accent { color: var(--red-bright); }

.hero p {
  font-size: 19px;
  color: var(--on-dark);
  max-width: 640px;
  margin: 0 0 34px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Generic section spacing ---------- */

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section--light { background: var(--light); }
.section--dark { background: var(--near-black); color: var(--white); }
.section--charcoal { background: var(--charcoal); color: var(--white); }

/* ---------- Service cards (home) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 44px;
}

.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 34px 30px 38px;
}

.card h3 {
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.card p { margin: 0; color: var(--ink-soft); }

/* ---------- Stats bar ---------- */

.stats {
  background: var(--red);
  color: var(--white);
  padding: 44px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  text-align: center;
}

.stat__number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 4.6vw, 58px);
  line-height: 1;
  text-transform: uppercase;
}

.stat__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ---------- Built to Last ---------- */

.built {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}

.built h2 {
  color: var(--red-bright);
  font-size: clamp(34px, 4vw, 44px);
  text-transform: uppercase;
  font-weight: 600;
}

.built p { color: var(--on-dark-soft); margin: 0 0 34px; }

.built__actions { display: flex; flex-direction: column; gap: 14px; max-width: 310px; }
.built__actions .btn { width: 100%; }

.built__collage {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 14px;
}

.built__collage a { overflow: hidden; display: block; }
.built__collage a:first-child { grid-row: span 2; }

.built__collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.built__collage a:hover img { transform: scale(1.04); }

/* ---------- Testimonials ---------- */

.testimonials h2 {
  text-align: center;
  font-size: clamp(32px, 4vw, 44px);
  text-transform: uppercase;
  margin-bottom: 48px;
}

.quote-block {
  display: grid;
  gap: clamp(24px, 3vw, 34px);
}

.quote-panel {
  display: grid;
  gap: clamp(24px, 3vw, 34px);
}

.quote-panel--three { grid-template-columns: repeat(3, 1fr); }

.quote-panel--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}

.quote {
  margin: 0;
  background: var(--light);
  border-radius: 14px;
  padding: clamp(26px, 3vw, 36px);
  display: flex;
  flex-direction: column;
}

.quote p { margin: 0 0 22px; font-size: 17px; }

.quote cite { margin-top: auto; }

.quote cite {
  font-style: normal;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* Red quote variant (contact page) */
.quote--red p, .quote--red cite { color: var(--red); }

/* ---------- Footer CTA / contact ---------- */

.footer-cta {
  background: var(--charcoal);
  color: var(--white);
  padding: clamp(64px, 8vw, 96px) 0 72px;
}

.footer-cta__grid {
  display: grid;
  grid-template-columns: minmax(300px, 460px) 1fr;
  gap: clamp(40px, 7vw, 110px);
}

.footer-cta h2 {
  font-size: clamp(34px, 4vw, 46px);
  margin-bottom: 30px;
}

.contact-block { margin-bottom: 20px; }

.contact-block__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin: 0 0 2px;
}

.contact-block a, .contact-block span {
  color: var(--white);
  text-decoration: none;
  font-size: 17px;
}

.contact-block a:hover { text-decoration: underline; }

.footer-cta__note { color: var(--on-dark-soft); margin: 26px 0 40px; max-width: 400px; }

.footer-links { list-style: none; padding: 0; margin: 0; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover { color: var(--on-dark-soft); }

/* ---------- Forms ---------- */

.form legend {
  font-size: 17px;
  font-weight: 600;
  padding: 0;
  margin-bottom: 6px;
}

.form fieldset { border: 0; padding: 0; margin: 0 0 8px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-field { margin-bottom: 26px; }

.form-field label {
  display: block;
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 10px;
}

.form-field label .req {
  font-weight: 400;
  font-size: 14px;
  opacity: 0.75;
  margin-left: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--on-dark-soft);
  border-radius: 0;
  color: inherit;
  font-family: var(--font-body);
  font-size: 17px;
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-field textarea { min-height: 96px; resize: vertical; }

.form-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }

.form-field.select-wrap { position: relative; }

.form-field.select-wrap::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 22px;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.8;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-bottom-color: var(--red-bright); }

.form-field ::placeholder { color: inherit; opacity: 0.55; }

.form--on-dark select option { color: var(--ink); }

.form__submit { margin-top: 34px; }

/* Light form variant (contact page) */
.form--on-light .form-field input,
.form--on-light .form-field select,
.form--on-light .form-field textarea { border-bottom-color: #7c7b78; }

.form--on-light .form-field input:focus,
.form--on-light .form-field select:focus,
.form--on-light .form-field textarea:focus { border-bottom-color: var(--red); }

/* ---------- Copyright strip ---------- */

.copyright {
  background: var(--black);
  color: #9b9a97;
  text-align: center;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 26px 24px;
}

/* ---------- Services page ---------- */

.services-hero {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.services-hero__media { position: sticky; top: 116px; }

.services-hero__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
}

.services-hero .section-title--red { font-size: clamp(40px, 5vw, 58px); }

.services-hero__intro { max-width: 560px; color: var(--ink-soft); }

/* Accordion */

.accordion { margin-top: 36px; border-top: 1px solid var(--ink); }

.accordion__item { border-bottom: 1px solid var(--ink); }

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: 0;
  padding: 22px 2px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--red);
}

.accordion__icon {
  position: relative;
  flex: 0 0 16px;
  height: 16px;
  color: var(--ink);
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.accordion__icon::before { left: 0; right: 0; top: 7px; height: 2px; }
.accordion__icon::after { top: 0; bottom: 0; left: 7px; width: 2px; }

.accordion__trigger[aria-expanded="true"] .accordion__icon::after { transform: scaleY(0); }

.accordion__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.accordion__body { padding: 6px 2px 34px; max-width: 60ch; }

.accordion__body h4 { font-family: var(--font-body); font-size: 17.5px; margin: 22px 0 8px; }
.accordion__body p { margin: 0 0 14px; color: var(--ink-soft); }
.accordion__body ul { margin: 0 0 18px; padding-left: 22px; color: var(--ink-soft); }
.accordion__body li { margin-bottom: 7px; }
.accordion__body .closing { font-style: italic; color: var(--ink); }

.services-cta { margin-top: 64px; }

.services-cta h2 {
  color: var(--red);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
}

.services-cta p { max-width: 520px; color: var(--ink-soft); }

.services-cta__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }

/* Gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 44px;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #e5e4e2;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-grid a:hover img { transform: scale(1.05); }

/* ---------- Contact page ---------- */

.contact-top {
  display: grid;
  grid-template-columns: minmax(300px, 480px) 1fr;
  gap: clamp(40px, 7vw, 110px);
}

.contact-top .section-title--red { font-size: clamp(40px, 5vw, 56px); }

.contact-top__intro { color: var(--ink-soft); max-width: 400px; }

.contact-divider { border: 0; border-top: 1px solid #cf6b66; margin: 30px 0; }

.contact-top .contact-block__label { color: var(--red); }
.contact-top .contact-block a, .contact-top .contact-block span { color: var(--ink); }

.hours { margin: 0; }
.hours div { display: flex; gap: 26px; }
.hours dt { min-width: 128px; font-weight: 400; }
.hours dd { margin: 0; }

.reply-callout {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 22px 26px;
  margin-top: 40px;
  max-width: 520px;
}

/* Team */

.team h2 {
  text-align: center;
  font-size: clamp(32px, 4vw, 42px);
  text-transform: uppercase;
  margin-bottom: 52px;
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.team-member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.team-member h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 18px 0 4px;
}

.team-member .role {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  margin: 0 0 10px;
}

.team-member a {
  display: block;
  color: var(--white);
  font-size: 14.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.team-member a:hover { color: var(--on-dark-soft); }

/* Contact testimonials */

.saying h2 {
  color: var(--red);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 40px);
  margin-bottom: 44px;
}

.saying__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 60px);
}

/* ---------- Legal pages ---------- */

.legal { max-width: 820px; }

.legal .updated {
  color: var(--ink-soft);
  font-size: 15px;
  margin: -6px 0 40px;
}

.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  line-height: 1.2;
  margin: 46px 0 14px;
  color: var(--ink);
}

.legal h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal p { margin: 0 0 14px; color: var(--ink-soft); }
.legal .in-short { font-style: italic; }
.legal ul { margin: 0 0 18px; padding-left: 24px; color: var(--ink-soft); }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--red); }

.legal .toc {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  counter-reset: toc;
}

.legal .toc li { counter-increment: toc; margin-bottom: 6px; }
.legal .toc li::before { content: counter(toc) ". "; font-weight: 700; color: var(--ink); }
.legal .toc a { text-decoration: none; }
.legal .toc a:hover { text-decoration: underline; }

.table-wrap { overflow-x: auto; margin: 20px 0 26px; }

.legal table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
  font-size: 15.5px;
}

.legal th, .legal td {
  border: 1px solid var(--line-light);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  color: var(--ink-soft);
}

.legal th { background: var(--light); color: var(--ink); font-weight: 700; }
.legal td.center { text-align: center; font-weight: 700; }

.legal .sig { margin-top: 44px; font-weight: 700; color: var(--ink); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 8, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: min(1200px, 100%);
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
  font-size: 40px;
  line-height: 1;
  padding: 12px;
  opacity: 0.85;
}

.lightbox button:hover { opacity: 1; }

.lightbox__close { top: 18px; right: 22px; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .services-hero { grid-template-columns: 1fr; }
  .services-hero__media { position: static; order: -1; max-width: 560px; }
  .built { grid-template-columns: 1fr; }
  .footer-cta__grid, .contact-top { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 24px 26px;
    display: none;
    border-top: 1px solid var(--line-dark);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a:not(.btn) { padding: 12px 0; font-size: 15px; }
  .site-nav .btn { margin-top: 12px; }

  .nav-toggle { display: block; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .cards-grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .quote-panel--three, .quote-panel--two, .saying__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .built__collage { grid-template-rows: 150px 150px; }
  .accordion__trigger { font-size: 21px; }
  .hours dt { min-width: 104px; }
}

@media (max-width: 460px) {
  .team__grid { grid-template-columns: 1fr; }
  .hero__actions .btn, .services-cta__actions .btn { width: 100%; }
}
