/* Knight Insulation — Sioux Falls, SD
   Design concept: the whole site is built around the one thing insulation
   actually does — hold a line between cold and warm. Cold blue (Prairie
   Night / Frost) sits opposite warm amber (Ember) throughout: in the hero
   gradient, in section dividers, in the wall-cross-section graphic. Nothing
   decorative, no stock-photo hero — the temperature line IS the visual. */

:root{
  --ink: #1C1C1C;
  --cream: #F7F3EC;
  --cream-dim: #EFE9DC;
  --line: #DDD5C4;
  --prairie: #17263A;   /* deep navy — cold, night sky over the plains */
  --prairie-2: #0F1B29;
  --frost: #3E6B95;     /* cold accent */
  --frost-light: #DCE8F0;
  --ember: #E2933C;     /* warm accent — the "kept-in" heat */
  --ember-dark: #B96C1F;
  --ember-light: #FBE6C8;
  --white: #FFFFFF;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --radius: 3px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; }
.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .display{
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0 0 0.4em;
}
h1{ font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2{ font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3{ font-size: clamp(1.25rem, 2.4vw, 1.55rem); }
p{ max-width: 62ch; }
.lede{ font-size: 1.2rem; color: #3A3A3A; max-width: 54ch; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@keyframes rise{ from{ opacity: 0; transform: translateY(14px); } to{ opacity: 1; transform: translateY(0); } }
.hero-grid > *{ animation: rise 0.7s ease-out both; }
.hero-grid > *:nth-child(2){ animation-delay: 0.12s; }

/* ---------- Skip link / focus ---------- */
.skip-link{
  position: absolute; left: -999px; top: 0; background: var(--ember);
  color: var(--prairie-2); padding: 10px 16px; z-index: 200; font-weight: 700;
}
.skip-link:focus{ left: 12px; top: 12px; }
a:focus-visible, button:focus-visible, summary:focus-visible{
  outline: 3px solid var(--ember); outline-offset: 2px;
}

/* ---------- Top bar (contact strip) ---------- */
.topbar{
  background: var(--prairie-2);
  color: var(--frost-light);
  font-size: 0.86rem;
}
.topbar .wrap{
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; gap: 12px; flex-wrap: wrap;
}
.topbar a{ text-decoration: none; }
.topbar a.tel{ color: var(--ember); font-weight: 700; }
.topbar .hours{ opacity: 0.85; }

/* ---------- Header / nav ---------- */
header.site{
  background: var(--prairie);
  color: var(--white);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--ember);
}
header.site .wrap{
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand{
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--white);
}
.brand .mark{ width: 52px; height: auto; flex: none; }
.brand-text{ font-family: var(--font-display); line-height: 1; }
.brand-text .name{ font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; }
.brand-text .tag{ display: block; font-family: var(--font-body); font-size: 0.68rem;
  color: var(--frost-light); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

nav.primary ul{ list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
nav.primary li{ position: relative; }
nav.primary a.navlink{
  display: block; padding: 10px 14px; text-decoration: none; color: var(--frost-light);
  font-size: 0.98rem; border-radius: var(--radius);
}
nav.primary a.navlink:hover, nav.primary a.navlink:focus-visible{ color: var(--white); background: rgba(255,255,255,0.08); }
nav.primary li.has-sub > a.navlink::after{ content: "▾"; font-size: 0.7em; margin-left: 5px; opacity: 0.7; }
.subnav{
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0;
  background: var(--prairie-2); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius);
  min-width: 230px; display: none; box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}
nav.primary li.has-sub:hover .subnav,
nav.primary li.has-sub:focus-within .subnav{ display: block; }
.subnav a{ display: block; padding: 9px 10px; text-decoration: none; color: var(--frost-light); font-size: 0.92rem; border-radius: 2px; }
.subnav a:hover, .subnav a:focus-visible{ background: rgba(255,255,255,0.08); color: var(--white); }

.btn{
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  padding: 11px 20px; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; font-size: 0.96rem;
}
.btn-ember{ background: var(--ember); color: var(--prairie-2); }
.btn-ember:hover{ background: var(--ember-dark); }
.btn-outline{ border-color: var(--frost-light); color: var(--frost-light); }
.btn-outline:hover{ border-color: var(--white); color: var(--white); }
.btn-outline-dark{ border-color: var(--prairie); color: var(--prairie); }
.btn-outline-dark:hover{ background: var(--prairie); color: var(--white); }

.nav-toggle{ display: none; background: none; border: 2px solid var(--frost-light); color: var(--white);
  padding: 8px 10px; border-radius: var(--radius); font-size: 1.1rem; }

@media (max-width: 880px){
  nav.primary{ display: none; }
  .nav-toggle{ display: inline-block; }
  header.site .actions{ display: none; }
  header.site.open nav.primary{
    display: block; position: fixed; inset: 68px 0 0 0; background: var(--prairie);
    overflow-y: auto; padding: 10px 0 40px;
  }
  header.site.open nav.primary ul{ flex-direction: column; align-items: stretch; padding: 0 20px; }
  header.site.open .subnav{ position: static; display: block; box-shadow: none; border: none; padding-left: 14px; background: transparent; }
  header.site.open nav.primary li.has-sub > a.navlink::after{ display: none; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  background: linear-gradient(115deg, var(--prairie-2) 0%, var(--prairie) 42%, var(--frost) 78%, var(--ember) 130%);
  color: var(--white);
  overflow: hidden;
}
.hero .wrap{ padding-top: 76px; padding-bottom: 84px; position: relative; z-index: 2; }
.hero-grid{ display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .eyebrow{ color: var(--ember); font-weight: 700; font-size: 0.92rem; margin-bottom: 10px; letter-spacing: 0.02em; }
.hero h1{ margin-bottom: 0.3em; }
.hero .lede{ color: rgba(255,255,255,0.88); }
.hero .actions{ display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero .fine{ margin-top: 18px; font-size: 0.86rem; color: rgba(255,255,255,0.7); }

/* wall cross-section diagram used in the hero / elsewhere */
.wall-diagram{ width: 100%; height: auto; }

@media (max-width: 880px){
  .hero-grid{ grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section{ padding: 64px 0; }
.section-cream{ background: var(--cream); }
.section-dim{ background: var(--cream-dim); }
.section-prairie{ background: var(--prairie); color: var(--white); }
.section-prairie h2{ color: var(--white); }
.section-prairie p{ color: rgba(255,255,255,0.82); }
.kicker{ text-transform: none; color: var(--frost); font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.section-prairie .kicker{ color: var(--ember); }
.section-head{ max-width: 68ch; margin-bottom: 36px; }

.grid{ display: grid; gap: 24px; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px){ .grid-3, .grid-2{ grid-template-columns: 1fr; } }

.card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; height: 100%; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:has(a.more):hover{ transform: translateY(-3px); box-shadow: 0 14px 28px rgba(23,38,58,0.12); }
.card .icon{ width: 40px; height: 40px; margin-bottom: 14px; }
.card h3{ margin-bottom: 8px; }
.card p{ margin: 0; color: #4a4a4a; font-size: 0.98rem; }
.card a.more{ display: inline-block; margin-top: 12px; font-weight: 700; color: var(--frost); text-decoration: none; border-bottom: 2px solid var(--frost-light); }
.card a.more:hover{ border-color: var(--frost); }

.stat-strip{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.18); border-bottom: 1px solid rgba(255,255,255,0.18);
  padding: 32px 0;
}
.stat-strip .stat .num{ font-family: var(--font-display); font-size: 2.6rem; color: var(--ember); line-height: 1; }
.stat-strip .stat .label{ font-size: 0.88rem; color: rgba(255,255,255,0.75); margin-top: 6px; }
@media (max-width: 880px){ .stat-strip{ grid-template-columns: repeat(2, 1fr); } }

.list-check{ list-style: none; margin: 0; padding: 0; }
.list-check li{ position: relative; padding-left: 28px; margin-bottom: 12px; }
.list-check li::before{
  content: ""; position: absolute; left: 0; top: 0.35em; width: 14px; height: 14px;
  background: var(--ember); border-radius: 2px;
}

.towns{ list-style: none; display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0; padding: 0; }
.towns li{ background: var(--frost-light); color: var(--prairie); padding: 7px 14px; border-radius: 999px; font-size: 0.92rem; font-weight: 600; }

.process{ counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.process li{ display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.process li::before{
  counter-increment: step; content: counter(step);
  font-family: var(--font-display); font-size: 1.6rem; color: var(--ember);
  width: 56px; height: 56px; border: 2px solid var(--ember); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.cta-band{
  background: var(--ember); color: var(--prairie-2);
  padding: 46px 0;
}
.cta-band .wrap{ display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2{ color: var(--prairie-2); margin-bottom: 4px; }
.cta-band p{ margin: 0; }

/* ---------- Footer ---------- */
footer.site{ background: var(--prairie-2); color: rgba(255,255,255,0.75); padding: 52px 0 26px; }
footer.site .grid{ grid-template-columns: 1.3fr 1fr 1fr 1fr; margin-bottom: 34px; }
footer.site h3{ color: var(--white); font-size: 1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 12px; }
footer.site ul{ list-style: none; margin: 0; padding: 0; }
footer.site li{ margin-bottom: 8px; }
footer.site a{ text-decoration: none; color: rgba(255,255,255,0.75); font-size: 0.94rem; }
footer.site a:hover{ color: var(--ember); }
footer.site .foot-bottom{ border-top: 1px solid rgba(255,255,255,0.14); padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; }
@media (max-width: 880px){ footer.site .grid{ grid-template-columns: 1fr 1fr; } }

.notice{
  background: var(--frost-light); border-left: 4px solid var(--frost); color: var(--prairie);
  padding: 14px 18px; font-size: 0.92rem; border-radius: 2px;
}

/* Job photo gallery */
.gallery{ display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery figure{ margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img{ width: 100%; height: 340px; object-fit: cover; display: block; }
.gallery figcaption{ padding: 14px 16px; font-size: 0.92rem; color: #4a4a4a; }
.gallery figcaption strong{ display: block; color: var(--ink); font-size: 0.98rem; margin-bottom: 3px; }
@media (max-width: 880px){ .gallery{ grid-template-columns: 1fr; } }
.hero-photo{ border-radius: var(--radius); overflow: hidden; border: 3px solid rgba(255,255,255,0.25); position: relative; box-shadow: 0 24px 48px rgba(0,0,0,0.35); }
.hero-photo img{ width: 100%; height: auto; display: block; filter: grayscale(0.55) contrast(1.08); }
.hero-photo::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(62,107,149,0.6), rgba(226,147,60,0.5)); mix-blend-mode: color; }
.hero-photo .cap{ position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px; background: linear-gradient(0deg, rgba(15,27,41,0.85), transparent); font-size: 0.86rem; color: var(--white); }
.hero-diagram{ background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 18px; }

/* Breadcrumb */
.crumb{ font-size: 0.86rem; color: var(--frost); padding: 14px 0 0; }
.crumb a{ text-decoration: none; color: var(--frost); }
.crumb a:hover{ text-decoration: underline; }

/* Contact page form */
.form-grid{ display: grid; gap: 16px; }
label{ font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 6px; }
input, select, textarea{
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--ink);
}
textarea{ min-height: 120px; resize: vertical; }
.hp-field{ position: absolute; left: -9999px; top: -9999px; opacity: 0; pointer-events: none; }
