/* Jeigi Solutions — single-ink identity.
   Single ink on a dark ground. */

:root {
  color-scheme: dark;

  --paper:       #161414;
  --paper-sunk:  #1d1a1a;
  --ink:         #f3f0ee;
  --ink-soft:    #d8d2cf;
  --muted:       #948a86;
  --rule:        #322e2d;
  --rule-strong: #4a4442;
  --field:       #f3f0ee;
  --field-ink:   #161414;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --track: .34em;            /* measured off the wordmark */
  --gut:   clamp(1.25rem, 5vw, 3.5rem);
  --rail:  10rem;            /* article-number rail on document pages */
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(.95rem, .9rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gut); top: -4rem; z-index: 20;
  background: var(--field); color: var(--field-ink);
  padding: .6rem 1rem; text-decoration: none;
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .12em; text-transform: uppercase;
  transition: top .18s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------------------------------------------------------------- lockup */

.lockup {
  margin: 0;
  display: inline-flex; flex-direction: column; align-items: center;
  gap: .16em; text-decoration: none; color: inherit;
}
.lockup__mark { display: block; height: 1em; width: auto; }
.lockup__word { display: block; width: 1.3em; height: auto; }

/* ------------------------------------------------------------------ home */

.home { min-height: 100svh; display: flex; flex-direction: column; }

.home__stage {
  flex: 1; display: grid; place-content: center; justify-items: center;
  padding: clamp(4rem, 14vh, 9rem) var(--gut);
}

.home__tagline {
  margin: clamp(1.5rem, 3vh, 2.4rem) 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fade-in .7s ease .7s forwards;
}

.home .lockup {
  font-size: clamp(6.5rem, 26vw, 15rem);   /* drives mark + wordmark together */
  opacity: 0;
  animation: lockup-in .8s cubic-bezier(.22, 1, .36, 1) .35s forwards;
}
@keyframes lockup-in {
  from { opacity: 0; transform: translateY(.6rem) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.home__meta {
  border-top: 1px solid var(--rule);
  padding: 1.4rem var(--gut) 1.6rem;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .5rem clamp(1rem, 4vw, 2.75rem);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fade-in .7s ease .85s forwards;
}
@keyframes fade-in { to { opacity: 1; } }

.home__meta a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: .15em; }
.home__meta a:hover { color: var(--ink); border-bottom-color: currentColor; }
.home__meta .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- header */

.masthead {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__in {
  max-width: 76rem; margin-inline: auto;
  padding: .95rem var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.masthead .lockup { flex-direction: row; align-items: center; gap: .75rem; font-size: 1.7rem; }
.masthead .lockup__word { width: 6.2em; }

.langs {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .14em; text-transform: uppercase;
}
.langs a { text-decoration: none; color: var(--muted); padding: .2rem .1rem; }
.langs a:hover { color: var(--ink); }
.langs [aria-current="true"] { color: var(--ink); border-bottom: 1px solid currentColor; }
.langs .sep { color: var(--rule-strong); }

/* -------------------------------------------------------------- document */

.doc { max-width: 76rem; margin-inline: auto; padding-inline: var(--gut); }

.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  border-top: 1px solid var(--rule);
}
.row:first-of-type { border-top: 0; }

.row__rail {
  padding: 2.4rem 1.75rem 2.4rem 0;
  border-right: 1px solid var(--rule);   /* stacked rows form one continuous rule */
  text-align: right;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.row__body { padding: 2.4rem 0 2.6rem clamp(1.5rem, 4vw, 3rem); min-width: 0; }

/* masthead of the document */
.doc__head .row__body { padding-block: clamp(3.5rem, 11vh, 7rem) clamp(2.5rem, 7vh, 4.5rem); }
.doc__head .row__rail { padding-top: clamp(3.5rem, 11vh, 7rem); }

.doc__title {
  margin: 0;
  font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4.25rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.doc__title b { font-weight: 500; font-style: normal; }

.doc__stamp {
  margin: 2rem 0 0;
  font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* mandatory mentions, art. R. 123-237 code de commerce */
.legal-line {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.85;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  max-width: 64ch;
}

/* article prose */
.art h2 {
  margin: 0 0 .9rem;
  font-size: clamp(1.05rem, .98rem + .35vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -.008em;
  line-height: 1.25;
}
.art h3 {
  margin: 1.9rem 0 .55rem;
  font-family: var(--mono);
  font-size: .6875rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.art p  { margin: 0 0 1rem; color: var(--ink-soft); max-width: 62ch; }
.art ul { margin: 0 0 1rem; padding-left: 0; list-style: none; max-width: 62ch; }
.art li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; color: var(--ink-soft); }
.art li::before {
  content: ""; position: absolute; left: 0; top: .82em;
  width: .6rem; height: 1px; background: var(--rule-strong);
}
.art > :last-child { margin-bottom: 0; }
.art strong { font-weight: 600; color: var(--ink); }
.art a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: .22em; }
.art a:hover { text-decoration-color: currentColor; }
.art .val { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .94em; }

/* article prose — ordered lists, tables and the annex form.
   Scoped to .art like every rule above: a bare element selector would reach
   the home page too. */
.art ol {
  margin: 0 0 1rem; padding-left: 0; max-width: 62ch;
  list-style: none; counter-reset: step;
}
.art ol > li { counter-increment: step; }
.art ol > li::before {
  content: counter(step); top: 0; width: auto; height: auto; background: none;
  font-family: var(--mono); font-size: .75em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.art__scroll { max-width: 62ch; margin: 0 0 1rem; overflow-x: auto; }
.art table {
  width: 100%; border-collapse: collapse;
  font-size: .9375rem; color: var(--ink-soft);
}
.art th, .art td {
  text-align: left; vertical-align: top;
  padding: .7rem 1.25rem .7rem 0;
  border-bottom: 1px solid var(--rule);
}
.art th {
  font-family: var(--mono); font-weight: 500;
  font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.art tbody tr:last-child td { border-bottom: 0; }

.art blockquote {
  margin: 0 0 1rem; padding: 1.4rem 0 1.4rem 1.5rem;
  border-left: 1px solid var(--rule-strong);
  max-width: 62ch;
}
.art blockquote p {
  font-family: var(--mono); font-size: .8125rem; line-height: 2;
  margin-bottom: .6rem;
}
.art blockquote p:last-child { margin-bottom: 0; }

/* a text that is not in force must not look like one that is */
.doc__draft {
  margin: 1.6rem 0 0; padding: .85rem 1.1rem;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono); font-size: .75rem; line-height: 1.7;
  color: var(--ink); max-width: 62ch;
}
.doc__note {
  margin: 1.6rem 0 0;
  font-family: var(--mono); font-size: .75rem; line-height: 1.7;
  color: var(--muted); max-width: 62ch;
}

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--rule);
  margin-top: clamp(3rem, 8vh, 5rem);
}
.foot__in {
  max-width: 76rem; margin-inline: auto;
  padding: 1.6rem var(--gut) 2.75rem;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .5rem clamp(1rem, 4vw, 2.75rem);
  font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.foot__in a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: .15em; }
.foot__in a:hover { color: var(--ink); border-bottom-color: currentColor; }
.foot__in .spacer { margin-left: auto; }

/* --------------------------------------------------------------- responsive */

@media (max-width: 46rem) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row__rail {
    border-right: 0; text-align: left;
    padding: 2.1rem 0 0;
  }
  .row__body { padding: .5rem 0 2.2rem; }
  .doc__head .row__rail { padding-top: clamp(2.5rem, 8vh, 4rem); }
  .doc__head .row__body { padding-block: .5rem clamp(2rem, 6vh, 3rem); }
  .home__meta .spacer, .foot__in .spacer { margin-left: 0; flex-basis: 100%; height: 0; }
}

/* --------------------------------------------------------------- a11y / print */

@media (prefers-reduced-motion: reduce) {
  .home .lockup, .home__tagline, .home__meta { animation: none; opacity: 1; transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #000; --muted: #444; --rule: #bbb; --rule-strong: #999; }
  .masthead { position: static; backdrop-filter: none; }
  .langs, .skip-link { display: none; }
  .row { break-inside: avoid; }
  .art a::after { content: " (" attr(href) ")"; font-family: var(--mono); font-size: .75em; }
}
