/* The signature kit's look (assets/js/signature.js wires it). Every proposal ships it and dresses it in its own colours:
   set these on body.vN in vN.css, and restyle any piece there (keep the class names). Taken from Manetas Plan 2 round 2. */
:root {
  --vp-ink: #141414;        /* preloader and back-to-top background */
  --vp-paper: #f4f1ec;      /* text, track and arrow on them */
  --vp-accent: #b08d57;     /* progress line, ring, cursor dot, cursor label: set it to the brand colour */
  --vp-on-accent: #141414;  /* text on the accent */
  --vp-ease: cubic-bezier(.2, .7, .2, 1);
  --vp-marquee-gap: 2.5rem;
}

/* Headlines wait, hidden, until they are split into lines (only while motion is on). If the script never runs, they show after 4s. */
.vp-anim [data-split]:not(.vp-split-ready) { opacity: 0; animation: vp-show 0s 4s forwards; }
@keyframes vp-show { to { opacity: 1; } }

/* Preloader: shown once per tab and page, only when the head script set .vp-pre-on. Gone after 5s whatever happens. */
.vp-pre { display: none; }
.vp-pre-on .vp-pre { position: fixed; inset: 0; z-index: 2147483500; display: grid; place-items: center; background: var(--vp-ink); color: var(--vp-paper);
  animation: vp-pre-safety .01s 5s forwards; }
@keyframes vp-pre-safety { to { visibility: hidden; } }
.vp-pre-inner { display: grid; justify-items: center; gap: 22px; }
/* The logo draws in from the left: text in the display face, or the logo as a mask (add .is-mask and a mask-image). */
.vp-pre-logo { font-size: clamp(28px, 4.4vw, 56px); line-height: 1; letter-spacing: -.01em; clip-path: inset(0 100% 0 0); }
.vp-pre-logo.is-mask { width: min(340px, 62vw); aspect-ratio: 5 / 1; font-size: 0; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.vp-pre-bar { width: min(340px, 62vw); height: 1px; background: color-mix(in srgb, var(--vp-paper) 14%, transparent); overflow: hidden; }
.vp-pre-bar i { display: block; height: 100%; background: var(--vp-accent); transform: scaleX(0); transform-origin: left; }
.vp-pre-note { font-size: 11px; line-height: 1; letter-spacing: .24em; opacity: .55; }
.vp-pre-note:empty { display: none; }

/* Header progress line: the header must be positioned (sticky, fixed or relative). */
.vp-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--vp-accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }

/* Custom cursor (mouse only): a ring that lags a little, grows on links and becomes a label over [data-cursor]. */
.vp-has-cursor, .vp-has-cursor * { cursor: none !important; }
.vp-has-cursor input, .vp-has-cursor textarea, .vp-has-cursor [contenteditable] { cursor: text !important; }
.vp-cursor, .vp-cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; border-radius: 50%; }
.vp-cursor { z-index: 2147483600; width: 42px; height: 42px; margin: -21px 0 0 -21px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .9); border-radius: 999px;
  mix-blend-mode: difference; opacity: 0; transition: width .45s var(--vp-ease), height .45s var(--vp-ease), margin .45s var(--vp-ease), background-color .35s, border-color .35s, opacity .3s; }
.vp-cursor.is-on { opacity: 1; }
.vp-cursor.is-link { width: 62px; height: 62px; margin: -31px 0 0 -31px; border-color: rgba(255, 255, 255, .55); }
/* The label circle. A label longer than it ("Move the light") widens it into a pill: the script measures the label into
   --vp-label-w. Keep the margins at minus half the size, so it stays centred on the pointer. */
.vp-cursor.is-label { --vp-cursor-w: max(96px, calc(var(--vp-label-w, 0px) + 40px)); width: var(--vp-cursor-w); height: 96px; margin: -48px 0 0 calc(var(--vp-cursor-w) / -2);
  background: var(--vp-accent); border-color: var(--vp-accent); mix-blend-mode: normal; }
.vp-cursor.is-text, .vp-cursor.is-out { opacity: 0; }
.vp-cursor.is-down { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
/* Pressed over a label ("Drag"): a slight squeeze, never the small ring, which the label would spill out of. */
.vp-cursor.is-label.is-down { width: calc(var(--vp-cursor-w) - 8px); height: 88px; margin: -44px 0 0 calc((var(--vp-cursor-w) - 8px) / -2); }
/* One line, centred. The script sets --vp-label-track to the label's letter-spacing: the margin takes back the space it
   leaves after the last letter, so restyle letter-spacing freely in vN.css. */
.vp-cursor-label { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .06em; white-space: nowrap; text-align: center; margin-right: calc(-1 * var(--vp-label-track, 0px));
  color: var(--vp-on-accent); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--vp-ease); }
.vp-cursor.is-label .vp-cursor-label { opacity: 1; transform: none; }
.vp-cursor-dot { z-index: 2147483601; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--vp-accent); transition: opacity .25s; }
.vp-cursor-dot.is-hidden { opacity: 0; }

/* Back to top: a ring that fills with the scroll, a tooltip with the percentage, and the arrow takes off when clicked.
   Hidden (and out of the tab order) until the visitor is a screen down. */
.vp-top { position: fixed; z-index: 60; right: 24px; bottom: 24px; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; background: var(--vp-ink); color: var(--vp-paper);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transform: translateY(24px) scale(.8); pointer-events: none;
  transition: opacity .45s, transform .6s var(--vp-ease), background-color .3s, visibility 0s .6s; }
.vp-top.is-on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .45s, transform .6s var(--vp-ease), background-color .3s, visibility 0s; }
.vp-top-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.vp-top-track { fill: none; stroke: color-mix(in srgb, var(--vp-paper) 16%, transparent); stroke-width: 2; }
.vp-top-ring { fill: none; stroke: var(--vp-accent); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.vp-top-arrow { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.vp-top-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.vp-top:hover { background: var(--vp-accent); color: var(--vp-on-accent); }
.vp-top:hover .vp-top-arrow svg { animation: vp-top-nudge 1.1s var(--vp-ease) infinite; }
.vp-top.is-launch .vp-top-arrow svg { animation: vp-top-launch .9s cubic-bezier(.55, 0, .2, 1) forwards; }
@keyframes vp-top-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes vp-top-launch { 0% { transform: translateY(0); } 42% { transform: translateY(-48px); } 43% { transform: translateY(48px); } 100% { transform: translateY(0); } }
.vp-top-tip { position: absolute; right: calc(100% + 12px); top: 50%; padding: 10px 14px; border-radius: 999px; background: var(--vp-paper); color: var(--vp-ink); font-size: 13px; line-height: 1;
  white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); opacity: 0; transform: translate(8px, -50%); pointer-events: none; transition: opacity .25s, transform .4s var(--vp-ease); }
.vp-top-tip b { margin-left: 4px; color: var(--vp-accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.vp-top:hover .vp-top-tip, .vp-top:focus-visible .vp-top-tip { opacity: 1; transform: translate(0, -50%); }

/* Lightbox for [data-lightbox] photos (signature.js builds it on the first open): the photo large on a dark veil, its alt
   text under it, arrows when the page has more than one. The kit's cursor moves into it while it is open. Restyle the
   colours, buttons and caption in vN.css; leave the padding and the figure's two rows: they keep photo, caption and
   buttons apart at every size. While it is open the page under it doesn't scroll (html.vp-lightbox-on). */
[data-lightbox] { cursor: zoom-in; }
html.vp-lightbox-on { overflow: hidden; } /* with Lenis, its own .lenis-stopped does the same */
.vp-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: clamp(64px, 6vw, 88px) clamp(72px, 7vw, 96px) clamp(20px, 3vw, 36px); border: 0; background: transparent; color: #f4f1ec; overflow: hidden; }
.vp-lightbox[open] { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.vp-lightbox::backdrop { background: rgba(10, 12, 10, .92); }
.vp-lightbox-veil { position: absolute; inset: 0; cursor: zoom-out; }
/* The photo as large as it fits with the caption right under it, the two centred together (a caption-less photo gets no
   second row). Only the photo and caption take the pointer: a click anywhere else lands on the veil and closes. */
.vp-lightbox-fig { position: relative; display: grid; grid-template-rows: minmax(0, max-content); grid-auto-rows: auto; align-content: center; place-items: center; gap: 14px;
  min-width: 0; min-height: 0; margin: 0; pointer-events: none; }
.vp-lightbox-fig img { display: block; width: auto; height: auto; max-width: min(100%, 1600px); max-height: 100%; object-fit: contain; border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); pointer-events: auto; }
.vp-lightbox-fig figcaption { max-width: 64ch; font-size: 14px; line-height: 1.45; text-align: center; opacity: .82; pointer-events: auto; }
.vp-lightbox-fig figcaption:empty { display: none; }
.vp-lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; transition: background-color .25s, border-color .25s, color .25s; }
.vp-lightbox button[hidden] { display: none; }
.vp-lightbox button:hover { background: var(--vp-accent); border-color: var(--vp-accent); color: var(--vp-on-accent); }
.vp-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vp-lightbox svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vp-lightbox-close { top: 16px; right: 16px; }
.vp-lightbox-prev, .vp-lightbox-next { top: 50%; margin-top: -24px; }
.vp-lightbox-prev { left: 16px; }
.vp-lightbox-next { right: 16px; }
/* With motion: the veil fades in, the photo scales in, and each step slides the next photo in from its side. */
.vp-anim .vp-lightbox[open]::backdrop { animation: vp-lb-fade .35s ease; }
.vp-anim .vp-lightbox[open] .vp-lightbox-fig { animation: vp-lb-in .5s var(--vp-ease); }
.vp-anim .vp-lightbox-fig[data-step="next"] img { animation: vp-lb-next .45s var(--vp-ease); }
.vp-anim .vp-lightbox-fig[data-step="prev"] img { animation: vp-lb-prev .45s var(--vp-ease); }
@keyframes vp-lb-fade { from { opacity: 0; } }
@keyframes vp-lb-in { from { opacity: 0; transform: scale(.96); } }
@keyframes vp-lb-next { from { opacity: 0; transform: translateX(40px); } }
@keyframes vp-lb-prev { from { opacity: 0; transform: translateX(-40px); } }

/* Marquee: a plain wrapped list without motion; rows that loop and speed up with the scroll once signature.js adds .is-on. */
.vp-marquee-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vp-marquee-gap); margin: 0; }
.vp-marquee.is-on { overflow: hidden; }
.vp-marquee.is-on .vp-marquee-row { flex-wrap: nowrap; gap: 0; width: max-content; white-space: nowrap; will-change: transform; }
.vp-marquee-track { display: inline-flex; align-items: center; flex: none; gap: var(--vp-marquee-gap); padding-inline-end: var(--vp-marquee-gap); }

/* Footage the scroll plays (assets/js/footage.js, optional). Without it running (reduced motion, no script) this is the static
   version: the poster fills a screen and every beat shows over it in normal flow. With it, .is-on gives the scene its scroll
   length, the stage sticks for one screen, frames draw on the canvas over the poster and one beat shows at a time.
   Never put overflow: hidden on an ancestor of the scene: it stops the stage from sticking (the check reports it). */
.vp-footage { --vp-footage-focus: 50% 50%; --vp-footage-pad: clamp(20px, 4vw, 56px); position: relative; }
.vp-footage-stage { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: 1.5rem;
  padding: var(--vp-footage-pad); overflow: hidden; isolation: isolate; color: #fff; }
.vp-footage-poster, .vp-footage-poster img, .vp-footage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vp-footage-poster { z-index: -3; margin: 0; }
.vp-footage-poster img { object-fit: cover; object-position: var(--vp-footage-focus); }
.vp-footage-canvas { z-index: -2; opacity: 0; transition: opacity .35s; }
.vp-footage-canvas.is-drawn { opacity: 1; }
/* Shade under the copy, so it reads over any frame. Set --vp-footage-shade: none for a clean shot with copy beside it. */
.vp-footage-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--vp-footage-shade, linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0))); }
.vp-footage-beat { position: relative; max-width: 42rem; }
.vp-footage.is-on { height: calc(100vh + var(--vp-footage-len, 260vh)); height: calc(100svh + var(--vp-footage-len, 260svh)); }
.vp-footage.is-on .vp-footage-stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
/* One at a time, in the same place: move them in vN.css (left, right, top, bottom, width), not with transform (the script owns it). */
.vp-footage.is-on .vp-footage-beat { position: absolute; left: var(--vp-footage-pad); right: var(--vp-footage-pad); bottom: var(--vp-footage-pad); will-change: opacity, transform; }

@media (max-width: 900px) {
  .vp-top { right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .vp-top-tip { display: none; }
}
/* Phones: the arrows go to a row of their own under the caption, within reach of the thumb; a swipe steps too. */
@media (max-width: 700px) {
  .vp-lightbox { padding: 68px 12px calc(80px + env(safe-area-inset-bottom)); }
  .vp-lightbox button { width: 44px; height: 44px; }
  .vp-lightbox-close { top: 12px; right: 12px; }
  .vp-lightbox-prev, .vp-lightbox-next { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-pre { display: none !important; }
  .vp-top:hover .vp-top-arrow svg, .vp-top.is-launch .vp-top-arrow svg { animation: none; }
}
