/* =========================================================================
   LINKUP — Direction artistique « Studio beauté tactile »
   Clair, chaud, éditorial, tactile. Identité cuivre/crème conservée.
   Fraunces (display + chiffres) · Hanken Grotesk (textes) ·
   IBM Plex Mono (labels techniques) · Caveat (annotations manuscrites)
   ========================================================================= */

:root {
  /* — Papiers chauds (clair, superposé) — */
  --ivory:   #FFFDF8;
  --paper:   #FBF7EF;
  --sable:   #F4EEE3;
  --blush:   #EAD9CC;
  --clay:    #DFC9B4;
  /* — Encres — */
  --ink:     #2A1F15;
  --ink-2:   #5C4632;
  --ink-soft: rgba(42,31,21,.66);
  --ink-mut:  rgba(42,31,21,.46);
  --ink-faint: rgba(42,31,21,.30);
  /* — Cuivre (accent signature) — */
  --copper:  #B5784E;
  --copper-2: #C89876;
  --copper-deep: #9A5F38;
  /* — Sombre (ponctuation) — */
  --espresso: #211812;
  --coffee:  #2A1F15;
  --cream:   #F2E9DD;
  --cream-soft: rgba(242,233,221,.62);
  --cream-mut:  rgba(242,233,221,.40);
  /* — Filets — */
  --rule:        rgba(42,31,21,.14);
  --rule-soft:   rgba(42,31,21,.09);
  --rule-strong: rgba(42,31,21,.30);
  --rule-light:  rgba(242,233,221,.16);

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Hanken Grotesk', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;
  --hand:  'Caveat', cursive;

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--sable);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--copper); color: var(--ivory); }

/* grain papier — texture tactile très subtile, au-dessus des fonds, sous le texte */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 1; pointer-events: none;
  opacity: .55; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* barre de progression de lecture */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--copper); z-index: 100;
}

/* Poussière de lumière interactive — décor du hero uniquement */
#dust {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ------------------------------------------------------------- type */
.serif { font-family: var(--serif); }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; }
.mono { font-family: var(--mono); }
.copper { color: var(--copper); }

h1, h2, h3 { font-family: var(--serif); font-weight: 420; letter-spacing: -.025em; line-height: 1.04; }

.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
  line-height: .99; letter-spacing: -.03em;
}
.h2 {
  font-family: var(--serif); font-weight: 430;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.03; letter-spacing: -.028em;
}
.h3 {
  font-family: var(--serif); font-weight: 460;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.12; letter-spacing: -.02em;
}
.lead {
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  line-height: 1.55; color: var(--ink-soft); font-weight: 400;
  letter-spacing: -.012em;
}
p { color: var(--ink-soft); }
strong, .ink { color: var(--ink); font-weight: 500; }

/* label technique mono + index */
.kicker {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--copper);
  display: inline-flex; align-items: center; gap: .7em;
}
.kicker .idx { color: var(--ink-mut); }
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--copper);
  display: inline-block; opacity: .6;
}
.kicker.no-line::before { display: none; }

/* chiffre éditorial géant */
.numeral {
  font-family: var(--serif); font-weight: 380; line-height: .86;
  letter-spacing: -.04em; font-variant-numeric: lining-nums;
}

/* citation */
.pull {
  font-family: var(--serif); font-style: italic; font-weight: 380;
  font-size: clamp(1.5rem, 3vw, 2.45rem); line-height: 1.26;
  letter-spacing: -.02em; color: var(--ink);
}

/* annotation manuscrite */
.hand {
  font-family: var(--hand); font-weight: 500;
  color: var(--copper-deep); font-size: 1.45rem; line-height: 1;
}

/* lien souligné animé */
.ulink {
  font-weight: 500; color: var(--ink); position: relative;
  padding-bottom: 2px; display: inline-flex; align-items: center; gap: .45em;
}
.ulink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(.0); transform-origin: 0 50%;
  transition: transform .4s var(--ease);
}
.ulink:hover::after { transform: scaleX(1); }
.ulink .arr { transition: transform .35s var(--ease); }
.ulink:hover .arr { transform: translate(2px,-2px); }
/* sur bande sombre, l'encre foncée devient illisible → encre crème */
.band--dark .ulink { color: var(--cream); }
.band--dark .ulink:hover { color: var(--copper-2); }

/* ------------------------------------------------------------- layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.band { position: relative; z-index: 2; }
.band--pad { padding-block: clamp(5rem, 11vw, 10rem); }
.band--air { padding-block: clamp(6rem, 14vw, 13rem); }
.band--sable { background: var(--sable); }
.band--paper { background: var(--paper); }
.band--ivory { background: var(--ivory); }
.band--blush { background: var(--blush); }
.band--dark  { background: var(--espresso); color: var(--cream); }
.band--dark p { color: var(--cream-soft); }
.band--dark .kicker { color: var(--copper-2); }
.band--dark .kicker .idx { color: var(--cream-mut); }
.band--dark .kicker::before { background: var(--copper-2); }
.band--dark .pull, .band--dark strong, .band--dark .ink { color: var(--cream); }
.band--dark .hand { color: var(--copper-2); }

.rule { height: 1px; background: var(--rule); border: 0; }
.band--dark .rule { background: var(--rule-light); }

/* Entêtes mono cuivre retirées à la demande — l'en-tête de section devient le titre seul */
.kicker { display: none !important; }
.shead { display: block; }
.shead > div { max-width: 760px; }

/* ------------------------------------------------------ boutons / cta */
.btn {
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
  letter-spacing: -.01em; padding: .9rem 1.45rem; border-radius: 4px;
  display: inline-flex; align-items: center; gap: .55em;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translate(3px,-3px); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--espresso); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(42,31,21,.5); }
.btn--copper { background: var(--copper); color: var(--ivory); }
.btn--copper:hover { background: var(--copper-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(155,95,56,.55); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--cream:hover { background: #fff; transform: translateY(-2px); }
.btn--outline { border: 1px solid var(--rule-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); background: rgba(42,31,21,.04); }
.band--dark .btn--outline { border-color: var(--rule-light); color: var(--cream); }
.band--dark .btn--outline:hover { border-color: var(--cream); background: rgba(242,233,221,.06); }

/* ------------------------------------------------------------- header */
header.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 60;
  padding-block: 1.15rem; transition: padding .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: rgba(244,238,227,.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--rule-soft); padding-block: .75rem;
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: baseline; gap: .12em; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; letter-spacing: -.03em; color: var(--ink); }
.logo .dot { color: var(--copper); }
.nav-links { display: none; gap: .35rem; align-items: center; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--ink-soft);
  padding: .4rem .7rem; border-radius: 4px; transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--copper); }
.nav-cta { display: none; }
.burger { display: inline-flex; flex-direction: column; gap: 5px; padding: .55rem; }
.burger span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s, opacity .3s; }
@media (min-width: 1000px) {
  .nav-links, .nav-cta { display: inline-flex; }
  .burger { display: none; }
}

/* menu mobile */
#menu {
  position: fixed; inset: 0; z-index: 80; background: var(--espresso);
  display: flex; flex-direction: column; justify-content: center; gap: .2rem;
  padding: 2rem var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
#menu.open { opacity: 1; visibility: visible; }
#menu a {
  font-family: var(--serif); font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 400;
  color: var(--cream); letter-spacing: -.03em; padding: .3rem 0;
  border-bottom: 1px solid var(--rule-light);
  display: flex; align-items: baseline; gap: 1rem;
  transform: translateY(14px); opacity: 0; transition: transform .55s var(--ease), opacity .5s, color .25s;
}
#menu a .mi { font-family: var(--mono); font-size: .8rem; color: var(--copper-2); }
#menu.open a { transform: none; opacity: 1; }
#menu a:nth-child(2){transition-delay:.04s}#menu a:nth-child(3){transition-delay:.08s}
#menu a:nth-child(4){transition-delay:.12s}#menu a:nth-child(5){transition-delay:.16s}
#menu a:nth-child(6){transition-delay:.20s}#menu a:nth-child(7){transition-delay:.24s}
#menu a:hover { color: var(--copper-2); }
#menu .mclose { position: absolute; top: 1.3rem; right: var(--gutter); width: 46px; height: 46px; border: 1px solid var(--rule-light); border-radius: 50%; color: var(--cream); display: grid; place-items: center; }
body.locked { overflow: hidden; }

/* ------------------------------------------------------- annotations */
.note { position: relative; display: inline-block; }
.note .scribble { position: absolute; pointer-events: none; }

/* ------------------------------------------------------------- chat */
.chat { display: flex; flex-direction: column; gap: .5rem; }
.row { display: flex; }
.row.out { justify-content: flex-end; }
.bubble {
  font-family: var(--sans); font-size: .84rem; line-height: 1.5;
  padding: .62rem .85rem; max-width: 86%; white-space: pre-wrap;
  border-radius: 16px;
}
.bubble.in  { background: var(--ivory); color: var(--ink); border: 1px solid var(--rule); border-bottom-left-radius: 5px; }
.bubble.out { background: var(--ink); color: var(--cream); border-bottom-right-radius: 5px; }
.band--dark .bubble.in { background: rgba(242,233,221,.07); color: var(--cream); border-color: var(--rule-light); }
.band--dark .bubble.out { background: var(--copper); color: var(--ivory); }
.typing { display: inline-flex; gap: 4px; padding: .25rem 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .4; animation: tp 1.2s ease-in-out infinite; }
.typing i:nth-child(2){animation-delay:.16s}.typing i:nth-child(3){animation-delay:.32s}
@keyframes tp { 0%,60%,100%{opacity:.25;transform:translateY(0)} 30%{opacity:.9;transform:translateY(-3px)} }
.chat-row { opacity: 0; transform: translateY(8px); animation: cin .45s var(--ease) forwards; }
@keyframes cin { to { opacity: 1; transform: none; } }
.scroll-y { overflow-y: auto; scrollbar-width: none; }
.scroll-y::-webkit-scrollbar { display: none; }

/* ----------------------------------------------------- reveal motion */
.rev { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rev.in { opacity: 1; transform: none; }
.rev-l { opacity: 0; transform: translateX(-22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rev-l.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rev, .rev-l { opacity: 1; transform: none; transition: none; }
  .hero-title .line-in { transform: none !important; transition: none !important; }
  .chat-row, .typing i { animation: none; }
  .halo { animation: none !important; opacity: 1 !important; transform: translate(-50%, -50%) !important; }
}
