/* ============================================================
   Cleantech NZ — Design System v1  (redesign foundation)
   Locked 2026-07-11: brand #0B9A4A · Inter · wide ~1760px
   Adapted from the ChatGPT redesign pack styles.css.
   Self-contained: previews load ONLY this (+ Inter webfont).
   ============================================================ */

:root {
  /* surfaces + ink */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f1f5f1;
  --ink: #102017;
  --muted: #65736b;
  --line: #d8e1db;    /* soft structural line — visible but gentle */
  --line-2: #c6d2ca;

  /* brand */
  --brand: #0b9a4a;
  --brand-2: #28b867;
  --brand-soft: #e9f7ef;
  --brand-ink: #06331a;

  /* sector palette (tags / icons / map only) */
  --blue: #367cf5;    --blue-soft: #edf3ff;
  --amber: #eaa525;   --amber-soft: #fff6de;
  --purple: #7f63df;  --purple-soft: #f1edff;
  --orange: #ef7d32;  --orange-soft: #fff0e6;
  --teal: #258b83;    --teal-soft: #e8f7f5;

  --shadow: 0 18px 45px rgba(28, 56, 38, 0.08);
  --shadow-sm: 0 8px 24px rgba(28, 56, 38, 0.07);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --max: 1760px;
}

* { box-sizing: border-box; }
/* whole site rendered at 90% — calmer, more breathing room (mimics a browser zoom to 90%) */
html { scroll-behavior: smooth; scrollbar-gutter: stable; zoom: 0.9; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container { width: min(calc(100% - 112px), var(--max)); margin: 0 auto; }
@media (max-width: 900px) { .container { width: calc(100% - 44px); } }

/* ---------- typography (calm, editorial — room to breathe) ---------- */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.03em; margin: 0; font-weight: 800; }
h1 { font-size: clamp(36px, 3.8vw, 54px); line-height: 1.07; }
h2 { font-size: clamp(24px, 2.5vw, 34px); font-weight: 700; }
h3 { font-size: 18px; letter-spacing: -.015em; font-weight: 700; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.lead { font-size: 16.5px; color: var(--muted); max-width: 60ch; line-height: 1.62; }
.muted { color: var(--muted); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav { min-height: 74px; display: flex; align-items: center; gap: 26px; }
/* dual-brand lockup: CLEANTECH NZ | [fern] Sphere New Zealand */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.brand-logo-img { height: 42px; width: auto; display: block; flex: none; }
/* "powered by Sphere" — secondary lockup next to the Cleantech mark */
.brand-powered { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; padding-left: 13px; border-left: 1px solid var(--line); white-space: nowrap; transform: translateY(1px); }
.brand-powered .pb-label { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brand-powered .pb-link { display: inline-flex; }
.brand-powered img { height: 30px; width: auto; display: block; }
@media (max-width: 720px) { .brand-powered { display: none; } }
.brand-mark { display: inline-flex; align-items: center; }
.brand-sphere-link { display: inline-flex; align-items: center; gap: 11px; }
.brand-div { width: 1px; height: 22px; background: var(--line-2); flex: none; }
.brand-fern { height: 27px; width: 27px; display: block; border-radius: 50%; flex: none; }
.brand-sphere { font-weight: 600; font-size: 13px; letter-spacing: -.005em; color: var(--brand); white-space: nowrap; }
@media (max-width: 560px) { .brand-div, .brand-fern, .brand-sphere { display: none; } }
.brand-logo { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: #38483f; padding: 9px 14px; border-radius: 9px; transition: background .15s, color .15s; }
.nav-links a:hover { background: var(--surface-soft); color: var(--ink); }
.nav-links a.active { color: var(--brand); font-weight: 700; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-search { display: flex; align-items: center; gap: 8px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; width: 220px; }
.nav-search input { border: none; background: none; outline: none; font-size: 14px; width: 100%; color: var(--ink); }
.nav-search input::placeholder { color: var(--muted); }
@media (max-width: 960px) { .nav-links, .nav-search { display: none; } }

/* member-nav variant (shared) */
.nav-mem { display:flex; align-items:center; gap:16px; margin-left:auto; }
.nav-search-m { display:flex; align-items:center; gap:8px; background:var(--surface-soft); border:1px solid var(--line); border-radius:10px; padding:8px 12px; width:200px; }
.nav-search-m input { border:none; background:none; outline:none; font-size:13.5px; width:100%; color:var(--ink); }
.nav-links-m { display:flex; gap:2px; }
.nav-links-m a { font-size:14px; font-weight:500; color:#38483f; padding:8px 12px; border-radius:8px; }
.nav-links-m a:hover { background:var(--surface-soft); color:var(--ink); }
.nav-links-m a.active { color:var(--brand); font-weight:700; }
.acct { position:relative; display:inline-flex; align-items:center; gap:8px; background:var(--surface); border:1px solid var(--line); border-radius:999px; padding:5px 6px 5px 12px; font-size:13px; font-weight:600; color:var(--ink); cursor:pointer; user-select:none; }
.acct:hover { border-color:var(--line-2); }
.acct .av { width:24px; height:24px; border-radius:50%; background:linear-gradient(145deg,var(--brand-2),var(--brand)); color:#fff; display:grid; place-items:center; font-size:11px; font-weight:800; }
.acct-menu { position:absolute; top:calc(100% + 9px); right:0; min-width:196px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:6px; display:none; z-index:70; }
.acct.open .acct-menu { display:block; }
.acct-menu a { display:block; padding:9px 12px; font-size:13.5px; font-weight:600; color:var(--ink); border-radius:8px; }
.acct-menu a:hover { background:var(--surface-soft); }
.acct-menu a#nv-signout { color:#b5432e; margin-top:4px; border-top:1px solid var(--line); border-radius:0 0 8px 8px; padding-top:11px; }
.acct-menu a#nv-signout:hover { background:#fbecea; }
@media(max-width:1120px){ .nav-search-m, .nav-links-m { display:none; } }

/* signed-in green bar (sits under the nav, inside the fixed header) */
.member-bar { background:var(--brand); color:#fff; }
.member-bar .container { display:flex; align-items:center; justify-content:space-between; min-height:38px; font-size:12.5px; }
.member-bar .mb-l { display:inline-flex; align-items:center; gap:9px; font-weight:500; color:rgba(255,255,255,.95); }
.member-bar .mb-l b { font-weight:700; color:#fff; }
.member-bar .mb-dot { width:7px; height:7px; border-radius:50%; background:#8ff0b6; box-shadow:0 0 0 3px rgba(143,240,182,.28); flex:none; }
.member-bar .mb-out { font-weight:700; color:#fff; opacity:.9; }
.member-bar .mb-out:hover { opacity:1; text-decoration:underline; }

/* secondary workspace nav — sits under the green bar, inside the fixed header */
.member-subnav { background:var(--surface); border-bottom:1px solid var(--line); }
.member-subnav .container { display:flex; }
.member-subnav .msn { display:flex; align-items:center; gap:2px; min-height:44px; overflow-x:auto; scrollbar-width:none; }
.member-subnav .msn::-webkit-scrollbar { display:none; }
.member-subnav .msn a { font-size:13px; font-weight:600; color:#5a6b62; padding:8px 13px; border-radius:8px; white-space:nowrap; transition:background .12s, color .12s; }
.member-subnav .msn a:hover { background:var(--surface-soft); color:var(--ink); }
.member-subnav .msn a.active { color:var(--brand); background:var(--brand-soft); }
.member-subnav .msn .msn-soon { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:#9aa8a0; padding:8px 13px; white-space:nowrap; cursor:default; }
.member-subnav .msn .msn-dot { font-size:8px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:#a36b00; background:var(--amber-soft); border:1px solid #f0e3bf; border-radius:4px; padding:1px 5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 12px 18px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.btn.primary:hover { box-shadow: 0 12px 26px -10px rgba(11,154,74,.65); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.small { padding: 9px 13px; font-size: 13px; border-radius: 9px; }
.btn .arw { transition: transform .15s; } .btn:hover .arw { transform: translateX(3px); }

/* ---------- surfaces ---------- */
.section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.section-head p { color: var(--muted); max-width: 620px; margin: 12px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; box-shadow: 0 1px 0 rgba(0,0,0,.02); transition: transform .1s, box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: var(--line-2); }
.card p { color: var(--muted); font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.icon-badge { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 900; margin-bottom: 16px; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font-size: 14px; padding: 11px 13px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,154,74,.12); }
.field textarea { min-height: 78px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); margin: -4px 0 14px; }

/* ---------- tags ---------- */
.tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--surface-soft); color: #526158; }
.tag.green { background: var(--brand-soft); color: var(--brand); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.amber { background: var(--amber-soft); color: #a36b00; }
.tag.purple { background: var(--purple-soft); color: var(--purple); }
.tag.orange { background: var(--orange-soft); color: var(--orange); }
.tag.teal { background: var(--teal-soft); color: var(--teal); }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); }
.site-footer .container { padding-top: 40px; padding-bottom: 54px; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); } .site-footer a:hover { color: var(--brand); }
.foot-brand { display: none; }
.foot-brand img { height: 28px; }
.foot-brand .brand-logo-img { height: 40px; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
