/* aviate skin, part b: page-specific rules
   Owner: integrator B. Loaded after aviate-skin.css on legacy pages.
   Scope: closing CTA cards (incl. the 4-link variant), trust strip
   marquee, related pages, sticky CTA, pricing chart, billing-operations
   hero demo window. Reference: aviate-landing.css (avl:LINE). */

/* ================================================================
   1. Closing CTA with the 4-link grid (.cta_component:has(.cta-grid))
   /aviate has one centred CTA card (avl:1549-1623). The legacy layout
   (copy left + 2x2 links right, inside one dark card) becomes:
     - a row of four /aviate link cards (white, radius 20, round arrow)
     - directly above (spec 6.5) the centred #eff4ff CTA card with the
       cta-bg.svg glow, 72px logo tile, 48/60 title, buttons.
   CSS only: .cta_component turns into a transparent flex column and
   .cta_content becomes the card. Works unchanged on every template
   that uses the shared markup (14 templates).
   ================================================================ */
.page-wrapper .cta_component:has(.cta-grid) {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 0;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: none;
  text-align: center;
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 540px;
  padding: var(--space-3xl) var(--space-xl);
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background-color: var(--color-primary-25);
  background-image: url("../images/aviate-landing/cta-bg.svg");
  background-position: 50% 0;
  background-repeat: no-repeat;
  background-size: 1280px 540px;
  text-align: center;
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Gaps as .avl-cta__content (32px) and .avl-cta__text (16px) */
.page-wrapper .cta_component:has(.cta-grid) > .cta_content .space-medium {
  height: var(--space-lg);
  min-height: 0;
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content .space-small {
  height: var(--space-xs);
  min-height: 0;
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content .space-xxlarge {
  height: var(--space-lg);
  min-height: 0;
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content :is(.heading-medium, .heading-large) {
  max-width: 900px;
  font-weight: var(--font-weight-semibold);
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content :is(.text-size-large, .is--light) {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--font-size-16);
  line-height: var(--line-height-22);
}

.page-wrapper .cta_component:has(.cta-grid) > .cta_content .button-row {
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* 72px white logo tile (.avl-cta__mark) */
.page-wrapper .cta_component:has(.cta-grid) > .cta_content > div > img:first-child {
  display: block;
  width: 72px;
  height: 72px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: var(--color-neutral-0);
  box-shadow: var(--shadow-badge);
  object-fit: contain;
}

/* /aviate CTA mark: the multicolour Kill Bill logomark on the white
   tile (cta-logomark.svg) instead of the dark-square PNG emblem */
.page-wrapper :is(.cta_component, .section-cta, .section-aviate-cta) img[src*="logo-emblem"] {
  content: url("../images/aviate-landing/cta-logomark.svg");
  width: 72px;
  height: 72px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: var(--color-neutral-0);
  box-shadow: var(--shadow-badge);
  object-fit: contain;
  /* Webflow IX leaves the emblem at inline opacity 0 */
  opacity: 1 !important;
  transform: none !important;
}

/* The link row: four cards above the CTA card */
.page-wrapper .cta_component > .cta-grid {
  order: -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto;
  gap: var(--space-xs);
  width: 100%;
  min-height: 0;
  text-align: left;
}

.page-wrapper .contact_cta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xs);
  text-align: left;
}

/* Link card = .avl-billing__card without media: white, radius 20,
   #e8e9eb outline, round arrow; whole card clickable; hover outline
   #528bff, raised, 2px lift (avl:1060-1126) */
.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 0;
  padding: var(--space-md);
  border: 0;
  border-radius: var(--radius-xl);
  background-color: var(--color-neutral-0);
  outline: 1px solid var(--color-outline-primary);
  outline-offset: -1px;
  box-shadow: none;
  transform: none;
  transition:
    outline-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap:hover,
.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap:focus-within {
  background-color: var(--color-neutral-0);
  outline-color: var(--color-primary-300);
  box-shadow: var(--shadow-raised);
  transform: translateY(-2px);
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap > img {
  width: 48px;
  height: 48px;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .space-small {
  height: var(--space-sm);
  min-height: 0;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .space-xxsmall {
  height: 6px;
  min-height: 0;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .heading-xxsmall {
  margin: 0;
  font-size: var(--font-size-20);
  line-height: var(--line-height-26);
  font-weight: var(--font-weight-medium);
  color: var(--color-on-surface-primary);
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap :is(.text-size-small, .text-size-medium, .is--light) {
  max-width: none;
  margin: 0;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  color: var(--color-on-surface-secondary);
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .button-row {
  margin-top: auto;
  justify-content: flex-start;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .button-link {
  position: static;
  gap: 6px;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  text-decoration: none;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .button-link .button-icon {
  display: none;
}

/* Stretched link: the whole card is the hit area */
.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .button-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .button-link:focus-visible {
  outline: none;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap:has(.button-link:focus-visible) {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* .avl-round-icon with the up-right arrow, top-right of the card */
.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap::after {
  content: "";
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23475467' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") no-repeat 50% 50% / 18px 18px,
    var(--color-neutral-0);
  box-shadow: var(--shadow-tile);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap:hover::after {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") no-repeat 50% 50% / 18px 18px,
    var(--color-neutral-900);
  transform: rotate(45deg);
}

/* contact-us: the link row sits under the form, 112px rhythm */
.page-wrapper .contact_cta-grid {
  margin-bottom: var(--skin-section-y, 7rem);
}

/* ================================================================
   2. Trust strip (_trust_strip.html.erb) = .avl-marquee (avl:347-395)
   1160px, 80px tall, 96px edge fade, 160x48 logos on a 200px pitch,
   #475467 logos, 40px/s loop, pauses on hover.
   ================================================================ */
.page-wrapper .trust-strip {
  padding: var(--space-xs) 0 0;
  background: transparent;
  border: 0;
}

.page-wrapper .trust-strip .trust-strip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xs);
  padding: 0;
  border: 0;
}

.page-wrapper .trust-strip .trust-strip__label {
  margin: 0;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
  font-weight: var(--font-weight-medium);
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  color: var(--color-on-surface-tertiary);
}

.trust-marquee {
  --marquee-pitch: 200px;
  --marquee-logo-width: 160px;
  --marquee-logo-height: 48px;
  --marquee-duration: 40s;
  --marquee-fade: 96px;
  position: relative;
  width: 100%;
  max-width: 1160px;
  height: 80px;
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
}

.page-wrapper .trust-marquee__track {
  display: flex;
  width: max-content;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: trust-marquee-scroll var(--marquee-duration) linear infinite;
  will-change: transform;
}

.trust-marquee:hover .trust-marquee__track {
  animation-play-state: paused;
}

.page-wrapper .trust-marquee__item {
  display: flex;
  flex: none;
  align-items: center;
  width: var(--marquee-pitch);
  margin: 0;
  padding: 0 0 0 calc((var(--marquee-pitch) - var(--marquee-logo-width)) / 2);
}

.page-wrapper .trust-marquee__item::before {
  content: none;
}

.page-wrapper .trust-marquee__item img {
  display: block;
  width: var(--marquee-logo-width);
  height: var(--marquee-logo-height);
  max-width: none;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

/* SureVoIP has no grey /aviate file: tint the grey-blue legacy file
   to the #475467 logo grey */
.page-wrapper .trust-marquee__item img[src*="surevoip"] {
  filter: grayscale(1) brightness(0.55) contrast(1.2);
}

@keyframes trust-marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-wrapper .trust-marquee__track {
    animation: none;
  }
}

/* ================================================================
   3. Closing CTA cards without links: make sure the content column
   uses the /aviate gaps (logo 32, title 16, text 32, buttons)
   ================================================================ */
.page-wrapper .cta_component:not(:has(.cta-grid)) .space-medium,
.page-wrapper :is(.section-cta, .section-aviate-cta) .space-medium {
  height: var(--space-lg);
  min-height: 0;
}

/* .section-cta (use-case, platform pages): /aviate card proportions,
   the 72px logomark tile (CSS-drawn, no markup), outline secondary */
.page-wrapper .section-cta .padding-vertical-xhuge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 540px;
  padding: var(--space-3xl) var(--space-xl);
}

.page-wrapper .section-cta .max-width-large {
  max-width: 900px;
}

.page-wrapper .section-cta .max-width-large:not(:has(img[src*="logo-emblem"]))::before,
.page-wrapper .section-aviate-cta .cta_content:not(:has(img))::before {
  content: "";
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-xl);
  background: url("../images/aviate-landing/cta-logomark.svg") no-repeat 50% 50% / 44px 44px, var(--color-neutral-0);
  box-shadow: var(--shadow-badge);
}

.page-wrapper .section-aviate-cta .padding-vertical-large {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 476px;
}

.page-wrapper .section-aviate-cta .space-xlarge {
  height: var(--space-lg);
  min-height: 0;
}

.page-wrapper .section-cta .space-xsmall {
  height: var(--space-xs);
  min-height: 0;
}

.page-wrapper .section-cta .space-large {
  height: var(--space-lg);
  min-height: 0;
}

.page-wrapper .section-cta .text-size-large {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--font-size-16);
  line-height: var(--line-height-22);
}

.page-wrapper :is(.section-cta, .section-aviate-cta, .cta_component) .button-secondary-gray {
  background-color: var(--color-neutral-0);
  border-color: var(--color-neutral-100);
  color: var(--color-neutral-900);
}

.page-wrapper :is(.section-cta, .section-aviate-cta, .cta_component) .button-secondary-gray:hover {
  background-color: var(--color-neutral-25);
  color: var(--color-neutral-900);
}

@media (max-width: 768px) {
  .page-wrapper .section-cta .padding-vertical-xhuge {
    min-height: 0;
    padding: var(--space-4xl) var(--space-md) var(--space-2xl);
  }
}

/* ================================================================
   4. Related pages: /aviate section heading (40/50 600, centred)
   ================================================================ */
.page-wrapper .section_related .heading-medium {
  font-weight: var(--font-weight-semibold);
  color: var(--color-on-surface-primary);
}

.page-wrapper .section_related .rel-grid {
  max-width: 1280px;
  gap: var(--space-xs);
}

.page-wrapper .section_related .rel-card {
  min-height: 168px;
}

/* ================================================================
   5. Sticky CTA: header pill (chrome:80-90): 50% white glass, blur,
   #e8e9eb outline, 16px radius; black "Try sandbox" pill
   ================================================================ */
.sticky-cta {
  border-radius: var(--radius-lg);
  background-color: rgb(255 255 255 / 72%);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
}

.sticky-cta__inner {
  gap: var(--space-xs);
  padding: var(--space-3xs) var(--space-3xs) var(--space-3xs) var(--space-xs);
}

.sticky-cta__text {
  font-weight: var(--font-weight-medium);
  color: var(--color-on-surface-primary);
}

.page-wrapper .sticky-cta__button.button {
  height: 38px;
  padding: 0 var(--space-xs);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-medium);
}

.sticky-cta__close {
  color: var(--color-on-surface-secondary);
  border-radius: var(--radius-pill);
}

/* ================================================================
   6. Pricing chart (pricing.html.erb .pr-fig) = /aviate .avl-chart on
   the dark card (avl:464-623): #0b0d12, radius 24, white 8% frame,
   orange share line, light-blue fixed line with blue glow, blue
   difference area, white-3% "before break-even" zone, dashed marker.
   ================================================================ */
.page-wrapper .main-wrapper figure.pr-fig {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--space-xl);
  border: 0;
  border-radius: var(--radius-2xl);
  background: var(--color-neutral-900);
  box-shadow: none;
}

.page-wrapper .main-wrapper figure.pr-fig svg {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.page-wrapper .main-wrapper figure.pr-fig figcaption {
  max-width: 560px;
  margin: var(--space-md) auto 0;
  font-size: var(--font-size-12);
  line-height: var(--line-height-16);
  color: var(--color-neutral-300);
  text-align: center;
}

/* ================================================================
   7. Billing operations: Storylane demo in the hero window
   (.avl-hero__demo, avl:397-444) over the hero glow
   ================================================================ */
.page-wrapper .section_header.aviate-hero-section {
  --skin-glow-drop: 120px;
  --skin-glow-fade: 160px;
}

.page-wrapper .aviate-hero-section .max-width-large {
  max-width: 964px;
  margin-left: auto;
  margin-right: auto;
}

.page-wrapper .aviate-hero-section .heading-h1 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.page-wrapper .bo-hero-demo {
  position: relative;
  max-width: 1120px;
  margin: 53px auto 0;
  padding: 0 var(--space-3xs) var(--space-3xs);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 50%);
  outline: 1px solid var(--color-neutral-100);
  outline-offset: -1px;
  -webkit-backdrop-filter: blur(4px) saturate(1.6);
  backdrop-filter: blur(4px) saturate(1.6);
}

.page-wrapper .bo-hero-demo__bar {
  height: 44px;
  background: url("../images/aviate-landing/window-dots.svg") no-repeat var(--space-xs) 50% / 52px 12px;
}

.page-wrapper .bo-hero-demo .sl-embed {
  overflow: hidden;
  border-radius: var(--radius-lg);
  /* Poster while the Storylane demo loads (or if it is blocked): an
     Aviate screen, so the window is never empty */
  background: var(--color-neutral-25) url("../images/aviate-control-plane.png") no-repeat 0 0 / cover;
}

.page-wrapper .bo-hero-demo .sl-demo {
  border: 0 !important;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

/* ================================================================
   8. Responsive (avl breakpoints: 1024, 768, 480)
   ================================================================ */
@media (max-width: 1024px) {
  .page-wrapper .cta_component > .cta-grid,
  .page-wrapper .contact_cta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .page-wrapper .cta_component:has(.cta-grid) {
    padding: 0;
  }

  .page-wrapper .cta_component:has(.cta-grid) > .cta_content {
    min-height: 0;
    padding: var(--space-4xl) var(--space-md) var(--space-2xl);
    border-radius: var(--radius-xl);
    background-size: 900px auto;
  }

  .page-wrapper .cta_component:has(.cta-grid) > .cta_content .button-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .page-wrapper .cta_component:has(.cta-grid) > .cta_content .button-row :is(.button, .button-tertiary-gray_cta) {
    width: 100%;
  }

  .page-wrapper .cta_component > .cta-grid,
  .page-wrapper .contact_cta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-wrapper .contact_cta-grid {
    margin-bottom: 4rem;
  }

  .page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap {
    padding: var(--space-sm);
  }

  .page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap > img {
    width: 40px;
    height: 40px;
  }

  .page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap .space-small {
    height: var(--space-2xs);
  }

  .page-wrapper :is(.cta-grid, .contact_cta-grid) .cta_link-wrap::after {
    top: var(--space-sm);
    right: var(--space-sm);
  }

  .trust-marquee {
    --marquee-pitch: 150px;
    --marquee-logo-width: 120px;
    --marquee-logo-height: 36px;
    height: 64px;
  }

  .page-wrapper .main-wrapper figure.pr-fig {
    padding: var(--space-md) var(--space-xs);
    border-radius: var(--radius-xl);
  }

  .page-wrapper .bo-hero-demo {
    margin-top: var(--space-xl);
    padding: 0 var(--space-4xs) var(--space-4xs);
  }

  .page-wrapper .bo-hero-demo__bar {
    height: 32px;
    background-size: 40px 9px;
  }
}
