/*
 * Nilaxi -- one stylesheet, no framework, no web font.
 *
 * Fonts are system stacks on purpose: the Content-Security-Policy
 * (config/initializers/content_security_policy.rb) blocks external fonts,
 * and a site that preaches sobriety should not ship 200 KB of type.
 *
 * One dark theme for every visitor: near-black with a hint of blue, and a
 * cyan accent. Cyan cannot carry text on a light background (1.8:1 on
 * white, measured), so there is no light variant to keep in step.
 * WCAG contrast, measured: text 16.1:1, muted 6.5:1 or more, accent 9.5:1
 * or more on every background. Colours live in the custom properties below
 * and nowhere else.
 */

:root {
  --bg: #0b1117;
  --bg-alt: #0f1720;
  --surface: #121c26;
  --text: #e6edf3;
  --muted: #93a1b0;
  --line: #1f2b38;
  --accent: #22d3ee;
  --accent-ink: #031418;
  --accent-soft: #0b2a33;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "Liberation Sans", sans-serif;
  --font-serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Noto Serif", "Liberation Serif", serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 0.75rem;
  --wrap: 72rem;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: 0.2em; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: 44rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark::after { content: "."; color: var(--accent); }

.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 40rem) {
  .site-nav { gap: 0.9rem; padding-bottom: 0.6rem; }
  .site-nav a { font-size: 0.9rem; }
}

/* Shared pieces */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

.accent { color: var(--accent); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1rem; }

.button {
  display: inline-block;
  font: inherit;
  cursor: pointer;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: background-color 0.15s, color 0.15s;
}
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--text)); }
.button--ghost { color: var(--accent); background: transparent; }
.button--ghost:hover { background: var(--accent-soft); }

.section { padding: 5rem 0; }
.section--alt { background: var(--bg-alt); }
.section__intro { max-width: 46rem; color: var(--muted); margin-bottom: 2.5rem; }
.section__intro strong { color: var(--text); }

/* Hero */

.hero { padding: 6rem 0 4.5rem; }
.hero h1 { max-width: 52rem; }
/* The line under the title: smaller and lighter, but inside the h1 so that the
   title and this line read as one sentence. */
.hero__sub { display: block; margin-top: 0.6rem; font-size: 1.25rem; font-weight: 400; line-height: 1.3; }
.hero__note { font-size: 0.95rem; color: var(--muted); }

@media (max-width: 40rem) {
  .hero { padding: 3rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
}

/* AI offer */

.section--offer { background: var(--bg-alt); border-block: 1px solid var(--line); }

.offer__terms {
  margin: 1.5rem 0 0;
  max-width: 46rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.offer__terms h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.offer__terms ul { margin: 0; padding-left: 1.25rem; color: var(--muted); }
.offer__terms li { margin-bottom: 0.35rem; }
.offer__terms li::marker { color: var(--accent); }
.offer__terms strong { color: var(--text); }

.delegation__example { margin: 0.75rem 0 0; font-size: 0.95rem; color: var(--muted); }
.delegation__example span { font-weight: 700; color: var(--text); }
.delegation__example strong { color: var(--accent); }

.offer__privacy {
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 46rem;
}
.offer__privacy h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.offer__privacy p { color: var(--muted); margin-bottom: 0.75rem; }
.offer__privacy ul { margin: 0; padding-left: 1.25rem; color: var(--muted); }
.offer__privacy li { margin-bottom: 0.35rem; }
.offer__privacy li::marker { color: var(--accent); }

.offer__footnote { margin: 2rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 46rem; }

/* The offer: a scale from all-human to all-AI */

.delegation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
}
.delegation__question { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; text-align: center; margin-bottom: 0.4rem; }
.delegation__motto { text-align: center; color: var(--muted); font-style: italic; margin-bottom: 1.5rem; }
.delegation__ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 calc(50% / var(--stops));
  gap: 1rem;
}
.delegation__ends span:last-child { color: var(--accent); text-align: right; }
/* Inline, so that the "+" never wraps away from its words on a narrow phone. */
.delegation__ends .delegation__plus { display: inline; }
/* Two labels cannot sit side by side on a phone: each keeps its "+" with its
   first word, and the right one is longer than half the width. Stack them,
   the left one on the left, the right one on the right. */
@media (max-width: 40rem) {
  .delegation__ends { margin: 0; flex-direction: column; gap: 0.25rem; }
  .delegation__ends span:last-child { align-self: flex-end; }
}

/* The track runs from the centre of the first stop to the centre of the
   last, so the thumb sits right above the name it selects. --stops is set
   on .delegation by the view, from the number of formulas. */
.delegation__range {
  display: block;
  width: calc(100% - 100% / var(--stops));
  margin: 0.75rem calc(50% / var(--stops)) 0;
  accent-color: var(--accent);
  height: 2rem;
  cursor: pointer;
}
.delegation__stops {
  list-style: none;
  margin: 0.25rem 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--stops), minmax(0, 1fr));
}
.delegation__stop {
  width: 100%;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.3;
  padding: 0.25rem;
  cursor: pointer;
}
.delegation__stop[aria-pressed="true"] { color: var(--accent); font-weight: 700; }

.delegation__panel {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}
.delegation__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 2rem; }
.delegation__head h3 { font-size: 1.75rem; margin: 0; }
.delegation__price { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; margin: 0; line-height: 1; }
.delegation__price--quote { font-size: 1.6rem; }
.delegation__price--quote a { color: var(--accent); }
.delegation__price span { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 400; color: var(--muted); }
/* Names wrap onto one to three lines on a phone: the button fills its grid
   cell and the price is pushed to the bottom, so the prices share a line. */
.delegation__stops li { display: flex; }
.delegation__stop { display: flex; flex-direction: column; align-items: center; }
.delegation__intro { margin: 1.25rem 0 0.4rem; }
.delegation__human-time { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; }
/* A sentence set apart at the end of a step: italic, nothing else changes. */
.delegation__note { font-style: italic; }

/* Every step of the level, with who does it. */
.delegation__steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.6rem; counter-reset: dstep; }
.delegation__step {
  counter-increment: dstep;
  display: grid;
  grid-template-columns: 1.75rem 11.5rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.delegation__step::before { content: counter(dstep); font-family: var(--font-mono); color: var(--muted); }
.delegation__who {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.delegation__step--ai .delegation__who { border-color: var(--accent); color: var(--accent); }
.delegation__step--both .delegation__who { border-color: var(--accent); color: var(--text); }
.delegation__step--client .delegation__who { border-style: dashed; }
/* Four names side by side on a phone: smaller type, and a word that still does
   not fit ("intervention", "accompagnement") is hyphenated, never pushed out. */
@media (max-width: 40rem) {
  .delegation__stop { font-size: 0.7rem; padding: 0.1rem; hyphens: auto; text-align: center; }
  .delegation__stop .delegation__stop-price { white-space: normal; font-size: 0.8rem; text-align: center; hyphens: auto; }
}

@media (max-width: 40rem) {
  .delegation__step { grid-template-columns: 1.5rem 1fr; }
  .delegation__step .delegation__who { grid-column: 2; }
  .delegation__step::before { grid-row: span 2; }
}

/* The "+" that replaces the ambiguous word "plus" on the scale's ends. */
.delegation__plus {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  margin-right: 0.15rem;
}

.nowrap { white-space: nowrap; }

.delegation__stop-price {
  display: block;
  margin-top: auto;
  padding-top: 0.2rem;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.delegation__stop[aria-pressed="true"] .delegation__stop-price { color: var(--accent); }

.delegation__fit {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.delegation__fit span { font-weight: 700; color: var(--text); }

/* Values, services, steps */

.values, .services, .steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: 1fr;
}

/* Four values and four steps: 4 columns, then 2, then 1 -- never a lone orphan. */
@media (min-width: 64rem) {
  .services { grid-template-columns: repeat(2, 1fr); }
}

/* Values are ranked: one numbered row each, title beside its text on a
   wide screen. */
.values { counter-reset: value; gap: 0; }
.values li {
  counter-increment: value;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  column-gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.values li:last-child { border-bottom: 1px solid var(--line); }
.values li::before {
  content: counter(value);
  grid-row: span 2;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.values h3 { margin-bottom: 0.4rem; }
@media (min-width: 56rem) {
  .values li { grid-template-columns: 3.5rem 18rem 1fr; column-gap: 2rem; align-items: baseline; }
  .values li::before { grid-row: auto; }
  .values h3 { margin: 0; }
}
.values p, .services p, .steps p { color: var(--muted); margin: 0; }

.services li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

/* Method: the steps run as one numbered column, with the estimate and
   billing notes beside them on a wide screen. */
.method { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; margin-top: 2rem; }
@media (min-width: 64rem) {
  .method { grid-template-columns: 3fr 2fr; gap: 4rem; }
}
.method .steps { margin: 0; grid-template-columns: 1fr; gap: 1.75rem; }
.steps { counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  column-gap: 1rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  padding-top: 0.2rem;
}
.steps h3 { margin-bottom: 0.4rem; }

.method__aside { display: grid; gap: 1rem; }
.method__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.method__card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.method__card p { margin: 0; color: var(--muted); }
.method__note { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* About */

.about { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 56rem) {
  .about { grid-template-columns: 3fr 2fr; gap: 4rem; }
}
.about__text p:not(.eyebrow):not(.lede) { color: var(--muted); }
.about__text .lede { margin-bottom: 1.25rem; }
.about__modes { margin: 0 0 1.25rem; padding-left: 1.25rem; color: var(--muted); }
.about__modes li { margin-bottom: 0.5rem; }
.about__modes li::marker { color: var(--accent); }
.about__modes strong { color: var(--text); }
.about__stance { margin: 1.5rem 0 0; padding-left: 1rem; border-left: 3px solid var(--accent); color: var(--text) !important; }

.about__facts { margin: 0; display: grid; gap: 1rem; }
.about__facts > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.about__facts dt { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.about__facts dd { margin: 0.25rem 0 0; color: var(--muted); }

/* Contact */

.section--contact { background: var(--bg-alt); border-top: 1px solid var(--line); text-align: center; }
.section--contact .lede { margin: 0 auto; }
.section--contact .actions { justify-content: center; }

/* Legal */

.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2.5rem; }

/* Footer */

/* The bottom padding leaves room for the Cal.com floating button (88 px from the
   bottom of the viewport, at every width) so the footer links stay reachable. */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 6.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
