/* ═══════════════════════════════════════════════════════════
   CemO2 — Marketing site
   Design tokens & styles recreated from the hifi handoff.
═══════════════════════════════════════════════════════════ */

:root {
  --bg: #F6F7F5;
  --bg-warm: #EFF1ED;
  --white: #FFFFFF;
  --ink: #13201B;
  --deep: #1E3029;
  --mid: #5C6B63;
  --faint: #8B968F;
  --line: #E2E6E1;
  --accent: #1A8A7A;
  --accent-d: #0F5F54;
  --accent-l: #E3F1EE;
  --sand: #D8D2C4;

  --card-border: 1.5px solid rgba(19, 32, 27, 0.22);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-logo: 'Chakra Petch', sans-serif;

  --pad-x: 96px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* ── Body CO2 subscript ── */
sub {
  font-size: 0.62em;
  vertical-align: baseline;
  position: relative;
  bottom: -0.16em;
  font-weight: inherit;
  letter-spacing: normal;
  margin-left: 0.01em;
}

/* ── Layout helpers ── */
.section-pad { padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section { position: relative; }
.section--bg { background: var(--bg); }
.section--warm { background: var(--bg-warm); }
.section--deep { background: var(--deep); }
.section--ink { background: var(--ink); }
.bordered { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section--bg, .section--warm, .section--deep, .section--ink { padding-top: 120px; padding-bottom: 120px; }
.section--impact { padding-top: 100px; padding-bottom: 110px; }
.section--cta, .section--news { padding-top: 0; }

.grid { display: grid; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 28px; }
.center { text-align: center; }
.center-text { margin-left: auto; margin-right: auto; }

/* ── Eyebrow / mono labels ── */
.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 16px;
}
.mono--white { color: #fff; text-transform: none; letter-spacing: 0.06em; }
.mono--dim { color: rgba(255, 255, 255, 0.5); }
.mono--dim2 { color: rgba(255, 255, 255, 0.4); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow.center { justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.dot--sm { width: 6px; height: 6px; }

/* ── Headings ── */
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 50px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.h2.light { color: #fff; }
.h2--lg { font-size: 58px; line-height: 1.04; }
.h2--xl { font-size: 56px; line-height: 1.04; }
.h2--cta { font-size: 46px; }
.h2--news { font-size: 52px; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.faint { color: var(--faint); }

.lead { font-size: 18px; color: var(--mid); line-height: 1.65; margin-top: 0; }
.lead + .lead { margin-top: 22px; }
.lead--light { color: rgba(255, 255, 255, 0.68); }
.block-narrow .lead { margin-top: 20px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  padding: 13px 28px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-d); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--ghost-light:hover { border-color: #fff; }
.btn--sm { padding: 10px 22px; font-size: 14px; }
.btn--square { border-radius: 8px; }
.btn-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

/* ─────────── WORDMARK ─────────── */
.wm {
  --wm-size: 32px;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--wm-size) * 0.62);
  color: var(--ink);
}
.wm[data-size="36"] { --wm-size: 36px; }
.wm__mark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: var(--wm-size);
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.wm__name { color: var(--mid); }
.wm__o2 { color: var(--accent); }
.wm__sub { font-size: 0.6em; position: relative; top: 0.2em; letter-spacing: 0.01em; bottom: auto; margin-left: 0; vertical-align: baseline; }
.wm__tm { color: var(--mid); font-size: 0.32em; font-weight: 600; align-self: flex-start; position: relative; top: 0.15em; margin-left: 0.06em; }
.wm__divider { width: 1.5px; height: calc(var(--wm-size) * 0.92); background: var(--ink); flex-shrink: 0; }
.wm__company {
  font-family: var(--font-display);
  font-size: calc(var(--wm-size) * 0.42);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--mid);
  white-space: nowrap;
}
.wm__accent { color: var(--accent); }
/* light variant (on dark backgrounds) */
.wm--light .wm__name, .wm--light .wm__tm, .wm--light .wm__company { color: rgba(255, 255, 255, 0.72); }
.wm--light .wm__divider { background: rgba(255, 255, 255, 0.22); }
.wm--light .wm__o2, .wm--light .wm__accent { color: var(--accent); }

/* ─────────── NAV ─────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(12px);
  transition: all 0.3s;
}
.nav__brand { margin-right: clamp(48px, 7vw, 120px); }
/* light state over hero — invert wordmark to light */
.nav:not(.nav--scrolled) .wm__name,
.nav:not(.nav--scrolled) .wm__tm,
.nav:not(.nav--scrolled) .wm__company { color: rgba(255, 255, 255, 0.72); }
.nav:not(.nav--scrolled) .wm__divider { background: rgba(255, 255, 255, 0.22); }

.nav--scrolled {
  padding: 16px var(--pad-x);
  background: rgba(246, 247, 245, 0.85);
  border-bottom: 1px solid var(--line);
}
.nav__menu { display: flex; gap: 32px; align-items: center; }
.nav__menu > a:not(.btn) {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.3s;
}
.nav__menu > a:not(.btn):hover { color: #fff; }
.nav--scrolled .nav__menu > a:not(.btn) { color: var(--mid); }
.nav--scrolled .nav__menu > a:not(.btn):hover { color: var(--ink); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: #fff; transition: background 0.3s; }
.nav--scrolled .nav__toggle span { background: var(--ink); }

/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  min-height: 720px;
  background: var(--ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, #243b32 0%, #16241e 60%, #0e1813 100%);
  background-size: cover;
  background-position: center;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15, 24, 20, 0.86) 0%, rgba(15, 24, 20, 0.6) 45%, rgba(15, 24, 20, 0.25) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  min-height: 720px;
  padding-top: 150px;
  padding-bottom: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 7px 16px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  margin-bottom: 26px;
  width: fit-content;
}
.hero__pill-items {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: 0.06em;
  font-size: 15px;
}
.hero__pill-item { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.hero__h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 64px;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: #fff;
  max-width: 980px;
  margin-bottom: 28px;
}
.hero__h1 span { display: block; }
.hero__sub {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 40px;
}
.hero__cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ─────────── PROBLEM ─────────── */
.stat__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat--ink { border-top: 1.5px solid var(--ink); padding-top: 26px; }
.stat__label { color: var(--mid); margin-top: 16px; line-height: 1.55; max-width: 260px; font-size: 18px; }
.problem__close {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--deep);
  line-height: 1.5;
  max-width: 640px;
  margin-top: 64px;
  font-size: 26px;
}

/* ─────────── SOLUTION ─────────── */
.card {
  background: var(--white);
  border: var(--card-border);
  border-radius: 18px;
  padding: 36px 34px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.pillar__icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--accent-l);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
}
.ico { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pillar__title { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 14px; letter-spacing: -0.01em; }
.pillar__body { font-size: 15px; color: var(--mid); line-height: 1.7; }

/* ─────────── HOW IT WORKS ─────────── */
.step { border-top: 1.5px solid var(--accent); padding-top: 24px; }
.step__num { font-family: var(--font-mono); font-size: 34px; font-weight: 500; color: var(--accent); margin-bottom: 16px; line-height: 1; }
.step__title { font-family: var(--font-display); font-size: 23px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.step__body { color: rgba(255, 255, 255, 0.6); line-height: 1.65; font-size: 16px; }

/* ─────────── IMPACT ─────────── */
.metric { border-top: 1.5px solid rgba(255, 255, 255, 0.9); padding-top: 26px; }
.metric__num { font-family: var(--font-display); font-weight: 700; font-size: 60px; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.metric__label { font-size: 14px; color: rgba(255, 255, 255, 0.62); margin-top: 16px; line-height: 1.55; max-width: 180px; }

/* ─────────── PRODUCT ─────────── */
.product { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.product__copy .lead { margin-bottom: 22px; }
.product__media { position: relative; }
.product__video {
  width: 100%; height: 480px; object-fit: cover;
  border-radius: 18px; border: var(--card-border);
  background: var(--deep);
}
.product__badge {
  position: absolute; bottom: 24px; left: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1.5px solid rgba(19, 32, 27, 0.16);
}
.product__badge-num { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.product__badge-num span { font-size: 16px; font-weight: 400; color: var(--mid); }
.product__credit {
  position: absolute; bottom: 8px; right: 12px;
  font-family: var(--font-mono); font-size: 9px;
  color: rgba(255, 255, 255, 0.65); letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ─────────── PANELS (Projects / News / CTA) ─────────── */
.panel { position: relative; overflow: hidden; }
.panel--dark { background: var(--ink); border-radius: 24px; padding: 90px 80px; }
.panel--warm { background: var(--bg-warm); border: var(--card-border); border-radius: 24px; padding: 80px; }
.section--cta .panel--dark { padding: 72px 80px; }
.panel__inner { position: relative; z-index: 1; }
.panel.center .panel__inner { display: flex; flex-direction: column; align-items: center; }
.panel__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.panel__glow--top { top: -100px; left: 50%; transform: translateX(-50%); width: 480px; height: 480px; background: radial-gradient(circle, rgba(26, 138, 122, 0.15) 0%, transparent 70%); }
.panel__glow--faint { top: -120px; width: 440px; height: 440px; background: radial-gradient(circle, rgba(26, 138, 122, 0.1) 0%, transparent 70%); }
.panel__glow--right { top: -80px; right: -60px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(26, 138, 122, 0.2) 0%, transparent 70%); }
.panel__glow--left { top: -120px; left: -80px; width: 420px; height: 420px; background: radial-gradient(circle, rgba(26, 138, 122, 0.13) 0%, transparent 70%); z-index: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px; padding: 7px 16px; margin-bottom: 30px;
}
.panel .h2 { margin-bottom: 22px; }
.panel.center .lead { margin-bottom: 40px; }

/* ─────────── VISION ─────────── */
.section--vision { overflow: hidden; }
.vision__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: center; }
.vision__p { font-size: 17px; color: rgba(255, 255, 255, 0.7); line-height: 1.75; margin-bottom: 22px; }
.vision__stats { display: flex; gap: 48px; }
.vision__stat-v { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--accent); }
.vision__stat-l { font-size: 13px; color: rgba(255, 255, 255, 0.55); margin-top: 4px; }
.vision__img {
  width: 100%; height: 440px; border-radius: 18px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 14px, rgba(255, 255, 255, 0.07) 14px 28px),
    var(--deep);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─────────── NEWS ─────────── */
.section--news { padding-bottom: 110px; }

/* ─────────── CTA ─────────── */
.section--cta { padding-bottom: 96px; }
.cta__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.cta__box { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; padding: 32px; }
.cta__form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.cta__form input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px; padding: 13px 16px; font-size: 15px; color: #fff;
  font-family: var(--font-body); outline: none;
}
.cta__form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.cta__form input:focus { border-color: var(--accent); }
.cta__success { color: #fff; font-size: 16px; padding: 16px 0; display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.cta__error { color: #f3b4a6; font-size: 13px; line-height: 1.5; margin-top: 12px; }
.cta__form button:disabled { opacity: 0.7; cursor: default; }

/* ─────────── FOOTER ─────────── */
.footer { background: var(--deep); padding: 64px var(--pad-x) 40px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 56px; }
.footer__tag { font-size: 14px; color: rgba(255, 255, 255, 0.55); line-height: 1.7; margin-top: 18px; max-width: 290px; }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col .mono { margin-bottom: 7px; }
.footer__col a { font-size: 14px; color: rgba(255, 255, 255, 0.65); transition: color 0.2s; }
.footer__col a:hover { color: #fff; }
.footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 26px; display: flex; justify-content: space-between; align-items: center; }
.footer__bar .mono { font-size: 12px; }

/* ─────────── HOVER LIFT (cards) ─────────── */
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  :root { --pad-x: 56px; }
  .hero__h1 { font-size: 52px; }
  .h2, .h2--lg, .h2--xl, .h2--news, .h2--cta { font-size: 42px; }
  .stat__num { font-size: 60px; }
  .metric__num { font-size: 48px; }
}

@media (max-width: 860px) {
  :root { --pad-x: 28px; }
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 18px;
    background: var(--bg);
    box-shadow: 0 16px 32px rgba(19, 32, 27, 0.1);
    padding: 24px var(--pad-x);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
  }
  .nav__menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav__menu > a:not(.btn) { color: var(--mid) !important; font-size: 16px; }
  .nav__brand { margin-right: auto; }

  .section--bg, .section--warm, .section--deep, .section--ink,
  .section--impact { padding-top: 72px; padding-bottom: 72px; }

  .grid-3, .grid-4, .product, .cta__grid, .vision__grid, .footer__grid {
    grid-template-columns: 1fr; gap: 28px;
  }
  .footer__grid { gap: 36px; }
  .vision__stats { gap: 32px; flex-wrap: wrap; }
  .panel--dark, .panel--warm { padding: 56px 28px; }
  .section--cta .panel--dark { padding: 48px 28px; }

  .hero__h1 { font-size: 38px; }
  /* Stack the pill labels vertically; each item keeps its own leading dot. */
  .hero__pill { white-space: normal; border-radius: 18px; }
  .hero__pill-items { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* Stack the hero CTAs so they don't crowd at narrow widths. */
  .hero__cta { flex-direction: column; align-items: stretch; width: 100%; }
  .hero__cta .btn { width: 100%; }
  .h2, .h2--lg, .h2--xl, .h2--news, .h2--cta { font-size: 34px; }
  .problem__close { font-size: 21px; }
  .product__video { height: 320px; }
  .footer__bar { flex-direction: column; gap: 10px; align-items: flex-start; }
}

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