/* Yvan Akou — shared styles (every page).
   Paper and ink, Geist for text, one Instrument Serif italic accent per headline, Geist Mono for labels.
   The rose dot comes from the "y." mark. */

:root {
  --paper: #f4f3ef;
  --paper-2: #ebeae5;
  --card: #fbfaf8;
  --ink: #141413;
  --ink-2: #3c3c39;
  --muted: #6a6964;
  --line: rgba(20, 20, 19, .11);
  --night: #0f0f0e;
  --night-2: #1a1a19;
  --fog: #eeede9;
  --fog-2: #c9c8c2;
  --fog-muted: #a09f99;
  --night-line: rgba(238, 237, 233, .12);
  --dot: #c9a99c;

  --sans: "Geist", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--dot); outline-offset: 3px; border-radius: 6px; }
.section-container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section-pad { padding-top: clamp(96px, 12vw, 176px); padding-bottom: clamp(96px, 12vw, 176px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow, .label {
  display: inline-block; font: 500 11.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
/* Geist sets the period as a square; the brand dot is round. */
.dot { display: inline-block; width: .15em; height: .15em; margin-left: .035em; border-radius: 50%; background: var(--dot); color: transparent; overflow: hidden; vertical-align: baseline; line-height: 0; }

.skip-link { position: fixed; left: 16px; top: -64px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; }
.skip-link:focus { top: 16px; }

/* Grain gives the paper some tooth. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 120; height: 2px; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* ---------- Header (original markup) ---------- */
.site-header { position: fixed; inset: 14px 0 auto; z-index: 100; padding: 0 var(--gutter); pointer-events: none; transition: transform .6s var(--ease); }
.site-header.is-hidden { transform: translateY(-120%); }
.nav-shell {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 7px 7px 7px 9px; border-radius: 18px;
  background: rgba(251, 250, 247, .74); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 0 0 1px rgba(20, 20, 19, .07), 0 12px 32px -20px rgba(0, 0, 0, .28);
  transition: background-color .45s, box-shadow .45s;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: flex; align-items: baseline; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ink); color: var(--paper);
  font: 600 21px/1 var(--sans); letter-spacing: -.07em; padding-top: 7px; transition: background-color .45s, color .45s;
}
.brand-mark span { width: 5px; height: 5px; margin-left: 1px; border-radius: 50%; background: var(--dot); color: transparent; overflow: hidden; }
.brand-name { font-weight: 560; font-size: 15px; letter-spacing: -.025em; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  position: relative; padding: 9px 14px; border-radius: 11px; text-decoration: none; font-size: 14.5px; color: var(--ink-2);
  transition: background-color .3s, color .3s;
}
.nav-links a:hover { background: rgba(20, 20, 19, .055); color: var(--ink); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--dot); }
.nav-contact {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 16px; border-radius: 12px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; font-size: 14.5px;
  transition: background-color .45s, color .45s, transform .4s var(--ease);
}
.nav-contact:hover { transform: translateY(-1px); }
.nav-contact span { transition: transform .4s var(--ease); }
.nav-contact:hover span { transform: translate(2px, -2px); }
.site-header.on-dark .nav-shell { background: rgba(28, 28, 26, .62); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 32px -20px rgba(0, 0, 0, .6); }
.site-header.on-dark .brand-name, .site-header.on-dark .nav-links a.is-active, .site-header.on-dark .nav-links a:hover { color: var(--fog); }
.site-header.on-dark .nav-links a { color: var(--fog-2); }
.site-header.on-dark .nav-links a:hover { background: rgba(255, 255, 255, .07); }
.site-header.on-dark .brand-mark, .site-header.on-dark .nav-contact { background: var(--fog); color: var(--ink); }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .site-header { inset: 10px 0 auto; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 14px;
  font: 500 15.5px/1 var(--sans); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; cursor: pointer;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background-color .3s, color .3s;
}
.button span { transition: transform .45s var(--ease); }
.button:hover span { transform: translate(2px, -2px); }
.button:active { transform: scale(.97); }
.button-dark { background: var(--ink); color: var(--paper); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.button-dark:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .55); }
.button-text { color: var(--ink); padding: 0 12px; }
.button-text:hover span { transform: translateY(3px); }
.button-light { background: var(--fog); color: var(--ink); }
.button-light:hover { transform: translateY(-2px); }

.text-link {
  display: inline-flex; align-items: center; gap: 14px; padding: 10px 0; text-decoration: none; font-weight: 500; font-size: 16px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; transition: background-size .6s var(--ease);
}
.text-link span { transition: transform .45s var(--ease); }
.text-link:hover { background-size: 0% 1px; background-position: 100% 100%; }
.text-link:hover span { transform: rotate(45deg); }

/* ---------- Project visuals (home tiles and case heroes) ---------- */
.project-preview { position: relative; width: 100%; aspect-ratio: 1.36; overflow: hidden; border-radius: 26px; isolation: isolate; }
.project-preview.preview-snapshot { display: grid; place-items: center; padding: 6%; }
.preview-snapshot img {
  width: 100%; height: auto; max-height: 100%; object-fit: contain; border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 30px 60px -24px rgba(24, 28, 36, .35), 0 0 0 1px rgba(20, 20, 19, .06);
}
.preview-snapshot.preview-viewmesh { background: radial-gradient(circle at 80% 18%, #cfe0f5, transparent 46%), radial-gradient(circle at 12% 90%, #f6e1d6, transparent 44%), #e8eef5; }
.preview-snapshot.preview-agi { background: radial-gradient(circle at 70% 10%, #3d3426, transparent 52%), #1d1b18; }
.preview-snapshot.preview-mindframe { background: radial-gradient(circle at 20% 15%, #f2f5f1, transparent 45%), #dfe9e5; }
.preview-snapshot.preview-distrove { background: radial-gradient(circle at 82% 12%, #ffffff, transparent 42%), #e2e1dc; }
.preview-rovanta { background: #d9d6ce; }
.preview-declic { background: radial-gradient(circle at 30% 27%, #f8ebe4, transparent 40%), #e9c7ba; }

/* Rovanta board */
.rovanta-board {
  position: absolute; inset: 7%; overflow: hidden; border-radius: 12px; color: #f0e9da;
  background: radial-gradient(circle at 71% 14%, #4a42385e, transparent 38%), #171917; box-shadow: 0 30px 60px -20px #1d241f80;
}
.rovanta-board::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(#d1b88429 1px, transparent 1px), linear-gradient(90deg, #d1b88429 1px, transparent 1px); background-size: 10% 10%; }
.rovanta-top { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 4.5% 5% 0; font: 500 clamp(6px, .6vw, 9.5px)/1 var(--mono); letter-spacing: .14em; color: #cdbfa2; }
.rovanta-wordmark { color: #f0d4aa; font: 700 clamp(9px, 1vw, 15px)/1 var(--sans); letter-spacing: -.04em; }
.rovanta-wordmark span { margin-left: .2em; vertical-align: top; font-size: .55em; }
.rovanta-headline { position: relative; margin: 8% 7% 0; font-size: clamp(22px, 3.3vw, 52px); line-height: .98; letter-spacing: -.055em; font-weight: 560; }
.rovanta-headline em { color: #d6b07a; font-size: 1.06em; }
.signal-line { position: absolute; left: 10%; right: 10%; top: 55%; display: flex; align-items: center; }
.signal-dot { z-index: 1; flex: none; width: 4.4%; aspect-ratio: 1; border: 1px solid #f5dbb9; border-radius: 50%; background: #34342f; box-shadow: 0 0 0 7px #e9c58e14; }
.signal-dot-active { background: #ddb471; box-shadow: 0 0 0 11px #e9c58e24; animation: signal 2.6s var(--ease) infinite; }
@keyframes signal { 0%, 100% { box-shadow: 0 0 0 6px #e9c58e30; } 50% { box-shadow: 0 0 0 14px #e9c58e10; } }
.signal-path { flex: 1; height: 1px; background: linear-gradient(90deg, #bca174, #bca17455); }
.signal-labels { position: absolute; left: 8%; right: 8%; top: 63%; display: flex; justify-content: space-between; color: #bcb6a9; font: 500 clamp(6px, .62vw, 10px)/1 var(--mono); letter-spacing: .04em; }
.signal-card { position: absolute; right: 5%; bottom: 6%; width: 41%; padding: 3.2%; border-radius: 10px; background: #f1eadc; color: #242721; box-shadow: 0 14px 28px #0006; }
.signal-card-kicker { display: block; margin-bottom: 7%; color: #8c826e; font: 500 clamp(5px, .5vw, 8.5px)/1.2 var(--mono); letter-spacing: .1em; }
.signal-card strong { display: block; margin-bottom: 7%; font-size: clamp(10px, 1.35vw, 21px); font-weight: 560; letter-spacing: -.035em; }
.signal-card div { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid #c9c4b8; padding-top: 6%; color: #8b897e; font-size: clamp(6px, .55vw, 9.5px); }
.signal-card b { display: block; margin-top: 3px; color: #32352e; font-weight: 560; }
.rovanta-index { position: absolute; left: 7%; bottom: 7%; color: #d9c59f; font: 500 clamp(6px, .55vw, 9px)/1 var(--mono); letter-spacing: .2em; }

/* Déclic phones */
.declic-stage { position: absolute; inset: 0; }
.declic-watermark { position: absolute; left: 5%; top: 2%; color: #b9806e40; font: italic 400 clamp(80px, 12vw, 190px)/1 var(--serif); letter-spacing: -.05em; }
.phone {
  position: absolute; top: 10%; width: 28%; height: 78%; overflow: hidden; border: 7px solid #26272c; border-radius: clamp(20px, 2.6vw, 34px);
  background: #faf6f1; box-shadow: 18px 24px 40px #6c45404d;
}
.phone-back { left: 22%; transform: rotate(-12deg) translateY(6%); }
.phone-front { right: 21%; transform: rotate(10deg); background: radial-gradient(circle at 50% 68%, #f0c9bb, transparent 44%), #faf6f1; }
.phone-notch { position: absolute; left: 30%; top: 0; width: 40%; height: 3.5%; border-radius: 0 0 10px 10px; background: #26272c; }
.phone-brand { display: block; margin: 20% 10% 0; color: #5e403b; font: italic 400 clamp(13px, 1.6vw, 26px)/1 var(--serif); }
.phone-step { display: block; margin: 22% 10% 0; color: #b1897c; font: 500 clamp(5px, .5vw, 9px)/1.3 var(--mono); letter-spacing: .12em; }
.phone strong { display: block; margin: 8% 10%; color: #503d3b; font-size: clamp(10px, 1.3vw, 21px); font-weight: 560; line-height: 1.12; letter-spacing: -.04em; }
.phone-chip { display: block; margin: 13% 10%; padding: .55em; border: 1px solid #cfaea3; border-radius: 8px; color: #7a5a52; font-size: clamp(6px, .6vw, 10px); }
.phone-footer { position: absolute; left: 10%; right: 10%; bottom: 7%; display: flex; justify-content: space-between; color: #b88d7f; font-size: clamp(6px, .62vw, 11px); }
.phone-front .phone-step { margin-top: 28%; }
.phone-front strong { font-size: clamp(11px, 1.5vw, 24px); }
.phone-orbit { position: absolute; left: 20%; top: 52%; width: 60%; height: 24%; border: 1px solid #bb9286; border-radius: 50%; transform: rotate(-23deg); }
.phone-orbit span { position: absolute; left: 20%; top: 20%; width: 20%; aspect-ratio: 1; border-radius: 50%; background: #c78d7d; }
.phone-orbit span + span { left: auto; right: 17%; top: 57%; background: #e7bbb1; }
.phone-cta { position: absolute; left: 10%; right: 10%; bottom: 7%; display: block; padding: .6em; border-radius: 20px; background: #6f504d; color: #fff; font-size: clamp(6px, .58vw, 10px); text-align: center; }
.declic-caption { position: absolute; left: 5%; bottom: 6%; color: #9d6b61; font: italic 400 clamp(13px, 1.25vw, 20px)/1 var(--serif); }

/* ---------- Surface / System lens (Distrove) ---------- */
.lens { position: relative; overflow: hidden; border-radius: 12px; background: #e6e5e0; box-shadow: 0 30px 60px -24px rgba(24, 28, 36, .35), 0 0 0 1px rgba(20, 20, 19, .07); }
.lens-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; touch-action: pan-y; --x: 62%; --y: 46%; --r: 0px; }
.lens-view .lens-surface { width: 100%; height: 100%; object-fit: cover; }
.lens-system { position: absolute; inset: 0; clip-path: circle(var(--r) at var(--x) var(--y)); }
.lens-system svg { width: 100%; height: 100%; }
.lens-ring {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2); translate: -50% -50%;
  border-radius: 50%; pointer-events: none; opacity: var(--ring-o, 1); transition: opacity .3s;
  box-shadow: 0 0 0 1px rgba(238, 237, 233, .75), 0 0 0 5px rgba(238, 237, 233, .1), 0 18px 44px rgba(0, 0, 0, .35);
}
@media (hover: hover) and (pointer: fine) { .lens-view { cursor: crosshair; } .lens-view.is-system { cursor: default; } }
.lens-mode {
  position: absolute; left: 5%; top: 5.5%; z-index: 3; display: inline-flex; padding: 4px; border-radius: 999px;
  background: rgba(251, 250, 247, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(20, 20, 19, .08), 0 8px 20px -10px rgba(0, 0, 0, .3);
}
.lens-mode button {
  position: relative; z-index: 1; min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 500 12.5px/1 var(--sans); color: var(--muted); transition: color .35s;
}
.lens-mode button.is-on { color: var(--paper); }
.lens-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: var(--pill-w, 70px); border-radius: 999px; background: var(--ink); transform: translateX(var(--pill-x, 0)); transition: transform .55s var(--ease), width .55s var(--ease); }
.lens-hint { position: absolute; right: 5%; top: 5.5%; z-index: 3; padding: 9px 12px; border-radius: 999px; background: rgba(20, 20, 19, .78); color: var(--fog); font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; transition: opacity .4s; }
.lens-hint.is-gone { opacity: 0; }
@media (max-width: 640px) { .lens-hint { display: none; } }

/* ---------- Footer (original markup) ---------- */
.site-footer { background: var(--night); color: var(--fog); padding: 0 var(--gutter) 26px; border-radius: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0 0; }
.home .site-footer { border-radius: 0; }
.footer-top, .footer-bottom { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-top { padding: 34px 0 26px; border-bottom: 1px solid var(--night-line); }
.footer-brand { display: flex; align-items: baseline; justify-content: center; width: 44px; height: 44px; border-radius: 13px; background: var(--fog); color: var(--ink); text-decoration: none; font: 600 25px/1 var(--sans); letter-spacing: -.07em; padding-top: 9px; }
.footer-brand span { width: 6px; height: 6px; margin-left: 1px; border-radius: 50%; background: var(--dot); color: transparent; overflow: hidden; }
.footer-top p { color: var(--fog-2); font-size: 15px; }
.footer-top a:not(.footer-brand) { text-decoration: none; color: var(--fog-2); font-size: 15px; transition: color .3s; }
.footer-top a:not(.footer-brand):hover { color: var(--fog); }
.footer-bottom { padding-top: 22px; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fog-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
