/* ============================================================
   PumaI — shared site design system
   Light / editorial. Extracted from the original landing page
   and extended for the multi-page site.
   ============================================================ */

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

:root {
  /* Thème sombre bleuté — repris de l'en-tête de la Vitrine (/vitrine). */
  --bg:           #06161e;
  --surface:      #0c2833;
  --surface-alt:  #0f303d;
  --text:         #e8eff1;
  --muted:        #a6bfc7;
  --faint:        #6f8b95;
  --border:       #1b3a48;
  --border-light: #16303d;
  --ink:          #e8eff1;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --maxw: 920px;

  /* subsystem accents (deck: memory=cyan, action=green, autonomy=magenta,
     governance=amber/brass) — brightened for the dark background */
  --mem:     #45c7d6;  --mem-bg:  rgba(69,199,214,0.10);  --mem-bd:  rgba(69,199,214,0.45);
  --act:     #3ddc97;  --act-bg:  rgba(61,220,151,0.10);  --act-bd:  rgba(61,220,151,0.42);
  --auto:    #e28fd6;  --auto-bg: rgba(226,143,214,0.10); --auto-bd: rgba(226,143,214,0.40);
  --gov:     #d7a94f;  --gov-bg:  rgba(215,169,79,0.12);  --gov-bd:  rgba(215,169,79,0.48);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: normal;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── I18N ── */
body.lang-fr .t-en { display: none !important; }
body.lang-en .t-fr { display: none !important; }

/* ── TYPE ── */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 2rem;
  display: block;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
}

h2 {
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--text);
  margin-bottom: 0.4rem;
}

p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

strong { font-weight: 600; color: var(--text); }
em { font-style: italic; color: var(--muted); }
.brand { font-weight: 700; color: var(--text); }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2.5rem;
}

section {
  padding: 100px 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
}

.section-lead { max-width: 640px; }
.section-lead p { margin-top: 0.6rem; }

.note-mono {
  font-size: 0.95rem;
  color: var(--faint);
  font-family: var(--mono);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6,22,30,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: normal;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
  transition: color 0.1s;
}

.nav-links a:hover { color: var(--text); }
/* Lien de la page courante : nettement mis en avant (gras + trait sous le mot). */
.nav-links a.active { color: var(--text); font-weight: 700; }
.nav-links a.nav-page.active {
  border-bottom: 2px solid var(--gov);
  padding-bottom: 3px;
}

.nav-cta {
  font-family: var(--mono) !important;
  font-size: 11px !important;
  font-weight: normal !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  background: var(--surface);
  transition: border-color 0.1s, background 0.1s;
}

.nav-cta:hover { border-color: var(--text) !important; }

.lang-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.35rem 0;
  transition: color 0.1s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn:hover { color: var(--text); }

/* ── HERO ── */
#hero {
  padding: 130px 0 110px;
  border-top: none;
}

.hero-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-bottom: 2.5rem;
  display: block;
}

#hero h1 { max-width: 720px; margin-bottom: 1.75rem; }

#hero p.lead {
  font-size: 1.15rem;
  font-weight: normal;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

/* compact hero variant for inner pages */
.page-hero { padding: 96px 0 64px; border-top: none; }
.page-hero h1 { max-width: 760px; margin-bottom: 1.5rem; }
.page-hero p.lead {
  font-size: 1.15rem; color: var(--muted);
  max-width: 620px; line-height: 1.85;
}

.btn-group { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.btn-primary {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.7; }

.btn-secondary {
  font-size: 14px;
  font-weight: normal;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.1s;
}

.btn-secondary:hover { color: var(--text); }

/* ── FEATURES GRID ── */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 2.5rem;
  background: var(--surface);
}

.feature-item {
  padding: 2rem 2.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-item:nth-child(2n) { border-right: none; }
.feature-item:nth-last-child(-n+2) { border-bottom: none; }

/* link cards (home pillars) */
a.feature-item { transition: background 0.12s; }
a.feature-item:hover { background: var(--surface-alt); }
.feature-arrow { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 0.8rem; display: inline-block; }

.feature-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-bottom: 0.75rem;
  display: block;
}

.feature-item h3 { font-size: 1.05rem; }
.feature-item p { font-size: 1rem; margin-top: 0.4rem; }

/* ── COMPARE / DATA TABLE ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.compare-table thead th {
  padding: 0.9rem 1.4rem;
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.compare-table thead th:last-child { color: var(--text); }

.compare-table td {
  padding: 0.9rem 1.4rem;
  font-size: 1rem;
  font-weight: normal;
  color: var(--muted);
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:last-child { color: var(--text); }
.compare-table td:first-child { white-space: nowrap; }
.compare-table.three td:first-child,
.compare-table.three th:first-child { white-space: normal; }

/* ── FLOW DIAGRAM (tick / waves) ── */
.flow-box {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-alt);
}

.tick-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.tick-node {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
}

.tick-node.accent { color: var(--text); border-color: var(--text); }

.tick-arrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.tick-silence {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
  font-style: italic;
  letter-spacing: 0.03em;
}

/* ── WAVES (engine) ── */
.waves {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.wave {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 1.1rem;
}

.wave .wave-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.6rem;
}

.wave .agent {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
}
.wave .agent:last-child { margin-bottom: 0; }

/* ── MODES / CARD ROW (3 cols) ── */
.card-row3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  margin-top: 2.5rem;
}
.card-row3.four { grid-template-columns: repeat(4, 1fr); }

.card-cell {
  padding: 2rem;
  border-right: 1px solid var(--border);
}

.card-row3 .card-cell:last-child { border-right: none; }

.mode-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  display: block;
  margin-bottom: 1rem;
}

.card-cell h3 { font-size: 1.05rem; }
.card-cell p { font-size: 1rem; margin-top: 0.4rem; margin-bottom: 1.25rem; }

.card-cell blockquote {
  font-size: 0.95rem;
  font-weight: normal;
  color: var(--faint);
  font-style: italic;
  border-left: 1px solid var(--border);
  padding-left: 0.85rem;
  line-height: 1.65;
}

/* ── NUMBERED STEPS ── */
.steps {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  margin-top: 2rem;
}

.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  border-bottom: 1px solid var(--border-light);
}

.step:last-child { border-bottom: none; }

.step-index {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: normal;
  color: var(--faint);
  padding: 1.5rem;
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
}

.step-content { padding: 1.5rem 1.75rem; }
.step-content p { font-size: 1rem; font-weight: normal; }

/* ── FUNNEL (memory decantation) ── */
.funnel { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.6rem; }

.funnel-stage {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 1.25rem 1.5rem;
}
.funnel-stage:nth-child(1) { margin: 0 0; }
.funnel-stage:nth-child(2) { margin: 0 2.5rem; }
.funnel-stage:nth-child(3) { margin: 0 5rem; }

.funnel-stage .stage-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.4rem;
}
.funnel-stage h3 { font-size: 1rem; }
.funnel-stage p { font-size: 0.97rem; margin-top: 0.25rem; }

/* ── FIGURE (slide images / diagrams) ── */
figure.fig {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
figure.fig img, figure.fig svg { display: block; width: 100%; height: auto; }
figure.fig figcaption {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   NATIVE DIAGRAMS — bilingual, responsive, built from the
   Mermaid flow sources. No images, no JS dependency.
   ============================================================ */
.diagram {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}
.diagram-body {
  padding: 1.9rem 1.75rem;
  background:
    linear-gradient(var(--surface-alt), var(--surface-alt)) padding-box;
  background-color: var(--surface-alt);
}
.diagram-cap {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

/* nodes */
.node {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.6rem 0.8rem;
  text-align: left;
}
.node .nh {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}
.node small { display: block; color: var(--faint); font-size: 10px; line-height: 1.45; margin-top: 0.15rem; }
.node.solid { background: var(--text); border-color: var(--text); color: var(--bg); }
.node.solid .nh { color: var(--bg); }
.node.solid small { color: rgba(6,22,30,0.68); }

/* accent variants */
.node.mem  { border-color: var(--mem-bd);  background: var(--mem-bg); }
.node.mem  .nh { color: var(--mem); }
.node.act  { border-color: var(--act-bd);  background: var(--act-bg); }
.node.act  .nh { color: var(--act); }
.node.auto { border-color: var(--auto-bd); background: var(--auto-bg); }
.node.auto .nh { color: var(--auto); }
.node.gov  { border-color: var(--gov-bd);  background: var(--gov-bg); }
.node.gov  .nh { color: var(--gov); }

/* layout primitives */
.dgm-row { display: flex; gap: 0.6rem; align-items: stretch; flex-wrap: wrap; }
.dgm-row.center { justify-content: center; }
.dgm-col { display: flex; flex-direction: column; gap: 0.6rem; }
.dgm-col.grow > .node { flex: 1; }
.dgm-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.dgm-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.dgm-row > .node { flex: 1; min-width: 120px; }

/* labelled lane (subsystem group) */
.lane {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.85rem;
  background: rgba(255,255,255,0.03);
}
.lane > .lane-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.6rem;
}
.lane.mem  { border-color: var(--mem-bd);  } .lane.mem  > .lane-tag { color: var(--mem); }
.lane.act  { border-color: var(--act-bd);  } .lane.act  > .lane-tag { color: var(--act); }
.lane.auto { border-color: var(--auto-bd); } .lane.auto > .lane-tag { color: var(--auto); }
.lane.gov  { border-color: var(--gov-bd);  } .lane.gov  > .lane-tag { color: var(--gov); }

/* connectors */
.conn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--faint);
  font-size: 13px;
  padding: 0.35rem 0;
  user-select: none;
}
.conn.v { width: 100%; }
.conn-label {
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-align: center;
  padding: 0.2rem 0;
}

/* horizontal arrow between inline nodes */
.ar { font-family: var(--mono); color: var(--faint); font-size: 13px; display: flex; align-items: center; padding: 0 0.1rem; }

/* branch row (decision outcomes) */
.branch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.branch .node { text-align: center; }
.outcome-ok   { border-color: var(--act-bd) !important;  }
.outcome-ok .nh   { color: var(--act); }
.outcome-warn { border-color: var(--gov-bd) !important;  }
.outcome-warn .nh { color: var(--gov); }
.outcome-stop { border-color: var(--auto-bd) !important; }
.outcome-stop .nh { color: var(--auto); }

@media (max-width: 640px) {
  .dgm-3, .dgm-2, .branch { grid-template-columns: 1fr; }
  .diagram-body { padding: 1.4rem 1.1rem; }
}

/* spec strip — the "numbers" flex */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  margin-top: 2.5rem;
}
.spec {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--border);
}
.spec:last-child { border-right: none; }
.spec .spec-n {
  font-family: var(--mono);
  font-size: 1.75rem;
  color: var(--text);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
}
.spec .spec-l {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin-top: 0.55rem;
  display: block;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .spec:nth-child(2) { border-right: none; }
  .spec:nth-child(1), .spec:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ── PULL QUOTE / CALLOUT ── */
.callout {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--surface-alt);
  padding: 1.75rem 2rem;
}
.callout p { color: var(--text); font-size: 1.05rem; }

/* ── CTA BAND ── */
.cta-band {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
  background: var(--surface-alt);
}
.cta-band .container { text-align: left; }
.cta-band h2 { margin-bottom: 1.25rem; }

/* ── BETA / CONTACT ── */
.beta-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.beta-info p { margin-top: 0.6rem; }
.beta-info h2 { margin-bottom: 0.75rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }

label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
}

input, textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: normal;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.1s;
  width: 100%;
}

input:focus, textarea:focus { border-color: var(--text); }
textarea { resize: vertical; min-height: 110px; }

.form-notice {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

#form-success, #form-error {
  display: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border-light);
  padding: 2.5rem 0;
  background: var(--bg);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); transition: color 0.1s; }
.footer-links a:hover { color: var(--text); }

/* ── MOBILE NAV (hamburger) ── */
.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
  width: 34px;
  height: 30px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  position: relative;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .container { padding: 0 1.5rem; }
  .nav-inner { padding: 0 1.5rem; }
  section { padding: 64px 0; }
  #hero { padding: 80px 0 64px; }
  .page-hero { padding: 72px 0 48px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-item { border-right: none !important; }
  .feature-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .feature-item:last-child { border-bottom: none !important; }
  .card-row3, .card-row3.four { grid-template-columns: 1fr; }
  .card-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .card-row3 .card-cell:last-child { border-bottom: none; }
  .waves { grid-template-columns: 1fr; }
  .funnel-stage:nth-child(2), .funnel-stage:nth-child(3) { margin: 0; }
  .beta-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}

/* Hamburger takes over below 720px */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(6,22,30,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.22s ease, opacity 0.18s ease;
  }
  body.nav-open .nav-links {
    max-height: 80vh;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links .nav-page {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-light);
  }
  .nav-links li:has(.lang-btn) { padding-top: 0.85rem; }
  .nav-cta { display: inline-block; margin-top: 0.85rem; }
}

/* ============================================================
   PREMIUM LIGHT LAYER
   Light base, dramatic dark render panels, depth & gradients.
   Appended last so it intentionally overrides the rules above.
   ============================================================ */
:root { --maxw: 1040px; --ink-shadow: 13,18,28; }

body { font-size: 17.5px; }

/* — type, bolder & larger — */
h1, h2, h3 { font-family: var(--serif); }
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); letter-spacing: -0.03em; line-height: 1.03; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -0.02em; line-height: 1.12; }
#hero p.lead, .page-hero p.lead { font-size: 1.3rem; line-height: 1.6; max-width: 660px; }
.label { letter-spacing: 0.14em; }

/* — section rhythm & ambience — */
section { padding: 116px 0; }
#hero { padding: 120px 0 96px; position: relative; }
#hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 50% at 12% -5%, rgba(8,145,178,0.10), transparent 60%),
    radial-gradient(42% 55% at 92% 8%, rgba(192,38,211,0.08), transparent 62%),
    radial-gradient(40% 45% at 60% 0%, rgba(217,119,6,0.05), transparent 60%);
}
.page-hero { position: relative; padding: 104px 0 60px; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 60% at 85% -10%, rgba(8,145,178,0.09), transparent 62%);
}

/* — RENDER PANEL: the signature premium element — */
.render-wrap { position: relative; margin-top: 3rem; }
.render-wrap::before {
  content: ""; position: absolute; inset: 8% 1% -6%; z-index: 0; pointer-events: none;
  background: radial-gradient(58% 62% at 35% 38%,
              rgba(8,145,178,0.30), rgba(192,38,211,0.22) 48%,
              rgba(217,119,6,0.12) 70%, transparent 80%);
  filter: blur(52px); opacity: 0.75;
}
.render-wrap.hero-render { margin-top: 3.6rem; }
.render {
  position: relative; z-index: 1;
  border-radius: 16px; overflow: hidden;
  background: #0c1018;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.5),
    0 30px 70px -28px rgba(var(--ink-shadow), 0.55),
    0 10px 24px -12px rgba(0,0,0,0.22);
}
.render img { display: block; width: 100%; height: auto; }
.render-cap {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--faint);
  text-align: center; margin-top: 1rem;
}

/* — FEATURE CARDS → shadowed, gapped, hover lift — */
.features-grid {
  border: none !important; background: none !important;
  overflow: visible !important; border-radius: 0 !important;
  gap: 1.1rem;
}
.feature-item {
  border: 1px solid var(--border-light) !important;
  border-radius: 14px; background: var(--surface) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 14px 30px -26px rgba(var(--ink-shadow),0.4);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
a.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 26px 50px -24px rgba(var(--ink-shadow),0.38);
  border-color: var(--border) !important;
}

/* — CARD ROWS (modes / effort) → cards with depth — */
.card-row3, .card-row3.four {
  border: none !important; background: none !important;
  overflow: visible !important; gap: 1rem;
}
.card-cell {
  border: 1px solid var(--border-light) !important;
  border-radius: 14px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 14px 30px -26px rgba(var(--ink-shadow),0.4);
}

/* — SPEC STRIP → gradient numbers, lift — */
.spec-strip {
  border-color: var(--border-light);
  box-shadow: 0 18px 40px -26px rgba(var(--ink-shadow),0.4);
  border-radius: 14px;
}
.spec .spec-n {
  font-size: 2.1rem;
  background: linear-gradient(120deg, var(--mem), var(--auto) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* — TABLE → soft depth, gradient header — */
.compare-table {
  border-color: var(--border-light);
  box-shadow: 0 18px 44px -28px rgba(var(--ink-shadow),0.36);
  border-radius: 14px;
}
.compare-table thead th { background: linear-gradient(180deg, var(--surface-alt), var(--surface)); }

/* — DIAGRAMS → depth, soft inner gradient — */
.diagram {
  border-color: var(--border-light);
  box-shadow: 0 20px 48px -30px rgba(var(--ink-shadow),0.4);
  border-radius: 14px;
}
.diagram-body { background: radial-gradient(130% 110% at 0% 0%, var(--surface-alt), var(--bg)); }
.node { box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.node.solid { box-shadow: 0 10px 22px -12px rgba(var(--ink-shadow),0.55); }
.flow-box {
  border-color: var(--border-light);
  box-shadow: 0 18px 44px -30px rgba(var(--ink-shadow),0.34);
  border-radius: 14px;
}
.wave { box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.funnel-stage {
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 12px 26px -24px rgba(var(--ink-shadow),0.4);
  border-color: var(--border-light);
}

/* — CALLOUT → soft gradient — */
.callout {
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--mem);
  background: linear-gradient(135deg, rgba(69,199,214,0.07), rgba(226,143,214,0.05)), var(--surface);
  box-shadow: 0 16px 36px -28px rgba(var(--ink-shadow),0.3);
  border-radius: 14px;
}

/* — CTA band — */
.cta-band { background: linear-gradient(135deg, var(--surface), var(--surface-alt)); }

/* — buttons / nav refinement — */
.btn-primary {
  padding: 0.85rem 1.65rem; font-size: 11.5px; border-radius: 6px;
  box-shadow: 0 12px 26px -14px rgba(var(--ink-shadow),0.55);
}
.btn-primary:hover { opacity: 0.88; }
nav { background: rgba(6,22,30,0.85); }

@media (max-width: 720px) {
  #hero { padding: 80px 0 60px; }
  .render-wrap { margin-top: 2rem; }
  .render-wrap::before { filter: blur(36px); inset: 6% 0 -4%; }
  .render { border-radius: 12px; }
  #hero p.lead, .page-hero p.lead { font-size: 1.12rem; }
}

/* ============================================================
   UTILITY / LEGACY LAYER (some rules kept for future reuse)
   ============================================================ */

/* — inline code — */
code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(255,255,255,0.08);
  padding: 0.08em 0.36em;
  border-radius: 4px;
}

/* — self-host code block (dark developer panel) — */
.codeblock {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #d6e2ea;
  background: #0c1018;
  border: 1px solid #1c2430;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin-top: 1.6rem;
  overflow-x: auto;
  box-shadow: 0 18px 40px -30px rgba(var(--ink-shadow),0.5);
}
.codeblock code { background: none; padding: 0; font-size: inherit; }
.codeblock .l { display: block; white-space: pre; }
.codeblock .p { color: #4bd6a0; }          /* prompt $ */
.codeblock .c { color: #6b7a8d; }          /* comment  */
.codeblock .k { color: #7bb8ff; }          /* command  */

/* — dark ghost button (echoes btn-primary) — */
.btn-gh {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.85rem 1.5rem; border-radius: 6px;
  background: var(--ink); color: var(--bg) !important; text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(var(--ink-shadow),0.55);
  transition: opacity 0.15s;
}
.btn-gh:hover { opacity: 0.85; }
.btn-gh svg { width: 15px; height: 15px; fill: currentColor; }

/* — pill tags (reuses spec-strip vibe) — */
.oss-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.6rem; list-style: none; padding: 0;
}
.oss-tags li {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  background: var(--surface-alt);
}
.oss-tags li strong { color: var(--text); font-weight: 600; }
