/* =====================================================================
   Cochrane Insulation — Midnight Authority, layered-but-flat-depth edition
   Depth comes from discrete flat tiers + crisp 1px hairlines + one
   consistent soft shadow. No glows, no blooms, no atmospheric blobs,
   no gradients on UI chrome. (Illustrations are imagery, untouched.)
   Plain CSS3, no framework, no build step. Mobile-first.
   ===================================================================== */

:root {
  /* --- flat depth tiers (value steps, bottom = darkest = furthest back) --- */
  --tier-0: #080D17;   /* page base — deepest, furthest back */
  --tier-1: #0E1626;   /* recessed wells, footer */
  --tier-2: #131E30;   /* default surface (cards, inputs) */
  --tier-3: #1A2740;   /* raised surface (nav, hover) */
  --tier-4: #243352;   /* highest (popover/dot active) */

  /* hairlines sit one step above their tier so edges read as crisp lines */
  --line:        #243352;  /* default 1px hairline */
  --line-strong: #324567;  /* emphasized edge (hover, focus) */

  /* --- semantic palette --- */
  --text:   #F8FAFC;
  --muted:  #94A3B8;   /* AA on tier-0/1/2 */
  --ember:  #FF6A1A;   /* the single accent */
  --ember-fg:#0B1220;  /* text on solid ember */
  --crisp:  #38BDF8;   /* secondary cyan */
  --frost:  #BFEAFF;   /* large/decorative only */

  /* --- type: Archivo for headlines (display), Inter for body --- */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* --- type scale (rem; html=16px) --- */
  --fs-h1: 2.75rem;   --lh-h1: 1.08;
  --fs-h2: 2.125rem;  --lh-h2: 1.12;
  --fs-h3: 1.375rem;  --lh-h3: 1.25;
  --fs-body:1.0625rem;--lh-body:1.65;
  --fs-sm:  0.875rem; --lh-sm: 1.5;

  /* --- spacing ladder --- */
  --s-4:4px; --s-8:8px; --s-16:16px; --s-24:24px; --s-40:40px; --s-64:64px;

  /* --- shape --- */
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1100px;

  /* one consistent soft shadow, single light direction (down), no color */
  --shadow-1: 0 1px 0 rgba(0,0,0,0.5), 0 8px 24px -12px rgba(0,0,0,0.7);
  --shadow-2: 0 1px 0 rgba(0,0,0,0.5), 0 16px 40px -16px rgba(0,0,0,0.8);

  /* focus = a flat ring built from an inset hairline, not a glow */
  --ring: inset 0 0 0 2px var(--crisp);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  /* FLAT: solid tier-0 fill, no radial blobs, no gradients */
  background: var(--tier-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { max-width: 100%; display: block; }
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1,h2,h3 { font-family: var(--font-display); line-height: var(--lh-h2); letter-spacing: -0.02em; margin: 0 0 var(--s-16); }
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 900; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
p  { margin: 0 0 var(--s-16); }
.lead { font-family: var(--font-body); font-size: 1.18rem; color: var(--muted); }
:where(button, a, input, textarea, select):focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-24); }
section { padding: clamp(64px, 10vw, 128px) 0; position: relative; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; font-weight: 800; color: var(--ember); margin-bottom: var(--s-8); }
.section-head { max-width: 720px; margin-bottom: var(--s-40); }

/* ---------- buttons (flat: solid fill, hairline edge, no bloom) ---------- */
.btn {
  --bg: var(--ember); --fg: var(--ember-fg);
  display: inline-flex; align-items: center; gap: 8px;
  font: 800 1rem/1 var(--font-display);
  padding: 14px 22px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  background: var(--bg); color: var(--fg);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  text-decoration: none; letter-spacing: 0.01em;
  box-shadow: var(--shadow-1);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; background: #FF7A30; }
.btn--ghost { --bg: var(--tier-3); --fg: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--tier-4); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.btn--lg { padding: 16px 28px; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- nav (flat tier + bottom hairline) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--tier-1);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.0625rem; color: var(--text); letter-spacing: -0.02em; flex-wrap: wrap; }
.brand__subline { display: block; width: 100%; font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; line-height: 1.2; padding-left: 38px; }
.brand__subline:empty { display: none; }
/* Shielded Peak logo: roof gable (inherit) + ember insulation bar + cyan droplet.
   The gable stroke uses currentColor so it reads white in nav/footer. */
.brand__mark { width: 28px; height: 28px; flex: none; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: var(--s-24); }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 0.94rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cta { padding: 10px 18px; font-size: 0.94rem; box-shadow: none; }
.nav-toggle { display: none; background: var(--tier-3); border: 1px solid var(--line); color: var(--text); padding: 8px 12px; border-radius: 10px; cursor: pointer; }

/* ---------- hero ---------- */
#hero { padding-top: clamp(56px, 9vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-copy h1 { margin-bottom: var(--s-24); }
.hero-copy h1 .accent { color: var(--ember); }
.hero-copy .lead { margin-bottom: var(--s-24); max-width: 32ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-16); margin-bottom: var(--s-16); }
.hero-trust { display: flex; flex-wrap: wrap; gap: var(--s-8) var(--s-24); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust span::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--crisp); } /* flat square pip, not a glowing dot */
/* hero image: edge-to-edge in its column, no card framing */
.hero-art { position: relative; overflow: hidden; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- generic card (flat tier-2 + hairline + one shadow) ---------- */
.card { background: var(--tier-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-24); box-shadow: var(--shadow-1); transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.card:hover { transform: translateY(-4px); background: var(--tier-3); border-color: var(--line-strong); }

/* ---------- problem ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,5vw,var(--s-64)); align-items: center; }

/* ---------- callout (flat inset well, accent bar) ---------- */
.callout {
  border-left: 3px solid var(--ember);
  background: var(--tier-1);
  padding: var(--s-16) var(--s-24);
  border-radius: 0 var(--radius) var(--radius) 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.25rem; font-weight: 800; color: var(--text);
}
.callout span { color: var(--ember); }

/* ---------- solution cards ---------- */
.solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-24); }
.solution-card .sol-icon { width: 96px; height: 96px; margin-bottom: var(--s-16); }
.solution-card h3 { margin-bottom: var(--s-8); }

/* ---------- walkthrough slider ---------- */
.deck { position: relative; }
.deck__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; display: flex; gap: var(--s-16); padding-bottom: var(--s-8); scrollbar-width: thin; scrollbar-color: var(--tier-4) transparent; }
.deck__viewport::-webkit-scrollbar { height: 8px; }
.deck__viewport::-webkit-scrollbar-thumb { background: var(--tier-4); border-radius: 8px; }
.slide { scroll-snap-align: start; flex: 0 0 min(100%, 760px); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--tier-2); box-shadow: var(--shadow-1); }
.slide img { width: 100%; height: auto; }
.slide--cta { flex: 0 0 min(100%, 760px); }
.cta-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 32px);
  padding: clamp(20px, 4vw, 32px);
  min-height: 100%;
  background: linear-gradient(135deg, var(--tier-1), var(--tier-2));
}
.cta-slide__intro { display: flex; flex-direction: column; justify-content: center; }
.cta-slide__eyebrow {
  margin: 0 0 var(--s-8);
  color: var(--ember);
  font-size: var(--fs-sm);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cta-slide__title {
  margin: 0 0 var(--s-12);
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1.1;
}
.cta-slide__sub {
  margin: 0 0 var(--s-20);
  color: var(--muted);
  max-width: 28ch;
}
.cta-slide__btn { align-self: flex-start; box-shadow: 0 0 0 1px rgba(255,106,26,.25), 0 12px 28px rgba(255,106,26,.18); }
.cta-slide__steps { padding: clamp(18px, 3vw, 24px); background: var(--tier-1); }
.cta-slide__steps-title { margin: 0 0 var(--s-16); font-size: 1.05rem; }
.cta-slide__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-16);
}
.cta-slide__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
}
.cta-slide__list li::before {
  content: counter(step);
  counter-increment: step;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ember);
  color: var(--ember);
  font-weight: 900;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.cta-slide__list { counter-reset: step; }
.cta-slide__list strong { grid-column: 2; font-size: 0.95rem; }
.cta-slide__list span { grid-column: 2; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.cta-slide__promise {
  margin: var(--s-20) 0 0;
  padding: 10px 14px;
  border: 1px solid var(--crisp);
  border-radius: 10px;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 800;
}
.deck__controls { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s-16); }
.dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line); background: var(--tier-3); cursor: pointer; padding: 0; transition: background .15s, border-color .15s; }
.dot[aria-current="true"] { background: var(--ember); border-color: var(--ember); }
.arrows { display: flex; gap: 8px; }
.arrow { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--tier-3); color: var(--text); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; transition: border-color .15s, background .15s; }
.arrow:hover { border-color: var(--line-strong); background: var(--tier-4); }

/* ---------- contact ---------- */
#contact-form { scroll-margin-top: 80px; }
#faq { scroll-margin-top: 80px; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: grid; gap: var(--s-12); max-width: 760px; }
.faq-item {
  background: var(--tier-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--s-16) var(--s-24);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ember);
  font-size: 1.1rem;
  font-weight: 900;
  transition: transform .15s ease, background .15s ease;
}
.faq-item[open] summary::after {
  content: "−";
  background: var(--tier-3);
}
.faq-item summary:hover { background: var(--tier-3); }
.faq-answer {
  padding: 0 var(--s-24) var(--s-20);
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.faq-answer p { margin: var(--s-16) 0 0; line-height: 1.6; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px,5vw,var(--s-64)); align-items: start; }
.contact-info .phone-line { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: var(--s-8); }
.contact-info .phone-line a { color: var(--ember); }
/* inputs are recessed wells (tier-1), sitting below the tier-2 form card */
form .field { margin-bottom: var(--s-16); }
form label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
form input, form textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--tier-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .15s, background .15s;
}
form input::placeholder, form textarea::placeholder { color: #5B6B85; }
form textarea { min-height: 130px; resize: vertical; }
/* focus = inset hairline ring (flat), not a glow */
form input:focus, form textarea:focus { outline: none; border-color: var(--ember); background: var(--tier-2); box-shadow: var(--ring); }
.field-error { color: #FF8A6A; font-size: var(--fs-sm); margin-top: 6px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #FF8A6A; }
.field.invalid .field-error { display: block; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: var(--s-16); padding: 12px 16px; border-radius: 10px; font-weight: 700; border: 1px solid var(--line); }
.form-status.ok  { background: var(--tier-1); color: var(--crisp); border-color: #1F4A60; }
.form-status.err { background: var(--tier-1); color: #FFB07A; border-color: #5A2E16; }

/* ---------- footer (deepest tier, top hairline) ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--tier-1); padding: var(--s-40) 0; color: var(--muted); font-size: var(--fs-sm); }
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--s-40); justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- reveal-on-scroll ---------- */
/* Default: visible. Only hide when JS is active (progressive enhancement). */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- contact form additions ---------- */
.contact-info .contact-tagline { font-size: 1.5rem; font-weight: 800; color: var(--text); margin-bottom: var(--s-8); }
form input[type="file"] {
  padding: 10px 14px; background: var(--tier-1); border: 1px dashed var(--line-strong);
  border-radius: 10px; color: var(--muted); font-size: var(--fs-sm); cursor: pointer;
}
form input[type="file"]::file-selector-button {
  background: var(--tier-3); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: 700 0.85rem var(--font-body); cursor: pointer; margin-right: 10px;
}
form input[type="file"]::file-selector-button:hover { background: var(--tier-4); }
.field-hint { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }

/* ===================================================================== */
/* responsive                                                             */
/* ===================================================================== */
@media (max-width: 900px) {
  .hero-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .solution-grid { grid-template-columns: 1fr; }
  .cta-slide { grid-template-columns: 1fr; }
  .cta-slide__sub { max-width: none; }
  .cta-slide__btn { width: 100%; text-align: center; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--tier-2); border-bottom: 1px solid var(--line);
    padding: var(--s-16) var(--s-24);
    box-shadow: var(--shadow-2);
  }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links.open a:last-child { border-bottom: none; }
  .nav-links.open .nav-cta { margin-top: var(--s-8); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .js .reveal { opacity: 1; transform: none; }
}
