/* Demo viewer and the compact mobile menu control. */
.demo-trigger { cursor: pointer; font-family: inherit; }
.demo-trigger .icon { width: 18px; height: 18px; }
html.demo-open { overflow: hidden; scrollbar-gutter: stable; }
.demo-modal {
  position: fixed; inset: 0; margin: auto; padding: 0;
  width: calc(100vw - 32px); height: calc(100svh - 32px);
  max-width: none; max-height: none; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); border-radius: 24px;
  background: #101010; color: #fff;
  box-shadow: 0 32px 100px rgba(0,0,0,.35);
}
.demo-modal::backdrop { background: rgba(11,11,11,.78); backdrop-filter: blur(16px); }
/* Our own player over a YouTube frame (controls=0): the frame keeps the video's own shape,
   centred like object-fit: contain; a transparent button on top takes every click, so
   YouTube never gets the pointer and shows none of its own bars. */
.demo-player { position: absolute; inset: 0; border-radius: inherit; }
.demo-player__frame {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; overflow: hidden;
  width: min(100%, calc((100svh - 32px) * 16 / 9)); aspect-ratio: 16 / 9;
}
.demo-modal.is-vertical .demo-player__frame { width: min(100%, calc((100svh - 32px) * 9 / 16)); aspect-ratio: 9 / 16; }
.demo-player__frame > div { display: block; width: 100%; height: 100%; }
/* The YouTube frame is taller than the visible box: its title row, logos, progress bar and
   the like / share column of the phone layout are anchored to the frame's edges, so they sit
   in the cut-off strips above and below the picture (the video itself is centred and fits
   the width). 200 px each side: the phone column reaches 160 px up from the frame's bottom. */
.demo-player__frame iframe { position: absolute; left: 0; top: -200px; display: block; width: 100%; height: calc(100% + 400px); border: 0; }
/* While the player warms up before the first click: open for layout (the frame has its real
   size, so YouTube buffers at the right quality) but invisible, untouchable and inert. */
.demo-modal.is-preload { visibility: hidden; pointer-events: none; }
.demo-player__hit {
  position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer;
}
.demo-player__hit:focus-visible { outline: 2px solid var(--lime); outline-offset: -4px; }
/* Until the first frame plays: our dark cover with our play button. Taps go through it to
   YouTube (iPhone starts sound only from a tap inside the player); then the button above rules. */
.demo-player__cover {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: #101010; pointer-events: none; transition: opacity .35s var(--ease), visibility .35s;
}
.demo-modal.is-waiting .demo-player__hit { pointer-events: none; }
.demo-modal:not(.is-waiting):not(.is-ended) .demo-player__cover { opacity: 0; visibility: hidden; }
.demo-player__play {
  display: grid; place-items: center; width: 84px; height: 84px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  background: rgba(20,20,20,.5); backdrop-filter: blur(16px); color: #fff;
}
.demo-player__play svg { width: 30px; height: 30px; margin-left: 4px; }
.demo-modal__state {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center;
  width: 84px; height: 84px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  background: rgba(20,20,20,.5); backdrop-filter: blur(16px);
  color: #fff; opacity: 0; transform: translate(-50%,-50%) scale(.88);
  transition: opacity .22s var(--ease), transform .3s var(--ease); pointer-events: none;
}
.demo-modal__state svg { width: 30px; height: 30px; }
/* The disc is solid: YouTube's own 56 px play/pause icon sits underneath for a few seconds
   after every start, resume, seek and pause, and must never shine through. */
.demo-modal.is-paused .demo-modal__state,
.demo-modal.is-masking:not(.is-waiting):not(.is-ended) .demo-modal__state { opacity: 1; transform: translate(-50%,-50%) scale(1); background: #141414; }
/* It appears at once (YouTube's icon must never show through a fade-in); it still fades out. */
.demo-modal.is-masking .demo-modal__state { transition: none; }
.demo-modal__close {
  position: absolute; z-index: 3; top: 20px; right: 20px; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%; background: rgba(20,20,20,.65); backdrop-filter: blur(16px);
  color: #fff; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease);
}
.demo-modal__close:hover { background: #262626; transform: rotate(90deg); }
.demo-modal__close svg { width: 22px; height: 22px; }
.demo-modal__close:focus-visible { outline-color: var(--lime); }
.demo-modal__error {
  position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 28px; margin: 0;
  text-align: center; font-size: 16px; pointer-events: none;
}
.menu-icon { position: relative; display: block; width: 20px; height: 16px; }
.menu-icon span {
  position: absolute; right: 0; top: 4px; width: 20px; height: 1.5px;
  background: currentColor; border-radius: 2px; transform-origin: center;
  transition: width .25s var(--ease), transform .25s var(--ease);
}
.menu-icon span:last-child { top: 11px; width: 14px; }
.topbar__toggle[aria-expanded="true"] .menu-icon span:first-child { transform: translateY(3.5px) rotate(45deg); }
.topbar__toggle[aria-expanded="true"] .menu-icon span:last-child { width: 20px; transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 900px) {
  .topbar__nav {
    background: var(--surface);
    box-shadow: 0 16px 40px -20px rgba(0,0,0,.2);
  }
  .topbar__toggle {
    width: 46px; height: 44px; border-radius: 16px;
    border: 1px solid rgba(11,11,11,.09); background: rgba(255,255,255,.8);
    box-shadow: 0 2px 8px rgba(0,0,0,.035);
  }
}
@media (max-width: 760px) {
  .hero__actions .demo-trigger, .topbar__nav > .pill { display: none; }
  .hero__actions { margin-top: 0; }
  .demo-modal { width: calc(100vw - 16px); height: calc(100svh - 16px); border-radius: 20px; }
  .demo-modal__close { top: 12px; right: 12px; }
  .demo-player__frame { width: min(100%, calc((100svh - 16px) * 16 / 9)); }
  .demo-modal.is-vertical .demo-player__frame { width: min(100%, calc((100svh - 16px) * 9 / 16)); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-modal__state, .demo-modal__close, .demo-player__cover, .menu-icon span { transition: none; }
}

/* A quiet header action appears with the frosted header; the menu gets a lighter demo row. */
.topbar__nav .header-demo { gap: 9px; }
.header-demo__play { display: grid; place-items: center; flex: none; }
.header-demo__copy { display: grid; text-align: left; }
.header-demo__copy small, .header-demo__arrow { display: none; }
@media (min-width: 901px) {
  .topbar {
    transition: background-color .65s var(--ease), backdrop-filter .65s var(--ease), height .65s var(--ease);
  }
  .topbar__brand { transition-duration: .6s; }
  .topbar__nav .header-demo {
    flex: none; width: 0; min-width: 0; padding-inline: 0; border-width: 0;
    margin-inline-start: -28px; overflow: hidden;
    opacity: 0; visibility: hidden; pointer-events: none; translate: 0 0;
    transition: width .78s cubic-bezier(.4,0,.2,1), padding-inline .78s cubic-bezier(.4,0,.2,1),
      margin-inline-start .78s cubic-bezier(.4,0,.2,1), opacity .5s var(--ease),
      background-color .2s var(--ease), visibility 0s .78s;
  }
  .topbar.is-scrolled .header-demo {
    width: 138px; padding-inline: 20px; margin-inline-start: 0;
    opacity: 1; visibility: visible; pointer-events: auto;
    transition-delay: 0s, 0s, 0s, .12s, 0s, 0s;
  }
  .topbar__nav .header-demo__play, .topbar__nav .header-demo__copy {
    opacity: 0; translate: 8px 0;
    transition: opacity .16s var(--ease), translate .4s var(--ease);
  }
  .topbar__nav .header-demo__play { scale: .85; transition: opacity .16s var(--ease), translate .4s var(--ease), scale .4s var(--ease); }
  .topbar.is-scrolled .header-demo__play, .topbar.is-scrolled .header-demo__copy {
    opacity: 1; translate: 0 0; scale: 1;
  }
  .topbar.is-scrolled .header-demo__play { transition-delay: .34s; }
  .topbar.is-scrolled .header-demo__copy { transition-delay: .46s; }
}
@media (max-width: 900px) {
  .topbar__nav { max-height: calc(100svh - 88px); overflow-y: auto; overscroll-behavior: contain; }
  .topbar__nav .header-demo {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; gap: 14px;
    width: 100%; height: auto; min-height: 76px; margin-top: 12px; padding: 14px 16px;
    border: 1px solid var(--line); border-radius: 20px;
    background: var(--surface-raised); color: var(--ink); text-align: left;
    font-size: 18px; line-height: 1.2; letter-spacing: -.02em;
  }
  .topbar__nav .header-demo:hover { background: #fff; }
  .header-demo__play { width: 40px; height: 40px; border-radius: 50%; background: var(--lime); }
  .header-demo__play .icon { width: 18px; height: 18px; }
  .header-demo__copy { gap: 5px; }
  .header-demo__copy small { display: block; color: var(--ink-2); font-size: 14px; letter-spacing: 0; }
  .header-demo__arrow { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar__nav .header-demo { transition: none; }
}

/* Contact card: a poster of the demo that opens the same player */
.intro-demo {
  position: relative; display: block; width: 100%; max-width: 460px; margin-top: 24px; padding: 0;
  overflow: hidden; border: 0; border-radius: 20px; background: #f1f1f1; color: #fff; text-align: left;
}
.intro-demo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: scale .6s var(--ease); }
.intro-demo::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to bottom, transparent, rgba(11,11,11,.88) 70%); pointer-events: none; }
.intro-demo__label {
  position: absolute; left: 12px; right: 16px; bottom: 12px; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  font-size: 17px; font-weight: 500; letter-spacing: -.01em;
}
.intro-demo__play {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--lime); color: var(--ink); transition: scale .3s var(--ease);
}
.intro-demo__play svg { width: 18px; height: 18px; margin-left: 2px; }
.intro-demo__label small { margin-left: auto; font-size: 14px; font-weight: 400; color: rgba(255,255,255,.8); white-space: nowrap; }
.intro-demo:hover img { scale: 1.03; }
.intro-demo:hover .intro-demo__play { scale: 1.08; }
.intro-demo:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
@media (max-width: 760px) {
  .intro-demo { max-width: none; margin-top: 22px; border-radius: 22px; }
}
