/* ==========================================================================
   Quad+ — quadroof.com
   Brand tokens mirror the quote-deck system (customers/quote-builder/lib/
   quote_chrome.py) so the site and the customer quote read as one brand.
   No CDN, no webfonts, no external requests — consistent with the rest of
   the Quad toolchain.
   ========================================================================== */

:root {
  /* Brand — from quote_chrome.py */
  --navy-deep: #1a2230;
  --navy-mid:  #3a4a5a;
  --accent:    #f14e23;
  --gray-mid:  #8a95a1;
  --gray-bg:   #f8f9fa;
  --white:     #ffffff;

  /* Derived */
  --navy-deeper: #11161f;
  --ink:         #1a2230;
  --ink-soft:    #48576a;
  --rule:        #e2e6eb;
  --accent-dark: #b03a18;
  /* --accent (#f14e23) is the brand colour and is correct for RULES and other
     non-text marks. It only reaches 3.59:1 on white, so small text and
     white-on-accent buttons use this 13%-darker variant, which clears
     WCAG AA on white (4.78:1), on the muted panel (4.53:1), and white-on-it. Verified, not eyeballed. */
  --accent-text: #cd421e;
  /* --gray-mid (#8a95a1) is likewise decorative-only; captions use this. */
  --gray-text:   #6a737c;

  --measure: 68ch;
  --shell:   1200px;
  --gap:     clamp(1rem, 3vw, 2rem);
  --section: clamp(4rem, 9vw, 7.5rem);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --shadow: 0 1px 2px rgba(26,34,48,.06), 0 8px 24px rgba(26,34,48,.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.022em;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.9vw, 4.15rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.3vw, 2.85rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }
p  { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent-text); color: #fff; padding: .75rem 1.25rem;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- Layout primitives ---------- */

.shell { width: min(100% - 2 * var(--gap), var(--shell)); margin-inline: auto; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section--dark  { background: var(--navy-deep); color: #e8edf3; }
.section--muted { background: var(--gray-bg); }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-text);
  margin: 0 0 1rem;
}
.section--dark .eyebrow { color: #ff7d55; }

.lede { font-size: clamp(1.075rem, 1rem + .5vw, 1.3rem); color: var(--ink-soft); max-width: var(--measure); }
.section--dark .lede { color: #b9c5d3; }

.section > .shell > h2 + .lede,
.section > .shell > .eyebrow + h2 { margin-top: 1rem; }
.section > .shell > h2 + .lede { margin-top: 1.15rem; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  padding: .95rem 1.75rem;
  font: inherit; font-weight: 700; line-height: 1;
  text-decoration: none;
  border: 2px solid transparent; border-radius: 4px;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn--primary { background: var(--accent-text); color: #fff; border-color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--dark { color: var(--navy-deep); border-color: var(--navy-deep); }
.btn--dark:hover { background: var(--navy-deep); color: #fff; }

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

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand__txt { font-weight: 800; letter-spacing: -.02em; font-size: 1.2rem; color: var(--navy-deep); }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-soft); }
.nav a:not(.btn):hover { color: var(--accent-text); }
.nav .btn { padding: .7rem 1.2rem; font-size: .9rem; }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }

@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ---------- Hero ---------- */

.hero { position: relative; background: var(--navy-deep); color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(17,22,31,.94) 0%, rgba(17,22,31,.86) 38%,
    rgba(17,22,31,.55) 68%, rgba(17,22,31,.35) 100%);
}
.hero__body {
  position: relative;
  padding-block: clamp(4.5rem, 12vw, 9rem);
  max-width: 46rem;
}
.hero h1 { color: #fff; }
.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1.075rem, 1rem + .55vw, 1.35rem);
  color: #cbd6e2; max-width: 40rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }
.hero__where {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.18);
  font-size: .9rem; color: #9fb0c2; letter-spacing: .03em;
}
.hero__where strong { color: #fff; font-weight: 700; }

/* ---------- Trust strip ---------- */

.strip { background: var(--navy-deeper); color: #fff; }
.strip ul {
  list-style: none; margin: 0; padding-block: 1.4rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem 1.5rem; text-align: center;
}
.strip li { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.strip b { display: block; color: var(--accent); font-size: 1.5rem; letter-spacing: -.02em; text-transform: none; margin-bottom: .15rem; }

/* ---------- Generic grids ---------- */

.grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--top { margin-top: clamp(2.25rem, 5vw, 3.5rem); }

.card {
  background: #fff; border: 1px solid var(--rule); border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.card__rule { width: 2.5rem; height: 3px; background: var(--accent); margin-bottom: 1.25rem; }
.card h3 { margin-bottom: .75rem; }
.card p { color: var(--ink-soft); }
.card ul { margin: .85rem 0 0; padding-left: 1.15rem; color: var(--ink-soft); }
.card li + li { margin-top: .5rem; }

/* ---------- Split (text + image) ---------- */

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--flip .split__media { order: -1; }
}
/* Constrain split imagery to a consistent landscape frame. A portrait source
   (the install photo is 1200x1600) otherwise runs the full column height and
   dominates the section it is meant to support. */
.split__media img {
  border-radius: 6px;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}
.figure figcaption {
  margin-top: .7rem; font-size: .8rem; color: var(--gray-text); line-height: 1.5;
}
.section--dark .figure figcaption { color: #8b9bad; }

/* ---------- Spec list ---------- */

.specs { list-style: none; margin: 2rem 0 0; padding: 0; }
.specs li {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding: .85rem 0; border-top: 1px solid var(--rule);
  font-size: .95rem;
}
.specs li:last-child { border-bottom: 1px solid var(--rule); }
.specs dt, .specs .k { color: var(--ink-soft); }
.specs .v { font-weight: 700; text-align: right; }
.section--dark .specs li { border-color: rgba(255,255,255,.14); }
.section--dark .specs .k { color: #a8b7c7; }
.section--dark .specs .v { color: #fff; }

/* ---------- Numbered reasons ---------- */

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 4rem; }
.steps > li + li { margin-top: 2.25rem; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.15rem;
  font-size: 1.6rem; font-weight: 800; color: var(--accent);
  letter-spacing: -.03em;
}
.steps h3 { margin-bottom: .5rem; }
.steps p { color: var(--ink-soft); max-width: 54ch; }
/* --ink-soft is a light-background colour; on navy it fails contrast. */
.section--dark .steps p { color: #b9c5d3; }

/* ---------- "Is / is not" contrast ---------- */

.contrast { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
@media (min-width: 820px) { .contrast { grid-template-columns: 1fr 1fr; } }
.panel { border-radius: 6px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.panel--is  { background: var(--navy-deep); color: #fff; }
.panel--not { background: #fff; border: 1px solid var(--rule); }
.panel h3 { margin-bottom: 1.25rem; font-size: 1.15rem; }
.panel--is h3 { color: #fff; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li { position: relative; padding-left: 1.9rem; }
.panel li + li { margin-top: .95rem; }
.panel li::before {
  position: absolute; left: 0; top: 0; font-weight: 800;
}
.panel--is li { color: #cfdae6; }
.panel--is li::before { content: "\2713"; color: #4ade80; }
.panel--not li { color: var(--ink-soft); }
.panel--not li::before { content: "\2715"; color: var(--accent); }

/* ---------- Gallery ---------- */

.gallery { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.gallery figure { margin: 0; }
.gallery img { border-radius: 6px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
/* Gallery captions sit centred under their own image (KM, 2026-09-10). They were
   inheriting body type and left alignment; this matches the caption style used
   elsewhere on the page. */
.gallery figcaption {
  margin-top: .7rem; text-align: center;
  font-size: .8rem; line-height: 1.5; color: var(--gray-text);
}

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

.contact__box {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.contact__item {
  border: 1px solid rgba(255,255,255,.18); border-radius: 6px;
  padding: 1.5rem;
}
.contact__item .k {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #ff7d55; margin-bottom: .5rem;
}
.contact__item a, .contact__item p { font-size: 1.05rem; font-weight: 600; color: #fff; text-decoration: none; word-break: break-word; }
.contact__item a:hover { color: var(--accent); }
.contact__note { margin-top: 1.75rem; font-size: .9rem; color: #9fb0c2; max-width: var(--measure); }

/* ---------- Footer ---------- */

.footer { background: var(--navy-deeper); color: #8b9bad; padding-block: 3rem 2.5rem; font-size: .875rem; }
.footer__top { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; align-items: flex-start; }
.footer a { color: #cbd6e2; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__legal {
  margin-top: 2.25rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
.footer__nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* ---------- Cost-over-time chart (2026-09-10) ---------- */
.chart svg { display: block; max-width: 100%; height: auto; }
.chart figcaption { max-width: 60ch; }
@media (max-width: 700px) {
  /* Right-hand series labels fall outside the viewBox on narrow screens; let the
     figure scroll rather than clip the labels that carry series identity. */
  .chart { overflow-x: auto; }
  .chart svg { min-width: 660px; }
}

/* ---------- Assessment form (2026-09-10) ----------
   Underline fields on the dark contact section, matching the MangumCFO form's
   shape. Labels use the eyebrow's uppercase treatment so the form reads as part
   of the page rather than a bolted-on widget. */

.qform { margin-top: clamp(2rem, 4vw, 3rem); }

.qform input[name="_gotcha"] { position: absolute; left: -9999px; opacity: 0; }

.qform__grid {
  display: grid; gap: 1.75rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.qform__field { margin: 0; }
.qform__field--wide { margin-top: 1.75rem; }

.qform label {
  display: block; margin-bottom: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #9fb0c2;
}
.qform__opt {
  font-weight: 400; letter-spacing: .06em; text-transform: none; color: #6f8296;
}

.qform input,
.qform select,
.qform textarea {
  width: 100%; padding: .55rem 0;
  font: inherit; color: #fff;
  background: transparent; border: 0;
  border-bottom: 1px solid rgba(255,255,255,.28);
  border-radius: 0;             /* iOS rounds inputs by default */
  appearance: none;
}
.qform textarea { resize: vertical; min-height: 4.5rem; }

.qform select option { color: #1a2230; }   /* native menu is light on most platforms */

.qform input:hover,
.qform select:hover,
.qform textarea:hover { border-bottom-color: rgba(255,255,255,.5); }

.qform input:focus,
.qform select:focus,
.qform textarea:focus {
  outline: none; border-bottom-color: var(--accent); border-bottom-width: 2px;
  padding-bottom: calc(.55rem - 1px);       /* hold the baseline when it thickens */
}
.qform :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Only after a submit attempt, so nothing is red before anyone has typed. */
.qform.is-checked :invalid { border-bottom-color: #ff7d55; }

.qform__actions { margin: 2.5rem 0 0; }

.qform__status {
  margin-top: 1.25rem; padding: .85rem 1.1rem;
  border-left: 3px solid var(--accent); background: rgba(255,255,255,.06);
  font-size: .95rem; color: #e8edf3; max-width: var(--measure);
}

/* Street address spans the whole grid; the modifier is also used on the textarea
   outside the grid, where it only needs the top margin. */
.qform__grid .qform__field--wide { grid-column: 1 / -1; margin-top: 0; }

/* Point-of-collection privacy notice, under the submit button. Quiet but legible —
   it has to be readable to do its job, so it uses the caption colour rather than
   anything dimmer. */
.qform__privacy {
  margin-top: 1.5rem; max-width: 48ch;
  font-size: .8rem; line-height: 1.55; color: #9fb0c2;
}
