/* Pablo marketing homepage. Colours, type and radius follow the Pablo design system.
   Type scale: 12 labels, 16 copy, 20 section headings, 32 quote, 48 headline and closing line. */

:root {
  --bg: #fbfbfc;
  --ink: #1d1f2b;
  --muted: #6b6e78;
  --line: #dcdde2;
  --plate: #f1f2f5;
  --navy: #1f2440;
  --on-navy: #c9cdf0;
  --focus: #3d52d5;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; padding: 0; cursor: pointer; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1312px; margin: 0 auto; padding: 0 48px; }

/* One 12-column grid for every section: 72px columns and 32px gutters at full width (1216px).
   Sections place their parts on its lines, so the page has three interior edges: the starts of
   columns 5, 7 and 9. Below 901px everything stacks in one column. */
.hero .wrap, .pair, .step, .quote, .close .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 32px; }
@media (min-width: 901px) {
  .hero .wrap, .pair, .step, .quote, .close .wrap { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .hero-copy, .close-copy { grid-column: 1 / span 5; }
  .hero-visual, .close-peek { grid-column: 7 / -1; }
  .pair > :first-child { grid-column: 1 / span 4; }
  .pair > :last-child { grid-column: 5 / span 6; }
  .step > .rail { grid-column: 9 / -1; grid-row: 1; }
  .step > .visual { grid-column: 1 / span 8; grid-row: 1; }
  .step.flip > .rail { grid-column: 1 / span 4; }
  .step.flip > .visual { grid-column: 5 / -1; }
  .quote blockquote { grid-column: 1 / span 8; }
  .quote figcaption { grid-column: 9 / -1; }
}
.muted { color: var(--muted); }
.strong { font-weight: 500; }

.label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.h-display { font-size: 48px; line-height: 52px; font-weight: 600; letter-spacing: -1.2px; }
.h-quote { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.6px; }
.h-section { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.3px; }
.h-item { font-size: 16px; line-height: 24px; font-weight: 600; }

/* Buttons: one filled primary per view. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #2b3157; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: #b8bac2; }
.btn-on-navy { background: #fff; color: var(--navy); }
.btn-on-navy:hover { background: #eceef6; }

/* Nav */
.nav { border-bottom: 1px solid var(--line); }
.nav .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links .signin { font-weight: 500; color: var(--muted); text-decoration: none; }
.nav-links .signin:hover { color: var(--ink); }
.logo { width: 70px; height: 24px; fill: var(--ink); }

/* Hero */
.hero { padding: 64px 0; }
.hero .wrap { align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.hero-visual { display: flex; flex-direction: column; gap: 8px; }
.hero-poster { position: relative; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 999px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.play svg { width: 24px; height: 24px; margin-left: 4px; fill: #fff; }

/* The demo video isn't recorded yet. Everything that promises it stays hidden until
   <html data-demo-video="ready"> is set, so the page never offers a video that isn't there. */
html:not([data-demo-video="ready"]) .needs-video { display: none; }

.shot { border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }

/* Needs you cards (step 06): the product's cards drawn in HTML, at the app's 14/12 type sizes. */
.ny { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 20px; user-select: none; pointer-events: none; }
.ny-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ny-head { display: flex; flex-direction: column; gap: 4px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.ny-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 24px; }
.ny-title { font-weight: 500; }
.ny-sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.ny-badge { margin-left: 8px; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: #fdf3dc; color: #8a5a0a; font-size: 12px; line-height: 16px; }
.ny-source { text-decoration: underline; text-underline-offset: 2px; }
.ny-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.ny-detail { display: flex; flex-direction: column; gap: 2px; flex: 1 1 240px; max-width: 320px; }
.ny-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-weight: 500; white-space: nowrap; }
.ny-choice { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Sections */
.sec { border-top: 1px solid var(--line); padding: 48px 0; }
.sec-loose { padding: 64px 0; }
.wrap > .sec:first-child { border-top: 0; }

.pair-body { display: flex; flex-direction: column; gap: 8px; }

/* A step: a wide visual (8 columns) and a narrow rail (4). The rail comes first in the markup
   so it reads first on a phone; on desktop it sits on alternating sides. */
.step { align-items: start; }
.rail { display: flex; flex-direction: column; gap: 24px; }
.rail-head { display: flex; flex-direction: column; gap: 4px; }
.rail-list { display: flex; flex-direction: column; gap: 4px; font-weight: 500; list-style: none; margin: 0; padding: 0; }
.visual { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.demo { width: 100%; max-width: 800px; text-align: left; }
.step.flip .demo { margin-left: auto; }
/* The demos are built 720px wide. data-ss-fill on each mount (index.html) lets the demo's own
   fit grow it past that, so it fills the 800px visual column. Under 600px of room the demo
   switches to its 358px phone design, which fill would also enlarge, so cap it at that size. */
.visual { container-type: inline-size; }
@container (max-width: 599.98px) {
  .step .visual .demo, .step.flip .visual .demo { max-width: 358px; margin-inline: auto; }
}

.over { position: relative; }
.over .floating {
  position: absolute;
  left: 22.5%;
  top: 19.75%;
  width: 55%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(29, 31, 43, 0.2);
}

.plate {
  aspect-ratio: 800 / 480;
  padding-top: 5%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--plate);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.plate img { width: 77.5%; border-radius: var(--radius); box-shadow: 0 16px 48px rgba(29, 31, 43, 0.16); }

/* Quote */
.quote figcaption { display: flex; flex-direction: column; gap: 4px; align-self: end; }
.quote figcaption .label { padding-top: 8px; }

/* Questions */
.questions { display: flex; flex-direction: column; gap: 24px; }
.questions > div { display: flex; flex-direction: column; gap: 4px; }

/* Closing band */
.close { background: var(--navy); color: #fff; overflow: hidden; }
.close .wrap { align-items: end; padding-top: 64px; }
.close-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding-bottom: 64px; }
.close-copy .btn { margin-top: 8px; }
.close .muted, .close .label { color: var(--on-navy); }
.close-note { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.close-peek { position: relative; align-self: stretch; min-height: 280px; }
.close-peek img {
  position: absolute;
  right: 0;
  top: 8px;
  width: 560px;
  max-width: 100%;
  border-radius: 2px 2px 0 0;
  transform: rotate(-2.4deg);
  transform-origin: top right;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

/* Footer */
.footer .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); }
.footer .logo { width: 58px; height: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .h-display { font-size: 32px; line-height: 40px; letter-spacing: -0.6px; }
  .h-quote { font-size: 24px; line-height: 32px; letter-spacing: -0.4px; }
  .hero { padding: 40px 0; }
  .step.flip .demo { margin-left: 0; }
  .pair-body, .questions { max-width: 640px; }
  .sec { padding: 40px 0; }
  .quote figcaption { align-self: start; }
  .close .wrap { padding-top: 40px; gap: 0; }
  .close-copy { padding-bottom: 40px; }
  .close-peek { min-height: 240px; }
  .close-peek img { left: 0; right: auto; width: 100%; top: 0; transform-origin: top left; transform: rotate(-1.6deg); }
  .footer .wrap { height: auto; padding-top: 20px; padding-bottom: 20px; flex-direction: column; align-items: flex-start; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .nav-links { gap: 12px; }
  .nav-links .signin { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- Book a walkthrough dialog ---------- */

/* Motion values from transitions.dev: modal, error state shake, success check. */
:root {
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --revert-hold: 3000ms;
  --revert-dur: 280ms;

  --check-opacity-dur: 500ms;
  --check-rotate-dur: 500ms;
  --check-rotate-from: 80deg;
  --check-bob-dur: 500ms;
  --check-y-amount: 40px;
  --check-blur-dur: 500ms;
  --check-blur-from: 10px;
  --check-path-dur: 500ms;
  --check-path-delay: 80ms;
  --check-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-opacity: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-rotate: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-ease-path: cubic-bezier(0.22, 1, 0.36, 1);

  --danger: #c4472b;
  --ok: #2f7a52;
  --ok-subtle: #eaf5ef;
}

/* transitions.dev: modal open / close */
.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

/* transitions.dev: error state shake */
.t-input {
  transition: border-color 150ms ease-out;
  will-change: transform;
}
.t-input.is-error {
  transition: border-color var(--revert-dur, 280ms) ease-out;
}
.t-error-msg {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear var(--revert-dur, 280ms);
}
.t-input-wrap.is-error .t-error-msg {
  opacity: 1;
  visibility: visible;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear 0s;
}
.t-input.is-shaking {
  animation: t-input-shake calc(
      var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2
    ) linear;
}
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .t-input { animation: none !important; transform: none !important; }
}

/* transitions.dev: success check */
.t-success-check {
  display: inline-block;
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity, filter;
}
.t-success-check svg { display: block; overflow: visible; }
/* The dash length is set from the real path length in booking.js. */
.t-success-check svg path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}
.t-success-check[data-state="in"] {
  animation:
    t-check-fade   var(--check-opacity-dur) var(--check-ease-opacity) forwards,
    t-check-rotate var(--check-rotate-dur)  var(--check-ease-rotate)  forwards,
    t-check-blur   var(--check-blur-dur)    var(--check-ease-out)     forwards,
    t-check-bob    var(--check-bob-dur)     var(--check-ease-bob)     forwards;
}
.t-success-check[data-state="in"] svg path {
  animation: t-check-draw var(--check-path-dur) var(--check-ease-path) var(--check-path-delay, 0ms) forwards;
}
@keyframes t-check-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-check-rotate {
  from { transform: rotate(var(--check-rotate-from)); }
  to   { transform: rotate(0deg); }
}
@keyframes t-check-blur {
  from { filter: blur(var(--check-blur-from)); }
  to   { filter: blur(0); }
}
@keyframes t-check-bob {
  from { translate: 0 var(--check-y-amount); }
  to   { translate: 0 0; }
}
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .t-success-check { animation: none !important; opacity: 1; }
  .t-success-check svg path { animation: none !important; stroke-dashoffset: 0 !important; }
}

/* The dialog itself */
html.booking-open { overflow: hidden; }

.booking {
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(29, 31, 43, 0.24);
}
.booking::backdrop {
  background: rgba(29, 31, 43, 0.45);
  opacity: 0;
  transition: opacity var(--modal-open-dur) var(--modal-ease);
}
.booking.is-open::backdrop { opacity: 1; }
.booking.is-closing::backdrop { opacity: 0; transition-duration: var(--modal-close-dur); }
@media (prefers-reduced-motion: reduce) {
  .booking::backdrop { transition: none; }
}

.booking-panel { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.booking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.booking-head-text { display: flex; flex-direction: column; gap: 4px; }
.booking-close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -10px -10px 0 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.booking-close:hover { background: var(--plate); color: var(--ink); }
.booking-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.booking-form { display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field + .field { margin-top: 4px; }
.field label { font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.field label .optional { font-weight: 400; color: var(--muted); }
.field .t-input { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.field .t-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(61, 82, 213, 0.18); }
.field .t-input.is-error { border-color: var(--danger); }
.field input, .field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
  letter-spacing: inherit;
  outline: none;
  appearance: none;
}
.field select {
  padding-right: 36px;
  background: no-repeat right 12px center / 12px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%236b6e78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
}
/* The message line is always reserved, so a field never jumps when its error appears. */
.field .t-error-msg { min-height: 16px; font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.booking-send-error { color: var(--danger); padding-bottom: 12px; }
.booking-submit { justify-content: center; width: 100%; margin-top: 8px; }
.booking-submit:disabled { opacity: 0.7; cursor: default; }

.booking-done { align-items: flex-start; }
.booking-check {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--ok-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.booking-check svg { width: 28px; height: 28px; }
.booking-check path { stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.booking-done .btn { margin-top: 8px; }
.booking [hidden] { display: none; }
