/* Targeted tuning for the feature showcase section. */

/* 2026-06-04 atmosphere final colored glow restore */
#atmosphere-effects.one-click-magic,
#atmosphere-effects .one-click-magic {
  --effect-veil: oklch(5.2% 0.008 252 / 0.9) !important;
}

#atmosphere-effects.one-click-magic .magic-photo__effect-veil,
#atmosphere-effects .one-click-magic .magic-photo__effect-veil {
  background: var(--effect-veil) !important;
  background-image: none !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="before"] .magic-photo__effect-veil,
#atmosphere-effects .one-click-magic[data-effect-phase="before"] .magic-photo__effect-veil {
  opacity: 0 !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"],
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] {
  --effect-veil: oklch(5.2% 0.008 252 / 0.92) !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .magic-photo__effect-veil,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .magic-photo__effect-veil {
  background: var(--effect-veil) !important;
  background-image: none !important;
  opacity: 0.88 !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .magic-photo__aura,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .magic-photo__aura {
  background: var(--effect-aura) !important;
  opacity: 0.68 !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .magic-photo__pulse,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .magic-photo__pulse {
  animation: 0.76s cubic-bezier(0.22, 1, 0.36, 1) magic-pulse-ring !important;
  border-color: var(--effect-glow) !important;
  box-shadow: 0 0 4rem var(--effect-glow) !important;
  opacity: 0.7 !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .magic-photo__particles,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .magic-photo__particles {
  opacity: 1 !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .magic-photo__particles span,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .magic-photo__particles span {
  animation: magic-particle-drift 0.78s cubic-bezier(0.22, 1, 0.36, 1) var(--particle-delay) !important;
  background: var(--effect-glow) !important;
  background-image: none !important;
  box-shadow: 0 0 1rem var(--effect-glow) !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="applying"] .wizard-panel__beam,
#atmosphere-effects .one-click-magic[data-effect-phase="applying"] .wizard-panel__beam {
  animation: 0.76s cubic-bezier(0.22, 1, 0.36, 1) spell-beam !important;
  background: linear-gradient(90deg, transparent, var(--effect-glow), transparent) !important;
  background-image: linear-gradient(90deg, transparent, var(--effect-glow), transparent) !important;
  box-shadow: 0 0 1.5rem var(--effect-glow) !important;
  border-color: transparent !important;
  opacity: 0.62 !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="after"] .magic-photo__effect-veil,
#atmosphere-effects .one-click-magic[data-effect-phase="after"] .magic-photo__effect-veil {
  background: oklch(5.2% 0.008 252 / 0.24) !important;
  background-image: none !important;
  opacity: 0.2 !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="after"] .magic-photo__aura,
#atmosphere-effects .one-click-magic[data-effect-phase="after"] .magic-photo__aura {
  background: var(--effect-aura) !important;
  opacity: 0.24 !important;
  filter: none !important;
}

#atmosphere-effects.one-click-magic[data-effect-phase="after"] .magic-photo__pulse,
#atmosphere-effects .one-click-magic[data-effect-phase="after"] .magic-photo__pulse,
#atmosphere-effects.one-click-magic[data-effect-phase="after"] .magic-photo__particles span,
#atmosphere-effects .one-click-magic[data-effect-phase="after"] .magic-photo__particles span,
#atmosphere-effects.one-click-magic[data-effect-phase="after"] .wizard-panel__beam,
#atmosphere-effects .one-click-magic[data-effect-phase="after"] .wizard-panel__beam {
  opacity: 0 !important;
  animation: none !important;
}

#reference-generation {
  --reference-fit-scale: 0.92;
  --reference-fusion-nudge: 0rem;
  --reference-node-nudge: 0rem;
}

#reference-generation .section-header__title {
  font-size: clamp(2.58rem, 3.95vw, 3.08rem);
  line-height: 0.96;
}

#reference-generation .section-header__description {
  margin-top: 0.72rem;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.38;
}

#reference-generation .reference-transfer-workbench {
  padding: clamp(0.9rem, 1.35vw, 1.25rem);
}

#reference-generation .reference-selector-card {
  min-height: 2.32rem;
}

#reference-generation .reference-input-card {
  padding: 0.48rem;
}

#reference-generation .reference-input-card__header {
  margin-bottom: 0.44rem;
}

#reference-generation .reference-source-media__meta {
  bottom: 0.58rem;
  left: 0.62rem;
  right: 0.62rem;
}

#reference-generation .reference-result-frame__tag {
  top: 0.72rem;
  right: 0.72rem;
}

@media (min-width: 1024px) {
  #reference-generation {
    padding-top: 2rem;
  }

  #reference-generation .section-header {
    margin-bottom: 0.9rem;
  }

  #reference-generation [data-testid="reference-card-scroller"] {
    gap: 0.55rem;
  }

  #reference-generation [data-testid="reference-studio-title"] + div,
  #reference-generation .reference-fusion-stage {
    margin-top: 0.65rem;
  }

  #reference-generation .reference-fusion-stage {
    min-height: clamp(27.75rem, 52svh, 31.25rem) !important;
    grid-template-columns:
      minmax(17rem, clamp(17rem, 20vw, 26rem))
      minmax(3.6rem, 4.1rem)
      minmax(34rem, 58rem);
    justify-content: center;
    align-items: center;
    gap: clamp(0.72rem, 1vw, 1rem);
    padding: clamp(0.68rem, 1vw, 0.92rem);
  }

  #reference-generation .reference-input-zone,
  #reference-generation .reference-fusion-zone,
  #reference-generation .reference-result-zone {
    align-self: center;
  }

  #reference-generation .reference-input-zone {
    justify-self: center;
    width: 100%;
    max-width: clamp(17rem, 20vw, 26rem);
  }

  #reference-generation .reference-fusion-zone {
    justify-self: center;
    transform: none;
  }

  #reference-generation .reference-result-zone {
    display: grid;
    min-width: 0;
    width: 100%;
    place-items: center;
  }

  #reference-generation .reference-fusion-node {
    width: clamp(2.9rem, 3.2vw, 3.35rem);
    height: clamp(2.9rem, 3.2vw, 3.35rem);
    border-radius: 999px;
    transform: rotate(0deg);
  }

  #reference-generation .reference-fusion-icon {
    width: clamp(1.75rem, 2.05vw, 2rem);
    height: clamp(1.75rem, 2.05vw, 2rem);
    border-radius: 999px;
    transform: none;
  }

  #reference-generation .reference-fusion-result {
    width: min(100%, 58rem);
    max-width: 58rem;
    justify-self: center;
    margin-inline: auto;
  }

  #reference-generation .reference-fusion-node {
    box-shadow:
      inset 0 1px oklch(98% 0.012 84 / 0.16),
      0 1rem 2.2rem oklch(2% 0.012 260 / 0.42),
      0 0 1.6rem color-mix(in oklch, var(--reference-accent) 18%, transparent);
  }

  #reference-generation .reference-fusion-icon .size-5 {
    width: 1.05rem;
    height: 1.05rem;
  }
}

@media (max-width: 1023px) {
  #reference-generation .section-header__title {
    font-size: clamp(2.45rem, 9vw, 3rem);
  }

  #reference-generation .reference-mobile-result-stage {
    gap: 0.72rem;
    padding-block: 0.68rem;
  }

  #reference-generation .reference-mobile-input-row {
    padding-top: 0.68rem;
  }
}

@media (max-width: 640px) {
  #upscale-outpaint .expand-reveal {
    margin-top: 1.25rem;
  }

  #upscale-outpaint .expand-reveal__stage {
    aspect-ratio: 1.95;
  }

  #upscale-outpaint .expand-reveal__center {
    width: clamp(5.75rem, 27.5%, 12.25rem);
    border-radius: 1.35rem;
  }

  #upscale-outpaint .expand-reveal__center-chip {
    left: 0.38rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.5rem;
  }

  #upscale-outpaint .expand-reveal__center-chip--top {
    top: 0.38rem;
  }

  #upscale-outpaint .expand-reveal__center-chip--bottom {
    bottom: 0.38rem;
  }
}

/* Homepage liquid-glass navigation refresh. */

header.fixed {
  top: 0.86rem !important;
  padding-inline: clamp(0.62rem, 2vw, 1.5rem) !important;
}

.site-header-glass {
  isolation: isolate;
  width: min(70rem, calc(100vw - 1.5rem)) !important;
  min-height: 3.75rem !important;
  height: 3.75rem;
  padding: 0.38rem 0.68rem 0.38rem 0.78rem !important;
  border: 1px solid rgba(255, 255, 255, 0.135);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.115), transparent 34%),
    radial-gradient(circle at 76% 100%, rgba(62, 213, 255, 0.07), transparent 38%),
    linear-gradient(180deg, rgba(25, 29, 39, 0.48), rgba(9, 13, 22, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(111, 224, 255, 0.075),
    0 18px 48px rgba(0, 4, 14, 0.25);
  backdrop-filter: blur(30px) saturate(1.62);
  -webkit-backdrop-filter: blur(30px) saturate(1.62);
}

.site-header-glass::before,
.site-header-glass::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.site-header-glass::before {
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035) 42%, rgba(255, 255, 255, 0.02)),
    radial-gradient(80% 150% at 50% -70%, rgba(255, 255, 255, 0.22), transparent 54%);
  opacity: 0.74;
}

.site-header-glass::after {
  left: 14%;
  right: 14%;
  bottom: 0.25rem;
  z-index: 0;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(96, 226, 255, 0.28), transparent);
  opacity: 0.62;
}

.site-header-glass > a:first-child,
.site-header-nav-glass,
.site-header-glass > a[href="#contact"],
.site-header-glass > a[href="/#contact"],
.site-mobile-menu-button {
  position: relative;
  z-index: 1;
}

.site-header-logo {
  width: 2.75rem !important;
  height: 2.75rem !important;
}

.site-header-glass > a:first-child {
  gap: 0.68rem !important;
}

.site-header-glass > a:first-child span span {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.site-header-nav-glass {
  gap: 0.16rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.site-header-nav-glass a {
  min-width: 3.55rem;
  padding: 0.52rem 0.9rem !important;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.68) !important;
  box-shadow: none !important;
  font-weight: 500;
  line-height: 1;
  transition:
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header-nav-glass a:hover {
  background: rgba(255, 255, 255, 0.035) !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

.site-header-nav-glass a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.11);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.04)) !important;
  color: rgba(255, 255, 255, 0.94) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(91, 223, 255, 0.07) !important;
}

.site-header-glass > a[href="#contact"],
.site-header-glass > a[href="/#contact"] {
  height: 2.25rem !important;
  padding-inline: 1rem !important;
  border: 1px solid rgba(95, 220, 255, 0.33) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(107, 226, 255, 0.18), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(53, 194, 255, 0.055)) !important;
  color: rgba(237, 252, 255, 0.92) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(96, 226, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.018),
    0 0.6rem 1.25rem rgba(23, 156, 218, 0.08) !important;
  backdrop-filter: blur(18px) saturate(1.45);
  -webkit-backdrop-filter: blur(18px) saturate(1.45);
}

.site-header-glass > a[href="#contact"]:hover,
.site-header-glass > a[href="/#contact"]:hover {
  border-color: rgba(118, 230, 255, 0.48) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(116, 229, 255, 0.24), transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(53, 194, 255, 0.08)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(96, 226, 255, 0.15),
    0 0.75rem 1.5rem rgba(38, 186, 235, 0.13),
    0 0 1.25rem rgba(93, 219, 255, 0.1) !important;
}

.site-mobile-menu-button {
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  color: rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(96, 226, 255, 0.055) !important;
}

@media (min-width: 1024px) {
  .site-header-glass {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(1rem, 3vw, 2.25rem) !important;
  }

  .site-header-glass > a:first-child {
    grid-column: 1;
    justify-self: start;
  }

  .site-header-nav-glass {
    grid-column: 2;
    justify-self: center;
  }

  .site-header-glass > a[href="#contact"],
  .site-header-glass > a[href="/#contact"] {
    grid-column: 3;
    justify-self: end;
  }

  .site-header-glass > .site-mobile-menu-button,
  .site-header-glass > .site-mobile-menu-scrim,
  .site-header-glass > .site-mobile-menu {
    display: none !important;
  }
}

@media (min-width: 1280px) {
  .side-anchor-nav {
    --side-anchor-line-top: 1.94rem;
    --side-anchor-row: 3.25rem;
    --side-anchor-dot-center: 1.625rem;
    --side-anchor-progress: 1.31rem;
    position: fixed !important;
    top: 48% !important;
    left: clamp(3.5rem, 4.45vw, 4rem) !important;
    z-index: 45;
    display: grid !important;
    width: 9.35rem;
    min-height: 16.25rem;
    padding: 1.62rem 0;
    gap: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .side-anchor-nav:has(a:nth-child(2)[aria-current="page"]) {
    --side-anchor-progress: 4.56rem;
  }

  .side-anchor-nav:has(a:nth-child(3)[aria-current="page"]) {
    --side-anchor-progress: 7.81rem;
  }

  .side-anchor-nav:has(a:nth-child(4)[aria-current="page"]) {
    --side-anchor-progress: 11.06rem;
  }

  .side-anchor-nav::before,
  .side-anchor-nav::after {
    position: absolute;
    left: 0.23rem;
    width: 1px;
    border-radius: 999px;
    pointer-events: none;
    content: "";
  }

  .side-anchor-nav::before {
    top: var(--side-anchor-line-top);
    bottom: var(--side-anchor-line-top);
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.22) 14%,
      rgba(255, 255, 255, 0.18) 82%,
      rgba(255, 255, 255, 0.035)
    );
  }

  .side-anchor-nav::after {
    top: var(--side-anchor-line-top);
    height: var(--side-anchor-progress);
    background: linear-gradient(180deg, rgba(99, 226, 255, 0), rgba(94, 226, 255, 0.62));
    box-shadow: 0 0 0.85rem rgba(94, 226, 255, 0.23);
  }

  .side-anchor-nav a {
    position: relative;
    display: grid !important;
    grid-template-columns: 0.5rem minmax(0, 1fr);
    align-items: center;
    height: var(--side-anchor-row);
    padding: 0 !important;
    gap: 0.92rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.55) !important;
    box-shadow: none !important;
    font-size: 0.91rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .side-anchor-nav a:hover,
  .side-anchor-nav a:focus-visible {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.78) !important;
  }

  .side-anchor-nav a::before,
  .side-anchor-nav a::after {
    display: none !important;
    content: none !important;
  }

  .side-anchor-nav a span:first-child {
    position: relative;
    z-index: 1;
    width: 0.43rem !important;
    height: 0.43rem !important;
    border: 0 !important;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28) !important;
    box-shadow: none !important;
    transform: none !important;
    transition:
      background-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .side-anchor-nav a span:last-child {
    position: relative;
    z-index: 1;
    overflow: visible;
    color: currentColor;
    white-space: nowrap;
  }

  .side-anchor-nav a[href="/#workflow"] span:last-child {
    font-size: 0;
  }

  .side-anchor-nav a[href="/#workflow"] span:last-child::after {
    content: "客户端展示";
    font-size: 0.91rem;
  }

  .side-anchor-nav a:hover span:first-child,
  .side-anchor-nav a:focus-visible span:first-child {
    background: rgba(255, 255, 255, 0.46) !important;
  }

  .side-anchor-nav a[aria-current="page"] {
    color: rgba(255, 255, 255, 0.96) !important;
    font-weight: 600;
  }

  .side-anchor-nav a[aria-current="page"] span:first-child {
    width: 0.5rem !important;
    height: 0.5rem !important;
    background: rgb(95, 226, 255) !important;
    box-shadow:
      0 0 0 0.28rem rgba(95, 226, 255, 0.075),
      0 0 1.05rem rgba(95, 226, 255, 0.46) !important;
  }
}

@media (max-width: 1279px) {
  .side-anchor-nav {
    display: none !important;
  }
}

@media (max-width: 640px) {
  header.fixed {
    top: 0.62rem !important;
  }

  .site-header-glass {
    width: min(100%, calc(100vw - 1rem)) !important;
    min-height: 3.5rem !important;
    height: 3.5rem;
    padding: 0.34rem 0.46rem 0.34rem 0.52rem !important;
  }

  .site-header-logo {
    width: 2.55rem !important;
    height: 2.55rem !important;
  }

  .site-header-glass > a:first-child {
    gap: 0.52rem !important;
  }

  .site-header-glass > a:first-child span span {
    font-size: 0.82rem;
  }
}

/* Keep the side timeline from feeling like an overlay panel on media sections. */

@media (min-width: 1280px) {
  .side-anchor-nav {
    left: clamp(1.45rem, 3.2vw, 3.35rem) !important;
    width: 7.7rem !important;
    padding-block: 1.7rem !important;
    opacity: 0.9;
    pointer-events: none;
  }

  .side-anchor-nav::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.025),
      rgba(255, 255, 255, 0.16) 18%,
      rgba(255, 255, 255, 0.12) 82%,
      rgba(255, 255, 255, 0.025)
    ) !important;
  }

  .side-anchor-nav a {
    width: fit-content !important;
    min-width: 0 !important;
    grid-template-columns: 0.5rem max-content !important;
    gap: 0.76rem !important;
    background: none !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    pointer-events: auto;
  }

  .side-anchor-nav a,
  .side-anchor-nav a:hover,
  .side-anchor-nav a:focus-visible,
  .side-anchor-nav a[aria-current="page"] {
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  .side-anchor-nav a::before,
  .side-anchor-nav a::after,
  .side-anchor-nav a span:last-child::before {
    display: none !important;
    content: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  .side-anchor-nav a span:last-child {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 0.64;
    text-shadow: 0 1px 0.75rem rgba(0, 0, 0, 0.52);
  }

  .side-anchor-nav a[href="/#workflow"] span:last-child::after {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-shadow: 0 1px 0.75rem rgba(0, 0, 0, 0.52);
  }

  .side-anchor-nav:not(:hover) a:not([aria-current="page"]) span:last-child {
    opacity: 0.42;
  }

  .side-anchor-nav a:hover span:last-child,
  .side-anchor-nav a:focus-visible span:last-child {
    opacity: 0.82;
  }

  .side-anchor-nav a[aria-current="page"] span:last-child,
  .side-anchor-nav a[aria-current="page"][href="/#workflow"] span:last-child::after {
    opacity: 1;
    color: rgba(255, 255, 255, 0.96);
    text-shadow:
      0 1px 0.75rem rgba(0, 0, 0, 0.56),
      0 0 1.05rem rgba(95, 226, 255, 0.12);
  }
}
