/* ==========================================================================
   Terraguard Technologies — site design system
   Built 18 September 2026 from:
     - Terraguard-homepage-draft-for-approval.pdf (15–16 Sept), the band structure
     - the live CO2 calculator, the button and badge treatment
     - Skills/website-build-standards/references/DESIGN.md, the invariants
   AMENDMENTS awaiting sign-off are marked AMENDED.
   ========================================================================== */

:root {
  /* palette */
  --ink:      #080c23;
  --blue:     #1c4e80;
  --sky:      #38b6ff;
  --yellow:   #efd434;
  --white:    #ffffff;
  --mist:     #e6ebf2;  /* AMENDED from #f4f6f8. The old value was ~4% off white,
                           which read as one long light stretch rather than a ground. */
  --cloud:    #d2dae5;  /* AMENDED from #dde3ea so hairlines register on the new Mist. */
  --slate:    #666f80;
  --graphite: #39414f;

  /* type */
  --title: Antic, Optima, Palatino, Georgia, serif;
  --body:  Jost, "Century Gothic", "Trebuchet MS", system-ui, sans-serif;

  /* shape — both from the live calculator */
  --card-r: 16px;
  --btn-r:  999px;

  --wrap: 1200px;
  --shadow: 0 1px 2px rgba(8,12,35,.05), 0 14px 32px -18px rgba(8,12,35,.22);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--graphite);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }

/* ---------- grounds. Four, not two. AMENDED ---------- */
.g-white { background: var(--white); color: var(--graphite); }
.g-mist  { background: var(--mist);  color: var(--graphite); }
.g-ink   { background: var(--ink);   color: rgba(221,227,234,.88); }
.g-blue  { background: var(--blue);  color: rgba(255,255,255,.90); }

.sec { padding: clamp(2.8rem, 6vw, 4.8rem) 0; }
.sec--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.w { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 3.5vw, 2.5rem); }
.narrow { max-width: 760px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0 0 .7rem; text-wrap: balance; }
h1, h2 { font-family: var(--title); font-weight: 400; color: var(--ink); line-height: 1.1; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem); max-width: 20ch; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.06rem; line-height: 1.3; color: var(--ink); }
.g-ink h1, .g-ink h2, .g-ink h3, .g-blue h1, .g-blue h2, .g-blue h3 { color: var(--white); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.lede { font-size: 1.12rem; max-width: 60ch; }
.prose { max-width: 66ch; }
strong { font-weight: 600; color: var(--ink); }
.g-ink strong, .g-blue strong { color: var(--white); }
small { font-size: .82rem; color: var(--slate); }
.g-ink small { color: rgba(221,227,234,.66); }

/* eyebrow. Blue on light, Sky on dark. */
.eyebrow {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--blue); margin: 0 0 .7rem;
}
.g-ink .eyebrow, .g-blue .eyebrow { color: var(--sky); }

/* the tagline, Sky, as the calculator uses it */
.tagline { color: var(--sky); font-weight: 500; }

/* ---------- badge: outlined yellow pill, straight from the calculator ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 600;
  color: var(--yellow); border: 1px solid rgba(239,212,52,.55);
  border-radius: var(--btn-r); padding: .34rem 1rem; margin: 0 0 1.2rem;
}
.badge::before { content: "◆"; font-size: .6rem; line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: .97rem; font-weight: 600;
  padding: .82rem 2rem; border-radius: var(--btn-r);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
/* Yellow is the primary on Ink and Blue, exactly as the calculator does it. */
.g-ink .btn--primary, .g-blue .btn--primary, .site-head .btn--primary { background: var(--yellow); color: var(--ink); }
.g-ink .btn--primary:hover, .g-blue .btn--primary:hover, .site-head .btn--primary:hover { background: #f5e267; }
/* Yellow may never touch white or Mist, so light grounds take Blue. */
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: #17406b; }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--cloud); }
.btn--ghost:hover { border-color: var(--blue); }
.g-ink .btn--ghost, .g-blue .btn--ghost, .site-head .btn--ghost { color: var(--white); border-color: rgba(255,255,255,.4); }
.g-ink .btn--ghost:hover, .g-blue .btn--ghost:hover, .site-head .btn--ghost:hover { border-color: var(--white); }
.ctas { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; }

/* ---------- links ---------- */
a { color: var(--blue); text-decoration: none; }
.prose a, .link { border-bottom: 1px solid rgba(28,78,128,.35); }
.prose a:hover, .link:hover { border-bottom-color: var(--blue); }
.g-ink a, .g-blue a { color: var(--yellow); }          /* yellow links, on Ink only */
.g-ink .link, .g-blue .link { border-bottom-color: rgba(239,212,52,.45); }
.g-ink .link:hover, .g-blue .link:hover { border-bottom-color: var(--yellow); }

/* ---------- header ---------- */
.site-head { background: var(--ink); position: sticky; top: 0; z-index: 50; }
.head-in { max-width: var(--wrap); margin: 0 auto; padding: .8rem clamp(1.1rem,3.5vw,2.5rem);
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.site-head img { height: 38px; width: auto; }
.nav { display: flex; gap: 1.3rem; flex-wrap: wrap; margin-left: auto; font-size: .92rem; }
.nav a { color: rgba(221,227,234,.9); border-bottom: 1px solid transparent; padding-bottom: 2px; }
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }
.head-cta { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.head-cta .btn { padding: .6rem 1.25rem; font-size: .88rem; }

/* ---------- hero, with the credential rail overlapping it ---------- */
.hero { padding: clamp(3rem,7vw,5.2rem) 0 0; }
.hero .sub { font-size: clamp(1.06rem,.98rem+.45vw,1.3rem); max-width: 54ch;
  color: rgba(221,227,234,.92); margin: 0 0 1.9rem; padding-left: 1.1rem;
  border-left: 3px solid var(--yellow); }   /* yellow touch 1 of 5 */

/* credential rail */
.rail { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem,3.5vw,2.5rem);
  transform: translateY(clamp(1.6rem, 4vw, 2.6rem)); }
.rail-in { background: var(--white); border-radius: var(--card-r); box-shadow: var(--shadow);
  display: grid; gap: 1px; background: var(--cloud); overflow: hidden; }
@media (min-width: 700px)  { .rail-in { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .rail-in { grid-template-columns: repeat(4,1fr); } }
.rail-in > div { background: var(--white); color: var(--graphite); padding: 1.25rem 1.35rem; }
.rail h3 { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--blue); margin-bottom: .4rem; }
.rail p { font-size: .9rem; margin: 0; color: var(--graphite); }
.rail .award h3 { color: var(--ink); }
.rail .award h3::after { content: " ◆"; color: var(--yellow); }  /* yellow touch 2 */

/* spacing after an overlapping rail */
.after-rail { padding-top: clamp(4.4rem, 9vw, 6.4rem); }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 820px) { .grid-3 { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1000px){ .grid-4 { grid-template-columns: repeat(4,1fr); } }

.card { background: var(--white); border-radius: var(--card-r); box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.card p { font-size: .95rem; }
.card .more { margin-top: auto; padding-top: .9rem; font-size: .88rem; font-weight: 500; color: var(--blue); }
a.card { color: inherit; }
.card--img { padding: 0; overflow: hidden; }
.card--img .shot { aspect-ratio: 16/9; background: var(--ink) url("texture.jpg") center/cover;
  display: grid; place-items: center; position: relative; }
.card--img .shot svg { width: 30%; max-width: 120px; height: auto; color: var(--sky); opacity: .95; }
.card--img .shot .cat { position: absolute; left: 1rem; bottom: .85rem; font-size: .62rem;
  letter-spacing: .15em; text-transform: uppercase; font-weight: 600; color: var(--yellow); }
.card--img .body { padding: 1.35rem 1.45rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card--img .body h3 { margin: 0; }
a.card--img:hover .shot svg { opacity: 1; }
a.card:hover { box-shadow: 0 2px 4px rgba(8,12,35,.08), 0 20px 40px -20px rgba(8,12,35,.35); }
.g-mist .card { box-shadow: 0 1px 2px rgba(8,12,35,.06), 0 14px 32px -18px rgba(8,12,35,.28); }

/* numbered stage */
.stage .n { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--blue); color: var(--white);
  font-family: var(--title); font-size: 1.15rem; display: grid; place-items: center; margin-bottom: .9rem; }
.stage .out { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--cloud);
  font-size: .82rem; font-weight: 600; color: var(--blue); letter-spacing: .02em; }

/* ---------- certifications: ruled list beside a Mist aside ---------- */
.cert-split { display: grid; gap: 2rem; }
@media (min-width: 900px) { .cert-split { grid-template-columns: 1.6fr 1fr; gap: 3rem; } }
.cert-list { border-top: 1px solid var(--cloud); }
.cert-row { display: grid; grid-template-columns: 13rem 1fr; gap: 1.4rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--cloud); }
@media (max-width: 640px) { .cert-row { grid-template-columns: 1fr; gap: .3rem; } }
.cert-row dt { font-weight: 600; color: var(--blue); font-size: 1rem; }
.cert-row dt small { display: block; color: var(--slate); font-weight: 400;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cert-row dd { margin: 0; font-size: .95rem; }
.aside { background: var(--mist); border-radius: var(--card-r); padding: 1.5rem 1.6rem; align-self: start; }
.g-mist .aside { background: var(--white); }

/* ---------- the paperwork panel: solid Ink, Signal Yellow rule ---------- */
.papers { background: var(--ink); border-radius: var(--card-r); padding: 1.8rem 1.9rem; color: rgba(221,227,234,.9); }
.papers h3 { color: var(--white); font-size: 1.15rem; }
.papers .rule { height: 3px; width: 56px; background: var(--yellow); border-radius: 2px; margin: .2rem 0 1.2rem; } /* yellow touch 3 */
.papers dl { margin: 0; }
.papers .row { display: grid; grid-template-columns: 1fr auto; gap: 1rem;
  padding: .72rem 0; border-bottom: 1px solid rgba(221,227,234,.16); align-items: baseline; }
.papers .row:last-child { border-bottom: 0; }
.papers dt { color: var(--sky); font-weight: 500; font-size: .96rem; }
.papers dd { margin: 0; font-size: .86rem; color: rgba(221,227,234,.78); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- award band ---------- */
.award-band { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .award-band { grid-template-columns: auto 1fr; gap: 3.2rem; } }
.award-mark { width: clamp(140px, 18vw, 200px); height: auto; flex: none; }
.award-mark img { width: 100%; height: auto; }

/* ---------- testimonials, with the speech bubble ---------- */
.quote-big { font-family: var(--title); font-size: clamp(1.6rem,1.15rem+2vw,2.9rem);
  line-height: 1.32; color: var(--white); max-width: 22ch; margin-inline: auto; }
.quote-rule { height: 3px; width: 56px; background: var(--yellow); border-radius: 2px; margin: 0 auto 1.6rem; } /* yellow touch 4 */
.quote-by { font-size: .95rem; color: var(--yellow); font-weight: 500; letter-spacing: .04em; margin-top: 1.8rem; }
.testimonial-band { text-align: center; }
.testimonial-band .eyebrow { margin-bottom: 1rem; }
.bubble-tail { height: 26px; }
.bubble-tail svg { height: 26px; width: 100%; }

.quotes { display: grid; gap: 1.1rem; }
@media (min-width: 760px) { .quotes { grid-template-columns: repeat(3,1fr); } }
.quotes blockquote { margin: 0; background: rgba(255,255,255,.07); border-radius: var(--card-r); padding: 1.3rem 1.4rem; }
.quotes p { font-size: .94rem; color: rgba(221,227,234,.9); }
.quotes cite { font-style: normal; font-size: .8rem; color: var(--sky); display: block; margin-top: .8rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--cloud); margin-top: 1.8rem; }
.faq details { border-bottom: 1px solid var(--cloud); }
.faq summary { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline;
  padding: 1.15rem 0; cursor: pointer; font-weight: 600; color: var(--ink); font-size: 1.04rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 1.2rem; font-size: .96rem; max-width: 72ch; }

/* ---------- rebate split ---------- */
.split { display: grid; gap: 2rem; }
@media (min-width: 880px) { .split { grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: start; } }
.panel { background: var(--white); border-radius: var(--card-r); box-shadow: var(--shadow); padding: 1.6rem 1.7rem; }
.panel ul { margin: .8rem 0 0; padding-left: 1.15rem; font-size: .95rem; }
.panel li { margin-bottom: .45rem; }

/* ---------- closing ---------- */
.close-h { display: inline; background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 3px; }                                   /* yellow touch 5 */

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: rgba(221,227,234,.78); padding: clamp(2.4rem,5vw,3.6rem) 0 2rem; font-size: .9rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; } }
.site-foot h4 { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin: 0 0 .85rem; }
.site-foot h4.compliance { color: var(--yellow); }          /* yellow touch 5b, footer heading */
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .48rem; }
.site-foot a { color: rgba(221,227,234,.82); }
.site-foot a:hover { color: var(--white); }
.site-foot img { height: 44px; margin-bottom: .9rem; }
.foot-tag { font-family: var(--title); font-size: 1.1rem; color: var(--white); margin: 0; }
.legal { border-top: 1px solid rgba(221,227,234,.16); margin-top: 2.4rem; padding-top: 1.3rem;
  font-size: .76rem; color: rgba(221,227,234,.62); display: grid; gap: .3rem; }
.legal b { color: rgba(221,227,234,.85); font-weight: 500; }
.foot-wide { grid-column: 1 / -1; border-top: 1px solid rgba(221,227,234,.14); padding-top: 1.4rem; margin-top: .6rem; }
.foot-wide ul { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .83rem; }

/* ---------- preview chrome ---------- */
.preview-bar { background: var(--yellow); color: var(--ink); font-size: .82rem; font-weight: 500;
  text-align: center; padding: .5rem 1rem; }
.preview-bar a { color: var(--ink); border-bottom: 1px solid rgba(8,12,35,.4); }
