/* ============================================================
   YATS SAINT-TROPEZ — Variant B · Experience styles
   Layers an immersive WebGL + GSAP experience over the shared
   brand system. Loaded after the Variant-A css.
   ============================================================ */

/* hide native cursor only where the custom one is active */
body.vb-cursor-on, body.vb-cursor-on a, body.vb-cursor-on button,
/* custom yacht cursor removed (Gregory audit A) — keep system cursor */

/* ---- WebGL canvas (fixed behind the hero) ------------------------------ */
#vb-gl {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}
/* atmosphere tint that GSAP fades in on scroll */
#vb-atmo {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 80% at 50% 120%, rgba(201,162,75,0.16), transparent 60%),
              linear-gradient(180deg, rgba(6,24,47,0.0), rgba(6,24,47,0.5));
  transition: opacity 0.3s linear;
}

/* ---- Immersive loader -------------------------------------------------- */
body.vb-loading { overflow: hidden; }
#vb-loader {
  position: fixed; inset: 0; z-index: 6000;
  display: grid; place-items: center;
  /* Failsafe: if JS never runs (e.g. vb-experience.js fails to load on a slow
     connection), fade the loader out anyway so content is never trapped behind
     a frozen overlay. The JS path removes the loader from the DOM well before. */
  animation: vbLoaderFailsafe 0.8s ease 6s forwards;
}
@keyframes vbLoaderFailsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
.vb-loader__top, .vb-loader__bottom {
  position: absolute; left: 0; right: 0; height: 50%;
  background: var(--deep);
  transform-origin: top;
}
.vb-loader__top { top: 0; transform-origin: top; }
.vb-loader__bottom { bottom: 0; transform-origin: bottom; }
.vb-loader__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  text-align: center; padding: var(--gutter);
}
.vb-loader__brand { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.vb-loader__brand .m {
  font-family: var(--display); font-size: clamp(2.4rem,6vw,3.6rem);
  font-weight: 600; letter-spacing: 0.14em; color: var(--paper);
}
.vb-loader__brand .s {
  font-family: var(--body); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.46em; text-transform: uppercase; color: var(--brass); margin-top: 0.9em;
}
.vb-loader__story { height: 1.6em; overflow: hidden; position: relative; width: min(80vw, 38ch); }
.vb-loader__line {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic; font-size: var(--fs-lead); color: var(--paper-dim);
}
.vb-loader__bar {
  width: min(72vw, 320px); height: 1px; background: var(--rule-paper); position: relative; overflow: hidden;
}
.vb-loader__bar i {
  position: absolute; inset: 0; background: var(--brass);
  transform: scaleX(0); transform-origin: left;
}
.vb-loader__pct {
  font-family: var(--body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.3em; color: var(--paper-dim);
}
.vb-loader__pct::after { content: " %"; color: var(--brass); }

/* ---- Yacht cursor ------------------------------------------------------ */
.vb-cursor-dot, .vb-cursor-ring, .vb-cursor-boat {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9000;
  opacity: 0; will-change: transform;
}
/* foam wake canvas — sits just under the yacht */
.vb-wake-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 8990; opacity: 0;
  filter: blur(0.5px);
  transition: opacity .3s var(--ease);
}
body.vb-cursor-on .vb-wake-canvas { opacity: 1; }
@media (hover: none), (pointer: coarse) { .vb-wake-canvas { display: none; } }
.vb-cursor-dot, .vb-cursor-ring { border-radius: 50%; }
.vb-cursor-dot { width: 5px; height: 5px; background: var(--brass-bright); transform: translate(-50%,-50%); }
/* the aerial luxury motor-yacht that sits dead-centre in the cursor */
.vb-cursor-boat {
  width: 20px; height: 28px; transform: translate(-50%,-50%);
  transition: opacity .3s var(--ease);
}
.vb-cursor-boat svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 9px rgba(6,24,47,0.6)); }
.vb-cursor-boat .hull { fill: #F7F4ED; }
.vb-cursor-boat .deck { fill: #E6DCC4; }
.vb-cursor-boat .glass { fill: var(--azure); }
.vb-cursor-boat .motor { fill: var(--brass); }
.vb-cursor-ring {
  width: 52px; height: 52px; border: 1px solid rgba(201,162,75,0.45);
  transform: translate(-50%,-50%);
  transition: width .3s var(--ease), height .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
body.vb-cursor-on .vb-cursor-dot,
body.vb-cursor-on .vb-cursor-ring,
body.vb-cursor-on .vb-cursor-boat { opacity: 1; }
body.vb-cursor-hover .vb-cursor-ring { width: 78px; height: 78px; border-color: var(--brass); background: rgba(201,162,75,0.06); }
@media (hover: none), (pointer: coarse) { .vb-cursor-dot, .vb-cursor-ring, .vb-cursor-boat { display: none; } }

/* ---- HERO (Variant B) -------------------------------------------------- */
.vb-hero {
  position: relative; z-index: 2;
  min-height: 100svh; display: flex; align-items: flex-end;
  background: transparent;
}
.vb-hero__fallback {
  position: absolute; inset: 0; z-index: -1;
}
.vb-hero__fallback image-slot { width: 100%; height: 100%; }
/* the WebGL canvas covers the fallback when it renders; fallback shows if no WebGL */
.vb-hero__inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--container); margin-inline: auto; padding: var(--gutter);
  padding-bottom: clamp(3rem, 9vh, 7rem);
}
.vb-hero .eyebrow { margin-bottom: var(--space-3); }
.vb-hero h1 {
  font-size: var(--fs-hero); font-weight: 400; line-height: 1.02; letter-spacing: -0.014em;
  max-width: 16ch; text-shadow: 0 2px 40px rgba(6,24,47,0.4);
}
.vb-hero h1 em { color: var(--brass-bright); }
.vb-line { display: block; overflow: hidden; }
.vb-line > span { display: block; will-change: transform; }
.vb-hero__lede { margin-top: var(--space-3); max-width: 46ch; color: var(--paper); opacity: 0.92; }
.vb-hero__actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* scroll cue */
.vb-scroll {
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.8em;
  font-size: var(--fs-eyebrow); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper-dim);
}
.vb-scroll .l { width: 1px; height: 46px; background: linear-gradient(var(--brass), transparent); animation: vbpulse 2.4s var(--ease) infinite; }
@keyframes vbpulse { 0%,100%{ transform: scaleY(0.5); opacity:.5;} 50%{ transform: scaleY(1); opacity:1;} }
@media (prefers-reduced-motion: reduce){ .vb-scroll .l { animation: none; } }

/* ---- Content sections sit on solid brand surfaces (cover the canvas) --- */
.vb-section { position: relative; z-index: 2; }

/* ---- Morphing cards ---------------------------------------------------- */
.vb-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
  perspective: 1200px;
}
.vb-card {
  position: relative; display: flex; flex-direction: column;
  transform-style: preserve-3d; will-change: transform;
}
.vb-card__media {
  position: relative; aspect-ratio: 4/5; overflow: hidden; margin-bottom: var(--space-3);
  will-change: transform;
  -webkit-mask-image: none;
}
.vb-card__media image-slot { width: 110%; height: 110%; margin: -5%; }
.vb-card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,24,47,0) 50%, rgba(6,24,47,0.6));
}
/* brass wipe that reveals on hover */
.vb-card__media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(201,162,75,0.16) 50%, transparent 60%);
  background-size: 280% 100%; background-position: 120% 0;
  transition: background-position 0.9s var(--ease);
}
.vb-card:hover .vb-card__media::before { background-position: -60% 0; }
.vb-card__num {
  position: absolute; top: var(--space-2); left: var(--space-2); z-index: 3;
  font-family: var(--display); font-size: 1.1rem; color: var(--paper); letter-spacing: 0.1em;
}
.vb-card__num::before { content:""; display:inline-block; width:1.8em; height:1px; background:var(--brass); vertical-align:middle; margin-right:.6em; }
.vb-card h3 {
  font-size: var(--fs-h3); font-weight: 500; margin-bottom: 0.4em;
  transition: transform 0.5s var(--ease), color 0.5s var(--ease);
}
.vb-card:hover h3 { color: var(--brass-bright); transform: translateX(6px); }
.vb-card p { font-size: var(--fs-small); color: var(--paper-dim); margin-bottom: var(--space-2); flex: 1; }
.vb-card .link { font-size: 0.78rem; align-self: flex-start; }
@media (max-width: 900px){ .vb-cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .vb-cards { grid-template-columns: 1fr; } }

/* ---- Big scroll stat band --------------------------------------------- */
.vb-stat { text-align: center; }
.vb-stat__n {
  font-family: var(--display); font-weight: 400; line-height: 0.9;
  font-size: clamp(4rem, 16vw, 13rem); color: var(--paper); letter-spacing: -0.02em;
}
.vb-stat__n .u { color: var(--brass); font-size: 0.3em; }
.vb-stat__l { margin-top: var(--space-2); }

/* ---- FAQ (variant b, reuse look) -------------------------------------- */
.vb-faq { max-width: var(--container-narrow); margin-inline: auto; }
.vb-faq__item { border-top: 1px solid var(--rule-paper); }
.vb-faq__item:last-child { border-bottom: 1px solid var(--rule-paper); }
.vb-faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
  text-align: left; padding: 1.4em 0; font-family: var(--display); font-size: var(--fs-h3); font-weight: 500; color: var(--paper);
}
.vb-faq__sign { position: relative; width: 16px; height: 16px; flex: none; }
.vb-faq__sign::before, .vb-faq__sign::after { content:""; position:absolute; background:var(--brass); transition: transform .4s var(--ease); }
.vb-faq__sign::before { top:50%; left:0; width:100%; height:1px; transform:translateY(-50%); }
.vb-faq__sign::after { left:50%; top:0; width:1px; height:100%; transform:translateX(-50%); }
.vb-faq__item.open .vb-faq__sign::after { transform: translateX(-50%) scaleY(0); }
.vb-faq__a { display:grid; grid-template-rows:0fr; transition: grid-template-rows .6s var(--ease); }
.vb-faq__a > div { overflow:hidden; }
.vb-faq__item.open .vb-faq__a { grid-template-rows:1fr; }
.vb-faq__a p { padding-bottom:1.6em; max-width:64ch; color:var(--paper-dim); }

/* ---- Scroll companion (brass sail) ------------------------------------ */
#vb-sail {
  position: fixed; right: 26px; top: 0; bottom: 0; width: 2px; z-index: 40;
  pointer-events: none; opacity: 0; transition: opacity .5s var(--ease);
}
#vb-sail.is-on { opacity: 1; }
#vb-sail .track { position: absolute; inset: 10vh 0; background: var(--rule-paper); }
#vb-sail .boat {
  position: absolute; left: 50%; top: calc(10vh + (80vh * var(--p, 0)));
  transform: translate(-50%,-50%); color: var(--brass-bright);
}
#vb-sail .boat svg { width: 18px; height: 18px; display: block; filter: drop-shadow(0 0 8px rgba(201,162,75,0.5)); }
@media (max-width: 900px){ #vb-sail { display: none; } }

/* ---- Variant badge ----------------------------------------------------- */
.vb-badge {
  position: fixed; left: 18px; bottom: 16px; z-index: 50;
  font-family: var(--body); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--paper-dim); display: flex; align-items: center; gap: 0.7em; pointer-events: none;
}
.vb-badge::before { content:""; width: 1.6em; height: 1px; background: var(--brass); }

/* nav over the WebGL hero needs to sit above the canvas */
.nav { z-index: 1000; }

/* ---- Page-transition curtain ------------------------------------------ */
#vb-trans {
  position: fixed; inset: 0; z-index: 7000; display: none;
  background: var(--deep); pointer-events: none; will-change: transform;
}
#vb-trans::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--brass);
  box-shadow: 0 0 24px rgba(201,162,75,0.6);
}
#vb-trans .vb-trans__mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: clamp(2rem,5vw,3rem); font-weight: 600;
  letter-spacing: 0.16em; color: var(--paper);
}
#vb-trans .vb-trans__mark span { display: block; text-align: center; }
#vb-trans .vb-trans__mark small {
  display: block; font-family: var(--body); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.46em; text-transform: uppercase; color: var(--brass); margin-top: 0.8em;
}

/* ---- Quote request form (devis) --------------------------------------- */
.quote {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 880px){ .quote { grid-template-columns: 1fr; gap: var(--space-4); } }

.quote__aside .lead { margin-bottom: var(--space-3); }
.quote__points { margin-top: var(--space-4); border-top: 1px solid var(--rule-paper); }
.quote__point {
  display: flex; gap: var(--space-2); padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule-paper);
}
.quote__point .mk { font-family: var(--display); color: var(--brass); font-size: 1.2rem; line-height: 1.2; flex: none; }
.quote__point h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: 0.25em; }
.quote__point p { font-size: var(--fs-small); color: var(--paper-dim); }
.quote__contact {
  margin-top: var(--space-4); display: flex; flex-direction: column; gap: 0.5em;
  font-size: var(--fs-small); color: var(--paper-dim);
}
.quote__contact a { color: var(--paper); transition: color var(--dur-fast) var(--ease); }
.quote__contact a:hover { color: var(--brass-bright); }
.quote__contact .lab { color: var(--brass); letter-spacing: var(--ls-label); text-transform: uppercase; font-size: var(--fs-eyebrow); }

/* the form card */
.quote__form {
  position: relative;
  background: rgba(11, 37, 69, 0.55);
  border: 1px solid var(--rule-paper);
  backdrop-filter: blur(10px) saturate(120%);
  padding: clamp(1.6rem, 3vw, 2.8rem);
}
.quote__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.field { display: flex; flex-direction: column; gap: 0.5em; }
.field.col-2 { grid-column: 1 / -1; }
.field label {
  font-family: var(--body); font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper-dim);
}
.field label .req { color: var(--brass); margin-left: 0.3em; }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: var(--fs-body); color: var(--paper);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule-paper);
  padding: 0.7em 0.1em; border-radius: 0;
  transition: border-color var(--dur-fast) var(--ease);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.field select { cursor: pointer; }
.field select option { background: var(--deep); color: var(--paper); }
.field input::placeholder, .field textarea::placeholder { color: rgba(201,195,182,0.5); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--brass-bright);
}
.field input:-webkit-autofill { -webkit-text-fill-color: var(--paper); transition: background-color 9999s; }

.quote__submit { margin-top: var(--space-4); display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.quote__note { font-size: var(--fs-eyebrow); color: var(--paper-dim); letter-spacing: 0.04em; }
.quote__form .btn { border-color: var(--brass); }

/* success state */
.quote__form.is-sent .quote__grid, .quote__form.is-sent .quote__submit { display: none; }
.quote__done { display: none; text-align: center; padding: var(--space-4) var(--space-2); }
.quote__form.is-sent .quote__done { display: block; }
.quote__done .seal {
  width: 64px; height: 64px; margin: 0 auto var(--space-3);
  border: 1px solid var(--brass); border-radius: 50%; display: grid; place-items: center;
  color: var(--brass-bright); font-size: 1.6rem;
}
.quote__done h3 { font-size: var(--fs-h3); font-weight: 500; margin-bottom: 0.4em; }
.quote__done p { color: var(--paper-dim); max-width: 38ch; margin: 0 auto; }

/* ---- Quote MODAL (popup) ---------------------------------------------- */
.vb-modal {
  position: fixed; inset: 0; z-index: 7500;
  display: none; place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}
.vb-modal.open { display: grid; }
.vb-modal__scrim {
  position: absolute; inset: 0;
  background: rgba(3, 12, 26, 0.72);
  backdrop-filter: blur(8px) saturate(115%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.vb-modal.open .vb-modal__scrim { opacity: 1; }
.vb-modal__card {
  position: relative; z-index: 1;
  width: min(640px, 100%);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(11,37,69,0.96), rgba(6,24,47,0.98));
  border: 1px solid var(--rule-paper);
  box-shadow: 0 40px 120px rgba(2,10,22,0.7);
  padding: clamp(1.6rem, 3.5vw, 2.8rem);
  opacity: 0; transform: translateY(24px) scale(0.985);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.vb-modal__card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--brass); box-shadow: 0 0 22px rgba(201,162,75,0.55);
}
.vb-modal.open .vb-modal__card { opacity: 1; transform: none; }
.vb-modal__x {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 40px; height: 40px; border: 1px solid var(--rule-paper); border-radius: 50%;
  display: grid; place-items: center; color: var(--paper-dim); font-size: 1.5rem; line-height: 1;
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.vb-modal__x:hover { color: var(--brass-bright); border-color: var(--brass); transform: rotate(90deg); }
.vb-modal__card .eyebrow { margin-bottom: var(--space-2); }
.vb-modal__card h2 { font-family: var(--display); font-size: var(--fs-h2); font-weight: 400; line-height: 1.05; }
.vb-modal__card h2 em { color: var(--brass-bright); font-style: italic; }
.vb-modal__sub { color: var(--paper-dim); font-size: var(--fs-small); margin: var(--space-2) 0 var(--space-3); max-width: 46ch; }
.vb-modal__card .quote__grid { margin-top: var(--space-2); }
.vb-modal__card.is-sent .quote__grid, .vb-modal__card.is-sent .quote__submit, .vb-modal__card.is-sent .eyebrow, .vb-modal__card.is-sent .vb-modal__sub, .vb-modal__card.is-sent > h2 { display: none; }
.vb-modal__card .quote__done { display: none; }
.vb-modal__card.is-sent .quote__done { display: block; }
@media (max-width: 560px){ .vb-modal__card .quote__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce){
  .vb-modal__scrim, .vb-modal__card { transition: none; }
}
body.vb-modal-open { overflow: hidden; }

/* Honeypot anti-spam field — visually hidden, off-screen, not focusable */
.vb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
