/* Shared website chrome. Page content styles remain in each page stylesheet. */
.site-shell {
  --home-font-family: 'MiSans VF', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-family: var(--home-font-family);
}
.site-shell button,
.site-shell input,
.site-shell select,
.site-shell textarea,
.site-shell .font-sans {
  font-family: var(--home-font-family);
}
/* Clickable controls share an explicit affordance across public pages. */
.site-shell a[href],
.site-shell button,
.site-shell [role='button'],
.site-shell [role='tab'],
.site-shell summary,
.site-shell select,
.site-shell label[for],
.site-shell input[type='button'],
.site-shell input[type='submit'],
.site-shell input[type='reset'],
.site-shell input[type='checkbox'],
.site-shell input[type='radio'],
.site-shell input[type='range'],
.site-shell input[type='file'],
.site-shell [data-country-close] {
  cursor: pointer;
}
.site-shell button:disabled,
.site-shell input:disabled,
.site-shell select:disabled,
.site-shell [aria-disabled='true'] {
  cursor: not-allowed;
}
.site-shell :focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 5px;
}
.site-shell a[href]:hover {
  text-decoration: none;
}
.site-shell #auth-panel #sms-phone:focus-visible,
.site-shell #auth-panel #sms-code:focus-visible {
  outline: none;
}

.site-shell:not([data-site-page='index']) #header-placeholder {
  min-height: 64px;
}
@media (max-width: 640px) {
  .site-shell:not([data-site-page='index']) #header-placeholder {
    min-height: 56px;
  }
}
/* 嵌入标记早于客户端接管生效，避免预渲染的官网导航占位短暂留白。 */
html.app-mode .site-shell #header-placeholder {
  display: none;
  min-height: 0;
}

/* Motion measurements from Apple's Home galleries and global navigation. */
.site-shell {
  --dialog-ease: cubic-bezier(.65, 0, .35, 1);
  --nav-motion: 320ms cubic-bezier(.4, 0, .6, 1);
  --card-motion: 300ms cubic-bezier(0, 0, .5, 1);
  --reveal-ease: cubic-bezier(.455, .03, .515, .955);
}
@supports (transition-timing-function: linear(0, 1)) {
  .site-shell {
    --dialog-ease: linear(0, .0005, .004, .0135, .032, .0625, .108, .1715, .256, .3645, .5, .6355, .744, .8285, .892, .9375, .968, .9865, .996, .9995, 1);
    /* Samples of easeInOutQuad, including its midpoint. */
    --reveal-ease: linear(0, .005, .02, .045, .08, .125, .18, .245, .32, .405, .5, .595, .68, .755, .82, .875, .92, .955, .98, .995, 1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-shell [data-revealed] {
    --enter-offset: none;
    --enter-opacity: 1;
  }
  .site-shell [data-revealed='false'] {
    --enter-offset: 0 30px;
    --enter-opacity: 0;
  }
  .site-shell [data-revealed] > :where(:not(.shop-products, [role='status'], .shop-catalog-actions)),
  .site-shell .shop-section[data-revealed] .shop-card {
    opacity: var(--enter-opacity);
    translate: var(--enter-offset);
    transition: opacity 900ms var(--reveal-ease), translate 700ms var(--reveal-ease);
    transition-delay: var(--enter-delay, 0ms);
  }
  .site-shell [data-revealed] > :nth-child(2),
  .site-shell .shop-section .shop-card:nth-child(4n + 1) { --enter-delay: 150ms; }
  .site-shell [data-revealed] > :nth-child(3),
  .site-shell .shop-section .shop-card:nth-child(4n + 2) { --enter-delay: 300ms; }
  .site-shell [data-revealed] > :nth-child(4),
  .site-shell .shop-section .shop-card:nth-child(4n + 3) { --enter-delay: 450ms; }
  .site-shell .shop-section .shop-card:nth-child(4n) { --enter-delay: 600ms; }
  .site-shell [data-revealed='false'] > *,
  .site-shell .shop-section[data-revealed='false'] .shop-card {
    transition-duration: 0s;
    transition-delay: 0s;
  }
  .site-shell [data-revealed]:focus-within > *,
  .site-shell [data-revealed] .shop-card:focus-within {
    transition-duration: 0s;
    transition-delay: 0s;
  }

  /* Common controls, including gallery arrows, checkout and account actions. */
  .site-shell :where(a[href], button, label, select, summary, input, textarea, [role='tab']),
  .site-shell :is(.transition, .transition-all, .transition-colors, .transition-opacity) {
    transition-property: color, background-color, border-color, opacity, box-shadow;
    transition-duration: 100ms;
    transition-timing-function: linear;
  }
  .site-shell .transition-transform {
    transition: transform var(--card-motion);
  }
  .site-shell .site-back-top {
    animation: site-fade-in var(--nav-motion);
  }
  .site-shell .home-media-play span {
    transition: opacity 100ms linear, transform 200ms ease;
  }
  .site-shell .home-media-play:active span { transform: scale(.95); }
}

@keyframes site-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Lead with the headline, then bring the artwork and supporting content into place. */
  html:not(.app-mode) .site-shell :is(
    .home-poster-copy > *,
    .shop-intro > :first-child,
    .shop-featured-copy,
    .shop-featured-media,
    .download-intro,
    .download-previews,
    .about-banner,
    .about-panel > :not([hidden]),
    .support-hero-copy,
    .support-portrait,
    .support-faq > h2
  ) {
    animation: site-page-enter 520ms cubic-bezier(.2, .65, .28, 1)
      var(--page-enter-delay, 55ms) backwards;
  }

  .site-shell :is(.home-poster-copy > p, .shop-featured-media,
    .download-previews, .support-portrait) {
    --page-enter-delay: 125ms;
  }
  .site-shell :is(.home-poster-actions, .shop-featured-copy,
    .about-panel > :not([hidden]), .support-faq > h2) {
    --page-enter-delay: 180ms;
  }
  .site-shell .about-banner {
    --page-enter-offset: 0px;
  }

  .site-shell #site-nav :is(.marketing-nav-links, .site-mobile-links) > a:active,
  .site-shell .about-tabs > a:active {
    opacity: .72;
    transition-duration: 80ms;
  }
}

@keyframes site-page-enter {
  from {
    opacity: .65;
    translate: 0 var(--page-enter-offset, 16px);
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .site-shell .shop-card-media img,
  .site-shell .tutorial-card img {
    transition: transform var(--card-motion);
  }
  .site-shell .shop-card > a:is(:hover, :focus-visible) .shop-card-media img,
  .site-shell .tutorial-card:is(:hover, :focus-within) img {
    transform: scale(1.0161);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-shell *, .site-shell *::before, .site-shell *::after, .site-shell dialog::backdrop {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (hover: hover) {
  .site-shell :is(.home-poster-actions a, .home-shop-banner a, .shop-featured-actions > a:first-child):hover {
    background-color: color-mix(in srgb, var(--brand-blue) 94%, white);
    color: white;
  }
}
.site-shell :is(.home-poster-actions a, .home-shop-banner a, .shop-featured-actions > a:first-child):active {
  background-color: var(--brand-blue-pressed);
  color: white;
}

@media (prefers-reduced-motion: no-preference) {
  /* The scrim starts immediately. Dialog content enters one quarter into its timeline. */
  .site-shell #country-modal {
    transition: display 800ms allow-discrete;
  }
  .site-shell #country-modal.hidden,
  .site-shell dialog:not([open]),
  .site-shell dialog:not([open])::backdrop { pointer-events: none; }
  .site-shell #country-modal > [role='dialog'],
  .site-shell dialog {
    transition: opacity 600ms var(--dialog-ease) 200ms, overlay 800ms allow-discrete, display 800ms allow-discrete;
  }
  .site-shell #country-modal.hidden > [role='dialog'],
  .site-shell dialog:not([open]) {
    opacity: 0;
    transition-delay: 0s;
    interactivity: inert;
  }
  .site-shell #country-modal > [data-country-close],
  .site-shell dialog::backdrop {
    backdrop-filter: blur(20px);
    transition: opacity 800ms var(--dialog-ease), backdrop-filter 800ms var(--dialog-ease), overlay 800ms allow-discrete, display 800ms allow-discrete;
  }
  .site-shell #country-modal.hidden > [data-country-close],
  .site-shell dialog:not([open])::backdrop { opacity: 0; backdrop-filter: blur(0px); }
  @starting-style {
    .site-shell #country-modal:not(.hidden) > [role='dialog'],
    .site-shell dialog[open] { opacity: 0; }
    .site-shell #country-modal:not(.hidden) > [data-country-close],
    .site-shell dialog[open]::backdrop { opacity: 0; backdrop-filter: blur(0px); }
  }
  .site-shell .support-faq [role='region'] {
    interpolate-size: allow-keywords;
    overflow: hidden;
    transition: height var(--nav-motion), padding-bottom var(--nav-motion), opacity var(--nav-motion), display 320ms allow-discrete;
  }
  .site-shell .support-faq [role='region'].hidden { height: 0; padding-bottom: 0; opacity: 0; }
  @starting-style {
    .site-shell .support-faq [role='region']:not(.hidden) { height: 0; padding-bottom: 0; opacity: 0; }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-shell :is([role='tabpanel'], #tab-panel-account, #tab-panel-orders, #tab-panel-address,
    #checkout-invoice-fields, #checkout-invoice-enterprise, #payment-qr-panel, #more-faqs):not(.hidden) {
    animation: site-fade-in 450ms ease;
  }
}
