/* =============================================================
   Energy Forensics Group — shared stylesheet
   Clean & authoritative light theme. No build tools required.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --navy:        #133c54;
  --navy-deep:   #0d2b3d;
  --navy-line:   #26536b;
  --ember:       #c14a22;
  --ember-dark:  #9a3717;
  --ember-soft:  #f7ede6;

  /* Neutrals (warm) */
  --ink:      #17222b;
  --ink-2:    #45535f;
  --muted:    #6b7a87;
  --line:     #e4e2dc;
  --line-2:   #d5d2c9;
  --paper:    #ffffff;
  --paper-2:  #f6f4f0;
  --paper-3:  #eef0f0;

  /* Type */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,32,48,.04), 0 8px 28px rgba(16,32,48,.06);
  --shadow-lg: 0 2px 6px rgba(16,32,48,.06), 0 20px 48px rgba(16,32,48,.12);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.06rem; }
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.bg-paper2 { background: var(--paper-2); }
.bg-paper3 { background: var(--paper-3); }
.bg-navy { background: var(--navy); color: #eaf1f4; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ember);
  margin: 0 0 .9em;
}
.bg-navy .eyebrow { color: #7fc7e0; }
.lead { font-size: 1.2rem; color: var(--ink-2); line-height: 1.65; }
.bg-navy .lead { color: #cddbe2; }
.muted { color: var(--muted); }
.maxw-60 { max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 600; font-size: .98rem;
  padding: .82em 1.4em; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease, color .2s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-ember { background: var(--ember); color: #fff; }
.btn-ember:hover { background: var(--ember-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--navy); background: var(--paper-2); }
.bg-navy .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.bg-navy .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--paper-2); color: var(--navy-deep); }
.btn-lg { font-size: 1.05rem; padding: .95em 1.7em; }
.arrow::after { content: "→"; font-weight: 400; transition: transform .15s ease; }
.btn:hover .arrow::after, a.arrow:hover::after { transform: translateX(3px); }
.textlink { color: var(--navy); font-weight: 600; display: inline-flex; align-items: center; gap: .4em; }
.textlink::after { content: "→"; transition: transform .15s ease; }
.textlink:hover { text-decoration: none; }
.textlink:hover::after { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: .7em; font-family: var(--serif); font-size: 1.24rem; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 9px; flex: none;
  background: var(--navy); display: grid; place-items: center; overflow: hidden;
}
.brand .mark img { height: 28px; width: auto; display: block; }
.brand small { display: block; font-family: var(--sans); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-2); font-weight: 500; font-size: .95rem;
  padding: .5em .8em; border-radius: 6px; display: block;
}
.nav-links a:hover { color: var(--navy); background: var(--paper-2); text-decoration: none; }
.nav-links a.active { color: var(--navy); font-weight: 600; }
.nav-cta { margin-left: 8px; }
.nav-links .nav-cta a { color: #fff; }
.nav-links .nav-cta a:hover { color: #fff; background: var(--navy-deep); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; width: 44px; height: 42px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Urgency ribbon ---------- */
.ribbon {
  background: var(--ember); color: #fff; text-align: center;
  font-size: .92rem; font-weight: 500; padding: .55em 1em;
}
.ribbon a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 92px 0 76px; background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 54ch; margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 1.4em; font-size: .92rem; color: var(--muted); }

/* ---------- Callout / new-loss box ---------- */
.callbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  background: var(--ember-soft); border: 1px solid #ecd7c9;
  border-radius: var(--radius); padding: 18px 22px; margin-top: 34px;
}
.callbar .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--ember); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.callbar b { color: var(--ember-dark); }
.callbar .phone { font-family: var(--serif); font-size: 1.35rem; color: var(--ember-dark); font-weight: 600; white-space: nowrap; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-2); font-size: .98rem; margin-bottom: 1em; }
.card p:last-child { margin-bottom: 0; }

/* pathway cards (the three modes) */
.path-card { display: flex; flex-direction: column; }
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.path-card .tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.path-card .ic {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.5rem; margin-bottom: 16px;
}
.ic-ember { background: var(--ember-soft); color: var(--ember); }
.ic-navy  { background: #e5eef2; color: var(--navy); }
.ic-green { background: #e6efe7; color: #2f6b3f; }
.path-card .textlink { margin-top: auto; padding-top: 14px; }

/* feature list */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.features li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.features li:last-child { border-bottom: 0; }
.features li::before { content: "✓"; position: absolute; left: 0; top: 10px; color: var(--ember); font-weight: 700; }

/* numbered process */
.steps { counter-reset: step; display: grid; gap: 20px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .num { counter-increment: step; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; }
.step .num::before { content: counter(step); }
.step h4 { margin-bottom: .2em; }
.step p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.stat { text-align: center; padding: 10px; }
.stat .n { font-family: var(--serif); font-size: 2.4rem; color: var(--navy); line-height: 1; }
.bg-navy .stat .n { color: #fff; }
.stat .l { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.bg-navy .stat .l { color: #b9cad2; }

/* split feature block */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: -1; }
.media-panel { border-radius: var(--radius); background: var(--navy); color: #cde0e8; min-height: 320px; padding: 34px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow-lg); }
.media-panel .kicker { color: #7fc7e0; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; }
.media-panel ul { list-style: none; margin: 14px 0 0; padding: 0; }
.media-panel li { color: #cde0e8; padding: 8px 0 8px 26px; position: relative; border-top: 1px solid rgba(255,255,255,.12); }
.media-panel li:first-child { border-top: 0; }
.media-panel li::before { content: "→"; position: absolute; left: 0; color: #7fc7e0; }

/* ---------- Section heading ---------- */
.sec-head { max-width: 62ch; margin-bottom: 40px; }
.sec-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Glossary / definition list ---------- */
.deflist { display: grid; gap: 0; }
.deflist .item { padding: 20px 0; border-top: 1px solid var(--line); }
.deflist .item:last-child { border-bottom: 1px solid var(--line); }
.deflist dt { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); margin-bottom: 4px; }
.deflist dd { margin: 0; color: var(--ink-2); }

/* ---------- Case study cards ---------- */
.case { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.case .case-top { background: var(--navy); color: #fff; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.case .case-top .badge { background: rgba(255,255,255,.14); color: #fff; }
.case .case-body { padding: 24px 22px; }
.case .row { padding: 12px 0; border-top: 1px solid var(--line); }
.case .row:first-child { border-top: 0; padding-top: 0; }
.case .row .k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.case .row .v { color: var(--ink-2); }
.case .row.outcome .v { color: var(--ink); font-weight: 500; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .4em; font-size: .78rem; font-weight: 600; padding: .3em .7em; border-radius: 999px; background: var(--paper-3); color: var(--ink-2); }
.badge-ember { background: var(--ember-soft); color: var(--ember-dark); }
.badge-navy { background: #e5eef2; color: var(--navy); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--ember); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .72em .85em; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(19,60,84,.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.field .hint { font-size: .82rem; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; }

/* ---------- Draft note (visible editorial placeholder) ---------- */
.draftnote {
  border: 1px dashed #c9922e; background: #fdf6e7; color: #6b4e12;
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0;
  font-size: .9rem;
}
.draftnote b { color: #8a5a00; }
.draftnote::before { content: "✎ Draft note — replace before publishing"; display: block; font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #b07d15; margin-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-top: 56px; padding-bottom: 56px; }
.cta-band h2 { margin: 0 0 .2em; }
.cta-band p { margin: 0; color: #cbdae1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #b7c8d0; padding: 60px 0 34px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; }
.site-footer a { color: #b7c8d0; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand .mark { background: var(--navy); }
.footer-brand p { color: #93a8b2; max-width: 34ch; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #7f97a2; font-size: .84rem; }
.disclaimer { max-width: 70ch; }

/* ---------- Prose (article/legal pages) ---------- */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose blockquote { border-left: 3px solid var(--ember); margin: 1.4em 0; padding: .2em 0 .2em 1.2em; font-family: var(--serif); font-size: 1.2rem; color: var(--ink-2); font-style: italic; }

/* ---------- Print (checklist) ---------- */
.printable { max-width: 820px; }
@media print {
  .site-header, .site-footer, .ribbon, .no-print, .cta-band { display: none !important; }
  body { font-size: 12pt; }
  .section { padding: 0; }
  .card, .case { box-shadow: none; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7em .6em; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 52px; }
  .grid-2, .grid-3, .grid-4, .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .callbar .phone { font-size: 1.2rem; }
}

/* ---------- Hero visual (two-column) ---------- */
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 52px; align-items: center; }
.hero-grid .hero-actions { margin-bottom: 0; }
.hero-visual svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 40px rgba(16,32,48,.12)); }
.hero .callbar { margin-top: 40px; }

/* ---------- Inline SVG icons ---------- */
.ic svg { display: block; }
.btn svg { flex: none; }
.icon-inline { vertical-align: -3px; }

/* ---------- Article / guide pages ---------- */
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.8em; }
.prose .lead { margin-bottom: 1.4em; }
.prose .callout { background: var(--paper-2); border-left: 4px solid var(--ember); border-radius: 0 8px 8px 0; padding: 16px 22px; margin: 1.7em 0; }
.prose .callout p { margin: 0; }
.related { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 22px; }
.related p:first-child { margin-bottom: .3em; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 620px) {
  .hero-visual { display: none; }
}

/* ---------- Homepage "pick one" choice cards ---------- */
.choices { counter-reset: choice; }
.choices .card { display: flex; flex-direction: column; border-top-width: 4px; border-top-color: var(--line-2); position: relative; }
.choices .choice-ember { border-top-color: var(--ember); }
.choices .choice-navy  { border-top-color: var(--navy); }
.choices .choice-green { border-top-color: #2f6b3f; }
.choice-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; padding: .32em .8em; border-radius: 999px; margin-bottom: 12px; align-self: flex-start; }
.tag-ember { background: var(--ember-soft); color: var(--ember-dark); }
.tag-navy  { background: #e5eef2; color: var(--navy); }
.tag-green { background: #e6efe7; color: #2f6b3f; }
.choices .card h3 { margin-bottom: .4em; }
.choices .card p { flex: 1 1 auto; }
.choices .btn { margin-top: 16px; align-self: flex-start; }
.btn-line-ember { border-color: var(--ember); color: var(--ember); background: transparent; }
.btn-line-ember:hover { background: var(--ember); color: #fff; }
.btn-line-navy { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-line-navy:hover { background: var(--navy); color: #fff; }
.btn-line-green { border-color: #2f6b3f; color: #2f6b3f; background: transparent; }
.btn-line-green:hover { background: #2f6b3f; color: #fff; }

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