/* ==========================================================================
   negaWatt Belgium — Sufficiency hypotheses website
   Single stylesheet. Edit CSS variables below to re-theme the whole site.
   ========================================================================== */

:root {
  /* Brand palette (sampled from the negaWatt Belgium website) */
  --nw-teal:        #1a9c98;
  --nw-teal-dark:   #137c79;
  --nw-teal-darker: #0d5d5b;
  --nw-cream:       #f6f1d8;
  --nw-mint:        #d9ece4;
  --nw-mint-soft:   #eef6f1;

  /* Functional colours */
  --ink:        #20302f;
  --ink-soft:   #4a5b5a;
  --muted:      #768584;
  --line:       #e3e8e6;
  --bg:         #ffffff;
  --bg-alt:     #f4f8f6;

  /* Change badges */
  --down:       #1f9d57;   /* a reduction (good for sufficiency) */
  --down-bg:    #e5f5ec;
  --up:         #c0612a;   /* an increase */
  --up-bg:      #fbeede;
  --flat:       #5a6b6a;
  --flat-bg:    #eceeed;

  /* Layout */
  --maxw:       1120px;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(13, 93, 91, 0.06), 0 8px 24px rgba(13, 93, 91, 0.08);
  --shadow-sm:  0 1px 3px rgba(13, 93, 91, 0.08);

  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------ Base ------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 130px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }

a { color: var(--nw-teal-dark); text-decoration: none; }
a:hover { color: var(--nw-teal-darker); text-decoration: underline; }

p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* ------------------------------ Header ----------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; }

.header-bar {
  background: var(--nw-teal);
  color: #fff;
  text-align: center;
  font-size: .92rem;
  padding: 8px 16px;
}
.header-bar a { color: #fff; font-weight: 600; text-decoration: underline; }

.header-main {
  background: var(--nw-cream);
  border-bottom: 1px solid #e8e1bf;
}
.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: .94rem;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(26, 156, 152, .12); color: var(--nw-teal-darker); }
.nav a.active { background: var(--nw-teal); color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; color: var(--ink); padding: 4px 8px;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch;
    background: var(--nw-cream);
    border-bottom: 1px solid #e8e1bf;
    padding: 8px 16px 16px;
    gap: 2px;
  }
  .nav.open { display: flex; }
  .header-main .container { position: relative; }
}

/* ------------------------------ Hero ------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--nw-mint) 0%, var(--nw-mint-soft) 60%, #fff 100%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--nw-teal-dark);
  margin-bottom: 12px;
}
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 720px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Sector / page header (lighter than hero) */
.page-head {
  background: linear-gradient(160deg, var(--nw-mint-soft), #fff);
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--nw-teal-dark); margin-bottom: 10px;
}
.page-head p.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 760px; }

/* ------------------------------ Buttons ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--nw-teal); color: #fff;
  font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { background: var(--nw-teal-dark); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--nw-teal-dark); border-color: var(--nw-teal); }
.btn.secondary:hover { background: var(--nw-mint-soft); color: var(--nw-teal-darker); }
.btn .icon { width: 18px; height: 18px; }

/* ------------------------------ Sections --------------------------------- */
section.block { padding: 48px 0; }
section.block.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-intro { max-width: 760px; margin-bottom: 8px; }

/* ------------------------------ Sector cards (landing) ------------------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.sector-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .15s, border-color .15s;
  text-decoration: none; color: inherit;
}
.sector-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--nw-teal);
  text-decoration: none;
}
.sector-card .sicon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--nw-mint); color: var(--nw-teal-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.sector-card .sicon svg { width: 28px; height: 28px; }
.sector-card h3 { margin-bottom: 6px; }
.sector-card p { color: var(--ink-soft); margin: 0 0 14px; font-size: .95rem; }
.sector-card .count {
  font-size: .8rem; font-weight: 700; color: var(--nw-teal-dark);
  text-transform: uppercase; letter-spacing: .06em;
}

/* ------------------------------ Sub-nav (in-page anchors) ---------------- */
.subnav {
  position: sticky; top: 130px; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 22px 0 8px;
  box-shadow: var(--shadow-sm);
}
.subnav a {
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
}
.subnav a:hover { background: var(--nw-mint-soft); color: var(--nw-teal-darker); }

/* ------------------------------ Hypothesis cards ------------------------- */
.hyp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) { .hyp-grid { grid-template-columns: 1fr; } }

.hyp-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 200px;
  display: flex; flex-direction: column;
}
.hyp-card__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.hyp-card__icon {
  flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--nw-mint); color: var(--nw-teal-dark);
  display: flex; align-items: center; justify-content: center;
}
.hyp-card__icon svg { width: 24px; height: 24px; }
.hyp-card__title { flex: 1; }
.hyp-card__title h3 { margin: 0; font-size: 1.12rem; }
.hyp-card__cat {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}

/* The value strip: 2019 -> 2050 with a change badge */
.hyp-values {
  display: flex; align-items: stretch; gap: 10px;
  margin: 14px 0 6px;
}
.val-box {
  flex: 1; text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
}
.val-box .yr { font-size: .72rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.val-box .num { font-size: 1.5rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.val-box .unit { font-size: .74rem; color: var(--ink-soft); }
.val-arrow { display: flex; align-items: center; color: var(--muted); font-size: 1.3rem; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: center;
  font-size: .82rem; font-weight: 800;
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.badge.down { color: var(--down); background: var(--down-bg); }
.badge.up   { color: var(--up);   background: var(--up-bg); }
.badge.flat { color: var(--flat); background: var(--flat-bg); }

.hyp-chart { width: 100%; height: 150px; margin: 8px 0 4px; }

.hyp-card__body { color: var(--ink-soft); font-size: .95rem; }
.hyp-card__body p:last-child { margin-bottom: 0; }

/* Debate / feasibility callout */
.debate {
  margin-top: 14px;
  background: #fbf6ec;
  border: 1px solid #efe2c4;
  border-left: 4px solid #e0a93b;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .9rem; color: #6c5526;
}
.debate strong { color: #8a6a1f; }
.debate .label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  font-size: .72rem; color: #b07d1c; margin-bottom: 4px;
}

.hyp-card__foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: .85rem;
}
.hyp-card__foot .ref { color: var(--muted); }
.hyp-card__foot a { font-weight: 600; }

/* ------------------------------ Big sector chart ------------------------- */
.figure {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.figure h3 { margin-bottom: 4px; }
.figure .fig-note { color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.figure .plot { width: 100%; height: 360px; }

/* ------------------------------ Callouts / notes ------------------------- */
.note {
  background: var(--nw-mint-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--nw-teal);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.stub-banner {
  background: var(--nw-cream);
  border: 1px dashed #d9cf9a;
  border-radius: var(--radius-sm);
  padding: 14px 16px; color: #6f6433; font-size: .92rem;
}

/* ------------------------------ Footer ----------------------------------- */
.site-footer {
  background: var(--nw-teal-darker);
  color: #d7ecea;
  padding: 40px 0 28px;
  margin-top: 56px;
}
.site-footer a { color: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; font-size: .92rem; }
.site-footer .foot-brand img { height: 42px; margin-bottom: 10px; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer .copyright { width: 100%; border-top: 1px solid rgba(255,255,255,.15); margin-top: 18px; padding-top: 16px; font-size: .82rem; color: #a9d2cf; }

/* ------------------------------ Utilities -------------------------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.ico { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
.data-missing { opacity: .92; }
