/* ==========================================================================
   Korix Studio · korix.css · design system "Calibre" (final)
   Linked by every artboard: <link rel="stylesheet" href="./korix.css">
   Fonts load through each artboard's single Google Fonts css2 link (see BRAND.md).
   Scope: every rule lives under .kx (the artboard root) or a .kx-* class.
   Rule of rest: the resting style of every element IS its final state.
   Keyframes only describe where things come from (fill-mode both), so a page
   is complete without JavaScript, before fonts load and with reduced motion.
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
.kx {
  /* palette (hex in BRAND.md, contrast pairs measured) */
  --kx-opalin: #EAEAE6;      /* main ground, silvered opaline dial */
  --kx-plaque: #F2F2EF;      /* raised surface, dial face */
  --kx-lunette: #E0E0DB;     /* bezel band, image wells */
  --kx-encre: #13151B;       /* text, logo, primary button */
  --kx-rhodium: #595D66;     /* secondary text, field rules */
  --kx-trait: #C5C6C0;       /* decorative hairlines only */
  --kx-acier: #2F3D72;       /* blued steel: hands, ticks, focus, active markers. Never text. */
  --kx-nuit: #172033;        /* the one dark field: footer, menu, confirmation */
  --kx-nuit-2: #222C42;      /* surface on nuit */
  --kx-ligne-nuit: #3A4560;  /* decorative hairlines on nuit */
  --kx-argent: #A7AEBE;      /* secondary text on nuit */
  --kx-acier-clair: #9DA9D6; /* accent on nuit: ticks, focus */
  --kx-rubis: #A3243E;       /* the jewel: one point per screen, never text, never a surface */

  /* semantic colours (switched by .kx-invert) */
  --kx-bg: var(--kx-opalin);
  --kx-surface: var(--kx-plaque);
  --kx-well: var(--kx-lunette);
  --kx-fg: var(--kx-encre);
  --kx-fg-2: var(--kx-rhodium);
  --kx-line: var(--kx-trait);
  --kx-line-strong: var(--kx-rhodium);
  --kx-accent: var(--kx-acier);
  --kx-focus: var(--kx-acier);
  --kx-btn-bg: var(--kx-encre);
  --kx-btn-bg-hover: var(--kx-nuit);
  --kx-btn-fg: var(--kx-opalin);

  /* type families */
  --kx-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --kx-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --kx-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* fluid type scale: each size is exact at a 390 px and a 1440 px viewport (linear between) */
  --kx-t-label: 11px;
  --kx-t-small: 13px;
  --kx-t-body: clamp(16px, 15.4px + .15vw, 17px);
  --kx-t-lead: clamp(19px, 17.514px + .381vw, 23px);
  --kx-t-h3: clamp(23px, 20.4px + .6667vw, 30px);
  --kx-t-h2: clamp(32px, 25.315px + 1.7143vw, 50px);
  --kx-t-h1: clamp(40px, 28.115px + 3.0477vw, 72px);
  --kx-t-display: clamp(48px, 30.172px + 4.5715vw, 96px);
  --kx-t-display-xl: clamp(56px, 26.286px + 7.6191vw, 136px);

  /* spacing: 8 px module */
  --kx-s1: 4px; --kx-s2: 8px; --kx-s3: 12px; --kx-s4: 16px; --kx-s5: 24px; --kx-s6: 32px;
  --kx-s7: 48px; --kx-s8: 64px; --kx-s9: 96px; --kx-s10: 128px; --kx-s11: 192px;
  --kx-margin: clamp(16px, 5vw, 72px);
  --kx-gutter: clamp(16px, 11px + 1.2vw, 24px);
  --kx-section: clamp(72px, 40px + 7.4vw, 144px);
  --kx-maxw: 1440px;
  --kx-measure: 36em;

  /* radii, hairlines */
  --kx-r-guichet: 3px;
  --kx-r-pill: 999px;
  --kx-hair: 1px;
  --kx-hair-2: 1.5px;

  /* motion */
  --kx-d-xs: 160ms; --kx-d-s: 320ms; --kx-d-m: 600ms; --kx-d-l: 900ms; --kx-d-xl: 1300ms;
  --kx-e-out: cubic-bezier(.2, .8, .2, 1);      /* reveals */
  --kx-e-sweep: cubic-bezier(.45, .02, .15, 1); /* hands: soft start, long settle */
  --kx-e-bezel: cubic-bezier(.65, 0, .35, 1);   /* bezel, indicators: mechanical */
  --kx-e-index: cubic-bezier(.3, .7, .2, 1);    /* ticks, rules, hairlines */
  --kx-e-voile: cubic-bezier(.2, .65, .1, 1);   /* blur settling */
  --kx-e-hinge: cubic-bezier(.76, 0, .24, 1);   /* caseback, curtain, menu */
}

/* inverted ground: nuit field. The footer and the menu are inverted by default. */
.kx-invert, .kx-footer, .kx-menu {
  --kx-bg: var(--kx-nuit);
  --kx-surface: var(--kx-nuit-2);
  --kx-well: var(--kx-nuit-2);
  --kx-fg: var(--kx-opalin);
  --kx-fg-2: var(--kx-argent);
  --kx-line: var(--kx-ligne-nuit);
  --kx-line-strong: var(--kx-argent);
  --kx-accent: var(--kx-acier-clair);
  --kx-focus: var(--kx-opalin);
  --kx-btn-bg: var(--kx-opalin);
  --kx-btn-bg-hover: #FFFFFF;
  --kx-btn-fg: var(--kx-nuit);
  background-color: var(--kx-bg);
  color: var(--kx-fg);
  color-scheme: dark;
}

/* 2. BASE ------------------------------------------------------------------ */
.kx {
  background-color: var(--kx-bg);
  color: var(--kx-fg);
  font-family: var(--kx-sans);
  font-size: var(--kx-t-body);
  font-weight: 400;
  line-height: 1.6;
  font-kerning: normal;
  font-optical-sizing: auto;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light;
  overflow-x: clip;
}
.kx, .kx *, .kx *::before, .kx *::after { box-sizing: border-box; }
.kx :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd, fieldset) { margin: 0; }
.kx :where(ul, ol) { padding: 0; list-style: none; }
.kx :where(h1, h2, h3, h4) {
  font-family: var(--kx-serif); font-weight: 300; line-height: 1.08; letter-spacing: -.012em;
  color: var(--kx-fg); text-wrap: balance;
}
.kx :where(p, li, dd, figcaption, blockquote) { text-wrap: pretty; }
.kx :where(img, video, canvas) { display: block; max-width: 100%; }
.kx :where(svg) { flex: none; }
.kx :where(button, input, textarea, select) { font: inherit; color: inherit; letter-spacing: inherit; }
.kx :where(button) { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; }
.kx :where(a) { color: inherit; text-decoration: none; }
.kx :where(strong, b) { font-weight: 500; }
.kx :where(hr) { border: 0; height: 1px; margin: 0; background: var(--kx-line); }
.kx ::selection { background: var(--kx-acier); color: var(--kx-opalin); }
.kx :focus-visible { outline: var(--kx-hair-2) solid var(--kx-focus); outline-offset: 3px; }
.kx :focus:not(:focus-visible) { outline: none; }

/* text links: a drawn underline that redraws on hover */
.kx :where(a:not([class])), .kx-link {
  color: var(--kx-fg);
  background: linear-gradient(currentColor, currentColor) 100% 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
}
.kx :where(a:not([class])):hover, .kx-link:hover { animation: kx-redraw 760ms var(--kx-e-out); }
@keyframes kx-redraw {
  0% { background-size: 100% 1px; background-position: 100% 100%; }
  44% { background-size: 0 1px; background-position: 100% 100%; }
  45% { background-size: 0 1px; background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}

/* 3. TYPE ------------------------------------------------------------------ */
.kx-display-xl, .kx-display, .kx-h1, .kx-h2, .kx-h3, .kx-lead, .kx-quote {
  font-family: var(--kx-serif); color: var(--kx-fg); text-wrap: balance;
}
.kx-display-xl { font-size: var(--kx-t-display-xl); font-weight: 300; line-height: .96; letter-spacing: -.026em; }
.kx-display { font-size: var(--kx-t-display); font-weight: 300; line-height: .98; letter-spacing: -.022em; }
.kx-h1 { font-size: var(--kx-t-h1); font-weight: 300; line-height: 1.02; letter-spacing: -.018em; }
.kx-h2 { font-size: var(--kx-t-h2); font-weight: 300; line-height: 1.06; letter-spacing: -.014em; }
.kx-h3 { font-size: var(--kx-t-h3); font-weight: 400; line-height: 1.16; letter-spacing: -.006em; }
.kx-lead { font-size: var(--kx-t-lead); font-weight: 400; line-height: 1.42; letter-spacing: -.004em; text-wrap: pretty; }
.kx-quote { font-size: var(--kx-t-h3); font-weight: 300; font-style: italic; line-height: 1.3; }
.kx-body { font-family: var(--kx-sans); font-size: var(--kx-t-body); line-height: 1.6; }
.kx-small { font-family: var(--kx-sans); font-size: var(--kx-t-small); line-height: 1.5; color: var(--kx-fg-2); }
.kx-label, .kx-kicker, .kx-tag, .kx-idx, .kx-mono { font-family: var(--kx-mono); font-variant-numeric: tabular-nums; }
.kx-label { font-size: var(--kx-t-label); line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg-2); }
.kx-mono { font-size: 13px; letter-spacing: .02em; }
.kx-idx { font-size: var(--kx-t-label); letter-spacing: .06em; color: var(--kx-fg); }
/* a mono class on a heading keeps the loaded mono weight (headings default to 300, which Martian Mono does not load) */
.kx :where(h1, h2, h3, h4, h5, h6):where(.kx-label, .kx-kicker, .kx-idx) { font-weight: 400; }
.kx-em { font-family: var(--kx-serif); font-style: italic; font-weight: inherit; }
.kx-muted { color: var(--kx-fg-2); }
.kx-measure { max-width: var(--kx-measure); }
.kx-nowrap { white-space: nowrap; }
.kx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* kicker: mono caps preceded by a short acier index line */
.kx-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--kx-t-label); line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg-2);
}
.kx-kicker::before { content: ""; width: 20px; height: 1px; background: var(--kx-accent); flex: none; }
.kx-tag {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px;
  border: 1px solid var(--kx-line); border-radius: var(--kx-r-guichet);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--kx-fg-2); white-space: nowrap;
}

/* graduated rule under one key phrase (emphasis is a rule, never a colour) */
.kx-mark {
  --kx-tick: var(--kx-accent);
  white-space: nowrap;
  padding-bottom: .2em;
  background:
    linear-gradient(var(--kx-tick), var(--kx-tick)) 0 100% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--kx-tick) 0 1px, transparent 1px 8px) 0 100% / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--kx-tick) 0 1.5px, transparent 1.5px 40px) 0 100% / 100% 10px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* 4. LAYOUT ---------------------------------------------------------------- */
.kx-wrap { width: 100%; max-width: var(--kx-maxw); margin-inline: auto; padding-inline: var(--kx-margin); }
.kx-grid { display: grid; grid-template-columns: repeat(var(--kx-cols, 4), minmax(0, 1fr)); column-gap: var(--kx-gutter); row-gap: var(--kx-row-gap, var(--kx-s6)); }
.kx-grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 760px) { .kx-grid { --kx-cols: 8; } .kx-grid > .kx-col { grid-column: var(--kx-start-md, auto) / span var(--kx-span-md, 8); } }
@media (min-width: 1100px) { .kx-grid { --kx-cols: 12; } .kx-grid > .kx-col { grid-column: var(--kx-start, auto) / span var(--kx-span, 12); } }
.kx-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--kx-min, 280px), 100%), 1fr)); gap: var(--kx-gap, var(--kx-gutter)); }
.kx-stack { display: flex; flex-direction: column; gap: var(--kx-gap, var(--kx-s4)); }
.kx-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--kx-gap, var(--kx-s4)); }
.kx-section { padding-block: var(--kx-section); }
.kx-section-tight { padding-block: clamp(48px, 33.14px + 3.81vw, 88px); } /* about 60 % of a section, on the 8 px module: 48 at 390, 88 at 1440 */
/* section opener: a hairline with the counter on the edge, content in the field */
.kx-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--kx-s4);
  padding-top: 14px; margin-bottom: clamp(32px, 2px + 3.75vw, 64px); border-top: 1px solid var(--kx-line); /* 32 at 390, 56 at 1440 */
}
/* minute track: 1 px tick every 8 px module, a major every 40 px. Once per page. */
.kx-track {
  display: block; height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--kx-line-strong) 0 1px, transparent 1px 8px) 0 0 / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--kx-fg) 0 1px, transparent 1px 40px) 0 0 / 100% 9px no-repeat;
  opacity: .7;
}

/* 5. COMPONENTS ------------------------------------------------------------ */

/* 5.1 logo helpers: inline SVG, fill="currentColor", height set inline */
.kx-logo { display: block; width: auto; color: inherit; overflow: hidden; }
.kx-logo-fluid { display: block; width: 100%; height: auto; overflow: hidden; }
.kx-mono-anim { display: block; width: auto; overflow: visible; color: inherit; }
.kx-mono-anim .kx-hh, .kx-mono-anim .kx-mh { transform-box: view-box; transform-origin: 11px 46.64px; }
.kx-mono-anim .kx-stem { transform-box: view-box; transform-origin: 5.5px 46.64px; }
.kx-mono-anim .kx-boss, .kx-mono-anim .kx-pin, .kx-mono-anim .kx-ruby { transform-box: fill-box; transform-origin: 50% 50%; }
.kx-dial-track { color: var(--kx-accent); --kx-delay: 240ms; --kx-stagger: 28ms; }
.kx-appicon { display: block; aspect-ratio: 1; border-radius: 22.4%; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 50% 36%, #22304D 0, #172033 46%, #0F1626 82%); }
.kx-appicon > svg { display: block; width: 100%; height: 100%; }
.kx-pin { fill: var(--kx-bg); }
.kx-ruby { fill: var(--kx-rubis); }

/* 5.2 header (desktop nav, mobile menu button) */
/* skip link: first focusable element of every site page, <a class="kx-skip" href="#contenu">Aller au contenu</a> */
.kx-skip {
  position: absolute; left: var(--kx-margin); top: 12px; z-index: 300; display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 20px; border-radius: var(--kx-r-pill); background-color: var(--kx-encre); color: var(--kx-opalin);
  font-family: var(--kx-sans); font-size: 14px; font-weight: 500; line-height: 1.1; white-space: nowrap;
  transform: translateY(-200%); pointer-events: none;
}
.kx-skip:focus, .kx-skip:focus-visible { transform: none; pointer-events: auto; }
.kx-header { position: relative; z-index: 20; background-color: var(--kx-bg); color: var(--kx-fg); }
.kx-header-sticky { position: sticky; top: 0; }
.kx-header-in { display: flex; align-items: center; gap: var(--kx-s6); min-height: 76px; border-bottom: 1px solid var(--kx-line); }
.kx-header-logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--kx-fg); }
.kx-header-logo .kx-logo { height: 17px; }
.kx-nav { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); margin-left: auto; }
.kx-nav-link, .kx-footer-link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14.5px; letter-spacing: .005em; color: var(--kx-fg); white-space: nowrap;
}
.kx-nav-link::after, .kx-footer-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right center; transition: transform var(--kx-d-m) var(--kx-e-out);
}
.kx-nav-link:hover::after, .kx-footer-link:hover::after { transform: scaleX(1); transform-origin: left center; }
.kx-nav-link.is-active::after, .kx-nav-link[aria-current="page"]::after { transform: scaleX(1); height: 1.5px; background: var(--kx-accent); }
.kx-header-cta { margin-left: var(--kx-s2); }
.kx-menu-btn {
  display: none; align-items: center; gap: 12px; min-height: 44px; min-width: 44px; margin-left: auto;
  font-family: var(--kx-mono); font-size: var(--kx-t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg);
}
.kx-menu-ico { position: relative; width: 22px; height: 9px; }
.kx-menu-ico::before, .kx-menu-ico::after { content: ""; position: absolute; left: 0; height: 1.5px; background: currentColor; }
.kx-menu-ico::before { top: 0; width: 22px; }
.kx-menu-ico::after { bottom: 0; width: 14px; }
@media (max-width: 899.98px) {
  .kx-header-in { min-height: 64px; }
  .kx-header .kx-nav, .kx-header .kx-header-cta { display: none; }
  .kx-header .kx-menu-btn { display: inline-flex; }
}

/* 5.3 mobile menu: full-screen nuit curtain, state class .is-open */
.kx-menu {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  padding: 0 var(--kx-margin) 24px; overflow-y: auto;
  visibility: hidden; clip-path: inset(0 0 100% 0);
  transition: clip-path var(--kx-d-l) var(--kx-e-hinge), visibility 0s linear var(--kx-d-l);
}
.kx-menu.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path var(--kx-d-l) var(--kx-e-hinge), visibility 0s; }
.kx-menu-top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; border-bottom: 1px solid var(--kx-line); }
.kx-menu-close { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; min-width: 44px; justify-content: flex-end;
  font-family: var(--kx-mono); font-size: var(--kx-t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg); }
.kx-menu-nav { display: flex; flex-direction: column; padding-block: 28px; margin-block: auto; }
.kx-menu-link {
  display: flex; align-items: baseline; gap: 18px; padding-block: 14px; border-bottom: 1px solid var(--kx-line);
  font-family: var(--kx-serif); font-weight: 300; font-size: clamp(34px, 9.4vw, 46px); line-height: 1.12; letter-spacing: -.014em; color: var(--kx-fg);
}
.kx-menu-link .kx-idx { color: var(--kx-fg-2); min-width: 2.4em; }
.kx-menu-link.is-active .kx-menu-txt { font-style: italic; }
.kx-menu-link.is-active .kx-idx { color: var(--kx-accent); }
.kx-menu-txt { display: inline-block; transform: translateY(45%); opacity: 0;
  transition: transform 760ms var(--kx-e-out), opacity 420ms linear; transition-delay: calc(220ms + var(--i, 0) * 70ms); }
.kx-menu.is-open .kx-menu-txt { transform: none; opacity: 1; }
.kx-menu-foot { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--kx-line); }

/* 5.4 footer (nuit field). overflow: clip, not hidden: a hidden footer would be a scroll container
   and freeze the view() timeline of the rising wordmark (.kx-sv-letters). */
.kx-footer { position: relative; overflow: hidden; overflow: clip; padding-top: var(--kx-section); }
.kx-footer .kx-label { text-wrap: balance; }
.kx-footer-top { display: grid; gap: var(--kx-s6); padding-bottom: clamp(48px, 6vw, 96px); }
@media (min-width: 1100px) { .kx-footer-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } }
.kx-footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--kx-s6) var(--kx-gutter);
  padding-block: var(--kx-s6); border-top: 1px solid var(--kx-line); }
.kx-footer-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.kx-footer-col .kx-label { margin-bottom: 8px; }
@media (pointer: fine) { .kx-footer-link { min-height: 32px; } }
.kx-footer-mark { padding-block: clamp(32px, 5vw, 72px) clamp(16px, 2vw, 28px); color: var(--kx-fg); }
.kx-footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--kx-line); }

/* 5.5 buttons */
.kx-btn {
  --kx-btn-h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: var(--kx-btn-h); padding: 0 26px; border: 1px solid transparent; border-radius: var(--kx-r-pill);
  font-family: var(--kx-sans); font-size: 15px; font-weight: 500; line-height: 1.1; letter-spacing: .005em;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color var(--kx-d-s) var(--kx-e-out), color var(--kx-d-s) var(--kx-e-out), border-color var(--kx-d-s) var(--kx-e-out);
}
.kx-btn-primary { background-color: var(--kx-btn-bg); color: var(--kx-btn-fg); }
.kx-btn-primary:hover { background-color: var(--kx-btn-bg-hover); }
.kx-btn-secondary { background-color: transparent; color: var(--kx-fg); border-color: var(--kx-line-strong); }
.kx-btn-secondary:hover { border-color: var(--kx-fg); }
.kx-btn-sm { --kx-btn-h: 44px; padding: 0 20px; font-size: 14px; gap: 10px; }
/* a primary that points to the page you are on (the brief pages) steps back to an outline,
   so the page's own primary stays the one filled pill */
.kx-btn-primary[aria-current="page"] { background-color: transparent; color: var(--kx-fg); border-color: var(--kx-line-strong); }
.kx-btn-primary[aria-current="page"]:hover { background-color: transparent; border-color: var(--kx-fg); }
.kx-btn[disabled], .kx-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.kx-btn-text { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--kx-fg); }
.kx-btn-text[disabled], .kx-btn-text[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.kx-btn-text .kx-btn-label { background: linear-gradient(currentColor, currentColor) 100% 100% / 100% 1px no-repeat; padding-bottom: 3px; }
.kx-btn-text:hover .kx-btn-label { animation: kx-redraw 760ms var(--kx-e-out); }
.kx-arrow { transition: transform var(--kx-d-s) var(--kx-e-out); }
.kx-btn:hover .kx-arrow, .kx-btn-text:hover .kx-arrow, .kx-pill:hover .kx-arrow { transform: translateX(3px); }

/* inline stroke icons */
.kx-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; }
.kx-icon * { vector-effect: non-scaling-stroke; }

/* 5.6 inline pill CTA: a button set inside a serif sentence */
.kx-pill-line { font-family: var(--kx-serif); font-weight: 300; font-size: var(--kx-t-h2); line-height: 1.3; letter-spacing: -.012em; color: var(--kx-fg); text-wrap: balance; }
.kx-pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; margin-inline: .12em;
  vertical-align: middle; border-radius: var(--kx-r-pill); background-color: var(--kx-btn-bg); color: var(--kx-btn-fg); /* centred on the x-height at any line size */
  font-family: var(--kx-sans); font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: .005em; white-space: nowrap;
  transition: background-color var(--kx-d-s) var(--kx-e-out);
}
.kx-pill:hover { background-color: var(--kx-btn-bg-hover); }
@media (max-width: 759.98px) { .kx-pill { min-height: 44px; padding: 0 18px; } }

/* 5.7 underline fields (input and textarea), label above in mono */
.kx-field { display: grid; gap: 4px; min-width: 0; }
.kx-input, .kx-textarea, .kx-select {
  display: block; width: 100%; min-height: 48px; padding: 10px 0 12px; border: 0; border-radius: 0; outline: none;
  background:
    linear-gradient(var(--kx-accent), var(--kx-accent)) 0 100% / 0 1.5px no-repeat,
    linear-gradient(var(--kx-line-strong), var(--kx-line-strong)) 0 100% / 100% 1px no-repeat;
  background-color: transparent;
  color: var(--kx-fg); font-family: var(--kx-sans); font-size: 17px; line-height: 1.4;
  transition: background-size var(--kx-d-m) var(--kx-e-index);
  -webkit-appearance: none; appearance: none;
}
.kx-input:focus, .kx-textarea:focus, .kx-select:focus { background-size: 100% 1.5px, 100% 1px; }
.kx-input:focus-visible, .kx-textarea:focus-visible, .kx-select:focus-visible { outline: none; }
.kx-input::placeholder, .kx-textarea::placeholder { color: var(--kx-fg-2); opacity: 1; } /* rhodium at full strength: 5.47:1 */
.kx-textarea { min-height: 132px; resize: vertical; }
.kx-field-hint { font-size: var(--kx-t-small); line-height: 1.5; color: var(--kx-fg-2); }
/* the point sits on the first line, so a message that wraps keeps it in place */
.kx-field-error { display: inline-flex; align-items: flex-start; gap: 8px; font-size: var(--kx-t-small); color: var(--kx-fg); }
.kx-field-error::before { content: ""; width: 6px; height: 6px; margin-top: calc(.8em - 3px); border-radius: 50%; background: var(--kx-rubis); flex: none; }

/* 5.8 chips: real radio or checkbox inputs + labels (input first, label right after) */
.kx-chips { border: 0; padding: 0; min-width: 0; }
.kx-chips > legend { padding: 0; margin-bottom: 14px; }
.kx-chip-row { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.kx-chip-item { display: contents; }
.kx-chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
/* the checked point sits in the left padding: the label stays centred and never shifts when checked */
.kx-chip {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 23px;
  border: 1px solid var(--kx-line-strong); border-radius: var(--kx-r-pill);
  font-size: 15px; line-height: 1.2; color: var(--kx-fg); cursor: pointer; user-select: none;
  transition: background-color var(--kx-d-s) var(--kx-e-out), color var(--kx-d-s) var(--kx-e-out), border-color var(--kx-d-s) var(--kx-e-out);
}
.kx-chip::before { content: ""; position: absolute; left: 9px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform var(--kx-d-s) var(--kx-e-out); }
.kx-chip:hover { border-color: var(--kx-fg); }
.kx-chip-input:checked + .kx-chip { background-color: var(--kx-fg); border-color: var(--kx-fg); color: var(--kx-bg); }
.kx-chip-input:checked + .kx-chip::before { transform: scale(1); }
.kx-chip-input:focus-visible + .kx-chip { outline: var(--kx-hair-2) solid var(--kx-focus); outline-offset: 3px; }
.kx-chip-input:disabled + .kx-chip { opacity: .4; cursor: not-allowed; }

/* 5.9 tabs with a gliding indicator: state classes .is-active on the tab, .is-at-N on the list */
.kx-tabs { --kx-i: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-bottom: 1px solid var(--kx-line); }
.kx-tabs.is-at-1 { --kx-i: 1; } .kx-tabs.is-at-2 { --kx-i: 2; } .kx-tabs.is-at-3 { --kx-i: 3; } .kx-tabs.is-at-4 { --kx-i: 4; } .kx-tabs.is-at-5 { --kx-i: 5; }
.kx-tab {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 12px 14px 0;
  font-family: var(--kx-sans); font-size: 15px; line-height: 1.25; color: var(--kx-fg-2); text-align: left;
  transition: color var(--kx-d-s) var(--kx-e-out);
}
.kx-tab:hover, .kx-tab.is-active, .kx-tab[aria-selected="true"] { color: var(--kx-fg); }
.kx-tab .kx-idx { color: inherit; }
.kx-tabs-ind {
  position: absolute; left: 0; bottom: -1px; width: calc(100% / var(--kx-n, 3)); height: 2px; background: var(--kx-accent);
  transform: translateX(calc(var(--kx-i) * 100%)); transition: transform 720ms var(--kx-e-bezel); pointer-events: none;
}
.kx-tabs-ind::before { content: ""; position: absolute; left: 0; bottom: 2px; width: 1.5px; height: 8px; background: var(--kx-accent); }
.kx-tabpanel { padding-top: clamp(28px, 3vw, 48px); animation: kx-panel 620ms var(--kx-e-out) both; }
@keyframes kx-panel { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 759.98px) { .kx-tab { font-size: 14px; gap: 8px; } }

/* 5.10 accordion row: state class .is-open on .kx-acc */
.kx-accs { border-top: 1px solid var(--kx-line); }
.kx-acc { border-bottom: 1px solid var(--kx-line); }
.kx-acc-h { margin: 0; font: inherit; }
.kx-acc-btn {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 16px; width: 100%;
  min-height: 72px; padding: 20px 0; text-align: left; color: var(--kx-fg);
  font-family: var(--kx-serif); font-weight: 400; font-size: clamp(19px, 14.5px + 1.15vw, 24px); line-height: 1.28; letter-spacing: -.004em;
}
/* index and question share the first baseline at every size; a one-line question stays centred on the icon */
.kx-acc-btn .kx-idx { color: var(--kx-fg-2); align-self: baseline; }
.kx-acc-btn > .kx-idx + span { align-self: baseline; padding-block: max(0px, calc((32px - 1.28em) / 2)); }
.kx-acc.is-open .kx-acc-btn .kx-idx { color: var(--kx-fg); } /* encre, never acier: acier is never text */
.kx-acc-icon { position: relative; width: 20px; height: 20px; }
.kx-acc-icon::before, .kx-acc-icon::after { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; }
.kx-acc-icon::after { transform: rotate(90deg); transition: transform var(--kx-d-m) var(--kx-e-bezel); }
.kx-acc.is-open .kx-acc-icon::after { transform: rotate(180deg); }
.kx-acc-panel { display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows var(--kx-d-m) var(--kx-e-out), visibility 0s linear var(--kx-d-m); }
.kx-acc.is-open .kx-acc-panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--kx-d-m) var(--kx-e-out), visibility 0s; }
.kx-acc-inner { overflow: hidden; min-height: 0; }
.kx-acc-body { padding: 0 36px 28px 64px; max-width: calc(var(--kx-measure) + 100px); color: var(--kx-fg); } /* text at the 36em measure */
@media (max-width: 759.98px) { .kx-acc-btn { grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 12px; } .kx-acc-body { padding: 0 0 24px 44px; } }

/* 5.11 hairline rows with sibling dim on hover */
.kx-rows { border-top: 1px solid var(--kx-line); }
.kx-row { border-bottom: 1px solid var(--kx-line); transition: opacity var(--kx-d-m) var(--kx-e-out); }
.kx-row-link {
  display: grid; grid-template-columns: minmax(2.8em, auto) minmax(0, 1fr) auto; align-items: baseline;
  gap: clamp(14px, 3vw, 48px); padding-block: clamp(18px, 2.4vw, 34px); color: var(--kx-fg);
}
.kx-row-title { font-family: var(--kx-serif); font-weight: 300; font-size: var(--kx-t-h2); line-height: 1.04; letter-spacing: -.014em; }
.kx-row-meta { display: inline-flex; align-items: center; gap: 14px; font-family: var(--kx-mono); font-size: var(--kx-t-label);
  letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg-2); white-space: nowrap; }
.kx-row-link:hover .kx-arrow { transform: translateX(4px); }
@media (hover: hover) { .kx-rows:has(.kx-row:hover) .kx-row:not(:hover) { opacity: .36; } }
.kx-rows:has(.kx-row-link:focus-visible) .kx-row:not(:focus-within) { opacity: .36; }
@media (max-width: 759.98px) { .kx-row-link { grid-template-columns: minmax(2.4em, auto) minmax(0, 1fr); } .kx-row-meta { grid-column: 2; white-space: normal; } }

/* 5.12 veiled screen (Ecran voile): app screens are glimpsed, never read.
   Blur rests at 9 px, comes to 7 px on hover, focus or .is-in, never below 6 px. */
.kx-veil {
  --kx-blur: 9px; --kx-blur-near: 7px; --kx-s: 1.12; --kx-o: 50% 40%;
  /* overflow: clip, not hidden: a hidden frame is a scroll container and would hold the
     view() timeline of .kx-sv-veil inside the frame instead of the page */
  position: relative; overflow: hidden; overflow: clip; isolation: isolate; margin: 0;
  aspect-ratio: var(--kx-ratio, 4 / 5); border-radius: var(--kx-r-guichet); background-color: var(--kx-nuit);
}
.kx-veil img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--kx-o);
  transform: scale(var(--kx-s)); filter: blur(max(6px, var(--kx-blur))) saturate(.72) brightness(.86);
  transition: filter var(--kx-d-l) var(--kx-e-voile), transform var(--kx-d-l) var(--kx-e-voile);
}
.kx-veil::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(19, 21, 27, .85);
  background:
    linear-gradient(162deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 36%),
    radial-gradient(120% 70% at 50% 118%, rgba(23, 32, 51, .5), rgba(23, 32, 51, 0) 62%);
}
.kx-veil:hover img, .kx-veil:focus-within img, .kx-veil.is-in img {
  filter: blur(max(6px, var(--kx-blur-near))) saturate(.86) brightness(.94); transform: scale(calc(var(--kx-s) * .985));
}
.kx-veil-lg { --kx-blur: 14px; --kx-blur-near: 11px; }
.kx-veil-round { border-radius: 50%; aspect-ratio: 1; }
.kx-figure { display: grid; gap: 12px; margin: 0; }
.kx-figcap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; font-family: var(--kx-mono);
  font-size: var(--kx-t-label); line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg-2); }

/* 5.13 lunette (bezel): steps on a ring turn under a fixed marker at 3 o'clock.
   Set --kx-turn (deg, shortest way, from renderVals) or the .is-step-N class. */
/* 22 degrees apart: five steps span -88 to +88 degrees, so every label stays on the right half.
   Ticks every quarter step (--kx-tick-p), one on each step; the pattern's seam falls on the cropped left half. */
.kx-lunette { --kx-r: 220px; --kx-gap: 22deg; --kx-tick-p: calc(var(--kx-gap) / 4); --kx-tick-w: .5deg; --kx-step: 0; position: relative; width: calc(var(--kx-r) * 2); aspect-ratio: 1; }
.kx-lunette.is-step-1 { --kx-step: 1; } .kx-lunette.is-step-2 { --kx-step: 2; } .kx-lunette.is-step-3 { --kx-step: 3; } .kx-lunette.is-step-4 { --kx-step: 4; }
.kx-lunette-ring {
  position: absolute; inset: 0; border-radius: 50%;
  transform: rotate(var(--kx-turn, calc(var(--kx-step) * var(--kx-gap) * -1)));
  transition: transform var(--kx-d-l) var(--kx-e-bezel);
}
.kx-lunette-ring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(from calc(90deg - var(--kx-tick-p) * 33 - var(--kx-tick-w) / 2), var(--kx-line-strong) 0 var(--kx-tick-w), transparent var(--kx-tick-w) var(--kx-tick-p));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 9px));
  opacity: .8;
}
.kx-lunette-ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--kx-line); }
.kx-lunette-label {
  position: absolute; left: 50%; top: 50%; transform-origin: 0 0; white-space: nowrap;
  transform: rotate(calc(var(--i, 0) * var(--kx-gap))) translate(calc(var(--kx-r) + 18px), -50%);
  font-family: var(--kx-mono); font-size: var(--kx-t-label); letter-spacing: .12em; text-transform: uppercase;
  color: var(--kx-fg-2); transition: color var(--kx-d-m) var(--kx-e-out); /* rhodium at full strength: 5.88:1 on plaque */
}
.kx-lunette-label.is-active { color: var(--kx-fg); font-weight: 500; }
.kx-lunette-marker { position: absolute; top: 50%; right: -2px; width: 14px; height: 1.5px; margin-top: -.75px; background: var(--kx-accent); }
.kx-lunette-marker::after { content: ""; position: absolute; right: 0; top: -4px; width: 1.5px; height: 9.5px; background: var(--kx-accent); }

/* 5.14 progress rail: a minute track with an acier fill. style="--kx-p: 0.4" (0 to 1) */
.kx-rail { --kx-p: 0; position: relative; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--kx-line-strong) 0 1px, transparent 1px 8px) 0 100% / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--kx-line-strong) 0 1px, transparent 1px 40px) 0 100% / 100% 9px no-repeat; }
.kx-rail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--kx-accent);
  transform: scaleX(var(--kx-p)); transform-origin: left center; transition: transform 720ms var(--kx-e-bezel); }
.kx-rail-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; font-family: var(--kx-mono);
  font-size: var(--kx-t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--kx-fg-2); font-variant-numeric: tabular-nums; }
/* vertical reading rail on long pages: fixed on the right edge, filled by scroll where supported */
.kx-scrollrail { position: fixed; top: 50%; right: 14px; z-index: 15; width: 9px; height: 200px; margin-top: -100px; pointer-events: none;
  background: repeating-linear-gradient(180deg, var(--kx-line-strong) 0 1px, transparent 1px 8px) 0 0 / 5px 100% no-repeat; opacity: .7; }
.kx-scrollrail::after { content: ""; position: absolute; left: 0; top: 0; width: 9px; height: 1.5px; background: var(--kx-accent); }
@media (max-width: 759.98px) { .kx-scrollrail { display: none; } }

/* 6. MOTION ---------------------------------------------------------------- */
/* 6.1 Mise a l'heure (signature): the K opens from 9:50 to 10:10, true 12:1 gearing on one curve.
   Markup: the animated monogram (BRAND.md). Hands are drawn at rest, the keyframes come from earlier. */
.kx-sweep .kx-stem { animation: kx-stem 620ms var(--kx-e-index) 40ms both; }
.kx-sweep .kx-hands { animation: kx-fade 260ms linear 160ms both; }
.kx-sweep .kx-hh { animation: kx-hh 1300ms var(--kx-e-sweep) 180ms both; }
.kx-sweep .kx-mh { animation: kx-mh 1300ms var(--kx-e-sweep) 180ms both; }
.kx-sweep .kx-boss { animation: kx-pop 460ms var(--kx-e-out) 120ms both; }
.kx-sweep .kx-pin, .kx-sweep .kx-ruby { animation: kx-pop 320ms var(--kx-e-out) 1220ms both; }
@keyframes kx-stem { from { transform: scaleY(0); } }
@keyframes kx-hh { from { transform: rotate(-10deg); } }
@keyframes kx-mh { from { transform: rotate(-120deg); } }
@keyframes kx-pop { from { transform: scale(0); } }
@keyframes kx-fade { from { opacity: 0; } }
/* waiting state: the minute hand turns once (only while something is actually loading) */
.kx-wait .kx-mh { animation: kx-turn 2400ms linear infinite; }
@keyframes kx-turn { from { transform: rotate(-360deg); } }

/* 6.2 logo intro: wordmark letters rise from the baseline, staggered (style="--i:N" on each path) */
.kx-logo-intro path { animation: kx-letter 900ms var(--kx-e-out) both; animation-delay: calc(var(--kx-delay, 0ms) + var(--i, 0) * 70ms); }
@keyframes kx-letter { from { transform: translateY(108%); } }

/* 6.3 line mask reveal: <span class="kx-line"><span style="--i:0">...</span></span>
   The line starts low enough (130 %, 165 % with a rule) that no ascender or accent shows in the mask at t=0. */
.kx-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.kx-line > span { display: block; animation: kx-line 1000ms var(--kx-e-out) both; animation-delay: calc(var(--kx-delay, 0ms) + var(--i, 0) * 110ms); }
@keyframes kx-line { from { transform: translateY(130%); } }
/* a line that carries a graduated rule needs room below for the ticks (put the rule on the last line) */
.kx-line:has(.kx-mark) { padding-bottom: .38em; margin-bottom: -.38em; }
.kx-line:has(.kx-mark) > span { animation-name: kx-line-deep; }
@keyframes kx-line-deep { from { transform: translateY(165%); } }

/* 6.4 rise: blocks fade up 14 px */
.kx-rise { animation: kx-rise 900ms var(--kx-e-out) both; animation-delay: var(--kx-delay, 0ms); }
@keyframes kx-rise { from { opacity: 0; transform: translateY(14px); } }

/* 6.5 hairline draw and index ticks */
.kx-hairline { display: block; height: 1px; background: var(--kx-line); }
.kx-draw { transform-origin: left center; animation: kx-draw 1200ms var(--kx-e-index) both; animation-delay: var(--kx-delay, 0ms); }
@keyframes kx-draw { from { transform: scaleX(0); } }
.kx-track.kx-draw-ticks, .kx-rail.kx-draw-ticks { animation: kx-ticks 1100ms var(--kx-e-index) both; animation-delay: var(--kx-delay, 0ms); }
@keyframes kx-ticks { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.kx-mark.kx-draw-ticks { animation: kx-mark-draw 1100ms var(--kx-e-index) both; animation-delay: var(--kx-delay, 0ms); }
@keyframes kx-mark-draw { from { background-size: 0 1px, 0 5px, 0 10px; } }
.kx-index { transform-box: fill-box; transform-origin: 50% 0; animation: kx-index 440ms var(--kx-e-index) both; animation-delay: calc(var(--kx-delay, 0ms) + var(--i, 0) * var(--kx-stagger, 60ms)); }
@keyframes kx-index { from { transform: scaleY(0); } }

/* 6.6 Voile: the screen settles from deep blur and stops at 9 px (on .kx-veil).
   The aperture fills backwards only: at rest the frame keeps no clip-path, so its own focus ring shows. */
.kx-voile { animation: kx-aperture 900ms var(--kx-e-index) backwards; animation-delay: var(--kx-delay, 0ms); }
.kx-voile img { animation: kx-voile 1400ms var(--kx-e-voile) both; animation-delay: calc(var(--kx-delay, 0ms) + 120ms); }
@keyframes kx-aperture { from { clip-path: inset(7% round var(--kx-r-guichet)); } to { clip-path: inset(0 round var(--kx-r-guichet)); } }
@keyframes kx-voile { from { filter: blur(26px) saturate(.4) brightness(.5); transform: scale(calc(var(--kx-s) * 1.08)); } }

/* 6.7 curtain wipe and caseback (page enter). Place once, first child of .kx. Hidden at rest. */
.kx-curtain { position: fixed; inset: 0; z-index: 200; pointer-events: none; background-color: var(--kx-nuit);
  clip-path: inset(0 0 100% 0); animation: kx-curtain 900ms var(--kx-e-hinge) 120ms both; }
@keyframes kx-curtain { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
.kx-caseback { position: fixed; inset: 0; z-index: 200; pointer-events: none; display: grid; grid-template-rows: 1fr 1fr; }
.kx-caseback::before, .kx-caseback::after { content: ""; background-color: var(--kx-nuit); }
.kx-caseback::before { clip-path: inset(0 0 100% 0); animation: kx-case-top 1000ms var(--kx-e-hinge) 80ms both; }
.kx-caseback::after { clip-path: inset(100% 0 0 0); animation: kx-case-bot 1000ms var(--kx-e-hinge) 80ms both; }
@keyframes kx-case-top { from { clip-path: inset(0 0 0 0); } }
@keyframes kx-case-bot { from { clip-path: inset(0 0 0 0); } }

/* 6.8 slow marquee (marks or veiled thumbnails only, never words). Duplicate the content once. */
.kx-marquee { --kx-gap: 72px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.kx-marquee-track { display: flex; align-items: center; gap: var(--kx-gap); width: max-content; animation: kx-marquee var(--kx-marquee-d, 60s) linear infinite; }
.kx-marquee:hover .kx-marquee-track { animation-play-state: paused; }
@keyframes kx-marquee { to { transform: translateX(calc(-50% - var(--kx-gap) / 2)); } }

/* 6.9 replay helper: put .kx-noanim on a wrapper for ~60 ms, then remove it, to restart its animations
   (pseudo-elements included: hairlines, rails and ticks drawn with ::before or ::after restart too) */
.kx-noanim, .kx-noanim *, .kx-noanim::before, .kx-noanim::after, .kx-noanim *::before, .kx-noanim *::after { animation: none !important; }

/* 7. SCROLL-LINKED (only where supported; without support everything simply shows) */
@supports (animation-timeline: view()) {
  .kx-sv-rise { animation: kx-sv-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  @keyframes kx-sv-rise { from { opacity: .3; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  .kx-sv-draw { transform-origin: left center; animation: kx-sv-draw linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
  @keyframes kx-sv-draw { from { transform: scaleX(.04); } to { transform: scaleX(1); } }
  /* backwards only: once the frame has settled, it rests on its own style, so hover, focus and .is-in still bring it nearer */
  .kx-sv-veil img { animation: kx-sv-veil linear backwards; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  @keyframes kx-sv-veil { from { filter: blur(20px) saturate(.5) brightness(.62); } to { filter: blur(max(6px, var(--kx-blur))) saturate(.72) brightness(.86); } }
  /* each word is its own box (inline boxes all share the paragraph's progress). Keep the spaces
     between the word spans, never inside one: <span class="kx-w">Une</span> <span class="kx-w">application</span> */
  .kx-sv-read .kx-w { display: inline-block; text-indent: 0; animation: kx-sv-read linear both; animation-timeline: view(); animation-range: cover 15% cover 45%; }
  @keyframes kx-sv-read { from { opacity: .3; } to { opacity: 1; } }
  .kx-sv-letters path { animation: kx-sv-letter linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  @keyframes kx-sv-letter { from { transform: translateY(40%); } to { transform: none; } }
}
@supports (animation-timeline: scroll()) {
  .kx-scrollrail::after { animation: kx-scrollrail linear both; animation-timeline: scroll(root block); }
  @keyframes kx-scrollrail { from { transform: translateY(0); } to { transform: translateY(198px); } }
}



/* 8. REDUCED MOTION: no movement at all, final states shown ------------------ */
@media (prefers-reduced-motion: reduce) {
  .kx *, .kx *::before, .kx *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .kx-curtain, .kx-caseback { display: none !important; }
  .kx-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .kx-menu-txt { transform: none; opacity: 1; }
}


/* 9. SITE (live site only, not part of the canvas boards) */
html.kx-lock, html.kx-lock body { overflow: hidden; }
html:not(.js) .kx-js-only { display: none !important; }
.kx-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* the canvas behind .kx: an overscroll bounce (iOS Safari, macOS trackpads) shows opalin above the header, not white */
html { background-color: #EAEAE6; }
/* without JavaScript the phone menu cannot open (kx-site.js drives it), so its button (below 900 px) steps aside
   and the footer's Pages column carries the navigation */
html:not(.js) .kx-header .kx-menu-btn { display: none; }
/* when Tab scrolls a link or a button into view, keep room for its focus ring (3 px offset + 1.5 px line),
   so the ring is never cut at the edge of the window. Anchor targets (sections) are not links: unchanged. */
.kx :is(a[href], button) { scroll-margin-block: 8px; }
/* legal link in the footer base line (site only) */
.kx-footer-legal { color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.kx-footer-legal:hover { color: var(--kx-fg); }
