/* ============================================================
   CLIMATELENZ v3 — SIGNAL
   Motion-rich, scientific-precision tech aesthetic.
   Dark stage. One vibrant accent. Geometric grotesque type.
   ============================================================ */

:root {
  /* Stage */
  --bg:        #06090F;
  --bg-2:      #0A0E16;
  --surf:      #0F141C;
  --surf-2:    #141A23;
  --surf-3:    #1A2230;
  --line:      #1E2837;
  --line-2:    #2B3849;
  --line-hi:   rgba(255, 255, 255, 0.06);

  /* Text */
  --text:      #E8ECF1;
  --text-dim:  #969FAB;
  --text-mute: #5E6772;
  --text-low:  #3B434E;

  /* Signal — single accent (climate green-cyan) */
  --signal:        #6DF7C1;
  --signal-2:      #4FE1A8;
  --signal-3:      #2BBC85;
  --signal-glow:   rgba(109, 247, 193, 0.28);
  --signal-soft:   rgba(109, 247, 193, 0.08);

  /* Warm warning */
  --warn:      #FFA47A;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --font: 'Manrope', system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--signal); color: var(--bg); }

/* ============================================================
   GLOBAL DOT GRID + GRAIN (the dirac-ish ambient layer)
   ============================================================ */
.stage-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, black, transparent 75%);
}
.stage-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(109,247,193,0.06), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(45,120,200,0.04), transparent 55%);
}
.stage-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}
body > * { position: relative; z-index: 2; }
body > .stage-grid, body > .stage-glow { z-index: 0; }
body > .stage-grain { z-index: 1; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(48px, 8vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
}
h2 {
  font-size: clamp(34px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
}
h3 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.mono, .eyebrow, .label, .chip {
  font-family: var(--mono);
  font-variation-settings: "wdth" 100;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 28px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--signal);
  opacity: 0.7;
}
.eyebrow .num {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.16em;
}

.lede {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 60ch;
  font-weight: 400;
  text-wrap: pretty;
}

/* Numeric "scientific" emphasis */
.tab {
  font-feature-settings: "tnum", "ss01";
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
.wrap-narrow { max-width: 920px; }
section { padding: 140px 0; position: relative; }
@media (max-width: 720px) {
  section { padding: 88px 0; }
  .wrap { padding: 0 22px; }
}

.section-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
  padding-bottom: 56px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { max-width: 18ch; }
.section-head .right {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
  text-align: left;
  max-width: 42ch;
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 28px; align-items: start; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), transform .25s var(--ease);
  position: relative;
  white-space: nowrap;
}
.btn .arrow { transition: transform .3s var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--signal);
  color: var(--bg);
  border-color: var(--signal);
  box-shadow: 0 0 0 0 var(--signal-glow);
}
.btn-primary:hover {
  background: #84FFCE;
  border-color: #84FFCE;
  box-shadow: 0 0 36px -4px var(--signal-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surf);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surf-2);
  border-color: var(--signal);
  color: var(--signal);
}

.btn-sm { padding: 11px 18px; font-size: 11px; }

/* ============================================================
   CARDS (glass + edge)
   ============================================================ */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surf-2), var(--surf));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}
.card-edge {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surf);
  position: relative;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo .mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  position: relative;
  background-image: url("brand-mark.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 18px -3px var(--signal-glow), inset 0 0 0 1px rgba(255,255,255,0.10);
}
.logo .name { font-size: 16px; }
.logo .name b { color: var(--signal); font-weight: 700; }

/* ============================================================
   REVEAL on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out-soft), transform .8s var(--ease-out-soft); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease-out-soft), transform .8s var(--ease-out-soft); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .40s; }

/* ============================================================
   FOOTER (shared)
   ============================================================ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 96px 0 32px;
  position: relative;
  overflow: hidden;
}
.footer-wave {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  pointer-events: none;
  opacity: 0.5;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 22px;
  font-weight: 500;
}
.footer-tag {
  margin-top: 20px;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
}
.footer-meta {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-mute);
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color .25s, padding .25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer ul a::before {
  content: "";
  width: 6px; height: 1px;
  background: var(--text-mute);
  transition: width .25s, background .25s;
}
.footer ul a:hover { color: var(--signal); }
.footer ul a:hover::before { width: 14px; background: var(--signal); }
.footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-bottom .caring { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-dim); font-style: italic; font-family: var(--font); }

/* ============================================================
   POLICY-page chrome (shared)
   ============================================================ */
.policy-nav {
  position: sticky;
  top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: rgba(6, 9, 15, 0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.policy-nav .nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.policy-nav .back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: color .25s, border-color .25s, background .25s;
}
.policy-nav .back:hover { color: var(--signal); border-color: var(--signal); background: var(--signal-soft); }
.policy-nav .back .arrow { transition: transform .25s; }
.policy-nav .back:hover .arrow { transform: translateX(-3px); }

.policy-hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.policy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 85% -10%, rgba(109,247,193,0.06), transparent 60%),
    radial-gradient(600px 400px at -10% 110%, rgba(45,120,200,0.04), transparent 60%);
  pointer-events: none;
}
.policy-hero .stamp {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  background: var(--surf);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 36px;
  border-radius: 999px;
  font-weight: 500;
}
.policy-hero .stamp .dot {
  width: 7px; height: 7px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--signal-glow);
  animation: pulse 3s ease-in-out infinite;
}
.policy-hero h1 {
  max-width: 16ch;
  margin-bottom: 32px;
  font-size: clamp(48px, 7vw, 96px);
}
.policy-hero h1 .term {
  color: var(--signal);
  font-weight: 700;
}
.policy-hero .lede { margin-top: 28px; max-width: 60ch; }
.policy-hero .meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
  .policy-hero .meta { grid-template-columns: 1fr 1fr; }
}
.policy-hero .meta > div {
  padding: 22px 24px 22px 0;
  border-right: 1px solid var(--line);
}
.policy-hero .meta > div:last-child { border-right: none; }
.policy-hero .meta .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 8px;
  display: block;
}
.policy-hero .meta .v {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}
.placeholder-banner {
  margin-top: 36px;
  padding: 12px 18px;
  border: 1px dashed var(--warn);
  background: rgba(255, 164, 122, 0.06);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warn);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
}
.placeholder-banner::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warn);
  opacity: 0.7;
}

.policy-body { padding: 88px 0 112px; }
.policy-body .wrap { max-width: 1320px; display: grid; grid-template-columns: 260px 1fr; gap: 80px; align-items: start; }
@media (max-width: 980px) { .policy-body .wrap { grid-template-columns: 1fr; gap: 40px; } }
.policy-body .content { max-width: 760px; }
.policy-body p {
  margin: 14px 0;
  color: var(--text-dim);
  max-width: 70ch;
  text-wrap: pretty;
  font-size: 15.5px;
  line-height: 1.72;
}
.policy-body p a {
  color: var(--signal);
  border-bottom: 1px solid rgba(109,247,193,0.25);
  transition: border-color .25s, color .25s;
}
.policy-body p a:hover { border-color: var(--signal); color: #84FFCE; }
.policy-body ul, .policy-body ol {
  margin: 14px 0;
  padding-left: 0;
  list-style: none;
  color: var(--text-dim);
  max-width: 70ch;
}
.policy-body li {
  margin: 10px 0;
  padding-left: 28px;
  position: relative;
  font-size: 15.5px;
  line-height: 1.65;
}
.policy-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 14px; height: 1px;
  background: var(--signal);
  opacity: 0.6;
}
.policy-body ol { counter-reset: itm; }
.policy-body ol li { counter-increment: itm; }
.policy-body ol li::before {
  content: counter(itm, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--signal);
  background: none;
  width: auto; height: auto;
  top: 4px;
  letter-spacing: 0.04em;
}
.policy-body strong { color: var(--text); font-weight: 600; }
.policy-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surf-2);
  border: 1px solid var(--line);
  padding: 3px 7px;
  color: var(--signal);
  border-radius: 4px;
}
.policy-body section {
  scroll-margin-top: 100px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.policy-body section:first-of-type { padding-top: 0; border-top: none; }
.policy-body .section-num {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}
.policy-body .section-num::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--signal);
  opacity: 0.6;
}
.policy-body h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  margin: 8px 0 22px;
  line-height: 1.05;
}
.policy-body h3 {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  margin: 32px 0 10px;
  color: var(--text);
  font-family: var(--mono);
  text-transform: uppercase;
  font-weight: 500;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surf);
  border-radius: var(--r-lg);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc h4 {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.toc ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.toc ol li { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; margin: 0; }
.toc ol li::before { content: none; }
.toc ol li .n {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  flex: 0 0 24px;
  letter-spacing: 0.04em;
}
.toc ol li a {
  font-size: 13.5px;
  color: var(--text-dim);
  border-bottom: none;
  transition: color .2s, padding .2s;
}
.toc ol li a:hover { color: var(--signal); padding-left: 3px; }
@media (max-width: 980px) { .toc { position: static; max-height: none; } }

.callout {
  margin: 32px 0;
  padding: 22px 26px;
  background: var(--signal-soft);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal);
  color: var(--text-dim);
  font-size: 15px;
  max-width: 70ch;
  line-height: 1.6;
  border-radius: 0 var(--r) var(--r) 0;
}
.callout strong { color: var(--text); }

.back-cta {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Pulse */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-2%, 1%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
