* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.ai-page {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-main);
  color: var(--text-color);
  background: #f6fbf8;
}

body.en-mode [lang="zh"],
body.zh-mode [lang="en"] {
  display: none !important;
}

.ai-page header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
}

.ai-page .logo {
  text-decoration: none;
}

.ai-page .nav-links .is-current {
  color: var(--primary-color);
  font-weight: 700;
}

.ai-page .lang-switch {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 6px 14px;
  cursor: pointer;
}

.ai-page main {
  overflow: hidden;
}

.ai-page section {
  scroll-margin-top: 88px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-color);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.ai-detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 650px) minmax(0, 1fr);
  align-items: stretch;
  min-height: min(820px, 100dvh);
  padding: 72px 0 0;
  background: #f6fbf8;
}

.ai-hero-copy {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 6vw, 92px) clamp(36px, 5vw, 76px);
  transform: translateY(-28px);
}

.ai-hero-copy h1 {
  max-width: 100%;
  margin: 0;
  color: var(--primary-color);
  font-size: clamp(3.1rem, 5.4vw, 5.3rem);
  line-height: .98;
  letter-spacing: 0;
}

.ai-hero-tagline {
  max-width: 26ch;
  margin: 22px 0 0;
  color: #173d37;
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  font-weight: 650;
  line-height: 1.2;
}

.ai-hero-lede {
  max-width: 60ch;
  margin: 20px 0 30px;
  color: rgba(22, 48, 44, .72);
  font-size: .94rem;
  line-height: 1.68;
}

.ai-primary-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 174px;
  white-space: nowrap;
}

.ai-hero-visual {
  position: relative;
  min-height: 680px;
  margin: 0;
  overflow: hidden;
  background: #edf5f4;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 79%, rgba(0,0,0,.55) 91%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 0%, #000 79%, rgba(0,0,0,.55) 91%, transparent 100%);
}

.ai-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(246,251,248,.78) 0%, transparent 16%, transparent 84%, #f6fbf8 100%),
    linear-gradient(270deg, transparent 64%, rgba(246,251,248,.74) 100%);
  pointer-events: none;
}

.ai-hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 680px;
  object-fit: cover;
  object-position: 50% center;
  filter: saturate(.66) contrast(.96) brightness(1.08);
  transform: translateY(-26px) scale(1.035);
}

.section-intro {
  width: min(100%, 920px);
  margin: 0 auto;
  text-align: center;
}

.section-intro.compact {
  width: min(100%, 760px);
}

.section-intro h2,
.optimization-copy h2,
.platform-principle h2 {
  margin: 0;
  color: var(--primary-color);
  font-size: clamp(2.25rem, 4.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.platform-loop .section-intro h2 {
  font-size: clamp(2.7rem, 5vw, 4.6rem);
}

.section-intro > p:not(.eyebrow) {
  width: min(100%, 700px);
  margin: 26px auto 0;
  color: rgba(22, 48, 44, .7);
  font-size: 1.04rem;
  line-height: 1.75;
}

.platform-loop {
  padding: clamp(88px, 9vw, 132px) clamp(24px, 6vw, 92px) clamp(60px, 6vw, 88px);
}

.generated-platform-flow {
  width: min(100%, 1380px);
  margin: clamp(40px, 5vw, 64px) auto 0;
}

.flow-image-crop {
  position: relative;
  width: 100%;
  aspect-ratio: 3.08 / 1;
  overflow: hidden;
  background: #f6fbf8;
}

.generated-platform-flow img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-20.5%) scaleY(.92);
  transform-origin: top center;
}

.generated-platform-flow figcaption,
.ppt-platform-visual figcaption {
  max-width: 900px;
  margin: 20px auto 0;
  color: rgba(22, 48, 44, .7);
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  font-weight: 600;
  line-height: 1.58;
  text-align: center;
}

.ppt-platform-visual {
  width: min(100%, 1160px);
  margin: clamp(64px, 8vw, 104px) auto 0;
}

.ppt-platform-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: scaleY(.92);
  transform-origin: top center;
}

.ppt-platform-image-compress {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  overflow: hidden;
}

.platform-difference {
  padding: clamp(90px, 9vw, 140px) clamp(24px, 7vw, 112px);
  background: rgba(238, 247, 244, .65);
}

.difference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 1180px);
  margin: clamp(54px, 6vw, 82px) auto 0;
  gap: clamp(28px, 4vw, 58px);
}

.difference-grid article {
  padding-top: 22px;
  border-top: 1px solid rgba(22, 79, 71, .24);
}

.difference-grid h3 {
  margin: 22px 0 14px;
  color: var(--primary-color);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.18;
}

.difference-grid p {
  margin: 0;
  color: rgba(22, 48, 44, .7);
  line-height: 1.72;
}

.optimization-section {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(400px, .68fr);
  align-items: center;
  padding: clamp(38px, 4vw, 62px) 0 clamp(78px, 8vw, 118px);
}

.optimization-visual {
  position: relative;
  margin: 0;
  padding: 0 clamp(22px, 3vw, 44px);
  -webkit-mask-image: none;
  mask-image: none;
}

.optimization-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.optimization-copy {
  padding: clamp(24px, 3vw, 44px) clamp(30px, 5vw, 72px) clamp(24px, 3vw, 44px) 0;
}

.optimization-copy h2 {
  font-size: clamp(2.15rem, 3.2vw, 3.25rem);
}

.optimization-copy > p:not(.eyebrow) {
  font-size: .94rem;
}

.optimization-copy > p:not(.eyebrow) {
  margin: 26px 0 0;
  color: rgba(22, 48, 44, .7);
  line-height: 1.75;
}

.merged-difference-list {
  margin-top: 34px;
  border-top: 1px solid rgba(22, 79, 71, .18);
}

.merged-difference-list div {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  min-height: 96px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(22, 79, 71, .14);
}

.merged-difference-list span {
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  color: var(--accent-color);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.merged-difference-list strong {
  color: var(--primary-color);
}

.merged-difference-list p {
  margin: 7px 0 0;
  color: rgba(22, 48, 44, .66);
  line-height: 1.6;
}

.merged-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 32px;
}

.merged-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-width: 158px;
  white-space: nowrap;
}

.merged-actions .text-link {
  color: var(--primary-color);
}

.platform-output-section {
  padding: clamp(90px, 9vw, 138px) clamp(24px, 7vw, 112px);
  background: rgba(238, 247, 244, .68);
}

.output-list {
  width: min(100%, 980px);
  margin: clamp(52px, 6vw, 80px) auto 0;
  border-top: 1px solid rgba(22, 79, 71, .24);
}

.output-list article {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid rgba(22, 79, 71, .18);
}

.output-list h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.2;
}

.platform-principle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding: clamp(90px, 10vw, 150px) clamp(28px, 8vw, 128px);
  color: #f3fbf8;
  background: #123d36;
}

.platform-principle .eyebrow {
  color: #e48da0;
}

.platform-principle h2 {
  color: #f3fbf8;
  max-width: 16ch;
}

.principle-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.principle-primary {
  background: #f3fbf8;
  color: var(--primary-color);
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f3fbf8;
  font-weight: 650;
}

.ai-footer {
  padding: 48px clamp(28px, 8vw, 128px);
  color: rgba(240, 249, 246, .68);
  background: #0d2924;
  text-align: left;
}

.footer-brand {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.ai-footer p {
  margin: 10px 0 0;
}

.ai-footer .copyright {
  margin-top: 26px;
  font-size: .78rem;
  color: rgba(240, 249, 246, .42);
}

@media (max-width: 1100px) {
  .ai-detail-hero {
    grid-template-columns: minmax(460px, 54%) 1fr;
  }

  .ai-hero-copy {
    padding-inline: clamp(28px, 4vw, 50px);
  }

  .optimization-section {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr);
  }

  .optimization-copy {
    padding-right: 42px;
  }
}

@media (max-width: 900px) {
  .ai-detail-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 72px;
  }

  .ai-hero-copy {
    order: 2;
    align-items: center;
    text-align: center;
    padding: 56px 28px 78px;
    transform: none;
  }

  .ai-hero-tagline,
  .ai-hero-lede {
    margin-inline: auto;
  }

  .ai-primary-action {
    align-self: center;
  }

  .ai-hero-visual {
    order: 1;
    min-height: clamp(340px, 62vw, 520px);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
  }

  .ai-hero-visual img {
    min-height: clamp(340px, 62vw, 520px);
  }

  .difference-grid {
    grid-template-columns: 1fr;
  }

  .optimization-section {
    grid-template-columns: 1fr;
  }

  .optimization-visual {
    padding: 0 clamp(24px, 6vw, 52px);
    -webkit-mask-image: none;
    mask-image: none;
  }

  .optimization-copy {
    width: min(calc(100% - 48px), 680px);
    margin: 0 auto;
    padding: 42px 0 0;
    text-align: center;
  }

  .merged-difference-list {
    text-align: left;
  }

  .platform-principle {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 768px) {
  .ai-page header {
    grid-template-columns: auto 1fr auto;
  }

  .ai-page .logo {
    --logo-word-size: clamp(1.05rem, 5vw, 1.35rem);
  }

  .ai-hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .section-intro h2,
  .optimization-copy h2,
  .platform-principle h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

@media (max-width: 560px) {
  .ai-page header {
    padding-left: 12px;
    padding-right: 4px;
  }

  .ai-page .logo {
    --logo-word-size: 1.05rem;
    gap: 6px;
  }

  .ai-page .lang-switch {
    padding: 7px 14px;
    font-size: 14px;
  }

  .ai-page .logo img {
    height: 40px !important;
  }

  .ai-page .logo > span[lang="zh"] {
    display: none !important;
  }

  .ai-detail-hero {
    padding-top: 66px;
  }

  .ai-hero-visual,
  .ai-hero-visual img {
    min-height: 300px;
    height: 300px;
  }

  .ai-hero-visual img {
    object-position: 50% center;
  }

  .platform-loop,
  .platform-difference,
  .platform-output-section,
  .platform-principle {
    padding-inline: 24px;
  }

  .ppt-platform-visual {
    width: 100%;
    margin-left: auto;
  }

  .generated-platform-flow {
    width: calc(100% + 24px);
    margin-left: -12px;
  }

  .flow-image-crop {
    aspect-ratio: 2.75 / 1;
  }

  .generated-platform-flow img {
    width: 112%;
    max-width: none;
    margin-left: -6%;
    transform: translateY(-20.5%) scaleY(.92);
  }

  .output-list article {
    grid-template-columns: 50px 1fr;
  }

  .principle-actions {
    width: 100%;
  }

  .merged-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
