/* ════════════════════════════════════════════════
   CENTIA — Studio site
   Editorial · technical · restrained
   ════════════════════════════════════════════════ */

:root {
  /* Palette — Paper (default) */
  --paper:   #efeae0;
  --paper-2: #e7e1d4;
  --ink:     #161513;
  --ink-2:   #2a2824;
  --muted:   #6b6557;
  --rule:    #c9c1ad;
  --accent:  #1f3a8a;   /* deep cobalt — blueprint */
  --accent-2:#2952c8;

  /* Type */
  --serif: "EB Garamond", "Times New Roman", serif;
  --sans:  "DM Sans", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --gutter: clamp(20px, 4vw, 56px);
  --max:    1320px;
}

/* ─────────── reset ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

em { font-style: italic; font-family: var(--serif); font-weight: 400; }

/* ─────────── grain ─────────── */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.08  0 0 0 0 0.07  0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─────────── NAV ─────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex; align-items: center;
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--ink);
}

/* Reusable lockup: mark replaces C, gold dot echoes satellite on the i */
.lockup {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: inherit;
  line-height: 1;
  letter-spacing: -0.005em;
  color: inherit;
  white-space: nowrap;
}
.lockup__mark {
  width: 1.014em;     /* 0.78 cap-height × 1.30 oversize */
  height: 1.014em;
  color: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  margin-left: 0.08em;
  margin-right: 0.04em;
  transform: translateY(0.022em);
  overflow: visible;
}
.lockup__rest { color: inherit; }
.lockup__i {
  position: relative;
  display: inline-block;
}
.lockup__dot {
  position: absolute;
  left: 50%;
  top: 0.18em;
  transform: translateX(-50%);
  width: 0.115em;
  height: 0.115em;
  background: var(--accent);
  border-radius: 50%;
}
.lockup--lg { font-size: 30px; }

.nav__links {
  display: flex; gap: 28px;
  justify-self: center;
  font-size: 14px;
  font-weight: 500;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute;
  left: 0; right: 100%; bottom: 2px;
  height: 1px; background: var(--ink);
  transition: right .25s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { right: 0; }

.nav__toggle {
  display: none;
  justify-self: end;
  width: 40px; height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
}
.nav__toggle span {
  display: block;
  width: 22px; height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform .25s ease, opacity .15s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 0 var(--gutter);
    font-family: var(--serif);
    font-size: clamp(38px, 9vw, 56px);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  .nav__links[data-open="true"] {
    opacity: 1;
    pointer-events: auto;
  }
  .nav__links a {
    color: var(--ink);
    padding: 8px 0;
  }
  .nav__links a::after { display: none; }
}
body[data-menu="open"] { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .nav__toggle span, .nav__links { transition: none; }
}

.nav__status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: color-mix(in oklab, var(--paper) 60%, white);
  white-space: nowrap;
}
.nav__status .mono { white-space: nowrap; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2c8a3d;
  box-shadow: 0 0 0 0 rgba(44,138,61,0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(44,138,61,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(44,138,61,0); }
  100% { box-shadow: 0 0 0 0 rgba(44,138,61,0); }
}

/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  padding: clamp(60px, 12vw, 140px) var(--gutter) clamp(80px, 14vw, 160px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  max-width: var(--max);
  margin: 0 auto;
}
.hero__meta {
  display: flex; gap: 20px;
  align-items: center;
}
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 0;
  position: relative;
}
.tag::before {
  content: ""; display: inline-block;
  width: 16px; height: 1px; background: var(--muted);
  margin-right: 10px;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 11.5vw, 184px);
  line-height: 0.94;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--ink);
}
.hero__title .line { display: block; }
.hero__title .line em { color: var(--accent); }
.hero__title .line--small {
  font-size: clamp(36px, 6.5vw, 96px);
  color: var(--muted);
  font-style: italic;
  letter-spacing: -0.015em;
}

.hero__sub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 780px;
}
@media (min-width: 900px) {
  .hero__sub {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
    max-width: none;
  }
}
.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
  max-width: 56ch;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-self: start;
}
@media (min-width: 900px) {
  .hero__actions { justify-self: end; }
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 14px; font-weight: 500;
  border-radius: 999px;
  transition: transform .15s ease, background .2s, color .2s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-2);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.hero__coords {
  position: absolute;
  right: var(--gutter);
  top: clamp(60px, 12vw, 140px);
  display: flex; flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}
.hero__coords span { white-space: nowrap; }
@media (max-width: 720px) { .hero__coords { display: none; } }

/* ─────────── RULE ─────────── */
.rule {
  position: relative;
  height: 1px;
  background: var(--rule);
  margin: 0 var(--gutter);
  display: flex;
  justify-content: center;
}
.rule span {
  background: var(--paper);
  padding: 0 16px;
  transform: translateY(-50%);
  display: inline-block;
  font-size: 10.5px;
  white-space: nowrap;
}

/* ─────────── SECTION HEAD ─────────── */
.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--gutter) clamp(36px, 5vw, 56px);
}
@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 120px 1fr;
    gap: 0 56px;
    align-items: start;
  }
}
.section__num { padding-top: 6px; color: var(--muted); }
.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.section__intro {
  grid-column: 2 / -1;
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}
@media (max-width: 899px) {
  .section__intro { grid-column: 1 / -1; }
}

/* ─────────── PRATIQUE ─────────── */
.practice {
  padding-bottom: clamp(60px, 8vw, 100px);
}
.services {
  list-style: none; padding: 0; margin: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service {
  padding: 36px 32px 40px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  gap: 14px;
  background: var(--paper);
  transition: background .25s;
  position: relative;
}
.service:hover { background: var(--paper-2); }
.service:nth-child(even) { border-right: none; }
@media (min-width: 1100px) {
  .services { grid-template-columns: repeat(4, 1fr); }
  .service:nth-child(even) { border-right: 1px solid var(--rule); }
  .service:last-child { border-right: none; }
}
.service__num {
  font-size: 11px;
  color: var(--muted);
}
.service--accent .service__num { color: var(--accent); }
.service__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 4px 0 4px;
  text-wrap: balance;
}
.service__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
  flex: 1;
}
.chips {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chips li {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ─────────── MÉTHODE ─────────── */
.method { padding-bottom: clamp(60px, 8vw, 100px); }
.phases {
  list-style: none; padding: 0; margin: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.phase {
  background: var(--paper);
  padding: 28px 28px 36px;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  min-height: 200px;
}
.phase__head {
  display: flex; justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--rule);
  padding-bottom: 12px;
}
.phase__num {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.phase__dur { color: var(--muted); }
.phase__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  margin: 4px 0 0;
}
.phase p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
}

/* ─────────── TRAVAUX ─────────── */
.works { padding-bottom: clamp(60px, 8vw, 100px); }
.cases {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .cases { grid-template-columns: repeat(3, 1fr); } }

.case {
  padding: 28px 28px 32px;
  background: var(--paper-2);
  border-radius: 6px;
  display: flex; flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.case::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--ink);
}
.case:nth-child(2)::before { background: var(--accent); }
.case__head {
  display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.case__sector { color: var(--ink-2); }
.case__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.12;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.case__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  text-wrap: pretty;
  flex: 1;
}
.case__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.case__metrics > div { display: flex; flex-direction: column; gap: 2px; }
.case__metrics dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.case__metrics dd {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  margin: 0;
  color: var(--ink);
}

/* ─────────── À PROPOS ─────────── */
.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 2fr; gap: 80px; }
}
.about__col--label { display: flex; flex-direction: column; gap: 12px; }
.about__role { color: var(--ink-2); }
.about__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  text-wrap: balance;
  max-width: 18ch;
}
.about__body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 62ch;
  text-wrap: pretty;
}
.creds {
  list-style: none; padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  max-width: 520px;
}
.creds li { display: flex; flex-direction: column; gap: 4px; }
.creds .mono {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.02em;
}
.creds li span:last-child {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* ─────────── CONTACT ─────────── */
.contact {
  background: var(--ink);
  color: var(--paper);
  margin-top: clamp(40px, 6vw, 80px);
}
.contact__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) var(--gutter);
  display: grid;
  gap: 24px;
}
.section__num--light { color: color-mix(in oklab, var(--paper) 60%, transparent); }
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  text-wrap: balance;
}
.contact__title em { color: color-mix(in oklab, var(--paper) 70%, var(--accent-2)); }
.contact__intro {
  font-size: 18px;
  line-height: 1.55;
  color: color-mix(in oklab, var(--paper) 80%, var(--ink));
  margin: 12px 0 36px;
  max-width: 52ch;
}

.contact__channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid color-mix(in oklab, var(--paper) 20%, transparent);
}
@media (min-width: 700px) {
  .contact__channels { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
.channel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--paper) 20%, transparent);
  transition: padding .2s;
}
@media (min-width: 700px) {
  .channel {
    padding: 32px 24px 32px 0;
    border-bottom: none;
    border-right: 1px solid color-mix(in oklab, var(--paper) 20%, transparent);
  }
  .channel:last-child { border-right: none; padding-right: 0; }
}
.channel__label {
  grid-column: 1 / -1;
  color: color-mix(in oklab, var(--paper) 55%, transparent);
}
.channel__value {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.channel:hover .channel__value { color: color-mix(in oklab, var(--paper) 70%, var(--accent-2)); }
.channel svg { color: color-mix(in oklab, var(--paper) 70%, transparent); }

/* ─────────── PIED ─────────── */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 0 var(--gutter) 0;
  overflow: hidden;
}
.foot__row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 0 32px;
  display: flex; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  border-top: 1px solid color-mix(in oklab, var(--paper) 18%, transparent);
}
.foot__brand .lockup { color: var(--paper); font-size: 30px; }
.foot__brand p { margin: 8px 0 0; color: color-mix(in oklab, var(--paper) 55%, transparent); }
.foot__meta { display: flex; gap: 24px; flex-wrap: wrap; align-self: flex-end; color: color-mix(in oklab, var(--paper) 55%, transparent); }

.foot__lockup {
  font-family: var(--serif);
  font-size: clamp(120px, 28vw, 420px);
  line-height: 0.78;
  letter-spacing: -0.04em;
  margin: 0 calc(var(--gutter) * -1) -0.08em;
  text-align: center;
  color: color-mix(in oklab, var(--paper) 12%, transparent);
  pointer-events: none;
  user-select: none;
}

/* ─────────── PALETTE VARIANTS (tweaks) ─────────── */
body[data-palette="ink"] {
  --paper:  #14130f;
  --paper-2:#1c1b16;
  --ink:    #efeae0;
  --ink-2:  #d8d2c3;
  --muted:  #8a8270;
  --rule:   #2e2c25;
  --accent: #d8b466;
  --accent-2:#e7c989;
}
body[data-palette="ink"] .grain { mix-blend-mode: screen; opacity: 0.18; }
/* .contact and .foot are always on a dark background. In the ink palette
   the global --paper/--ink are inverted, so re-pin them to their light/dark
   roles inside these sections to keep text legible. */
body[data-palette="ink"] .contact,
body[data-palette="ink"] .foot {
  background: #0c0b08;
  --paper: #efeae0;
  --ink:   #161513;
  color: var(--paper);
}

body[data-palette="clinical"] {
  --paper:  #f3f2ee;
  --paper-2:#e8e6df;
  --ink:    #111;
  --ink-2:  #2f2f2f;
  --muted:  #777;
  --rule:   #d3d0c6;
  --accent: #c8492b;
  --accent-2:#e25a39;
}

body[data-palette="forest"] {
  --paper:  #ebe7da;
  --paper-2:#dfd9c7;
  --ink:    #14201a;
  --ink-2:  #283d33;
  --muted:  #6b7268;
  --rule:   #bcb39a;
  --accent: #2f5d3a;
  --accent-2:#3f7a4d;
}
