/* ============================================
   Design tokens
   ============================================ */
:root {
  /* surfaces */
  --bg: #12141a;
  --bg-alt: #171a22;
  --surface: #1b1f29;
  --surface-line: #2a2f3c;

  /* text */
  --text: #e9e7f2;
  --text-muted: #a7abbd;
  --text-faint: #6f7386;

  /* accents: vert tendre + lilas */
  --vert: #9fd8a6;
  --vert-soft: #cfeed2;
  --lilas: #c3aee6;
  --lilas-soft: #e3d7f5;

  /* type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 14px;
  --wrap: 1080px;
}

/* ============================================
   Reset & base
   ============================================ */
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--vert-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vert); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--vert);
  color: #0c0e12;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--lilas);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 20, 26, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--lilas-soft); }
.brand-mark { color: var(--vert); display: inline-flex; }

.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--lilas-soft); }
.site-nav a[aria-current="true"] { color: var(--vert-soft); }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lilas);
  margin: 0 0 16px;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.01em;
}
.hero-title em {
  font-style: italic;
  color: var(--vert);
}

.hero-lede {
  font-size: 1.1rem;
  max-width: 46ch;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--vert) 0%, var(--vert-soft) 100%);
  color: #0f1410;
}
.btn-primary:hover { color: #0f1410; filter: brightness(1.05); }

.btn-ghost {
  background: transparent;
  border-color: var(--surface-line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--lilas); color: var(--lilas-soft); }

.motto {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: lowercase;
  margin: 8px 0 0;
}
.motto .dot { color: var(--lilas); margin: 0 8px; }

/* signature: animated git-graph */
.hero-graph {
  position: absolute;
  right: -40px;
  bottom: -10px;
  width: min(640px, 60vw);
  height: auto;
  z-index: 1;
  opacity: 0.9;
}
.line {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw 2.4s ease forwards;
}
.line-vert { stroke: var(--vert); animation-delay: 0.1s; }
.line-lilas { stroke: var(--lilas); animation-delay: 0.35s; }
.line-mid { stroke: var(--surface-line); animation-delay: 0s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.node {
  fill: var(--bg);
  stroke: var(--text-faint);
  stroke-width: 1.4;
  opacity: 0;
  animation: pop 0.4s ease forwards;
}
.n1 { animation-delay: 0.1s; }
.n2 { animation-delay: 1.1s; fill: var(--lilas); stroke: var(--lilas); }
.n3 { animation-delay: 0.6s; }
.n4 { animation-delay: 1.1s; fill: var(--vert); stroke: var(--vert); }
.n5 { animation-delay: 2.2s; fill: var(--text); stroke: var(--text); }

@keyframes pop {
  from { opacity: 0; transform: scale(0.4); transform-origin: center; }
  to { opacity: 1; transform: scale(1); }
}

.label {
  fill: var(--text-faint);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}
.hero-graph text.label:nth-of-type(1) { animation-delay: 0.3s; }
.hero-graph text.label:nth-of-type(2) { animation-delay: 1.3s; }
.hero-graph text.label:nth-of-type(3) { animation-delay: 1.3s; }
.hero-graph text.label:nth-of-type(4) { animation-delay: 2.4s; }

@keyframes fadeIn { to { opacity: 1; } }

@media (max-width: 760px) {
  .hero-graph { display: none; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--surface-line);
}
.section-alt { background: var(--bg-alt); }

.section-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
}
@media (max-width: 760px) {
  .section-grid { grid-template-columns: 1fr; gap: 20px; }
}

.section-head h2 {
  font-size: 1.9rem;
}
.section-head-center {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}
.section-intro {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.section-body p { max-width: 62ch; }

.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
}
.tag-row li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--surface-line);
  color: var(--lilas-soft);
}

/* ============================================
   Missions — commit-graph list
   ============================================ */
.mission-graph {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.mission-graph::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--surface-line);
}

.mission {
  position: relative;
  display: flex;
  gap: 24px;
  padding: 22px 0;
}

.mission-hash {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  z-index: 1;
}

.mission-body h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.mission-body p {
  max-width: 56ch;
}

/* ============================================
   Charte cards
   ============================================ */
.charte-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 560px) {
  .charte-grid { grid-template-columns: 1fr; }
}

.charte-card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  padding: 22px;
}
.charte-card h3 {
  font-size: 1.05rem;
  color: var(--vert-soft);
}
.charte-card p { margin: 0; font-size: 0.95rem; }

.licence-note {
  font-size: 0.92rem;
  color: var(--text-faint);
  border-top: 1px dashed var(--surface-line);
  padding-top: 18px;
}
.licence-note strong { color: var(--lilas-soft); }

/* ============================================
   CTA
   ============================================ */
.section-cta {
  text-align: center;
}
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-inner .hero-actions { justify-content: center; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--surface-line);
  padding: 32px 0 48px;
}
.footer-inner p {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--text-faint);
}
.footer-meta a { color: var(--text-faint); }
.footer-meta a:hover { color: var(--vert-soft); }
