/* Scoped layout corrections for the original WebAzul homepage. */
.nav-links[hidden] { display:none!important; }

/* Explicit scene visibility also prevents transparent 3D layers painting in Safari. */
@media (min-height:591px) {
.motion-ready:not(.motion-paused) .intelligence-story[data-intel-view]:not([data-intel-view="orbit"]) .intel-orbit-camera,
.motion-ready:not(.motion-paused) .intelligence-story:is([data-intel-view="orbit"],[data-intel-view="live"]) .intel-browser,
.motion-ready:not(.motion-paused) .intelligence-story[data-intel-view]:not([data-intel-view="live"]) .intel-live-card { visibility:hidden; }
.motion-ready:not(.motion-paused) .intelligence-story[data-intel-view]:not([data-intel-view="integration"]) .intel-integration,
.motion-ready:not(.motion-paused) .intelligence-story[data-intel-view="integration"] .intel-example,
.intel-example[data-active="false"] { display:none; }
.intel-example[data-active="true"] { opacity:1; visibility:visible; transform:none; }
}

@media (min-width:1201px) {
  .intel-example { display:grid; grid-template-columns:minmax(0,.38fr) minmax(0,.62fr); grid-template-rows:48px minmax(0,1fr); }
  .intel-demo-nav { grid-column:1/-1; grid-row:1; height:auto; padding:0 20px; gap:12px; }
  .intel-context { grid-column:1; grid-row:2; position:relative; inset:auto; width:auto; min-height:0; padding:20px 16px; overflow:hidden; }
  .intel-context > strong { font-size:22px; line-height:1.12; margin:8px 0 12px; }
  .intel-web-context > p { font-size:12px; line-height:1.5; margin-bottom:14px; }
  .intel-web-context > div { padding:12px; margin-bottom:10px; transform:none; }
  .intel-web-context .icon { width:20px; height:20px; margin-bottom:8px; }
  .intel-web-context b { font-size:13px; }
  .intel-web-context div > span { font-size:11px; margin-top:5px; }
  .intel-local-map { max-height:190px; }
  .intel-shop-product { margin-top:14px; padding:12px; }
  .intel-shop-product > svg { width:100%; max-height:125px; }
  .intel-order-card { margin-top:14px; padding:12px; }
  .intel-chat-demo { grid-column:2; grid-row:2; position:relative; inset:auto; min-width:0; min-height:0; margin:20px 16px 20px 0; display:grid; grid-template-rows:50px minmax(0,1fr) 42px; }
  .intel-chat-head { height:auto; padding:8px 12px; gap:9px; }
  .intel-chat-head > span { width:32px; height:32px; flex-shrink:0; }
  .intel-chat-head .brand-vector { width:24px; }
  .intel-chat-head b { font-size:14px; }
  .intel-chat-head small { font-size:11px; line-height:1.2; }
  .intel-chat-conversation { position:relative; inset:auto; min-height:0; padding:12px; }
  .intel-chat-scroll { gap:10px; transform:translateY(calc(var(--intel-mobile-chat-scroll,0px) * -1)); }
  .intel-demo-welcome { font-size:12px; line-height:1.4; padding:9px; }
  .intel-user-message,.intel-answer-message { padding:10px; }
  .intel-user-message > small,.intel-answer-message > small { font-size:11px; margin-bottom:4px; }
  .intel-user-message > p,.intel-answer-message > p { font-size:12px; line-height:1.5; }
  .intel-demo-input { position:relative; inset:auto; height:auto; padding:7px 10px; }
}

/* Start below the measured heading; move into the map after its title fades. */
@media (min-height:591px) {
  .motion-ready:not(.motion-paused) .journey-intro { z-index:2; }
  .motion-ready:not(.motion-paused) .journey-map { z-index:1; }
  .motion-ready:not(.motion-paused) .journey-search { top:calc(var(--journey-safe-search-top,70) * 1%); }
}
@media (min-width:901px) and (min-height:591px) and (max-height:700px) {
  .motion-ready:not(.motion-paused) .journey-intro { top:20%; }
  .journey-intro .display { font-size:clamp(64px,7vw,90px); }
}

/* Let the browser header determine where its results begin at every size. */
.rank-browser {
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
}
.rank-browser > .acq-browser-chrome { grid-row:1; }
.rank-search-head { grid-row:2; min-width:0; }
.rank-depth {
  grid-row:3;
  position:relative;
  inset:auto;
  justify-self:end;
  margin:2px 12px;
  padding:0 8px;
  font-size:11px;
  line-height:1.2;
}
.rank-ascent { top:auto; bottom:22px; right:22px; }
.rank-customer { visibility:var(--rank-customer-visible,visible); }
.rank-browser > .rank-results {
  grid-row:4;
  position:relative;
  inset:auto;
  height:auto;
  min-height:0;
  margin:0 12px 6px;
}
.rank-stage { --rank-row:108px; }
.rank-result,.rank-target { height:104px; }

/* Opaque screens keep the previous shopping step from showing through. */
.sales-story[data-sale-view="admin"] :is(.sale-store,.sale-cart,.sale-checkout,.sale-paid),
.sales-story[data-sale-view="store"] :is(.sale-admin,.sale-checkout,.sale-paid),
.sales-story[data-sale-view="checkout"] :is(.sale-admin,.sale-store,.sale-cart,.sale-paid),
.sales-story[data-sale-view="paid"] :is(.sale-admin,.sale-store,.sale-cart,.sale-checkout),
.sales-story[data-cart-open="false"] .sale-cart { visibility:hidden; }
.sales-story[data-sale-view="admin"] .sale-admin,
.sales-story[data-sale-view="store"] .sale-store,
.sales-story[data-sale-view="checkout"] .sale-checkout,
.sales-story[data-sale-view="paid"] .sale-paid,
.sales-story[data-cart-open="true"] .sale-cart { opacity:1; }

/* The guide belongs in the navigation, clear of the scene artwork. */
body .story-playback {
  top:15px;
  max-width:calc(100% - 510px);
  box-shadow:none;
}

@media (min-width:901px) and (min-height:591px) {
  .motion-ready:not(.motion-paused) .story-connected .acq-copy .display {
    font-size:clamp(37px,3.65vw,55px);
  }
  .motion-ready:not(.motion-paused) .acq-copy-panels { margin-top:24px; }
  .motion-ready:not(.motion-paused) .acq-copy .acq-cta { margin-top:20px; }
  .motion-ready:not(.motion-paused) .acq-stage {
    width:min(100%,calc((100svh - var(--nav-h) - 56px) * 1.04));
  }
  .rank-result > strong { line-height:1.3; }
  .rank-result > p { line-height:1.4; }
  .rank-google { font-size:27px; line-height:1; margin-bottom:4px; }
  .rank-browser { top:86px; height:calc(100% - 186px); }
  .rank-visibility-pill { top:0; right:0; width:340px; }
  .rank-visibility-pill small { white-space:nowrap; letter-spacing:.03em; }
  .rank-visibility-pill b { max-width:none; line-height:1.3; }
  .rank-search-box { height:36px; }
  .rank-query-chips { margin-top:6px; }
  .rank-search-tabs { margin-top:7px; height:25px; }
}

/* Keep floating access to the real chat from covering the demo controls. */
body:has(.story-playback:not([hidden])) #waicc-toggle {
  width:52px;
  height:52px;
  min-width:52px;
  padding:0;
  justify-content:center;
}
body:has(.story-playback:not([hidden])) #waicc-toggle .waicc-toggle__label,
body:has(.story-playback:not([hidden])) #waicc-toggle .waicc-toggle__dot { display:none; }
body:has(.story-playback:not([hidden])) #waicc-toggle::before { content:none; }

@media (min-width:601px) and (max-width:900px) {
  body .story-playback { top:9px; max-width:calc(100% - 320px); }
}

@media (max-width:600px) {
  #waicc-toggle { width:52px; min-width:52px; height:52px; padding:0; justify-content:center; }
  #waicc-toggle .waicc-toggle__label,#waicc-toggle .waicc-toggle__dot { display:none; }
  #waicc-toggle::before { content:none; }
  body .story-playback {
    top:12px;
    left:auto;
    right:116px;
    translate:none;
    width:auto;
    max-width:none;
    padding:3px;
    gap:4px;
    border-radius:24px;
    background:#fff;
  }
  .story-playback .story-playback-ring,
  .story-playback .story-playback-copy { display:none; }
  .story-playback .story-playback-action { width:30px; height:30px; }
  .story-playback .story-repeat { margin-left:0; }
  .mobile-story-mode .story-connected .acq-copy .acq-cta {
    position:relative;
    inset:auto;
    font-size:13px!important;
    margin-top:14px;
    max-width:100%;
  }
  .mobile-story-mode .story-connected .acq-copy .acq-cta .icon { flex-shrink:0; }
  .rank-query-chips { flex-wrap:wrap; }
  .rank-search-tabs { gap:18px; }
  html.mobile-story-mode .story-connected .rank-stage { height:612px!important; }
  .mobile-story-mode .rank-browser { height:calc(100% - 217px); }
  .mobile-story-mode .rank-traffic { height:106px; }
  .mobile-story-mode .rank-ascent { top:auto; bottom:118px; right:12px; }
  html.mobile-story-mode .story-connected .perf-stage { height:674px!important; }
  .mobile-story-mode .perf-outcome { height:105px; }
}
@media (max-width:375px) { .site-nav .brand :is(img,.brand-header) { width:135px; } }
@media (max-width:340px) { .site-nav .brand :is(img,.brand-header) { width:110px; } }

@media (min-width:601px) and (min-height:591px) and (max-height:800px) {
  .arrival-enabled:not(.motion-paused) .arrival-final-copy { top:calc(36% - 24px); }
  .arrival-hero .arrival-final-copy h1 { font-size:clamp(42px,5vw,64px); line-height:1.08; }
  .arrival-final-copy > .lead { max-width:64ch; font-size:16px; line-height:1.6; margin-top:20px; }
  .arrival-final-copy .actions { margin-top:22px; }
  .arrival-final-copy .hero-proof { margin-top:18px; }
  .arrival-final-copy .arrival-scroll { margin-top:20px; }
}

/* Grid children may shrink without pushing adjacent columns off screen. */
:is(.acq-layout,.build-layout,.intel-layout,.sale-layout,.footer-grid) > * { min-width:0; }

@media (min-width:601px) and (min-height:591px) {
  .motion-ready:not(.motion-paused) .story-connected > :is(.acq-pin,.build-pin,.intel-pin,.sale-pin) > .container {
    transform:translateY(calc(var(--connected-lift,0px) * -1)) scale(var(--story-fit,1));
    transform-origin:center;
  }
}
