/* ============================================================
   MAISON SACHA — l'analyse de la pierre, au scroll.
   Ivoire, encre, or champagne. Serif haute, hairlines.
   ============================================================ */

:root {
  --ivory: #f4f1ea;
  --ivory-deep: #e7e2d7;
  --ink: #14161c;
  --ink-soft: rgba(20, 22, 28, 0.68);
  --night: #0c0f16;
  --night-2: #141926;
  --paper: #f7f3e9;
  --gold: #c9a24f;
  --gold-soft: #e9c886;
  --line: rgba(20, 22, 28, 0.2);
  --line-light: rgba(244, 241, 234, 0.25);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

/* ---------------- loader ---------------- */

.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--ivory);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark { font-family: var(--serif); font-weight: 500; font-size: 30px; letter-spacing: 0.06em; }
.loader-line { width: 150px; height: 1.5px; background: var(--line); overflow: hidden; }
.loader-line i { display: block; width: 100%; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; animation: ld 1.4s var(--ease-out) forwards; }
@keyframes ld { to { transform: scaleX(1); } }

/* ---------------- expérience ---------------- */

.exp { position: relative; height: 900vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ivory-deep); }

.bg { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.bg-jour {
  opacity: 1;
  background:
    radial-gradient(120% 90% at 50% 24%, #f8f6f1 0%, #e6e2d8 55%, #cfcabf 100%);
}
.bg-bougie {
  background:
    radial-gradient(80% 60% at 50% 62%, rgba(255, 166, 87, 0.32) 0%, rgba(38, 24, 12, 0) 60%),
    radial-gradient(120% 100% at 50% 30%, #2c1d10 0%, #140d06 70%, #0c0804 100%);
}
.bg-soir {
  background:
    radial-gradient(70% 50% at 50% 80%, rgba(255, 180, 100, 0.12) 0%, rgba(20, 25, 45, 0) 55%),
    linear-gradient(180deg, #1a2138 0%, #10141f 60%, #0b0e15 100%);
}
.bg-nuit {
  background: radial-gradient(110% 85% at 50% 32%, #1a2030 0%, #10131d 55%, #090b11 100%);
}

.gl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; }
html.no-gl .gl-canvas { display: none; }

/* voile doux en haut pour asseoir la nav */
.pin::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: linear-gradient(180deg, rgba(244, 241, 234, 0.4) 0%, rgba(244, 241, 234, 0) 14%);
  transition: opacity 0.6s;
}
.pin.is-dark::after { opacity: 0; }

/* ---------------- nav ---------------- */

.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 46px 0;
  transition: color 0.6s;
}
.pin.is-dark .nav { color: var(--ivory); }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: 0.04em; }
.brand-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.4em; opacity: 0.62; margin-top: 5px; }

.nav-links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; opacity: 0.85; }
.nav-links a { padding-bottom: 5px; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px; background: var(--gold); transition: width 0.35s var(--ease-out); }
.nav-links a:hover::after { width: 60%; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}
.pill:hover { transform: translateY(-1px); }
.pill--gold {
  background: linear-gradient(120deg, #d8b06a, #b9903f);
  color: #171207;
  box-shadow: 0 10px 26px rgba(160, 122, 48, 0.35);
}
.pill--ghost {
  border: 1px solid currentColor; opacity: 0.9;
  background: transparent;
}
.pill--ghost:hover { background: rgba(128, 128, 128, 0.12); }

/* ---------------- overlays des temps ---------------- */

.ov {
  position: absolute; left: 6vw; top: 50%; transform: translateY(-50%) translateY(14px);
  z-index: 10; max-width: 560px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s, transform 0.6s var(--ease-out), color 0.6s;
}
.ov.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); pointer-events: auto; }
.pin.is-dark .ov { color: var(--ivory); }

.ov-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.34em; color: #a07a2e; margin-bottom: 16px; }
.pin.is-dark .ov-kicker { color: var(--gold-soft); }

.ov-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(52px, 6vw, 96px); line-height: 1.02; letter-spacing: 0.005em;
}
.ov-h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 4.4vw, 68px); line-height: 1.05;
}
.ov-sub { margin-top: 20px; font-size: 13px; font-weight: 700; letter-spacing: 0.32em; opacity: 0.66; }
.ov-text { margin-top: 18px; font-size: 15.5px; line-height: 1.65; max-width: 380px; opacity: 0.8; }
.ov-big {
  margin-top: 18px; font-family: var(--serif); font-weight: 500;
  font-size: clamp(64px, 8vw, 130px); line-height: 1; color: var(--gold-soft);
}
.ov-hero .scroll-cta { margin-top: 30px; }

.moment-words span {
  font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 40px);
  color: var(--gold-soft);
}

/* ---------------- cotes (temps 01) ---------------- */

.cotes, .cote-tags, .rays {
  position: absolute; left: 50%; top: 50%;
  width: 94vmin; height: 94vmin;
  transform: translate(-50%, -50%);
  z-index: 9; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ease-out);
}
.cotes.is-on, .cote-tags.is-on, .rays.is-on { opacity: 1; }

.cotes .c-line {
  stroke: rgba(20, 22, 28, 0.55); stroke-width: 1; vector-effect: non-scaling-stroke;
  stroke-dasharray: 120; stroke-dashoffset: 120;
  transition: stroke-dashoffset 1.1s var(--ease-out) 0.15s;
}
.cotes.is-on .c-line { stroke-dashoffset: 0; }
.cotes .c-diag1 { transition-delay: 0.4s; }
.cotes .c-diag2 { transition-delay: 0.55s; }

.ctag {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em;
  background: rgba(247, 243, 233, 0.92); color: var(--ink);
  border: 1px solid rgba(20, 22, 28, 0.28); border-radius: 999px; padding: 7px 13px;
  white-space: nowrap; box-shadow: 0 6px 16px rgba(20, 22, 28, 0.1);
}

/* ---------------- rayons (temps 02) ---------------- */

.rays::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 68%; height: 68%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 62%);
}
.rays i {
  position: absolute; left: 50%; top: 50%;
  width: 50%; height: 1.5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0) 100%);
  transform-origin: 0 50%;
  transform: rotate(var(--a, 0deg));
}
.rays i:nth-child(1) { --a: 8deg; }
.rays i:nth-child(2) { --a: 47deg; width: 42%; opacity: 0.7; }
.rays i:nth-child(3) { --a: 96deg; }
.rays i:nth-child(4) { --a: 138deg; width: 38%; opacity: 0.6; }
.rays i:nth-child(5) { --a: 187deg; }
.rays i:nth-child(6) { --a: 224deg; width: 44%; opacity: 0.75; }
.rays i:nth-child(7) { --a: 275deg; }
.rays i:nth-child(8) { --a: 318deg; width: 40%; opacity: 0.65; }
.rays.is-on { animation: rays-turn 26s linear infinite; }
@keyframes rays-turn { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------------- spectre (temps 02) ---------------- */

.spectre {
  position: absolute; right: 6vw; bottom: 120px; z-index: 10;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.spectre.is-on { opacity: 1; transform: none; }
.spectre-label { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; color: rgba(244, 241, 234, 0.72); margin-bottom: 12px; text-align: right; }
.spectre-bars { display: flex; align-items: flex-end; gap: 7px; height: 74px; }
.spectre-bars i {
  width: 13px; height: var(--h); background: var(--c); border-radius: 3px 3px 0 0;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.8s var(--ease-out);
  opacity: 0.9;
}
.spectre.is-on .spectre-bars i { transform: scaleY(1); }
.spectre.is-on .spectre-bars i:nth-child(1) { transition-delay: 0.05s; }
.spectre.is-on .spectre-bars i:nth-child(2) { transition-delay: 0.1s; }
.spectre.is-on .spectre-bars i:nth-child(3) { transition-delay: 0.15s; }
.spectre.is-on .spectre-bars i:nth-child(4) { transition-delay: 0.2s; }
.spectre.is-on .spectre-bars i:nth-child(5) { transition-delay: 0.25s; }
.spectre.is-on .spectre-bars i:nth-child(6) { transition-delay: 0.3s; }
.spectre.is-on .spectre-bars i:nth-child(7) { transition-delay: 0.35s; }

/* ---------------- callouts sertissage (temps 03) ---------------- */

.co-layer {
  position: absolute; left: 50%; top: 50%;
  width: 94vmin; height: 94vmin;
  transform: translate(-50%, -50%);
  z-index: 11; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--ease-out) 0.2s;
}
.co-layer.is-on { opacity: 1; }
.callout { position: absolute; left: var(--x); top: var(--y); display: flex; align-items: center; }
.callout span {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em;
  background: rgba(247, 243, 233, 0.92); color: var(--ink);
  border: 1px solid rgba(20, 22, 28, 0.25); border-radius: 999px; padding: 7px 13px;
  box-shadow: 0 6px 16px rgba(20, 22, 28, 0.12); white-space: nowrap;
}
.callout i { width: 44px; height: 1px; background: rgba(20, 22, 28, 0.5); }
.callout[data-side="l"] { transform: translateX(-100%); }
.callout[data-side="r"] { flex-direction: row-reverse; }

/* ---------------- certificat (temps 05) ---------------- */

.cert {
  position: absolute; z-index: 10;
  right: 7vw; top: 50%; transform: translateY(-50%) translateX(36px);
  width: min(330px, 84vw);
  background: linear-gradient(160deg, #faf6ec 0%, #efe8d6 100%);
  color: var(--ink);
  border: 1px solid rgba(160, 122, 46, 0.35);
  border-radius: 6px; padding: 26px 26px 30px;
  box-shadow: 0 30px 70px rgba(5, 8, 14, 0.55);
  opacity: 0; visibility: hidden;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), visibility 0.7s;
}
.cert.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); }
.cert-head { font-size: 10px; font-weight: 700; letter-spacing: 0.42em; color: #a07a2e; }
.cert-brand { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 6px 0 18px; }
.cert ul { list-style: none; }
.cert li { display: flex; align-items: baseline; gap: 10px; padding: 6.5px 0; font-size: 13px; }
.cert li span { color: rgba(20, 22, 28, 0.62); }
.cert li i { flex: 1; border-bottom: 1px dotted rgba(20, 22, 28, 0.3); }
.cert li em { font-style: normal; font-weight: 600; }
.cert-seal { margin-top: 18px; display: flex; justify-content: flex-end; }

/* ---------------- finale (temps 06) ---------------- */

.finale {
  position: absolute; left: 6vw; top: 50%; transform: translateY(-50%);
  z-index: 11; opacity: 0; visibility: hidden; color: var(--ivory);
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.finale.is-on { opacity: 1; visibility: visible; }
.finale-title { font-family: var(--serif); font-weight: 500; font-size: clamp(52px, 7vw, 116px); line-height: 1.04; }
.finale-cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.finale .pill--ghost { color: var(--ivory); }

/* ---------------- barre de métriques ---------------- */

.metrics {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 26px;
  padding: 16px 46px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(244, 241, 234, 0) 0%, rgba(244, 241, 234, 0.5) 100%);
  transition: color 0.6s, border-color 0.6s;
}
.pin.is-dark .metrics {
  color: var(--ivory); border-color: var(--line-light);
  background: linear-gradient(180deg, rgba(9, 11, 17, 0) 0%, rgba(9, 11, 17, 0.45) 100%);
}
.m-group { display: flex; align-items: center; gap: 22px; }
.m-item { display: flex; flex-direction: column; gap: 3px; }
.m-item b { font-size: 8.5px; font-weight: 700; letter-spacing: 0.26em; opacity: 0.55; }
.m-item em { font-style: normal; font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.m-track { flex: 1; height: 1px; background: currentColor; opacity: 0.9; position: relative; min-width: 60px; }
.m-track::before { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0.18; }
.m-track { background: none; }
.m-track i {
  position: absolute; left: 0%; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(201, 162, 79, 0.22);
}
.m-badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.26em;
  border: 1px solid var(--gold); color: #a07a2e; border-radius: 999px; padding: 6px 12px;
  opacity: 0; transform: scale(0.9); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.pin.is-dark .m-badge { color: var(--gold-soft); }
.m-badge.is-on { opacity: 1; transform: none; }
.m-lum em { color: #a07a2e; }
.pin.is-dark .m-lum em { color: var(--gold-soft); }

/* ---------------- hint ---------------- */

.hint {
  position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%);
  z-index: 10; font-size: 12px; font-weight: 700; letter-spacing: 0.3em; color: var(--ink-soft);
  animation: hint-pulse 2.4s ease-in-out infinite;
  transition: color 0.6s;
}
.pin.is-dark .hint { color: rgba(244, 241, 234, 0.7); }
.exp.is-started .hint { animation: none; opacity: 0; pointer-events: none; transition: opacity 0.5s; }
@keyframes hint-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ---------------- sections crawlables ---------------- */

.sec-inner { max-width: 860px; margin: 0 auto; padding: 96px 28px 84px; }
.sec-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.4em; color: var(--gold-soft); margin-bottom: 12px; }
.sec-title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 4.8vw, 62px); margin-bottom: 42px; }

.collection { background: var(--night); color: var(--ivory); position: relative; z-index: 10; }
.col-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 60px; }
.col-col h3 {
  font-family: var(--serif); font-weight: 500; font-size: 24px;
  margin: 30px 0 14px; color: var(--gold-soft);
}
.col-col h3:first-child { margin-top: 0; }
.h-gold { color: var(--gold) !important; }
.col-col ul { list-style: none; }
.col-col li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 14.5px; }
.col-col li i { flex: 1; border-bottom: 1px dotted rgba(244, 241, 234, 0.3); }
.col-col li em { font-style: normal; font-weight: 600; }
.col-small li { font-size: 12.5px; color: rgba(244, 241, 234, 0.85); }
.col-note { margin-top: 40px; font-family: var(--serif); font-style: italic; font-size: 17px; color: rgba(244, 241, 234, 0.9); }
.col-badge {
  margin-top: 26px; display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid rgba(244, 241, 234, 0.4); border-radius: 999px; padding: 10px 18px;
  color: rgba(244, 241, 234, 0.9);
}

.atelier { background: var(--ivory); position: relative; z-index: 10; }
.atelier .sec-title { margin-bottom: 18px; }
.at-addr { font-family: var(--serif); font-size: 26px; margin-bottom: 10px; }
.at-note { font-size: 14px; color: var(--ink-soft); margin-bottom: 30px; max-width: 420px; }
.at-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.atelier .pill--ghost { color: var(--ink); border-color: rgba(20, 22, 28, 0.4); }

/* ---------------- footer ---------------- */

.foot {
  background: var(--ivory); border-top: 1px solid var(--line);
  padding: 30px 28px 40px; display: flex; flex-direction: column; gap: 8px; align-items: center;
  text-align: center;
}
.foot-brand { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.foot-line { font-size: 12px; color: var(--ink-soft); }
.foot-demo { font-size: 10px; letter-spacing: 0.14em; color: rgba(20, 22, 28, 0.4); margin-top: 8px; }

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .nav { padding: 18px 20px 0; }
  .nav-links { display: none; }
  .exp { height: 700vh; }
  .col-cols { grid-template-columns: 1fr; }
  .metrics { padding: 12px 18px 14px; gap: 14px; }
  .m-table { display: none; }
  .m-item em { font-size: 14px; }
  .m-item b { font-size: 7.5px; letter-spacing: 0.2em; }
  .m-group { gap: 12px; }
  .spectre { right: 5vw; bottom: 108px; }
  .spectre-bars { height: 52px; }
  .callout i { width: 22px; }
}

/* portrait : textes en haut, pierre au centre */
@media (orientation: portrait) {
  .nav { padding: 16px 18px 0; align-items: flex-start; }
  .brand-name { font-size: 23px; white-space: nowrap; }
  .brand-sub { font-size: 8.5px; letter-spacing: 0.3em; margin-top: 3px; }
  .nav .pill--gold { padding: 10px 16px; font-size: 12px; white-space: nowrap; }
  .ov { left: 6vw; right: 6vw; top: 14%; transform: translateY(10px); max-width: none; }
  .ov.is-on { transform: none; }
  .ov-title { font-size: clamp(36px, 10vw, 52px); }
  .ov-h2 { font-size: clamp(29px, 8vw, 42px); }
  .ov-big { font-size: clamp(54px, 17vw, 86px); }
  .ov-text { font-size: 13.5px; margin-top: 12px; }
  .ov-kicker { font-size: 9.5px; margin-bottom: 10px; letter-spacing: 0.28em; }
  .ov-hero .scroll-cta { margin-top: 18px; padding: 11px 18px; font-size: 12px; }
  .pin::after { background: linear-gradient(180deg, rgba(244, 241, 234, 0.9) 0%, rgba(244, 241, 234, 0.55) 26%, rgba(244, 241, 234, 0) 48%); }
  .pin.is-dark::after { opacity: 0; }
  .finale { left: 6vw; right: 6vw; top: 13%; transform: none; }
  .finale-title { font-size: clamp(40px, 12vw, 56px); }
  .finale-cta .pill { font-size: 12px; padding: 10px 16px; }
  .cert { right: 50%; transform: translateX(50%) translateY(24px); top: auto; bottom: 92px; }
  .cert.is-on { transform: translateX(50%); }
  .cert-brand { font-size: 19px; }
  .cert li { padding: 4.5px 0; font-size: 12px; }
  .cotes, .cote-tags { width: 136vmin; height: 136vmin; }
  .rays, .co-layer { width: 110vmin; height: 110vmin; }
  /* étiquettes ramenées dans l'écran */
  .cote-tags .ctag:nth-child(2) { --x: 74% !important; --y: 38% !important; }
  .cote-tags .ctag:nth-child(3) { --x: 28% !important; --y: 65% !important; }
  .callout span { max-width: 46vw; white-space: normal; text-align: center; line-height: 1.5; }
  .co-layer .callout:nth-child(1) { --x: 56% !important; }
  .co-layer .callout:nth-child(3) { --x: 52% !important; --y: 68% !important; }
  .m-item.m-lum b { display: none; }
  .metrics { gap: 10px; }
  .m-track { min-width: 30px; }
  .ctag, .callout span { font-size: 8.5px; padding: 5px 9px; letter-spacing: 0.16em; }
  .spectre { display: none; }
  .hint { bottom: 84px; width: 86vw; text-align: center; white-space: normal; line-height: 1.8; letter-spacing: 0.2em; font-size: 10px; }
}

/* paysage téléphone */
@media (max-height: 520px) and (orientation: landscape) {
  .brand-name { font-size: 22px; }
  .brand-sub { display: none; }
  .ov { max-width: 40vw; }
  .ov-title { font-size: clamp(26px, 4.8vw, 36px); }
  .ov-h2 { font-size: clamp(22px, 4vw, 30px); }
  .ov-big { font-size: clamp(40px, 7vw, 60px); }
  .ov-text { font-size: 12px; }
  .finale-title { font-size: clamp(30px, 6vw, 44px); }
  .cert { padding: 16px 18px; width: 260px; }
  .hint, .spectre { display: none; }
  .metrics { padding: 8px 18px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint, .rays.is-on { animation: none; }
}
