/* ════════════════════════════════════════════════════════════════════
   CHARTE GRAPHIQUE — GenesisCorp
   3 directions présentées comme un document éditorial
   ════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Geist:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400..700&family=Outfit:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: #08040f;
  color: #c8c0d8;
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* ───────── shared primitives ───────── */
.cg-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #a78bfa;
}
.cg-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.cg-h1 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: #f4f0fa;
}
.cg-h2 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #f4f0fa;
}
.cg-h3 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #f4f0fa;
}
.cg-body {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  color: #c8c0d8;
}
.lead-paragraph {
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.6;
  color: #d4ccdf;
  max-width: 65ch;
  text-wrap: pretty;
}

.cg-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(217, 70, 239, 0.4);
  background: rgba(217, 70, 239, 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f4f0fa;
}
.cg-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d946ef;
  box-shadow: 0 0 10px #d946ef;
  display: inline-block;
}

/* ════════════════════════════════════════════════════════════════════
   COVER
   ════════════════════════════════════════════════════════════════════ */
.cg-cover {
  min-height: 100vh;
  padding: 36px 64px 48px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 64px;
  background:
    radial-gradient(ellipse at top right, rgba(217, 70, 239, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(124, 58, 237, 0.12), transparent 50%),
    #08040f;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  position: relative;
  overflow: hidden;
}
.cg-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(167, 139, 250, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 139, 250, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}
.cg-cover > * { position: relative; z-index: 1; }

.cg-cover-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  padding-bottom: 24px;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #f4f0fa;
}
.cg-cover-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a7e9e;
}
.cg-cover-meta strong {
  display: block;
  margin-top: 4px;
  color: #f4f0fa;
  font-weight: 500;
}

.cg-cover-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 64px 0;
}

.cg-cover-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  padding-top: 24px;
}
.cg-cover-bottom > div {
  padding-right: 32px;
  border-right: 1px solid rgba(167, 139, 250, 0.1);
}
.cg-cover-bottom > div:last-child { border-right: 0; }
.cg-cover-bottom .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d946ef;
  margin-bottom: 10px;
}
.cg-cover-bottom .value {
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: #d4ccdf;
  line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════════
   GENERIC SECTION
   ════════════════════════════════════════════════════════════════════ */
.cg-section {
  padding: 120px 64px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}
.cg-section-head {
  display: grid;
  grid-template-columns: 80px 1.5fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}
.cg-section-head .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #d946ef;
  padding-top: 18px;
  border-top: 1px solid #d946ef;
}
.cg-section-head .title { padding-top: 0; }
.cg-section-head .title .cg-eyebrow { display: block; margin-bottom: 16px; }
.cg-section-head .desc {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  color: #b8aec8;
  line-height: 1.7;
  padding-top: 18px;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  text-wrap: pretty;
}

/* ════════════════════════════════════════════════════════════════════
   DIRECTION WRAPPER
   ════════════════════════════════════════════════════════════════════ */
.cg-direction {
  position: relative;
  padding: 0;
}

/* COVER row of a direction */
.cg-direction-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.cg-direction-cover .copy {
  padding: 96px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  border-right: 1px solid rgba(167, 139, 250, 0.15);
}
.cg-direction-cover .copy .codename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d946ef;
}
.cg-direction-cover .copy .pitch {
  font-family: 'Geist', sans-serif;
  font-size: 17px;
  color: #d4ccdf;
  line-height: 1.65;
  max-width: 50ch;
  text-wrap: pretty;
}
.cg-direction-cover .copy .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* MOOD STAGE — the big visual on the right of each direction cover */
.cg-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  height: 100%;
}
.cg-stage .stage-bg { position: absolute; inset: 0; z-index: 0; }
.cg-stage .stage-grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(167, 139, 250, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(167, 139, 250, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.cg-stage .stage-tag {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: rgba(244, 240, 250, 0.5);
  text-transform: uppercase;
  z-index: 4;
}
.cg-stage .corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid #d946ef;
  z-index: 4;
}
.cg-stage .corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.cg-stage .corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.cg-stage .corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.cg-stage .corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }

/* SPEC ROWS inside a direction */
.cg-spec {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  padding: 80px 64px;
  border-top: 1px solid rgba(167, 139, 250, 0.12);
  align-items: start;
}
.cg-spec .spec-label {
  position: sticky;
  top: 32px;
}
.cg-spec .spec-label .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: #d946ef;
  margin-bottom: 12px;
}
.cg-spec .spec-label h3 {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.015em;
  color: #f4f0fa;
  margin-bottom: 12px;
}
.cg-spec .spec-label p {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  color: #b8aec8;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ════════════════════════════════════════════════════════════════════
   PALETTE GRID
   ════════════════════════════════════════════════════════════════════ */
.cg-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cg-swatch {
  position: relative;
  display: flex;
  flex-direction: column;
}
.cg-swatch.feature { grid-column: span 2; }
.cg-swatch .chip {
  height: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}
.cg-swatch.feature .chip { height: 220px; }
.cg-swatch .chip .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
}
.cg-swatch.light .chip .num { color: rgba(0, 0, 0, 0.5); }
.cg-swatch .chip .role {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}
.cg-swatch .meta {
  padding: 12px 0 0;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  margin-top: 10px;
  background: transparent;
}
.cg-swatch .meta .name {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #f4f0fa;
}
.cg-swatch .meta .hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #8a7e9e;
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════════════
   TYPE GRID
   ════════════════════════════════════════════════════════════════════ */
.cg-type-grid {
  display: grid;
  gap: 16px;
}
.cg-type-card {
  border: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(124, 58, 237, 0.04);
  padding: 32px 36px;
}
.cg-type-card .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d946ef;
  margin-bottom: 24px;
}
.cg-type-card .specimen {
  font-size: 64px;
  line-height: 1;
  color: #f4f0fa;
  margin-bottom: 24px;
}
.cg-type-card .face-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #8a7e9e;
  text-transform: uppercase;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  padding-top: 16px;
  margin-bottom: 14px;
}
.cg-type-card .alphabet {
  font-size: 22px;
  color: #d4ccdf;
  letter-spacing: 0.04em;
  margin: 6px 0;
}
.cg-type-card .pangram {
  font-size: 18px;
  color: #c8c0d8;
  margin-top: 14px;
  line-height: 1.4;
}
.cg-type-card .weights {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 17px;
  color: #d4ccdf;
}

/* ════════════════════════════════════════════════════════════════════
   ICON GRID
   ════════════════════════════════════════════════════════════════════ */
.cg-icons {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  border-left: 1px solid rgba(167, 139, 250, 0.18);
}
.cg-icons .ic {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-right: 1px solid rgba(167, 139, 250, 0.18);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(124, 58, 237, 0.03);
}
.cg-icons .ic .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #8a7e9e;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════════════
   UI MOCK FRAME
   ════════════════════════════════════════════════════════════════════ */
.cg-mock {
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: #0c0517;
  display: grid;
  grid-template-rows: 36px 1fr;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.cg-mock .mock-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  background: rgba(0, 0, 0, 0.2);
}
.cg-mock .mock-chrome .dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.3);
}
.cg-mock .mock-chrome .url {
  margin-left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #8a7e9e;
}

/* ════════════════════════════════════════════════════════════════════
   DIRECTION A — GRIMOIRE SYNAPTIQUE (default theme)
   ════════════════════════════════════════════════════════════════════ */
.dir-a .stage-bg {
  background:
    radial-gradient(ellipse at center, rgba(217, 70, 239, 0.18), transparent 70%),
    radial-gradient(ellipse at top, rgba(124, 58, 237, 0.2), transparent 60%),
    linear-gradient(180deg, #1a0d2e, #0c0517);
}

.mock-a {
  background:
    radial-gradient(ellipse at top right, rgba(217, 70, 239, 0.12), transparent 60%),
    linear-gradient(180deg, #150828, #0c0517);
}

/* ════════════════════════════════════════════════════════════════════
   DIRECTION B — NÉO-PULSE
   ════════════════════════════════════════════════════════════════════ */
.dir-b {
  background: #0a0d1a;
  color: #b0b6c7;
}
.dir-b .cg-section-head .num,
.dir-b .cg-section-head .title .cg-eyebrow,
.dir-b .cg-mono { color: #c4f04d; }
.dir-b .cg-h2, .dir-b .cg-h3 { color: #eef1f8; }
.dir-b .cg-body { color: #b0b6c7; }
.dir-b .cg-direction-cover .copy {
  border-right-color: rgba(99, 102, 241, 0.2);
}
.dir-b .cg-direction-cover .copy .pitch { color: #c5cad9; }
.dir-b .stage-bg {
  background:
    radial-gradient(ellipse at top right, rgba(236, 72, 153, 0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(99, 102, 241, 0.25), transparent 60%),
    linear-gradient(180deg, #111726, #0a0d1a);
}
.dir-b .stage-grid {
  background-image:
    linear-gradient(to right, rgba(99, 102, 241, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
}
.dir-b .stage-tag { color: rgba(196, 240, 77, 0.6); }
.dir-b .cg-stage .corner { border-color: #c4f04d; }
.dir-b .cg-spec {
  border-top-color: rgba(99, 102, 241, 0.18);
}
.dir-b .cg-spec .spec-label .num { color: #c4f04d; font-family: 'IBM Plex Mono', monospace; }
.dir-b .cg-spec .spec-label h3 { color: #eef1f8; font-family: 'Space Grotesk', sans-serif; }
.dir-b .cg-spec .spec-label p { color: #b0b6c7; font-family: 'Inter', sans-serif; }
.dir-b .cg-icons {
  border-color: rgba(99, 102, 241, 0.2);
}
.dir-b .cg-icons .ic {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.2);
}
.dir-b .cg-icons .ic .label {
  font-family: 'IBM Plex Mono', monospace;
  color: #b0b6c7;
}
.mock-b {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(180deg, #111726, #0a0d1a);
}
.mock-b .mock-chrome {
  background: rgba(0, 0, 0, 0.3);
  border-bottom-color: rgba(99, 102, 241, 0.2);
}
.mock-b .mock-chrome .dot { background: rgba(99, 102, 241, 0.4); }
.mock-b .mock-chrome .url { color: #b0b6c7; font-family: 'IBM Plex Mono', monospace; }

/* ════════════════════════════════════════════════════════════════════
   DIRECTION C — CRÉPUSCULE
   ════════════════════════════════════════════════════════════════════ */
.dir-c {
  background: #1a0d1f;
  color: #d4ccb8;
}
.dir-c .cg-mono { color: #d4a857; }
.dir-c .cg-direction-cover .copy {
  border-right-color: rgba(212, 168, 87, 0.2);
}
.dir-c .stage-bg {
  background:
    radial-gradient(ellipse at top, rgba(212, 168, 87, 0.12), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(107, 45, 95, 0.4), transparent 60%),
    linear-gradient(180deg, #2a1530, #1a0d1f);
}
.dir-c .stage-paper {
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(212, 168, 87, 0.3);
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(241, 233, 216, 0.02), rgba(212, 168, 87, 0.04));
}
.dir-c .cg-stage .stage-grid {
  background-image:
    linear-gradient(to right, rgba(212, 168, 87, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 168, 87, 0.04) 1px, transparent 1px);
}
.mock-c {
  border-color: rgba(212, 168, 87, 0.3);
  background:
    radial-gradient(ellipse at top, rgba(212, 168, 87, 0.08), transparent 60%),
    linear-gradient(180deg, #2a1530, #1a0d1f);
  color: #f1e9d8;
}
.mock-c .mock-chrome {
  border-bottom-color: rgba(212, 168, 87, 0.2);
}
.mock-c .mock-chrome .dot { background: rgba(212, 168, 87, 0.4); }
.mock-c .mock-chrome .url { color: #b8a890; font-family: 'IBM Plex Mono', monospace; }

/* ════════════════════════════════════════════════════════════════════
   COMPARE GRID
   ════════════════════════════════════════════════════════════════════ */
.cg-compare-grid {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 1fr;
  border-top: 1px solid rgba(167, 139, 250, 0.18);
  border-left: 1px solid rgba(167, 139, 250, 0.18);
}
.cg-compare-grid > div {
  padding: 24px;
  border-right: 1px solid rgba(167, 139, 250, 0.18);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: #c8c0d8;
  line-height: 1.55;
}
.cg-compare-grid .lab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #8a7e9e;
  text-transform: uppercase;
  padding-top: 28px;
  background: rgba(124, 58, 237, 0.04);
}
.cg-compare-grid .head {
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #f4f0fa;
  letter-spacing: -0.015em;
  padding: 28px 24px;
}
.cg-compare-grid .head .codename {
  display: block;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════ */
.cg-footer {
  padding: 120px 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
  background:
    radial-gradient(ellipse at bottom, rgba(76, 29, 149, 0.18), transparent 60%),
    #08040f;
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .cg-cover, .cg-section, .cg-footer { padding-left: 32px; padding-right: 32px; }
  .cg-direction-cover { grid-template-columns: 1fr; }
  .cg-direction-cover .copy { padding: 64px 32px; border-right: 0; border-bottom: 1px solid rgba(167, 139, 250, 0.15); }
  .cg-spec { padding: 64px 32px; grid-template-columns: 1fr; gap: 32px; }
  .cg-spec .spec-label { position: static; }
  .cg-section-head { grid-template-columns: 1fr; gap: 24px; }
  .cg-icons { grid-template-columns: repeat(4, 1fr); }
  .cg-palette { grid-template-columns: repeat(2, 1fr); }
  .cg-cover-bottom { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cg-cover-bottom > div { border-right: 0; padding-right: 0; }
  .cg-compare-grid { grid-template-columns: 1fr; }
  .cg-footer { grid-template-columns: 1fr; padding: 80px 32px; }
}
