/* T10 · Responsive / mobile refinement
   Extends the approved Desktop Cinematic Command without changing its desktop art direction. */

/* Product evidence ------------------------------------------------------ */
.screen-picture {
  display: block;
  overflow: hidden;
  width: 100%;
  background: #eef3fb;
}
.screen-picture source { display: none; }
.screen-picture img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}
.browser-frame > .screen-picture,
.browser-frame--product > .screen-picture {
  border-radius: 0 0 inherit inherit;
}
.screen-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.screen-zoom {
  position: absolute;
  z-index: 8;
  right: 13px;
  bottom: 13px;
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(17, 26, 46, .2);
  border-radius: 12px;
  color: #111a2e;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 9px 25px rgba(17, 35, 71, .16);
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.screen-zoom::before {
  content: "↗";
  margin-right: 6px;
  color: #245cff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
}
.screen-zoom span { font-size: 11px; font-weight: 850; }
.screen-zoom:hover { border-color: rgba(36, 92, 255, .42); transform: translateY(-1px); }
.screen-zoom:focus-visible,
.screen-tabs__list button:focus-visible,
.media-dialog__close:focus-visible,
.button--video:focus-visible {
  outline: 3px solid rgba(36, 92, 255, .34);
  outline-offset: 3px;
}
.capability__visual::before,
.product-stage::before,
.product-stage::after { pointer-events: none; }
.capability__visual > * { position: relative; z-index: 2; }

.product-stage--wide .screen-picture img {
  aspect-ratio: 1.974 / 1;
  object-fit: cover;
  object-position: center top;
}
.capability__visual .screen-picture img {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
}
.capability__visual--farpost .screen-picture img {
  aspect-ratio: 1070 / 610;
  object-fit: cover;
  object-position: center top;
}

.screen-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}
.screen-actions--split { align-items: flex-start; }
.screen-hint {
  max-width: 620px;
  margin: 0;
  color: #66728a;
  font-size: 12px;
  line-height: 1.5;
}
.capability:nth-child(even) .screen-hint { color: #c9d5ee; }
.button--video {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid rgba(36, 92, 255, .23);
  border-radius: 13px;
  color: #173fbd;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(13, 32, 70, .1);
  font-weight: 850;
}
.button--video::before {
  content: "▶";
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #245cff;
  font-size: 9px;
  text-indent: 2px;
}
.button--video > span {
  margin-left: 2px;
  color: #68738a;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.capability:nth-child(even) .button--video {
  border-color: rgba(255,255,255,.2);
  color: #fff;
  background: rgba(255,255,255,.09);
  box-shadow: none;
}
.capability:nth-child(even) .button--video > span { color: #b9c8e5; }

/* Analytics tabs -------------------------------------------------------- */
.analytics-showcase { display: grid; align-content: start; }
.screen-tabs { position: relative; min-width: 0; }
.screen-tabs__list {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 5px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1px solid rgba(36, 92, 255, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 28px rgba(23, 44, 88, .08);
}
.screen-tabs__list button {
  min-height: 44px;
  padding: 9px 18px;
  border: 0;
  border-radius: 10px;
  color: #56627a;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}
.screen-tabs__list button.is-active {
  color: #fff;
  background: #245cff;
  box-shadow: 0 8px 18px rgba(36, 92, 255, .25);
}
.screen-tabs__panel[hidden] { display: none !important; }

/* Navigation ------------------------------------------------------------ */
.nav-backdrop {
  display: none;
  position: fixed;
  z-index: 990;
  inset: var(--header-height) 0 0;
  width: 100%;
  border: 0;
  background: rgba(7, 16, 35, .48);
  backdrop-filter: blur(3px);
}
.nav-backdrop[hidden] { display: none !important; }
body.dialog-open,
body.menu-open { overflow: hidden; }

/* Native media dialogs -------------------------------------------------- */
.media-dialog {
  width: min(94vw, 1320px);
  max-width: none;
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  color: #111a2e;
  background: #f5f8fd;
  box-shadow: 0 36px 120px rgba(3, 10, 27, .52);
}
.media-dialog::backdrop { background: rgba(5, 12, 27, .82); backdrop-filter: blur(8px); }
.media-dialog__shell { display: grid; max-height: 92dvh; grid-template-rows: auto minmax(0, 1fr) auto; }
.media-dialog__header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px 12px 22px;
  border-bottom: 1px solid #dce4f1;
  background: #fff;
}
.media-dialog__header h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.media-dialog__close {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7dfec;
  border-radius: 13px;
  color: #111a2e;
  background: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}
.media-dialog__viewport {
  overflow: auto;
  min-height: 0;
  padding: 18px;
  background:
    linear-gradient(rgba(36, 92, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 92, 255, .04) 1px, transparent 1px),
    #edf2fa;
  background-size: 24px 24px;
  overscroll-behavior: contain;
}
.media-dialog__viewport img {
  display: block;
  width: auto;
  min-width: min(100%, 980px);
  max-width: none;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(19, 38, 79, .18);
}
.media-dialog__note {
  margin: 0;
  padding: 11px 22px calc(11px + env(safe-area-inset-bottom));
  border-top: 1px solid #dce4f1;
  color: #66728a;
  background: #fff;
  font-size: 11px;
}
.media-dialog--video { width: min(94vw, 1160px); color: #fff; background: #09152f; }
.media-dialog--video .media-dialog__header,
.media-dialog--video .media-dialog__note { color: #fff; border-color: rgba(255,255,255,.12); background: #0b1834; }
.media-dialog--video .media-dialog__close { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.bidder-demo-video { display: block; width: 100%; max-height: calc(92dvh - 120px); background: #050b19; }

/* Tablet ---------------------------------------------------------------- */
@media (max-width: 980px) {
  .nav-backdrop:not([hidden]) { display: block; }
  .site-header { padding-top: env(safe-area-inset-top); height: calc(var(--header-height) + env(safe-area-inset-top)); }
  .site-nav { top: calc(var(--header-height) + env(safe-area-inset-top)); inset-block-start: calc(var(--header-height) + env(safe-area-inset-top)); }
  .nav-backdrop { top: calc(var(--header-height) + env(safe-area-inset-top)); inset-block-start: calc(var(--header-height) + env(safe-area-inset-top)); }
  .site-nav.is-open {
    max-height: min(520px, calc(100dvh - var(--header-height) - env(safe-area-inset-top)));
    overflow-y: auto;
    padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
    box-shadow: 0 24px 55px rgba(17, 35, 71, .18);
  }
  .site-nav a { min-height: 48px; display: flex; align-items: center; }
  .capability__visual,
  .capability--right .capability__visual { padding-right: 0; padding-left: 0; }
  .screen-actions { width: 100%; }
  .docs-toc,
  .legal-toc { overflow-x: auto; scroll-snap-type: x proximity; }
  .docs-toc a,
  .legal-toc a { scroll-snap-align: start; }
}

/* Mobile ---------------------------------------------------------------- */
@media (max-width: 760px) {
  html { scroll-padding-top: calc(var(--header-height) + env(safe-area-inset-top) + 10px); }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-header__inner {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .menu-button { min-width: 46px; min-height: 46px; border-radius: 14px; }
  .brand { min-height: 44px; }
  .brand__logo { width: 158px; }

  /* Mobile keeps Cinematic Command but removes fragile perspective. */
  .cinematic-page .hero::after { pointer-events: none; }
  .product-stage--wide .screen-picture img {
    aspect-ratio: 1.15 / 1;
    object-fit: cover;
    object-position: center top;
  }
  .screen-zoom {
    right: 8px;
    bottom: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 10px;
  }
  .screen-zoom span { display: none; }
  .screen-zoom::before { margin: 0; font-size: 14px; }

  .capability__visual .screen-picture {
    max-height: min(66dvh, 600px);
    overflow: hidden;
  }
  .capability__visual .screen-picture img {
    width: 100%;
    min-height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center top;
  }
  .capability__visual--scout .screen-picture img { object-position: left top; }
  .capability__visual--bidder .screen-picture img { object-position: center top; }
  .capability__visual--analytics .screen-picture img { object-position: left top; }
  .capability__visual--farpost .screen-picture img {
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center top;
  }
  .screen-actions,
  .screen-actions--split { display: grid; align-items: stretch; gap: 12px; }
  .screen-actions .button { width: 100%; }
  .screen-hint { font-size: 11px; }
  .button--video { width: 100%; justify-content: center; }

  .screen-tabs__list { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-tabs__list button { padding-inline: 10px; }
  .analytics-showcase { min-width: 0; }
  .context-tags { position: static; margin-top: 12px; }

  /* Preserve the selected dark/light cadence on compact screens. */
  .cinematic-command .capability:nth-child(even) {
    color: #fff;
    border-color: rgba(255,255,255,.12);
    background:
      radial-gradient(circle at 12% 5%, rgba(36,92,255,.5), transparent 34%),
      radial-gradient(circle at 96% 90%, rgba(255,138,52,.14), transparent 26%),
      linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
      #0c1b3b;
    background-size: auto, auto, 28px 28px, 28px 28px, auto;
  }
  .cinematic-command .capability:nth-child(even) .capability__copy > p:not(.module-label),
  .cinematic-command .capability:nth-child(even) .check-list li { color: #cbd7ed; }
  .cinematic-command .capability:nth-child(even) .module-label { color: #fff; }

  .founder__photo picture,
  .founder__photo picture img { min-height: inherit; }
  .founder__photo picture img { object-fit: cover; object-position: 55% 44%; }

  .consent label { min-height: 44px; align-items: flex-start; padding-block: 5px; }
  .consent input { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; }
  .billing-switch button { min-height: 48px; }
  .material-card,
  .contact-card,
  .price-card { scroll-margin-top: calc(var(--header-height) + 12px); }

  .site-footer__links { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
  .site-footer__links a { display: flex; min-height: 44px; align-items: center; }
  .site-footer__bottom { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .mobile-trial-bar {
    min-height: calc(68px + env(safe-area-inset-bottom));
    height: auto;
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }
  body.menu-open .mobile-trial-bar,
  body.dialog-open .mobile-trial-bar { transform: translateY(112%); opacity: 0; pointer-events: none; }

  /* Dialogs become stable full-screen workspaces on phones. */
  .media-dialog {
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .media-dialog__shell { max-height: 100dvh; height: 100dvh; padding-top: env(safe-area-inset-top); }
  .media-dialog__header { min-height: 60px; padding: 8px max(12px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
  .media-dialog__header h2 { font-size: 15px; }
  .media-dialog__close { width: 44px; height: 44px; flex-basis: 44px; }
  .media-dialog__viewport { padding: 12px; }
  .media-dialog__viewport img { min-width: 920px; border-radius: 9px; }
  .media-dialog__note { padding-right: max(14px, env(safe-area-inset-right)); padding-left: max(14px, env(safe-area-inset-left)); }
  .bidder-demo-video { align-self: center; max-height: calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }

  /* Inner pages: readable mobile table-of-contents and product images. */
  .inner-hero__meta { padding: 22px; }
  .inner-actions { display: grid; }
  .inner-actions .button { width: 100%; }
  .docs-toc,
  .legal-toc {
    display: flex;
    position: sticky;
    z-index: 20;
    top: calc(var(--header-height) + env(safe-area-inset-top));
    gap: 8px;
    overflow-x: auto;
    width: 100%;
    margin-inline: 0;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #dce4f1;
    border-radius: 0;
    background: rgba(245,248,253,.96);
    box-shadow: 0 8px 18px rgba(17,35,71,.06);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }
  .docs-toc::-webkit-scrollbar,
  .legal-toc::-webkit-scrollbar { display: none; }
  .docs-toc > strong,
  .legal-toc > strong { display: none; }
  .docs-toc a,
  .legal-toc a {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 42px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #dce4f1;
    border-radius: 999px;
    color: #344058;
    background: #fff;
    text-decoration: none;
  }
  .prose { min-width: 0; }
  .prose figure.browser-frame > img { aspect-ratio: 1.1 / 1; object-fit: cover; object-position: center top; }
}

@media (max-width: 430px) {
  .screen-tabs__list { gap: 4px; padding: 4px; }
  .screen-tabs__list button { font-size: 11px; }
  .site-footer__links { grid-template-columns: 1fr; }
  .media-dialog__viewport img { min-width: 820px; }
}

/* Landscape phones: preserve content access and avoid a trapped hero. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 980px) {
  .site-nav.is-open { max-height: calc(100dvh - var(--header-height) - env(safe-area-inset-top)); }
  .hero { padding-top: 28px; }
  .hero h1 { max-width: 760px; font-size: clamp(36px, 7vw, 52px); }
  .hero__summary { margin-top: 12px; }
  .hero__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; margin-inline: auto; }
  .product-stage--wide { margin-top: 28px; }
  .media-dialog__header { min-height: 52px; }
  .media-dialog__close { width: 40px; height: 40px; flex-basis: 40px; }
  .bidder-demo-video { max-height: calc(100dvh - 96px); }
  .mobile-trial-bar { min-height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-zoom:hover { transform: none; }
  .media-dialog::backdrop { backdrop-filter: none; }
}

/* T12 · Revision 02 — Bidder video note alignment.
   Keep the explanatory copy on its own row so it cannot collapse into a
   narrow vertical column beside the video button. */
.capability__visual--bidder .screen-actions--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  width: 100%;
}
.capability__visual--bidder .screen-hint {
  width: 100%;
  max-width: none;
  padding-inline: 4px;
}
@media (min-width: 981px) {
  .capability__visual--bidder .button--video {
    width: min(100%, 360px);
    justify-self: end;
    justify-content: center;
  }
}
@media (max-width: 980px) {
  .capability__visual--bidder .button--video {
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }
}


/* T12 · Revision 03 — Analytics overview screen. */
.screen-tabs__panel--overview .screen-picture img {
  aspect-ratio: 1135 / 965;
  object-fit: contain;
  object-position: center top;
  background: #f4f7fb;
}
@media (max-width: 430px) {
  .screen-tabs__list button { padding-inline: 6px; }
}
