/* The VSL funnel page (/vsl/).
 *
 * A dark, single-column funnel: accent bar, headline, video, estimator, booking.
 * It is deliberately NOT the light marketing site; only this page loads this
 * file, and everything is scoped under .vsl so nothing here can reach /,
 * /estimate/ or /privacy/.
 *
 * EVERY COLOUR IS A TOKEN. No component below carries a hex value; they all
 * read the six custom properties declared once in :root here. Opacity variants
 * are derived with color-mix so a palette change is a change to this block and
 * nothing else.
 */

:root {
  --bg: #0b0f0d;
  --surface: #111614;
  --deep: #143b2a;
  --accent: #2f6b4f;
  --text: #f2f0ea;
  --muted: #9aa39e;

  /* Derived, so the six above stay the only source of colour. */
  --accent-40: color-mix(in srgb, var(--accent) 40%, transparent);
  --accent-30: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-20: color-mix(in srgb, var(--accent) 20%, transparent);
  --muted-40: color-mix(in srgb, var(--muted) 40%, transparent);
  --text-70: color-mix(in srgb, var(--text) 70%, transparent);
  --glow: 0 0 60px color-mix(in srgb, var(--deep) 65%, transparent);

  --bar-h: 4px;
  --gutter: 16px;
  /* MEASURED OFF THE REFERENCE PAGE at 1440: its player renders 510 wide.
   * Ours is 16:9, so 510 gives 287 tall against their 276. */
  --player-max: 510px;
  --copy-max: 408px;
  /* The reference page's scheduler renders 488 wide by 602 tall. */
  --calendly-max: 488px;
}

.vsl {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* No horizontal scroll at any width: nothing inside may exceed the viewport. */
  overflow-x: hidden;
}

.vsl *,
.vsl *::before,
.vsl *::after {
  box-sizing: border-box;
}

/* 1. The accent bar, above everything, full width. */
.vsl-bar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--bar-h);
  background: var(--accent);
  z-index: 100;
}

.vsl-main {
  padding: calc(var(--bar-h) + 20px) var(--gutter) 28px;
  max-width: calc(var(--player-max) + var(--gutter) * 2);
  margin: 0 auto;
}

.vsl-skip {
  position: absolute;
  left: -9999px;
}
.vsl-skip:focus {
  left: var(--gutter);
  top: calc(var(--bar-h) + 8px);
  z-index: 200;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
}

/* 2, 3. Headline and subhead. */
.vsl h1,
.vsl h2 {
  color: var(--accent);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  margin: 0;
}

.vsl h1 {
  /* 18px, the reference page's heading size. Everything on that page is 18px
   * headings over 12px copy; the hierarchy is weight and colour, not size. */
  font-size: 1.125rem;
}

.vsl h2 {
  font-size: 1rem;
}

/* The headline's second line: smaller, off-white, supporting rather than
 * competing with the accent line above it. */
.vsl-headline-sub {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.vsl-subhead {
  color: var(--text);
  opacity: 0.7;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  margin: 6px auto 0;
  max-width: var(--copy-max);
}

.vsl-lede {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  margin: 6px auto 0;
  max-width: var(--copy-max);
}

.vsl-lede.book {
  font-size: 0.75rem;
}

/* 4, 6, 10. One card treatment, used by the player, the estimator and Calendly. */
.vsl-card {
  background: var(--surface);
  border: 1px solid var(--accent-40);
  border-radius: 16px;
  box-shadow: var(--glow);
  margin: 0 auto;
  overflow: hidden;
}

.vsl-player {
  max-width: var(--player-max);
  margin-top: 12px;
}

/* 16:9 exactly. The video fills the box, so a 16:9 source neither letterboxes
 * nor crops; a source of another shape is contained rather than cut, which is
 * the safer of the two wrong answers. The surface behind it IS the placeholder
 * when there is no poster and no file yet. */
.vsl-player .frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  display: block;
}

.vsl-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
  display: block;
}

/* The pulse. Dead centre of the player, where a play control is expected. The
 * centre lands on the W of WATCH, so the button sits on an opaque backdrop
 * (below) rather than being moved off the lettering.
 * Size: the disc is 10% of the player's width but never under 60px. The floor
 * is there because Safari draws its own fixed ~60px centre play button (shadow
 * DOM, cannot be hidden with CSS) exactly behind this one; any smaller and its
 * grey circle shows as a ring around the pulse on a narrow player.
 * Its hit area ends at about 73% of the height on the 330px phone player and
 * 65% on desktop, clear of the native controls, which start below 78%.
 * Deploy note: /assets/* is cached for a year, immutable, keyed on ?v=. The
 * first deploy of this rule (2026-09-18) had www's edge cache the OLD file
 * under the NEW ?v= because it was requested before the new deployment
 * reached that edge, and no token we hold can purge. Changing this file mints
 * a fresh ?v=; after deploying, do not request the real ?v= URL until a
 * random-query request on every host returns the new content. */
.vsl-player .vsl-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(14%, 84px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

/* The backdrop: an opaque dark disc the size of the button with a soft dark
 * halo, so the button reads cleanly over the lettering. It does NOT animate;
 * the pulse below keeps its own scale and fade on top of it. */
.vsl-player .vsl-pulse::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--deep) 45%, var(--bg));
  box-shadow: 0 0 16px 8px color-mix(in srgb, var(--bg) 70%, transparent);
}

.vsl-player .vsl-pulse-dot {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--text-70);
  background: color-mix(in srgb, var(--deep) 60%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
  opacity: 0.72;
  animation: vsl-pulse 2.4s ease-in-out infinite;
}

/* The play triangle, drawn in CSS so there is no asset to load. */
.vsl-player .vsl-pulse-dot::before {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  width: 30%;
  height: 34%;
  transform: translate(-50%, -50%);
  background: var(--text);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* A soft ring that widens and fades once per cycle. */
.vsl-player .vsl-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--text-70);
  opacity: 0;
  animation: vsl-pulse-ring 2.4s ease-out infinite;
}

.vsl-player .vsl-pulse:hover .vsl-pulse-dot,
.vsl-player .vsl-pulse:focus-visible .vsl-pulse-dot {
  opacity: 1;
}

.vsl-player .vsl-pulse:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 50%;
}

@keyframes vsl-pulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.07); opacity: 0.95; }
}

@keyframes vsl-pulse-ring {
  0% { transform: scale(1); opacity: 0.45; }
  70%, 100% { transform: scale(1.22); opacity: 0; }
}

/* Reduced motion: the same button, static, no animation at all. */
@media (prefers-reduced-motion: reduce) {
  .vsl-player .vsl-pulse-dot,
  .vsl-player .vsl-pulse-dot::after {
    animation: none;
  }
  .vsl-player .vsl-pulse-dot { opacity: 0.9; }
  .vsl-player .vsl-pulse-dot::after { display: none; }
}

.vsl-player .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: var(--gutter);
}

.vsl-player .placeholder img {
  width: 64px;
  height: 64px;
  opacity: 0.8;
}

/* 2b. The logo mark under the player. The build leaves this element EMPTY when
 * the file is not in the repo, and an empty one draws nothing at all, which is
 * the same rule the poster follows. */
.vsl-logo {
  display: flex;
  justify-content: center;
  margin: 12px auto;
}

.vsl-logo:empty {
  display: none;
}

.vsl-logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* 5, 7. The divider. */
.vsl-rule {
  width: 60%;
  max-width: calc(var(--player-max) * 0.6);
  height: 1px;
  border: 0;
  background: var(--accent-30);
  margin: 20px auto;
}

.vsl-section {
  margin-top: 0;
}

.vsl-section h2 + .vsl-lede,
.vsl-section h2 + .vsl-subhead {
  margin-top: 6px;
}

/* The headline's second line: smaller, off-white, supporting rather than
 * competing with the accent line above it. */
.vsl-headline-sub {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

/* 6. The estimator shell. The component's own markup is untouched; everything
 * below restyles it for this page only. */
.vsl .form-card {
  background: var(--surface);
  border: 1px solid var(--accent-40);
  border-radius: 16px;
  box-shadow: var(--glow);
  max-width: 510px;
  margin: 10px auto 0;
  padding: 13px;
}

.vsl .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.vsl .field,
.vsl .full,
.vsl fieldset.field {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.vsl .field.full,
.vsl .full,
.vsl fieldset.field.full {
  grid-column: 1 / -1;
}

.vsl .field label,
.vsl .field legend {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 5px;
}

.vsl .field .opt,
.vsl .field .counter,
.vsl .hint,
.vsl .muted {
  color: var(--muted);
  font-weight: 500;
}

.vsl .field input[type="text"],
.vsl .field input[type="email"],
.vsl .field input[type="tel"],
.vsl .field input[type="number"],
.vsl .field textarea,
.vsl .file-drop {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--muted-40);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 7px 9px;
}

.vsl .field textarea {
  min-height: 84px;
  resize: vertical;
}

.vsl .field input:focus-visible,
.vsl .field textarea:focus-visible,
.vsl .field input[type="file"]:focus-visible,
.vsl .btn:focus-visible,
.vsl a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.vsl .radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.vsl .radio-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 600;
  font-size: 0.75rem;
}

.vsl .radio-row input {
  accent-color: var(--accent);
}

.vsl .file-drop input[type="file"] {
  color: var(--muted);
  font-family: inherit;
  font-size: 0.75rem;
  max-width: 100%;
}

.vsl .file-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.vsl .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.vsl .field-error {
  color: var(--text);
  background: color-mix(in srgb, var(--deep) 55%, transparent);
  border-left: 3px solid var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 8px 0 0;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

.vsl .field-error:empty {
  display: none;
}

.vsl .form-status {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
}

.vsl .form-status:empty {
  display: none;
}

.vsl .submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.vsl .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 0.8125rem;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: filter 140ms ease;
}

.vsl .btn:hover {
  filter: brightness(1.12);
}

.vsl .btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.vsl .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  display: none;
}

.vsl .btn.busy .spinner {
  display: inline-block;
  animation: vsl-spin 700ms linear infinite;
}

@keyframes vsl-spin {
  to {
    transform: rotate(360deg);
  }
}

.vsl a {
  color: var(--accent);
}

.vsl .success {
  text-align: center;
  padding: 10px 0 4px;
}

.vsl .success h2 {
  font-size: 1rem;
}

.vsl .success .success-icon svg {
  width: 44px;
  height: 44px;
  stroke: var(--accent);
}

.vsl .center-note {
  text-align: center;
  color: var(--muted);
  margin-top: 16px;
}

/* 10. Calendly. */
.vsl-calendly {
  max-width: var(--calendly-max);
  margin-top: 10px;
  /* NO PADDING. Calendly's own panel is white, and any padding here would draw
   * a dark gutter between that panel and the card border. The card clips to its
   * radius, so the white meets the border on all four sides. */
  padding: 0;
}

/* THE FULL SCHEDULER, NOT THE COMPACT CARD. Calendly lays the event details
 * panel beside the date and time picker only when the container is wide enough
 * and tall enough for both; at the old 900 wide by 700 tall it fell back to the
 * stacked card and scrolled inside itself. The wrapper is the player's width
 * now, and the height holds the whole view so nothing scrolls within it. */
.vsl-calendly .calendly-inline-widget {
  min-width: 0;
  width: 100%;
  height: 602px;
  /* The wrapper never scrolls: the height holds the whole scheduler, and a
   * scrollbar here would be a second one inside the page's own. */
  overflow: hidden;
}

.vsl-calendly .calendly-inline-widget iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.vsl-calendly .calendly-loading {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 40px 0;
}

.vsl-faq-link {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 8px auto 0;
}

.vsl-faq-link a {
  color: var(--muted);
}

.vsl-fallback {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  /* Inside the card, beneath the white widget, on the card's dark background,
   * the way the reference page does it. The card's own padding is zero so the
   * widget stays flush, so the breathing room belongs to this line. */
  margin: 0;
  padding: 10px 12px 12px;
}

.vsl-estimate-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin: 8px auto 0;
  max-width: var(--copy-max);
}

/* The credential line. Deliberately the quietest thing on the page after the
 * footer: the page's muted body colour, centred, no border, no background, no
 * weight change. A credential, not a pitch. */
.vsl-credential {
  text-align: center;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  margin: 28px auto 0;
  max-width: var(--copy-max);
}

/* Underlined AND accented, so it reads as a link in a line of muted text where
 * colour alone is a weak signal. */
.vsl-credential a {
  color: var(--accent);
  text-decoration: underline;
}

.vsl-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  /* Was 24px. The credential line now sits directly above it, and 24 on top of
   * that line's own 28 read as two separate blocks rather than one foot. */
  margin: 14px auto 0;
  max-width: var(--copy-max);
}

/* Mobile: stack centred, the player goes edge to edge inside the 16px gutter. */
@media (max-width: 720px) {
  .vsl h1 {
    font-size: 1.125rem;
  }
  .vsl h2 {
    font-size: 0.9375rem;
  }
  .vsl-headline-sub {
    font-size: 0.8125rem;
  }
  .vsl-subhead,
  .vsl-lede,
  .vsl-lede.book,
  .vsl-faq-link {
    font-size: 0.75rem;
  }
  .vsl-main {
    padding: calc(var(--bar-h) + 13px) var(--gutter) 22px;
  }
  /* The reference page renders its player 330 wide and its scheduler 320 wide
   * at 390. */
  .vsl-player {
    max-width: 330px;
  }
  .vsl-calendly {
    max-width: 320px;
  }
  .vsl .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .vsl .form-card {
    padding: 18px;
  }
  .vsl-logo {
    margin: 11px auto;
  }
  .vsl-logo img {
    height: 36px;
  }
  .vsl-rule {
    margin: 16px auto;
    width: 72%;
  }
  .vsl-calendly .calendly-inline-widget {
    height: 602px;
  }
  .vsl .submit-row {
    justify-content: center;
    text-align: center;
  }
}

/* The glow and every transition are motion the viewer did not ask for. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --glow: none;
  }
  .vsl *,
  .vsl *::before,
  .vsl *::after {
    transition: none !important;
    animation: none !important;
  }
  .vsl .btn.busy .spinner {
    display: none;
  }
}
