/* 042 · Canopy (ظُلّة الكربون) — 1:1 Reference-Faithful Carbon Intelligence Stylesheet */
:root {
  --cn-bg: #05070a;
  --cn-surface: #0a1014;
  --cn-surface-2: #0f171c;
  --cn-fg: #eef6f3;
  --cn-muted: rgba(238, 246, 243, 0.66);
  --cn-line: rgba(238, 246, 243, 0.11);
  --cn-mint: #3df2c4;
  --cn-warn: #f2b35e;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cn-bg); color: var(--cn-fg); }

body {
  margin: 0;
  background: var(--cn-bg);
  color: var(--cn-fg);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, a, button, span, select, input { letter-spacing: 0; }
[dir="ltr"] { font-family: 'JetBrains Mono', monospace; }

/* Sticky 3-Zone Dark Glass Top Bar */
.cn-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cn-line);
  padding: 14px clamp(18px, 3.5vw, 48px);
}

.cn-nav {
  max-width: 1340px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cn-fg);
  text-decoration: none;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.cn-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cn-links a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--cn-muted);
  text-decoration: none;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.cn-links a:hover {
  background: rgba(61, 242, 196, 0.1);
  color: var(--cn-fg);
}

.cn-pill-mint {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--cn-mint);
  color: #05070a;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.cn-pill-mint:hover { filter: brightness(1.08); transform: translateY(-1px); }

.cn-pill-ghost {
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(238, 246, 243, 0.2);
  background: rgba(10, 16, 20, 0.7);
  color: var(--cn-fg);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

/* Section 1: Hero + Particle Tree Stage + Stroked Watermark + HUD */
.cn-hero {
  position: relative;
  min-height: calc(100dvh - 71px);
  padding: 54px clamp(20px, 4vw, 56px) 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid var(--cn-line);
}

.cn-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cn-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
}

.cn-watermark {
  position: absolute;
  bottom: 8%;
  inset-inline-end: 4%;
  z-index: 1;
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(6rem, 15vw, 15rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(61, 242, 196, 0.16);
  pointer-events: none;
  user-select: none;
}

.cn-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 32% 48%, rgba(5, 7, 10, 0.15) 0%, rgba(5, 7, 10, 0.82) 100%),
    linear-gradient(to left, rgba(5, 7, 10, 0.9) 0%, rgba(5, 7, 10, 0.56) 46%, rgba(5, 7, 10, 0.18) 100%);
}

.cn-hero-main {
  position: relative;
  z-index: 5;
  max-width: 1340px;
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 32px;
  align-items: center;
}

.cn-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--cn-mint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cn-h1 {
  margin: 0 0 18px;
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.1;
}

.cn-h1 em, .cn-h2 em {
  font-style: italic;
  color: var(--cn-mint);
  font-weight: 400;
}

.cn-hero-hud {
  position: relative;
  z-index: 5;
  max-width: 1340px;
  width: 100%;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--cn-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.76rem;
  color: var(--cn-muted);
}

.cn-legend-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cn-legend-ramp {
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3df2c4, #f2b35e);
}

/* Shared Section */
.cn-sec {
  scroll-margin-top: 72px;
  border-bottom: 1px solid var(--cn-line);
  padding: clamp(72px, 8vw, 108px) clamp(20px, 4vw, 56px);
}

.cn-wrap { max-width: 1320px; margin: 0 auto; }

.cn-h2 {
  margin: 0 0 14px;
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1.16;
}

/* 01 · #how 3-Col Bento Cards */
.cn-grid-3 {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cn-card {
  background: var(--cn-surface);
  border: 1px solid var(--cn-line);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cn-ledger-mini {
  background: var(--cn-surface-2);
  border: 1px solid var(--cn-line);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.74rem;
  display: grid;
  gap: 7px;
}

.cn-ledger-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 6px;
}

.cn-ledger-row.is-mint {
  background: rgba(61, 242, 196, 0.14);
  color: var(--cn-mint);
}

/* 02 · #report 2-Col Split + 3-Tab Report Card */
.cn-split-2 {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
}

.cn-report-box {
  background: var(--cn-surface);
  border: 1px solid rgba(238, 246, 243, 0.16);
  border-radius: 22px;
  padding: 26px;
}

.cn-rtabs {
  display: flex;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cn-line);
  margin-bottom: 18px;
}

.cn-rtab {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--cn-line);
  background: transparent;
  color: var(--cn-muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.cn-rtab.is-active {
  background: var(--cn-mint);
  border-color: var(--cn-mint);
  color: #05070a;
  font-weight: 700;
}

.cn-rpane { display: none; }
.cn-rpane.is-active { display: block; }

/* 03 · #scopes Interactive Scope Selector + Hotspot Stage */
.cn-tree-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--cn-line);
  aspect-ratio: 16 / 11;
}

.cn-tree-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.cn-hotspot {
  position: absolute;
  left: 48%;
  top: 38%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.88);
  border: 1px solid var(--cn-warn);
  color: var(--cn-warn);
  font-size: 0.74rem;
  font-weight: 700;
  transition: left 0.4s ease, top 0.4s ease;
}

.cn-scope-btn {
  width: 100%;
  text-align: start;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--cn-line);
  border-inline-start: 3px solid transparent;
  background: var(--cn-surface);
  color: var(--cn-fg);
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cn-scope-btn.is-active {
  border-color: rgba(61, 242, 196, 0.35);
  border-inline-start-color: var(--cn-mint);
  background: var(--cn-surface-2);
}

/* 05 · Pricing Featured Card + Baseline Estimator */
.cn-card.is-featured {
  position: relative;
  border-color: rgba(61, 242, 196, 0.48);
  box-shadow: 0 -10px 40px rgba(61, 242, 196, 0.12);
}

.cn-top-pill {
  position: absolute;
  top: -12px;
  inset-inline-start: 22px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--cn-mint);
  color: #05070a;
  font-size: 0.7rem;
  font-weight: 700;
}

.cn-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--cn-line);
  background: var(--cn-surface-2);
  color: var(--cn-fg);
  font-family: inherit;
  font-size: 0.9rem;
}

.cn-footer {
  padding: 40px clamp(20px, 4vw, 56px);
  background: #040608;
}

@media (max-width: 720px) {
  .cn-links { display: none; }
  .cn-hero-main, .cn-grid-3, .cn-split-2 { grid-template-columns: 1fr; }
}
