/* === Kankele V1 — Premium Trust ===================================== */

:root {
  --ink-950: #0A0A0A;
  --ink-900: #171717;
  --ink-700: #404040;
  --ink-600: #525252;
  --ink-500: #737373;
  --ink-400: #A3A3A3;
  --ink-300: #D4D4D4;
  --ink-200: #E5E5E5;
  --ink-100: #F5F5F5;
  --ink-50:  #FAFAFA;
  --ink-0:   #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Geist", Inter, ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss02", "cv11", "tnum";
  color: var(--ink-950);
  background: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink-950); color: #fff; }
a { color: inherit; text-decoration: none; }

/* === Eyebrow / labels === */
.eyebrow, .kbd-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}

/* === Buttons === */
.btn-primary, .btn-secondary, .btn-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink-950);
  color: #fff;
  border-color: var(--ink-950);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 1px 1px rgb(0 0 0 / 0.2);
}
.btn-primary:hover { background: #262626; border-color: #262626; text-decoration: none; }
.btn-secondary {
  background: var(--ink-0);
  color: var(--ink-950);
  border-color: var(--ink-300);
}
.btn-secondary:hover { background: var(--ink-50); border-color: var(--ink-400); text-decoration: none; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }

/* === Masthead institutionnel ===
   Structure type lettre notariale / journal de référence :
   - rule épais de 3px en haut (autorité)
   - meta-row mono small-caps (édition / langue / sign-in)
   - logo CENTRÉ et grand (140px)
   - strapline "Proof · Identity · Trust" centrée dessous
   - rule fin de fermeture
*/
.masthead {
  background: #fff;
  border-top: 3px solid var(--ink-950);
  border-bottom: 1px solid var(--ink-200);
  padding: 0;
}
.masthead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--ink-100);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.masthead-signin,
.masthead-back-link {
  color: var(--ink-700);
  font-weight: 500;
  transition: color 160ms ease;
}
.masthead-back-link:hover { color: var(--ink-950); text-decoration: none; }

/* Variante compacte (page demo) — pas de strapline, logo plus petit. */
.masthead--compact .brand-centered { padding: 0.625rem 2rem 1rem; }
.masthead--compact .brand-centered img { height: 96px; }
@media (max-width: 768px) {
  .masthead--compact .brand-centered img { height: 72px; }
  .masthead--compact .brand-centered { padding: 0.5rem 1rem 0.75rem; }
}
.masthead-signin:hover {
  color: var(--ink-950);
  text-decoration: none;
}

.masthead .brand-centered {
  display: flex;
  justify-content: center;
  padding: 0.5rem 2rem 0;
}
.masthead .brand-centered img {
  height: 180px;
  width: auto;
  display: block;
  /* PNG natif 1536x1024 → reste dans le pixel-perfect même à DPR 3 */
  image-rendering: -webkit-optimize-contrast;
}
.masthead-strapline {
  text-align: center;
  margin: 0;
  padding: 0 2rem 1.25rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--ink-700);
  font-weight: 500;
}

/* === Switch FR/EN compact === */
.lang {
  display: inline-flex;
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.lang button {
  background: transparent;
  color: var(--ink-500);
  border: 0;
  padding: 6px 12px;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.lang button:hover:not([aria-pressed="true"]) { background: var(--ink-50); color: var(--ink-900); }
.lang button[aria-pressed="true"] { background: var(--ink-950); color: #fff; }

/* Mobile masthead — logo réduit à 88px, strapline plus serrée. */
@media (max-width: 768px) {
  .masthead-meta {
    gap: 0.75rem;
    padding: 0.5rem 1rem;
  }
  .masthead .brand-centered { padding: 0.5rem 1rem 0; }
  .masthead .brand-centered img { height: 112px; }
  .masthead-strapline {
    font-size: 10px;
    letter-spacing: 0.35em;
    padding: 0 1rem 0.875rem;
  }
}

/* === Hero centré (institutionnel) === */
.hero {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  text-align: center;
}
.hero .eyebrow { display: block; margin-bottom: 1.75rem; }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink-950);
  max-width: 60rem;
  margin: 0 auto;
}
.hero-title span { display: block; }
.hero-title-em { color: var(--ink-700); }
.hero-lede {
  margin: 2.25rem auto 0;
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-600);
}
.hero-cta {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.hero-meta {
  margin-top: 4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-500);
}
.trust-dot {
  width: 6px; height: 6px;
  background: #16a34a;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
}

/* === Modules === */
.modules {
  max-width: 80rem;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-top: 1px solid var(--ink-200);
}
.modules-header { margin-bottom: 3rem; max-width: 36rem; }
.modules-header .eyebrow { display: block; margin-bottom: 1rem; }
.modules-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .modules-grid { grid-template-columns: 1fr; gap: 0.75rem; }
}
.module {
  padding: 2.5rem 2rem;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.module:hover {
  border-color: var(--ink-300);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.06), 0 2px 4px rgb(0 0 0 / 0.04);
  transform: translateY(-2px);
}
.module-num {
  font-family: "Geist Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--ink-300);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.module h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--ink-950);
}
.module p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-600);
}

/* === Lede section === */
.lede-section {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-top: 1px solid var(--ink-200);
}
.lede-section .eyebrow { display: block; margin-bottom: 1.5rem; }
.lede-body {
  font-size: clamp(1.125rem, 1.5vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}

/* === Trust band (Proof / Identity / Trust pillars) === */
.band {
  background: var(--ink-950);
  color: #fff;
  padding: 6rem 2rem;
  text-align: left;
}
.band-inner { max-width: 80rem; margin: 0 auto; }
.band .eyebrow {
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-bottom: 1.5rem;
}
.band-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 50rem;
  margin: 0 0 4rem;
}
.band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 3rem;
}
@media (max-width: 768px) {
  .band-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.band-pillar h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.875rem;
  color: #fff;
}
.band-pillar p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

/* === Workflows section === */
.workflows {
  max-width: 80rem;
  margin: 0 auto;
  padding: 5rem 2rem;
  border-top: 1px solid var(--ink-200);
}
.workflows-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 56rem;
}
.workflows-header .eyebrow { display: block; }
.workflows-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.workflows-lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-600);
  max-width: 36rem;
}
.workflows-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink-200);
}
@media (min-width: 900px) {
  .workflows-list { grid-template-columns: repeat(4, 1fr); }
}
.workflows-list li {
  border-bottom: 1px solid var(--ink-200);
  padding: 1.25rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  font-size: 0.9375rem;
  color: var(--ink-900);
}
@media (min-width: 900px) {
  .workflows-list li:not(:nth-last-child(-n+4)) { border-bottom: 1px solid var(--ink-200); }
}
.workflows-list .num {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  color: var(--ink-400);
  letter-spacing: 0.05em;
  min-width: 1.75rem;
}

/* === Colophon === */
.colophon {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  border-top: 1px solid var(--ink-200);
}
.colo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) { .colo-grid { grid-template-columns: 1fr 1fr; } }
.colo-grid > div .eyebrow { display: block; margin-bottom: 0.75rem; }
.colo-strong {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-900);
}
.colo-meta {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-top: 0.25rem;
  line-height: 1.5;
}
.colo-grid a:hover { color: var(--ink-950); text-decoration: underline; text-underline-offset: 3px; }
.copy {
  border-top: 1px solid var(--ink-200);
  padding-top: 1.5rem;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-400);
  text-align: center;
}

/* === Form fields (partagés avec /demo.html) === */
.input, .field-ink {
  width: 100%;
  background: #fff;
  border: 1px solid var(--ink-300);
  border-radius: 8px;
  padding: 0.6875rem 0.875rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink-950);
  transition: border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
}
.input:hover, .field-ink:hover { border-color: var(--ink-400); }
.input:focus, .field-ink:focus { border-color: var(--ink-950); box-shadow: 0 0 0 3px rgb(0 0 0 / 0.08); }
.input::placeholder, .field-ink::placeholder { color: var(--ink-400); }
textarea.input, textarea.field-ink { resize: vertical; min-height: 88px; line-height: 1.55; }

/* === /demo.html === */
.demo-page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}
.demo-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--ink-500);
  margin-bottom: 3rem;
  transition: color 160ms ease;
}
.demo-back:hover { color: var(--ink-950); text-decoration: none; }

.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px) { .demo-grid { grid-template-columns: 280px 1fr; gap: 4rem; } }

.demo-aside .eyebrow { display: block; margin-bottom: 1rem; }
.demo-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.demo-lede {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-600);
  margin-bottom: 2rem;
}
.demo-aside-meta {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-500);
}
.demo-aside .rule-thick { display: none; }

.demo-main form {
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 768px) { .demo-main form { padding: 2.5rem; } }

.demo-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.demo-fieldset legend {
  display: block;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 0.5rem;
  padding: 0;
}
.demo-main label {
  display: grid;
  gap: 0.4375rem;
}
.demo-main label > span:first-child {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-700);
  letter-spacing: 0;
  text-transform: none;
}

.demo-submit {
  width: 100%;
  padding: 1rem;
  font-size: 0.9375rem;
}

.form-status {
  font-size: 0.875rem;
  text-align: center;
  min-height: 1.25rem;
  margin: 0;
}
.form-status.success { color: var(--ink-950); }
.form-status.error { color: var(--ink-950); }

hr.rule-thick {
  border: 0;
  border-top: 1px solid var(--ink-200);
  margin: 0.5rem 0;
}

/* === Status seal (legacy) === */
.serif-italic { font-style: italic; }
