:root {
  --page: #f3eee7;
  --card: #fffcf8;
  --ink: #241f1a;
  --ink-muted: #5c544b;
  --ink-faint: #8a8076;
  --border: #e9e0d4;
  --border-strong: #e0d3c2;
  --accent: #c1673c;
  --accent-soft: #f5e9df;
  --on-accent: #fff8f2;
  --well: #f5efe6;
  --supply-ample: #9ba98f;
  --bullet: #c1a98f;

  --radius-card: 16px;
  --radius-panel: 18px;
  --radius-chip: 14px;
  --gutter: 24px;
  --row-gap: 14px;
  --section-gap: 28px;
  --tap: 44px;

  --fast: 140ms;
  --base: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shadow-card: 0 1px 2px rgba(58, 45, 32, 0.05), 0 3px 10px rgba(58, 45, 32, 0.045);
  --shadow-action: 0 2px 5px rgba(140, 62, 30, 0.18), 0 6px 18px rgba(140, 62, 30, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #14110e;
    --card: #1e1a16;
    --ink: #ede6dd;
    --ink-muted: #a2988d;
    --ink-faint: #8a8076;
    --border: #2a241e;
    --border-strong: #2a241e;
    --accent: #c97f53;
    --accent-soft: #33231a;
    --on-accent: #fff8f2;
    --well: #221d18;
    --supply-ample: #8fa687;
    --bullet: #7a6a57;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 10px rgba(0, 0, 0, 0.3);
    --shadow-action: 0 2px 5px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- language toggle ---------- */

/* Hide the language that is not active, rather than hiding both and reviving one.
   Reviving with `display: revert` discarded author rules such as `.back` and
   `.footlinks a`, which set their own display and won on specificity. */
body[data-active="fr"] [data-lang]:not([data-lang="fr"]),
body[data-active="en"] [data-lang]:not([data-lang="en"]) {
  display: none;
}

.langbar {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding: 18px 0 0;
}

.langbar button {
  min-height: var(--tap);
  min-width: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--fast) var(--ease-out),
    color var(--fast) var(--ease-out), border-color var(--fast) var(--ease-out);
}

.langbar button:first-of-type {
  border-radius: 10px 4px 4px 10px;
}

.langbar button:last-of-type {
  border-radius: 4px 10px 10px 4px;
}

.langbar button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* ---------- hero ---------- */

header.hero {
  padding: 56px 0 var(--section-gap);
}

.mark {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 30px;
  margin-bottom: 30px;
}

.mark i {
  display: block;
  width: 12px;
  border-radius: 3px;
  background: var(--accent);
}

.mark i:nth-child(1) { height: 12px; }
.mark i:nth-child(2) { height: 22px; }
.mark i:nth-child(3) { height: 30px; }
.mark i:nth-child(4) { height: 18px; }
.mark i:nth-child(5) { height: 26px; }
.mark i.rest {
  height: 5px;
  width: 18px;
  background: var(--border-strong);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 9vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.tagline {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(19px, 4.4vw, 23px);
  line-height: 1.42;
  color: var(--ink-muted);
}

/* ---------- sections ---------- */

main {
  padding-bottom: 64px;
}

section {
  padding-top: 44px;
}

h2 {
  margin: 0 0 var(--row-gap);
  font-size: clamp(25px, 5.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h3 {
  margin: var(--section-gap) 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 var(--row-gap);
  color: var(--ink-muted);
}

p.lead {
  color: var(--ink);
  font-size: 19px;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

/* ---------- feature cards ---------- */

.cards {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.glyph {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.glyph span {
  width: 9px;
  height: 9px;
  background: var(--accent);
  display: block;
}

.glyph .round { border-radius: 50%; }
.glyph .square { border-radius: 2px; }
.glyph .diamond { border-radius: 2px; transform: rotate(45deg); }
.glyph .ring {
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.glyph .bar { width: 12px; height: 4px; border-radius: 2px; }

/* ---------- quiet panel ---------- */

.quiet {
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 22px;
}

.quiet ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.quiet li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--ink-muted);
  font-size: 16px;
}

.quiet li:last-child {
  margin-bottom: 0;
}

.quiet li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bullet);
}

/* ---------- prose (privacy / terms) ---------- */

.prose h2 {
  margin-top: 40px;
  font-size: clamp(21px, 4.6vw, 25px);
}

.prose h2:first-of-type {
  margin-top: var(--section-gap);
}

.prose ul {
  margin: 0 0 var(--row-gap);
  padding-left: 20px;
  color: var(--ink-muted);
}

.prose li {
  margin-bottom: 7px;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.updated {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ---------- links & footer ---------- */

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) var(--ease-out);
}

a:hover,
a:focus-visible {
  border-bottom-color: var(--accent);
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin-left: -12px;
  padding: 0 12px;
  font-size: 16px;
  border-bottom: none;
}

footer {
  border-top: 1px solid var(--border);
  padding: var(--section-gap) 0 48px;
  margin-top: 56px;
}

.footlinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  margin-bottom: 18px;
}

.footlinks a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: 16px;
  border-bottom: none;
  color: var(--ink-muted);
}

.footlinks a:hover,
.footlinks a:focus-visible {
  color: var(--accent);
}

footer p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-faint);
}

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