/* =========================================================================
   TPC Solar — Enhancements Layer
   Adds: bold hero motion, scroll reveals (extras), sticky CTA bar,
   ROI calculator, panel comparison, multi-step wizard,
   case-studies hub, downloads hub.
   Loaded AFTER main.css.
   ========================================================================= */

/* ---------- Easing + extra tokens ---------- */
:root {
  --ease-spring: cubic-bezier(.2, .8, .2, 1.05);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --shadow-elev: 0 24px 60px -24px rgba(11, 33, 48, .35);
  --grad-gold: linear-gradient(135deg, #F4C76A 0%, #C9A24F 100%);
  --grad-night: linear-gradient(180deg, #0B2130 0%, #082130 60%, #0e2c40 100%);
}

/* ---------- Hero overhaul (kinetic) ----------
   Goal: full-bleed image, image clearly visible, headline still legible.
   Approach: image at full opacity with object-fit:cover, single
   bottom-anchored dark gradient for contrast, very subtle Ken-Burns.
   Aggressively override main.css with !important where needed. */
.hero.hero-bold { min-height: 84vh; }
.hero.hero-bold .hero-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}
.hero.hero-bold .hero-bg img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 50% !important;
  opacity: 1 !important;
  transform: scale(1.04) !important;
  animation: heroZoom 30s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.04); }
  to   { transform: scale(1.10); }
}
/* Single overlay — soft bottom-vignette so headline + lead are readable
   without darkening the upper image. */
.hero.hero-bold .hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,33,48,.30) 0%, rgba(11,33,48,.10) 35%, rgba(11,33,48,.55) 100%);
  pointer-events: none;
}
/* Headline gets a soft text-shadow for contrast on the bright image. */
.hero.hero-bold h1,
.hero.hero-bold .lead,
.hero.hero-bold .eyebrow {
  text-shadow: 0 2px 18px rgba(11,33,48,.55);
}
/* Stats sit on a translucent navy band so they read on bright photo. */
.hero.hero-bold .hero-stats {
  background: rgba(11,33,48,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--sp-4) var(--sp-5);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  margin-top: var(--sp-6);
}
@media (max-width: 760px) {
  .hero.hero-bold { min-height: 78vh; }
  .hero.hero-bold .hero-bg::after {
    background: linear-gradient(180deg, rgba(11,33,48,.45) 0%, rgba(11,33,48,.78) 100%);
  }
}
.hero.hero-bold .hero-content { max-width: 760px; }
.hero.hero-bold h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-5);
}
.hero.hero-bold h1 .reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(.55em) rotate(2deg);
  filter: blur(6px);
  animation: heroWord .9s var(--ease-out-expo) forwards;
}
.hero.hero-bold h1 .reveal-word.gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes heroWord {
  to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
.hero.hero-bold .hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero.hero-bold .hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--gold-ink);
  font-weight: 500;
  line-height: 1;
}
.hero.hero-bold .hero-stat span {
  display: block;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-top: 8px;
}
@media (max-width: 760px) {
  .hero.hero-bold .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Subtle drifting light overlay on hero photo */
.hero.hero-bold .hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(244,199,106,.18), transparent 35%);
  mix-blend-mode: screen;
  animation: drift 18s linear infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(8%, 4%, 0); }
}

/* Floating project-thumbnail strip in the bottom-right of the hero,
   fills empty space and shows variety of installs. */
.hero-thumbs {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(80px, 10vh, 130px);
  display: grid;
  grid-template-columns: repeat(2, 138px);
  grid-template-rows: repeat(2, 92px);
  gap: 10px;
  z-index: 2;
  opacity: 0;
  animation: thumbsIn 1.2s 1.4s var(--ease-out-expo) forwards;
}
@keyframes thumbsIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 32px -10px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.18);
  transform: translateY(8px);
}
.hero-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out-expo);
}
.hero-thumb:hover img { transform: scale(1.08); }
.hero-thumb-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 5px 10px;
  background: linear-gradient(180deg, transparent, rgba(11,33,48,.85));
  color: var(--white);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}
@media (max-width: 1100px) {
  .hero-thumbs { display: none; }
}

/* ---------- Sticky Quote bar ---------- */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(140%);
  transition: transform .5s var(--ease-out-expo);
  z-index: 80;
  background: var(--navy-900);
  color: var(--white);
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-elev);
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100vw - 32px);
}
.sticky-cta.is-visible { transform: translateX(-50%) translateY(0); }
.sticky-cta-text {
  font-size: .95rem;
  letter-spacing: .01em;
}
.sticky-cta-text strong { color: var(--gold-ink); font-weight: 600; }
.sticky-cta .btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .9rem;
}
.sticky-cta-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  line-height: 1;
}
.sticky-cta-close:hover { color: var(--white); }
@media (max-width: 540px) {
  .sticky-cta { padding: 10px 10px 10px 14px; }
  .sticky-cta-text { display: none; }
}

/* ---------- Page hero block (reusable for tool pages) ---------- */
.tool-hero {
  background: var(--grad-night);
  color: var(--white);
  padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.tool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(244,199,106,.15), transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(244,199,106,.08), transparent 40%);
  pointer-events: none;
}
.tool-hero .container { position: relative; z-index: 1; }
.tool-hero .eyebrow { color: var(--gold-ink); }
.tool-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -.018em;
  line-height: 1.08;
  color: var(--white);
  margin: 12px 0 18px;
  max-width: 18ch;
}
.tool-hero p.lead { color: rgba(255,255,255,.78); max-width: 60ch; }

/* ---------- ROI calculator ---------- */
.roi-shell {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--sp-7);
  align-items: stretch;
}
@media (max-width: 920px) { .roi-shell { grid-template-columns: 1fr; } }

.roi-form {
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 16px;
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-4);
}
.roi-row { display: grid; gap: 6px; }
.roi-row label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy-700);
}
.roi-row .hint { font-size: .8rem; color: var(--navy-500); }
.roi-row input, .roi-row select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  color: var(--navy-900);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.roi-row input:focus, .roi-row select:focus {
  outline: 0;
  border-color: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(201,162,79,.18);
}
.roi-slider-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.roi-slider-wrap output {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 1rem;
  color: var(--navy-900);
  background: var(--stone-100);
  padding: 6px 10px;
  border-radius: 8px;
  min-width: 110px;
  text-align: center;
}
input[type=range] {
  appearance: none;
  height: 6px;
  background: var(--stone-200);
  border-radius: 999px;
  padding: 0;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold-600);
  border: 3px solid var(--white);
  box-shadow: 0 2px 6px rgba(11,33,48,.2);
  cursor: pointer;
  transition: transform .2s var(--ease);
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.1); }

.roi-results {
  background: var(--grad-night);
  color: var(--white);
  border-radius: 16px;
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.roi-results::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  right: -100px; top: -100px;
  background: radial-gradient(circle, rgba(244,199,106,.18), transparent 70%);
  pointer-events: none;
}
.roi-results h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--white);
}
.roi-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.roi-stat {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: var(--sp-4);
}
.roi-stat .label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 8px;
}
.roi-stat .value {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--gold-ink);
  line-height: 1;
}
.roi-stat .unit { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 4px; }

.roi-bar {
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--sp-3);
}
.roi-bar-fill {
  height: 100%;
  background: var(--grad-gold);
  border-radius: 999px;
  transition: width .8s var(--ease-out-expo);
}
.roi-disclaimer {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ---------- Panel Comparison ---------- */
.compare-shell { display: grid; gap: var(--sp-5); }
.compare-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 760px) { .compare-picker { grid-template-columns: 1fr; } }
.compare-slot {
  border: 2px dashed var(--stone-200);
  border-radius: 14px;
  padding: var(--sp-4);
  background: var(--white);
  transition: all .3s var(--ease);
  position: relative;
}
.compare-slot.has-panel {
  border-style: solid;
  border-color: var(--gold-500);
  box-shadow: var(--shadow-md);
}
.compare-slot select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--stone-200);
  background: var(--stone-100);
  border-radius: 10px;
  font: inherit;
}
.compare-slot .slot-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--stone-100);
  border-radius: 10px;
  margin-bottom: 12px;
  object-fit: cover;
  display: block;
}
.compare-slot .slot-brand-badge {
  display: inline-block;
  background: var(--grad-night);
  color: var(--gold-ink);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.compare-slot .slot-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: var(--navy-900);
}
.compare-slot .slot-class {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 12px;
}
.compare-slot button.slot-clear {
  position: absolute;
  top: 10px; right: 10px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--stone-100);
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  color: var(--navy-700);
  transition: background .2s var(--ease);
}
.compare-slot button.slot-clear:hover { background: var(--stone-200); }

.compare-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--stone-200); }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--stone-200);
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .01em;
}
.compare-table th:first-child {
  background: var(--stone-100);
  color: var(--navy-700);
  font-family: var(--font-sans, Inter);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  width: 220px;
}
.compare-table td.best {
  background: rgba(244,199,106,.12);
  color: var(--navy-900);
  font-weight: 600;
}
.compare-table td.best::after {
  content: " ★";
  color: var(--gold-ink);
}

/* ---------- Multi-step Quote Wizard ---------- */
.wizard {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 56px);
  box-shadow: var(--shadow-elev);
}
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-5);
}
.wizard-step-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--stone-100);
  border-radius: 999px;
  color: var(--navy-500);
  font-size: .82rem;
  letter-spacing: .04em;
  font-weight: 600;
  transition: all .3s var(--ease);
}
.wizard-step-pill .num {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy-500);
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid var(--stone-200);
}
.wizard-step-pill.is-active {
  background: var(--navy-900);
  color: var(--white);
}
.wizard-step-pill.is-active .num { background: var(--gold-500); color: var(--navy-900); border-color: transparent; }
.wizard-step-pill.is-done { background: rgba(60,140,90,.1); color: #2e6b46; }
.wizard-step-pill.is-done .num { background: #2e6b46; color: var(--white); border-color: transparent; }
.wizard-step-pill.is-done .num::after { content: "✓"; }
.wizard-step-pill.is-done .num span { display: none; }

.wizard-panel { display: none; }
.wizard-panel.is-active { display: block; animation: wizardIn .4s var(--ease-out-expo); }
@keyframes wizardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
}
.wizard .step-hint { color: var(--navy-500); margin-bottom: var(--sp-4); }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
}
.choice {
  border: 2px solid var(--stone-200);
  border-radius: 12px;
  padding: var(--sp-4);
  cursor: pointer;
  transition: all .25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--white);
}
.choice:hover { border-color: var(--gold-500); transform: translateY(-2px); }
.choice.is-selected {
  border-color: var(--gold-600);
  background: rgba(244,199,106,.08);
  box-shadow: 0 4px 12px rgba(201,162,79,.18);
}
.choice .icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--stone-100);
  border-radius: 10px;
  color: var(--navy-700);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.choice .icon svg { width: 22px; height: 22px; display: block; }
.choice:hover .icon { background: var(--gold-50); color: var(--gold-ink); }
.choice.is-selected .icon { background: var(--grad-gold); color: var(--navy-900); }
.choice strong { font-family: var(--font-serif); font-weight: 500; font-size: 1.05rem; }
.choice span { font-size: .85rem; color: var(--navy-500); }

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--stone-200);
}

.wizard-summary {
  background: var(--stone-100);
  border-radius: 12px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.wizard-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 0; }
.wizard-summary dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy-500); }
.wizard-summary dd { margin: 0; font-weight: 600; color: var(--navy-900); }

.wizard-success {
  text-align: center;
  padding: var(--sp-5);
}
.wizard-success-icon {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--grad-gold);
  display: grid; place-items: center;
  font-size: 2.6rem;
  color: var(--white);
  margin: 0 auto var(--sp-4);
  animation: pop .6s var(--ease-spring);
}
@keyframes pop {
  0% { transform: scale(.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================================
   Rich Case Study layout
   ========================================================================= */
.case-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: var(--sp-7);
  padding: var(--sp-7) 0;
}
@media (max-width: 920px) { .case-shell { grid-template-columns: 1fr; } }

/* Sticky project-facts sidebar */
.case-facts {
  position: sticky;
  top: 100px;
  align-self: start;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: var(--sp-5);
  box-shadow: 0 4px 24px rgba(11,33,48,.06);
}
.case-facts h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 var(--sp-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stone-200);
}
.case-facts dl { margin: 0; display: grid; gap: 14px; }
.case-facts dt {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy-500);
  margin-bottom: 4px;
}
.case-facts dd {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--navy-900);
  font-size: .98rem;
  line-height: 1.35;
}
.case-facts dd strong { color: var(--gold-ink); font-weight: 600; }
.case-facts .case-facts-cta {
  display: block;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--stone-200);
  text-align: center;
}

.case-body { display: flex; flex-direction: column; gap: var(--sp-7); }
.case-section { }
.case-section h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 8px 0 var(--sp-3);
  letter-spacing: -.012em;
}
.case-section p { color: var(--navy-700); font-size: 1.02rem; line-height: 1.65; }
.case-section .eyebrow { color: var(--gold-ink); }

/* Timeline */
.case-timeline { position: relative; padding-left: 28px; }
.case-timeline::before {
  content: ""; position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-500), var(--stone-200));
}
.case-timeline .tl-step {
  position: relative;
  padding-bottom: var(--sp-4);
}
.case-timeline .tl-step:last-child { padding-bottom: 0; }
.case-timeline .tl-step::before {
  content: ""; position: absolute;
  left: -27px; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--gold-500);
  box-shadow: 0 0 0 4px rgba(244,199,106,.15);
}
.case-timeline .tl-date {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .78rem;
  color: var(--navy-500);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.case-timeline .tl-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 4px;
  color: var(--navy-900);
}
.case-timeline .tl-detail { color: var(--navy-500); font-size: .94rem; margin: 0; }

/* Equipment list */
.case-equipment {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
}
.case-equipment th, .case-equipment td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--stone-200);
  vertical-align: top;
}
.case-equipment thead th {
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-sans, Inter);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.case-equipment tbody tr:hover { background: var(--stone-100); }
.case-equipment .qty { font-family: var(--font-mono, "JetBrains Mono", monospace); color: var(--gold-ink); font-weight: 600; }
.case-equipment-wrap {
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  overflow: hidden;
}

/* Performance bar chart (CSS-only) */
.case-perf {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 240px;
  padding: var(--sp-4);
  background: var(--stone-100);
  border-radius: 12px;
}
.case-perf-bar {
  position: relative;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  border-radius: 4px 4px 0 0;
  min-height: 20%;
  transition: filter .2s var(--ease);
  cursor: default;
}
.case-perf-bar:hover { filter: brightness(1.1); }
.case-perf-bar::after {
  content: attr(data-month);
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy-500);
}
.case-perf-bar:hover::before {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .72rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.case-perf-wrap { padding-bottom: 28px; }

/* Pull quote */
.case-quote {
  background: var(--navy-900);
  color: var(--white);
  padding: var(--sp-7) var(--sp-7);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.case-quote::before {
  content: "\201C";
  position: absolute;
  top: -20px; left: 18px;
  font-family: var(--font-serif);
  font-size: 9rem;
  color: var(--gold-ink);
  opacity: .4;
  line-height: 1;
}
.case-quote blockquote {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  line-height: 1.45;
  margin: 0 0 var(--sp-4);
  color: var(--white);
  max-width: 60ch;
  position: relative;
  z-index: 1;
}
.case-quote cite {
  font-style: normal;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* Photo gallery with captions */
.case-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 540px;
}
.case-gallery > a:nth-child(1) { grid-row: span 2; }
.case-gallery > a {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--stone-200);
}
.case-gallery > a img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out-expo);
}
.case-gallery > a:hover img { transform: scale(1.04); }
.case-gallery .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(180deg, transparent, rgba(11,33,48,.85));
  color: var(--white);
  font-size: .85rem;
}
@media (max-width: 760px) {
  .case-gallery { grid-template-columns: 1fr; grid-template-rows: none; height: auto; }
  .case-gallery > a { aspect-ratio: 16 / 10; }
  .case-gallery > a:nth-child(1) { grid-row: auto; }
}

/* Related case studies */
.case-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

/* ---------- Case Studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-5);
}
.case-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s var(--ease-out-expo), box-shadow .3s var(--ease);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-elev); }
.case-card-img { aspect-ratio: 16 / 10; overflow: hidden; }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out-expo); }
.case-card:hover .case-card-img img { transform: scale(1.05); }
.case-card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.case-card-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--stone-100);
  color: var(--gold-ink);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.case-card h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.4rem; margin: 0; line-height: 1.2; }
.case-card p { color: var(--navy-500); font-size: .94rem; margin: 0; }
.case-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--stone-200);
}
.case-card-meta div { font-size: .8rem; color: var(--navy-500); }
.case-card-meta strong { display: block; font-family: var(--font-serif); color: var(--navy-900); font-size: 1.1rem; font-weight: 500; }

/* Case detail */
.case-hero { position: relative; min-height: 64vh; display: flex; align-items: flex-end; color: var(--white); padding: var(--sp-7) 0; overflow: hidden; }
.case-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(11,33,48,.86) 0%, rgba(11,33,48,.62) 45%, rgba(11,33,48,.9) 100%); z-index: 1; }
.case-hero-bg { position: absolute; inset: 0; }
.case-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.case-hero .container { position: relative; z-index: 2; }
.case-hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.06; margin: 0 0 18px; max-width: 22ch; color: var(--white); }
.case-hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.case-hero-tags span { background: rgba(255,255,255,.15); padding: 6px 14px; border-radius: 999px; font-size: .82rem; letter-spacing: .04em; color: var(--white); border: 1px solid rgba(255,255,255,.18); }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--stone-200);
}
@media (max-width: 760px) { .metric-strip { grid-template-columns: repeat(2, 1fr); } }
.metric-strip > div {
  padding: var(--sp-5) var(--sp-4);
  border-right: 1px solid var(--stone-200);
}
.metric-strip > div:last-child { border-right: 0; }
.metric-strip strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--gold-ink);
  line-height: 1;
}
.metric-strip span {
  display: block;
  margin-top: 8px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--navy-500);
}

/* ---------- Downloads hub ---------- */
.dl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-5); }
.dl-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--navy-700);
  transition: all .2s var(--ease);
}
.dl-chip:hover { border-color: var(--navy-900); }
.dl-chip.is-active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.dl-card {
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  transition: all .25s var(--ease-out-expo);
  text-decoration: none;
  color: inherit;
}
.dl-card:hover { border-color: var(--gold-500); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.dl-icon {
  width: 56px; height: 70px;
  background: var(--grad-night);
  color: var(--gold-ink);
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.dl-icon::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  border-style: solid;
  border-width: 0 14px 14px 0;
  border-color: transparent var(--white) transparent transparent;
}
.dl-card h3 { font-size: 1rem; margin: 0 0 4px; font-family: var(--font-sans, Inter); font-weight: 600; color: var(--navy-900); }
.dl-card p { font-size: .82rem; color: var(--navy-500); margin: 0 0 8px; line-height: 1.45; }
.dl-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-meta span { font-size: .72rem; color: var(--navy-500); padding: 2px 8px; background: var(--stone-100); border-radius: 999px; }

/* ---------- RTL adjustments for new components ---------- */
[dir="rtl"] .roi-shell,
[dir="rtl"] .compare-picker,
[dir="rtl"] .case-grid,
[dir="rtl"] .dl-grid { direction: rtl; }
[dir="rtl"] .roi-results::before { right: auto; left: -100px; }
[dir="rtl"] .wizard-actions { flex-direction: row-reverse; }
[dir="rtl"] .compare-table th, [dir="rtl"] .compare-table td { text-align: right; }
[dir="rtl"] .metric-strip > div { border-right: 0; border-left: 1px solid var(--stone-200); }
[dir="rtl"] .metric-strip > div:last-child { border-left: 0; }
[dir="rtl"] .dl-card { flex-direction: row-reverse; }
[dir="rtl"] .sticky-cta { flex-direction: row-reverse; }
[dir="rtl"] .hero.hero-bold .hero-stats { direction: rtl; }
[dir="rtl"] .compare-table td.best::after { content: " ★"; }

/* =========================================================================
   Layout fixes (post-launch)
   ========================================================================= */

/* FIX 1 — Stat-monument: a duplicate rule in main.css makes the SECTION
   itself a 4-col grid, which collapses .container into the leftmost column.
   Override: section is a normal block, .container is the 4-col grid. */
.stat-monument {
  display: block !important;
  grid-template-columns: none !important;
  background: var(--stone-50);
  padding: var(--sp-9) 0;
}
.stat-monument .container {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1px;
  background: var(--stone-200);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}
.stat-monument .stat-cell {
  background: var(--white);
  padding: 48px 32px;
  text-align: center;
  border-right: 0;
}
@media (max-width: 880px) {
  .stat-monument .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stat-monument .container { grid-template-columns: 1fr; }
}

/* FIX 2 — Capability project cards were too tall with empty space.
   Make them flex-column with proper image sizing. */
.project-grid { gap: var(--sp-5); }
.project-card {
  display: flex !important;
  flex-direction: column !important;
}
.project-card .img {
  aspect-ratio: 16 / 11 !important;
  flex: 0 0 auto;
}
.project-card .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-card h4 { line-height: 1.25; margin-bottom: 6px; }

/* FIX 3 — Testimonials: last card was cut off. Add a right-edge fade
   indicator so users see there's more, plus a scroll hint. */
.testimonials { position: relative; }
.testimonials::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 80px;
  background: linear-gradient(90deg, transparent, var(--navy-900) 70%);
  pointer-events: none;
  z-index: 3;
}
.testimonial-track {
  scroll-padding-left: 24px;
  scroll-padding-right: 80px;
}
@media (max-width: 1300px) {
  .testimonial-card { flex-basis: 380px !important; padding: 36px 30px !important; }
}
@media (max-width: 720px) {
  .testimonial-card { flex-basis: 86vw !important; }
}

/* FIX 4 — Safety / Sustainability donut labels colliding with description.
   Add breathing space below the dashboard before the description paragraph. */
.impact-dashboard {
  margin-bottom: var(--sp-6);
  align-items: start;
}
.impact-ring {
  margin-bottom: 8px;
}
.impact-ring .ring-label {
  margin-top: 14px !important;
  max-width: 180px !important;
}
.esg-footer {
  margin-top: var(--sp-7) !important;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--stone-200);
}

/* FIX 5 — Recognition cards on epc.html had heavy empty side margins.
   Force the cards-grid to span full container. */
.cert-grid,
.recognition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
  max-width: 100%;
}

/* FIX 6 — Recognition awards-ribbon: force horizontal single row across
   the container, evenly spaced, instead of the prior 3x2 stack. */
.awards-ribbon {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 14px !important;
  width: 100%;
  max-width: 100%;
}
.awards-ribbon .award-medal {
  padding: 16px 12px !important;
  text-align: center;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 0 !important;
}
.awards-ribbon .award-medal-icon {
  width: 44px !important;
  height: 44px !important;
  font-size: .9rem !important;
}
.awards-ribbon .award-medal-name { font-size: .9rem !important; }
.awards-ribbon .award-medal-org  { font-size: .68rem !important; line-height: 1.3 !important; }
@media (max-width: 900px) {
  .awards-ribbon { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 540px) {
  .awards-ribbon { grid-template-columns: repeat(2, 1fr) !important; }
}

/* FIX 7 — Insights cards: equalize heights so the 3 cards align cleanly */
.insight-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: var(--sp-4) !important;
  align-items: stretch !important;
}
.insight-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}
.insight-card .visual {
  aspect-ratio: 16 / 10 !important;
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
}
.insight-card .body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.insight-card.featured { grid-column: span 1; }
.insight-card .insight-meta { margin-top: auto !important; padding-top: 10px; }
@media (max-width: 920px) {
  .insight-grid { grid-template-columns: 1fr !important; }
}

/* FIX 8 — Capability cards: darker placeholder bg so even if the photo
   is light/sky-heavy the card doesn't read as "empty". Plus a subtle
   gradient overlay on the image bottom to give the card more presence. */
.project-card .img {
  background: var(--navy-900) !important;
  position: relative;
}
.project-card .img::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(11,33,48,.35));
  pointer-events: none;
}

/* FIX 9 — Global map: dark navy bg, no orbital line, label spacing */
.global-map-section {
  background: var(--navy-900);
  color: var(--white);
  padding: var(--sp-9) 0;
  position: relative;
  overflow: hidden;
}
.global-map-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(244,199,106,.06), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(244,199,106,.04), transparent 40%);
  pointer-events: none;
}
.global-map-section .container { position: relative; z-index: 1; }
.global-map-section h2 { color: var(--white); }
.global-map-wrap { margin-top: var(--sp-6); }
.global-map-svg {
  width: 100%;
  height: auto;
  max-width: 1000px;
  margin: 0 auto;
  display: block;
}
.global-map-svg .map-pins circle {
  filter: drop-shadow(0 0 8px rgba(244,199,106,.45));
}
.global-map-svg .map-pins text {
  paint-order: stroke;
  stroke: rgba(11,33,48,.55);
  stroke-width: .4px;
}

/* Radiating reach pulse from NZ Office (Auckland) — conveys global reach */
.global-map-svg .reach-pulse {
  transform-origin: 912px 408px;
  opacity: 0;
  animation: reachPulse 4s linear infinite;
}
.global-map-svg .reach-pulse-2 { animation-delay: 1.3s; }
.global-map-svg .reach-pulse-3 { animation-delay: 2.6s; }
@keyframes reachPulse {
  0%   { r: 11; opacity: .85; stroke-width: 2; }
  100% { r: 460; opacity: 0; stroke-width: .3; }
}
/* Office pin glow */
.global-map-svg .map-pins circle {
  filter: drop-shadow(0 0 6px rgba(244,199,106,.5));
}

/* =========================================================
   CASE STUDY (flagship) — reusable design system
   For: case-studies/*.html
   ========================================================= */
.cs-hero {
  position: relative;
  min-height: 78vh;
  background: var(--navy-900);
  overflow: hidden;
  color: var(--white);
  display: flex; align-items: flex-end;
}
.cs-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.55) saturate(1.05);
  transform: scale(1.04);
  animation: cs-hero-zoom 28s ease-out forwards;
}
@keyframes cs-hero-zoom { to { transform: scale(1); } }
.cs-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 45%, rgba(15,26,36,.55) 80%, rgba(15,26,36,.92) 100%);
  pointer-events: none;
}
.cs-hero .container { position: relative; z-index: 1; padding: var(--sp-8) 0 var(--sp-7); width: 100%; }
.cs-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(244,184,60,.14);
  border: 1px solid rgba(244,184,60,.35);
  border-radius: 999px;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: var(--sp-4);
}
.cs-hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.cs-hero h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2.2rem, 5.6vw, 4.2rem);
  line-height: 1.05; letter-spacing: -.02em;
  color: var(--white);
  max-width: 22ch;
  margin: 0 0 var(--sp-3);
}
.cs-hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.78); max-width: 56ch; margin: 0 0 var(--sp-5); }
.cs-hero-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: .8rem; letter-spacing: .08em;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: var(--sp-4);
}
.cs-hero-meta strong { color: var(--gold-ink); font-weight: 600; }

/* Sticky sub-nav for in-page sections */
.cs-subnav {
  position: sticky; top: 64px; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-200);
}
.cs-subnav-inner {
  display: flex; gap: var(--sp-5);
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.cs-subnav-inner::-webkit-scrollbar { display: none; }
.cs-subnav-inner a {
  color: var(--navy-500);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cs-subnav-inner a:hover, .cs-subnav-inner a.is-active { color: var(--navy-900); border-bottom-color: var(--gold-500); }

/* KPI counter strip */
.cs-kpis {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-7) 0;
  border-bottom: 1px solid var(--stone-200);
}
@media (max-width: 920px) { .cs-kpis { grid-template-columns: repeat(2, 1fr); } }
.cs-kpi {
  position: relative;
  padding: var(--sp-4) var(--sp-3);
}
.cs-kpi:not(:last-child)::after {
  content: ""; position: absolute; right: 0; top: 16%; bottom: 16%;
  width: 1px; background: var(--stone-200);
}
@media (max-width: 920px) { .cs-kpi:not(:last-child)::after { display: none; } }
.cs-kpi-value {
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  color: var(--navy-900);
  line-height: 1;
  letter-spacing: -.02em;
}
.cs-kpi-unit { font-size: .55em; color: var(--gold-ink); font-weight: 600; margin-left: 4px; }
.cs-count { font-variant-numeric: tabular-nums; }
.cs-kpi-label {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-500);
  margin-top: 10px;
}
.cs-kpi-sub { font-size: .82rem; color: var(--navy-500); margin-top: 6px; line-height: 1.4; }

/* Reveal-on-scroll */
.cs-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out-expo), transform .8s var(--ease-out-expo); }
.cs-reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .cs-reveal { opacity: 1; transform: none; transition: none; }
  .cs-hero-bg { animation: none; transform: none; }
}

/* Section blocks */
.cs-section { padding: var(--sp-8) 0; border-top: 1px solid var(--stone-200); }
.cs-section:first-of-type { border-top: 0; }
.cs-eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-ink); font-weight: 600; margin-bottom: var(--sp-3); }
.cs-h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; letter-spacing: -.015em; color: var(--navy-900); margin: 0 0 var(--sp-4); max-width: 28ch; }
.cs-prose { max-width: 64ch; }
.cs-prose p { font-size: 1.05rem; line-height: 1.75; color: var(--navy-700); margin: 0 0 var(--sp-4); }
.cs-prose strong { color: var(--navy-900); }

/* Two-column split */
.cs-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-7); align-items: start; }
@media (max-width: 920px) { .cs-split { grid-template-columns: 1fr; } }

/* Stat callout card */
.cs-callout {
  background: var(--grad-night);
  color: var(--white);
  padding: var(--sp-6);
  border-radius: 16px;
  position: relative; overflow: hidden;
}
.cs-callout::before {
  content: ""; position: absolute;
  width: 280px; height: 280px;
  right: -80px; top: -80px;
  background: radial-gradient(circle, rgba(244,184,60,.18), transparent 70%);
  pointer-events: none;
}
.cs-callout h3 { font-family: var(--font-serif); font-weight: 500; font-size: 1.4rem; color: var(--white); margin: 0 0 var(--sp-3); }
.cs-callout ul { padding-left: 18px; margin: 0; }
.cs-callout li { color: rgba(255,255,255,.85); line-height: 1.7; margin-bottom: 8px; font-size: .94rem; }
.cs-callout li strong { color: var(--gold-ink); }

/* Architecture diagram container */
.cs-arch { background: var(--stone-100); border: 1px solid var(--stone-200); border-radius: 16px; padding: var(--sp-6); margin-top: var(--sp-5); }
.cs-arch svg { width: 100%; height: auto; max-width: 880px; margin: 0 auto; display: block; }
.cs-arch-legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--stone-200); font-size: .82rem; color: var(--navy-700); }
.cs-arch-legend > div { display: flex; align-items: center; gap: 8px; }
.cs-arch-legend .swatch { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }

/* BoM table */
.cs-bom-table { width: 100%; border-collapse: collapse; margin-top: var(--sp-4); font-size: .92rem; }
.cs-bom-table th, .cs-bom-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--stone-200); }
.cs-bom-table th { background: var(--stone-100); font-weight: 600; color: var(--navy-900); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.cs-bom-table tbody tr { transition: background var(--dur) var(--ease); }
.cs-bom-table tbody tr:hover { background: rgba(244,184,60,.05); }
.cs-bom-table .qty { font-family: var(--font-mono, "JetBrains Mono", monospace); color: var(--gold-ink); font-weight: 600; white-space: nowrap; }
.cs-bom-table .nz-flag { font-size: .68rem; color: var(--navy-500); padding: 2px 8px; background: var(--stone-100); border-radius: 999px; margin-left: 6px; }

/* Generation chart */
.cs-chart { background: var(--white); border: 1px solid var(--stone-200); border-radius: 16px; padding: var(--sp-6) var(--sp-5) var(--sp-5); margin-top: var(--sp-5); }
.cs-chart-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.cs-chart-title { font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem; color: var(--navy-900); margin: 0; }
.cs-chart-total { font-size: .92rem; color: var(--navy-500); }
.cs-chart-total strong { font-family: var(--font-mono, "JetBrains Mono", monospace); color: var(--navy-900); font-size: 1.1rem; margin-right: 4px; }
.cs-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 220px; padding: 0 4px; border-bottom: 1px solid var(--stone-200); }
.cs-bar { background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); border-radius: 4px 4px 0 0; height: 0; transition: height 1.4s var(--ease-out-expo); position: relative; cursor: default; }
.cs-bar:hover { background: linear-gradient(180deg, var(--gold-500), var(--gold-600)); }
.cs-bar:hover .cs-bar-tip { opacity: 1; transform: translateY(-4px); }
.cs-bar-tip {
  position: absolute; left: 50%; bottom: 100%; transform: translateY(0);
  background: var(--navy-900); color: var(--white);
  padding: 6px 10px; border-radius: 6px;
  font-size: .78rem; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  margin-left: -50%;
}
.cs-bar-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--navy-900); }
.cs-bars-x { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; padding: 8px 4px 0; font-size: .7rem; color: var(--navy-500); text-align: center; letter-spacing: .04em; text-transform: uppercase; }

/* Lessons learned cards */
.cs-lessons { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); margin-top: var(--sp-5); }
@media (max-width: 920px) { .cs-lessons { grid-template-columns: 1fr; } }
.cs-lesson { padding: var(--sp-5); background: var(--white); border: 1px solid var(--stone-200); border-radius: 14px; transition: all var(--dur) var(--ease); }
.cs-lesson:hover { border-color: var(--gold-500); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cs-lesson-num { font-family: var(--font-mono, monospace); font-size: .78rem; color: var(--gold-ink); letter-spacing: .14em; margin-bottom: 8px; }
.cs-lesson h4 { font-family: var(--font-serif); font-weight: 500; font-size: 1.15rem; margin: 0 0 var(--sp-2); color: var(--navy-900); line-height: 1.3; }
.cs-lesson p { font-size: .92rem; color: var(--navy-700); line-height: 1.65; margin: 0; }

/* Photo gallery */
.cs-gallery { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 180px; gap: var(--sp-3); margin-top: var(--sp-5); }
@media (max-width: 760px) { .cs-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; } }
.cs-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 12px; }
.cs-gallery figure:nth-child(1) { grid-column: span 4; grid-row: span 2; }
.cs-gallery figure:nth-child(2) { grid-column: span 2; }
.cs-gallery figure:nth-child(3) { grid-column: span 2; }
.cs-gallery figure:nth-child(4) { grid-column: span 3; }
.cs-gallery figure:nth-child(5) { grid-column: span 3; }
@media (max-width: 760px) {
  .cs-gallery figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .cs-gallery figure:nth-child(n+2) { grid-column: span 1; }
}
.cs-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out-expo); }
.cs-gallery figure:hover img { transform: scale(1.05); }
.cs-gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(15,26,36,.85));
  color: var(--white);
  font-size: .8rem;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.cs-gallery figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* Pull quote */
.cs-quote {
  position: relative;
  margin: var(--sp-7) 0 0;
  padding: var(--sp-6) var(--sp-7);
  background: var(--stone-100);
  border-left: 4px solid var(--gold-500);
  border-radius: 0 14px 14px 0;
}
.cs-quote::before {
  content: "\201C";
  position: absolute; top: 8px; right: 24px;
  font-family: var(--font-serif);
  font-size: 6rem;
  color: var(--gold-300);
  line-height: 1;
}
.cs-quote blockquote { margin: 0; font-family: var(--font-serif); font-weight: 400; font-style: italic; font-size: 1.3rem; line-height: 1.5; color: var(--navy-900); max-width: 60ch; }
.cs-quote cite { display: block; margin-top: var(--sp-4); font-style: normal; font-size: .85rem; color: var(--navy-500); }
.cs-quote cite strong { color: var(--navy-900); font-weight: 600; }
.cs-quote-disclaimer { font-size: .72rem; color: var(--navy-500); margin-top: var(--sp-3); font-style: italic; }

/* Reference profile disclaimer banner */
.cs-disclaimer {
  background: #FEF7E6;
  border: 1px solid var(--gold-300);
  border-radius: 12px;
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-6) 0;
  font-size: .88rem;
  color: var(--navy-900);
  line-height: 1.6;
}
.cs-disclaimer strong { color: var(--gold-ink); }

/* Prev / Next */
.cs-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-7); padding-top: var(--sp-6); border-top: 1px solid var(--stone-200); }
@media (max-width: 760px) { .cs-prevnext { grid-template-columns: 1fr; } }
.cs-prevnext a { padding: var(--sp-4) var(--sp-5); border: 1px solid var(--stone-200); border-radius: 12px; text-decoration: none; color: var(--navy-900); transition: all var(--dur) var(--ease); }
.cs-prevnext a:hover { border-color: var(--gold-500); background: var(--stone-100); transform: translateY(-2px); }
.cs-prevnext .label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-500); margin-bottom: 6px; }
.cs-prevnext .title { font-family: var(--font-serif); font-weight: 500; font-size: 1.05rem; line-height: 1.35; color: var(--navy-900); }
.cs-prevnext .next { text-align: right; }

/* Final CTA band */
.cs-cta-band {
  background: var(--grad-night);
  color: var(--white);
  padding: var(--sp-8) 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.cs-cta-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(244,199,106,.18), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(244,199,106,.10), transparent 50%);
  pointer-events: none;
}
.cs-cta-band h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--white); margin: 0 0 var(--sp-3); position: relative; z-index: 1; }
.cs-cta-band p { color: rgba(255,255,255,.78); max-width: 56ch; margin: 0 auto var(--sp-5); position: relative; z-index: 1; }
.cs-cta-band .cs-cta-buttons { position: relative; z-index: 1; display: inline-flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }

/* ===== Mobile-first refinements (added 2026-06) ===== */
@media (max-width: 640px) {
  .hero { min-height: 76vh; }
  .nav-mobile-toggle { width: 44px; height: 44px; }
  .btn-sm { min-height: 40px; }
}
