:root {
  --green-900: #123e3e;
  --green-800: #143824;
  --green-700: #1f402b;
  --green-title: #336342;
  --green-accent: #85ab8c;
  --brown: #5d3a1d;
  --action: #386b72;
  --ivory: #fffaf0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100svh;
  overflow: hidden;
  color: var(--green-900);
  background: #e3e8d6;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page-deck {
  width: 100%;
  height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.page-deck::-webkit-scrollbar {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero,
.analyses {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.08) 48%, rgba(31, 41, 28, 0.38)),
    url("./assets/wenzhai-hero-shanshui-v2.webp");
  background-position: center;
  background-size: cover;
}

.topbar {
  position: absolute;
  z-index: 5;
  top: clamp(16px, 2.67svh, 24px);
  left: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  color: #0f3833;
}

.brand img {
  width: 56px;
  height: 56px;
  display: block;
  border-radius: 14px;
  object-fit: cover;
}

.hero-copy {
  position: absolute;
  top: 16.67%;
  left: 50%;
  width: min(1160px, calc(100% - 48px));
  transform: translateX(-50%);
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(50px, min(5.7vw, 9.12svh), 82px);
  line-height: 1;
  letter-spacing: -0.033em;
  font-weight: 700;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy h1 span:first-child {
  color: var(--green-title);
}

.hero-copy h1 span:last-child {
  color: var(--green-accent);
}

.hero-copy p {
  max-width: 862px;
  margin: clamp(8px, 1.55svh, 14px) auto 0;
  color: #4a5c47;
  font-size: 18px;
  line-height: 30px;
}

.hero-action {
  position: absolute;
  z-index: 3;
  top: 55.56%;
  left: 40px;
  width: 390px;
  color: var(--green-700);
}

.capability-list {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.capability-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.capability-list i {
  color: #b4822c;
  font-style: normal;
  font-size: 12px;
}

.capability-carousel {
  display: none;
}

.capability-summary {
  width: 340px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 21px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 126px;
  height: 46px;
  border-radius: 999px;
  color: #1f291c;
  background: #f7f7f0;
  box-shadow: 0 8px 20px rgba(10, 41, 36, 0.08);
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #fff;
}

.text-link {
  font-size: 14px;
  font-weight: 700;
}

.scroll-guide {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 73.56%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 500;
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.trust-bar,
.site-footer {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  background: rgba(255, 247, 232, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 -8px 24px -10px rgba(10, 41, 36, 0.08);
}

.trust-bar {
  height: 20%;
  align-items: center;
}

.trust-inner {
  width: min(1200px, calc(100% - 48px));
  text-align: center;
}

.trust-title {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}

.trust-stats {
  width: min(1000px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-stat {
  height: clamp(58px, 8.45svh, 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 20px -8px rgba(10, 41, 36, 0.08);
  font-size: 16px;
  line-height: 24px;
}

.trust-stat strong,
.trust-stat span {
  display: block;
  font-weight: 700;
}

.analyses {
  background: url("./assets/wenzhai-chinese-texture-bg-v1.webp") center / cover no-repeat;
}

.analyses-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 15.56svh;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(32px, 4.45svh, 40px);
  line-height: 1.4;
  font-weight: 700;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--brown);
  font-size: clamp(14px, 1.9svh, 17px);
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(340px, 374px));
  gap: 39px;
  margin-top: 3.56svh;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x;
}

.feature-grid::-webkit-scrollbar {
  display: none;
}

.feature-grid.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.feature-card {
  width: 100%;
  height: 47.78svh;
  padding: clamp(22px, 3.56svh, 32px);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 250, 240, 0.48);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 14px 28px -12px rgba(10, 46, 38, 0.13);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.icon-slot {
  width: 100%;
  height: clamp(78px, 13.34svh, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.feature-icon {
  display: block;
  width: clamp(78px, 13.34svh, 120px);
  height: clamp(78px, 13.34svh, 120px);
  max-width: 100%;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
  overflow: visible;
}

.feature-card h3 {
  margin: clamp(14px, 2.67svh, 24px) 0 0;
  font-size: clamp(23px, 3.12svh, 28px);
  line-height: 1.42;
}

.feature-card > p {
  margin: clamp(14px, 2.67svh, 24px) 0 0;
  color: var(--brown);
  font-size: 15px;
  line-height: 26px;
}

.feature-card > a {
  display: inline-flex;
  gap: 8px;
  margin-top: clamp(14px, 2.67svh, 24px);
  color: var(--action);
  font-size: 15px;
  line-height: 24px;
  font-weight: 500;
}

.site-footer {
  height: 13.34%;
  align-items: center;
}

.footer-inner {
  width: min(1200px, calc(100% - 48px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: var(--brown);
  font-size: 13px;
  line-height: 20px;
}

.footer-inner a {
  color: var(--action);
  font-weight: 500;
}

@media (min-width: 901px) {
  .capability-list,
  .capability-summary {
    display: none;
  }

  .capability-carousel {
    display: block;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
  }

  .capability-track {
    display: flex;
    width: 100%;
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .capability-slide {
    flex: 0 0 100%;
    width: 100%;
  }

  .capability-slide strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 20px;
  }

  .capability-slide strong i {
    color: #b4822c;
    font-style: normal;
    font-size: 12px;
  }

  .capability-slide p {
    width: 100%;
    min-height: 21px;
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 21px;
  }

  .capability-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
  }

  .capability-dots button {
    width: 6px;
    height: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 56, 36, 0.28);
    cursor: pointer;
    transition: width 220ms ease, background-color 220ms ease;
  }

  .capability-dots button.is-active {
    width: 18px;
    background: var(--green-800);
  }

  .hero-action .action-row {
    margin-top: 12px;
  }
}

/*
 * Large desktop scaling
 * 1440 × 900 is the design baseline. Above 1600px, visual dimensions follow
 * the smaller of the viewport's width/height scale so 16:9, 2K and 4K remain
 * balanced without overflowing on ultrawide displays.
 */
@media (min-width: 1600px) {
  .topbar {
    top: clamp(24px, min(1.667vw, 2.667svh), 58px);
    left: clamp(40px, min(2.778vw, 4.445svh), 96px);
  }

  .brand {
    gap: clamp(16px, min(1.111vw, 1.778svh), 38px);
    font-size: clamp(24px, min(1.667vw, 2.667svh), 58px);
  }

  .brand img {
    width: clamp(56px, min(3.889vw, 6.223svh), 134px);
    height: clamp(56px, min(3.889vw, 6.223svh), 134px);
    border-radius: clamp(14px, min(0.972vw, 1.556svh), 34px);
  }

  .hero-copy {
    width: min(80.556vw, calc(100% - 6vw));
  }

  .hero-copy h1 {
    font-size: clamp(82px, min(5.694vw, 9.112svh), 197px);
  }

  .hero-copy p {
    max-width: 59.861vw;
    margin-top: clamp(14px, min(0.972vw, 1.556svh), 34px);
    font-size: clamp(18px, min(1.25vw, 2svh), 43px);
    line-height: clamp(30px, min(2.083vw, 3.334svh), 72px);
  }

  .hero-action {
    left: clamp(40px, min(2.778vw, 4.445svh), 96px);
    width: min(27.083vw, 65svh);
  }

  .capability-list {
    gap: clamp(14px, min(0.972vw, 1.556svh), 34px);
    font-size: clamp(13px, min(0.903vw, 1.445svh), 31px);
  }

  .capability-list span {
    gap: clamp(5px, min(0.347vw, 0.556svh), 12px);
  }

  .capability-list i {
    font-size: clamp(12px, min(0.833vw, 1.334svh), 29px);
  }

  .capability-slide strong {
    gap: clamp(6px, min(0.417vw, 0.667svh), 14px);
    font-size: clamp(13px, min(0.903vw, 1.445svh), 31px);
    line-height: clamp(20px, min(1.389vw, 2.223svh), 48px);
  }

  .capability-slide strong i {
    font-size: clamp(12px, min(0.833vw, 1.334svh), 29px);
  }

  .capability-slide p {
    min-height: clamp(21px, min(1.458vw, 2.334svh), 50px);
    margin-top: clamp(10px, min(0.694vw, 1.112svh), 24px);
    font-size: clamp(13px, min(0.903vw, 1.445svh), 31px);
    line-height: clamp(21px, min(1.458vw, 2.334svh), 50px);
  }

  .capability-dots {
    gap: clamp(6px, min(0.417vw, 0.667svh), 14px);
    margin-top: clamp(9px, min(0.625vw, 1svh), 22px);
  }

  .capability-dots button {
    width: clamp(6px, min(0.417vw, 0.667svh), 14px);
    height: clamp(6px, min(0.417vw, 0.667svh), 14px);
  }

  .capability-dots button.is-active {
    width: clamp(18px, min(1.25vw, 2svh), 43px);
  }

  .hero-action .action-row {
    margin-top: clamp(12px, min(0.833vw, 1.334svh), 29px);
  }

  .capability-summary {
    width: min(23.611vw, 56.667svh);
    margin: clamp(16px, min(1.111vw, 1.778svh), 38px) 0;
    font-size: clamp(13px, min(0.903vw, 1.445svh), 31px);
    line-height: clamp(21px, min(1.458vw, 2.334svh), 50px);
  }

  .action-row {
    gap: clamp(18px, min(1.25vw, 2svh), 43px);
  }

  .primary-button {
    width: clamp(126px, min(8.75vw, 14svh), 302px);
    height: clamp(46px, min(3.194vw, 5.112svh), 110px);
    font-size: clamp(14px, min(0.972vw, 1.556svh), 34px);
    box-shadow: 0 min(0.556vw, 0.889svh) min(1.389vw, 2.223svh)
      rgba(10, 41, 36, 0.08);
  }

  .text-link,
  .scroll-guide {
    font-size: clamp(14px, min(0.972vw, 1.556svh), 34px);
  }

  .scroll-guide {
    gap: clamp(8px, min(0.556vw, 0.889svh), 19px);
  }

  .chevron {
    width: clamp(10px, min(0.694vw, 1.112svh), 24px);
    height: clamp(10px, min(0.694vw, 1.112svh), 24px);
    border-width: 0 clamp(2px, min(0.139vw, 0.223svh), 5px)
      clamp(2px, min(0.139vw, 0.223svh), 5px) 0;
  }

  .trust-inner,
  .analyses-inner,
  .footer-inner {
    width: min(83.333vw, calc(100% - 6vw));
  }

  .trust-title {
    margin-bottom: clamp(16px, min(1.111vw, 1.778svh), 38px);
    font-size: clamp(18px, min(1.25vw, 2svh), 43px);
    line-height: clamp(28px, min(1.944vw, 3.112svh), 67px);
  }

  .trust-stats {
    width: min(69.444vw, 100%);
    gap: clamp(24px, min(1.667vw, 2.667svh), 58px);
  }

  .trust-stat {
    border-radius: clamp(16px, min(1.111vw, 1.778svh), 38px);
    font-size: clamp(16px, min(1.111vw, 1.778svh), 38px);
    line-height: clamp(24px, min(1.667vw, 2.667svh), 58px);
  }

  .section-heading h2 {
    font-size: clamp(40px, min(2.778vw, 4.445svh), 96px);
  }

  .section-heading p {
    margin-top: clamp(8px, min(0.556vw, 0.889svh), 19px);
    font-size: clamp(17px, min(1.181vw, 1.889svh), 41px);
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(39px, min(2.708vw, 4.334svh), 94px);
  }

  .feature-card {
    padding: clamp(32px, min(2.222vw, 3.556svh), 77px);
    border-radius: clamp(24px, min(1.667vw, 2.667svh), 58px);
  }

  .icon-slot,
  .feature-icon {
    width: 100%;
    height: clamp(120px, min(8.333vw, 13.334svh), 288px);
  }

  .feature-icon {
    width: clamp(120px, min(8.333vw, 13.334svh), 288px);
  }

  .feature-card h3 {
    margin-top: clamp(24px, min(1.667vw, 2.667svh), 58px);
    font-size: clamp(28px, min(1.944vw, 3.112svh), 67px);
  }

  .feature-card > p {
    margin-top: clamp(24px, min(1.667vw, 2.667svh), 58px);
    font-size: clamp(15px, min(1.042vw, 1.667svh), 36px);
    line-height: clamp(26px, min(1.806vw, 2.889svh), 62px);
  }

  .feature-card > a {
    gap: clamp(8px, min(0.556vw, 0.889svh), 19px);
    margin-top: clamp(24px, min(1.667vw, 2.667svh), 58px);
    font-size: clamp(15px, min(1.042vw, 1.667svh), 36px);
    line-height: clamp(24px, min(1.667vw, 2.667svh), 58px);
  }

  .footer-inner {
    gap: clamp(28px, min(1.944vw, 3.112svh), 67px);
    font-size: clamp(13px, min(0.903vw, 1.445svh), 31px);
    line-height: clamp(20px, min(1.389vw, 2.223svh), 48px);
  }
}

@media (max-width: 900px) {
  .hero {
    background-position: 58% center;
  }

  .topbar {
    top: 20px;
    left: 20px;
  }

  .brand {
    gap: 10px;
    font-size: 20px;
  }

  .brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .hero-copy {
    top: 12%;
  }

  .hero-copy h1 {
    font-size: clamp(36px, min(10vw, 7svh), 64px);
  }

  .hero-copy p {
    max-width: 560px;
    font-size: 16px;
    line-height: 28px;
  }

  .hero-action {
    top: 43%;
    left: 24px;
    width: min(360px, calc(100% - 48px));
  }

  .capability-list {
    display: none;
  }

  .capability-summary {
    display: none;
  }

  .capability-carousel {
    display: block;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
  }

  .capability-track {
    display: flex;
    width: 100%;
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .capability-slide {
    flex: 0 0 100%;
    width: 100%;
  }

  .capability-slide strong {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 20px;
  }

  .capability-slide strong i {
    color: #b4822c;
    font-style: normal;
    font-size: 12px;
  }

  .capability-slide p {
    width: 100%;
    min-height: 42px;
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 21px;
  }

  .capability-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
  }

  .capability-dots button {
    width: 6px;
    height: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(20, 56, 36, 0.28);
    cursor: pointer;
    transition: width 220ms ease, background-color 220ms ease;
  }

  .capability-dots button.is-active {
    width: 18px;
    background: var(--green-800);
  }

  .action-row {
    gap: clamp(12px, 3.5vw, 18px);
    margin-top: clamp(16px, 2.8svh, 24px);
  }

  .primary-button {
    width: clamp(108px, 30vw, 126px);
    height: clamp(40px, 6.2svh, 46px);
    font-size: clamp(12px, 3.3vw, 14px);
  }

  .text-link {
    font-size: clamp(12px, 3.3vw, 14px);
  }

  .scroll-guide {
    top: 70%;
  }

  .trust-bar {
    height: 22%;
  }

  .trust-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .trust-stat {
    height: clamp(48px, 6.6svh, 58px);
    border-radius: 12px;
    padding: 4px 2px;
    font-size: 11px;
    line-height: 17px;
  }

  .analyses {
    padding-bottom: 0;
  }

  .analyses-inner {
    width: calc(100% - 40px);
    padding-top: 6svh;
  }

  .feature-grid {
    width: calc(100vw - 40px);
    grid-template-columns: repeat(3, 70vw);
    gap: 16px;
    margin-top: 2.5svh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .feature-grid::-webkit-scrollbar {
    display: none;
  }

  .feature-card {
    display: flex;
    flex-direction: column;
    width: 70vw;
    height: 56svh;
    aspect-ratio: auto;
    min-height: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .feature-card .icon-slot {
    height: clamp(108px, 18svh, 142px);
  }

  .feature-card .feature-icon {
    width: clamp(108px, 18svh, 142px);
    height: clamp(108px, 18svh, 142px);
  }

  .feature-card h3 {
    margin-top: auto;
  }

  .site-footer {
    height: 11svh;
    min-height: 72px;
    padding: 12px 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .hero-copy {
    top: 11%;
  }

  .hero-copy h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .hero-copy p {
    margin-top: 18px;
    font-size: 14px;
    line-height: 24px;
  }

  .hero-action {
    top: 39%;
  }

  .action-row {
    margin-top: clamp(18px, 3svh, 22px);
  }

  .primary-button {
    width: clamp(104px, 29vw, 116px);
    height: clamp(38px, 6.2svh, 42px);
    border-radius: 999px;
  }

  .scroll-guide {
    top: 69%;
  }

  .trust-bar {
    height: 23%;
  }

  .trust-title {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 20px;
  }

  .trust-inner {
    width: calc(100% - 24px);
  }

  .trust-stat {
    font-size: 10px;
    line-height: 15px;
  }

  .analyses-inner {
    width: calc(100% - 32px);
  }

  .feature-grid {
    width: calc(100vw - 32px);
    grid-template-columns: repeat(3, 72vw);
  }

  .feature-card {
    width: 72vw;
    height: 56svh;
    aspect-ratio: auto;
    padding: 22px;
  }

  .section-heading h2 {
    font-size: 32px;
    line-height: 44px;
  }

  .section-heading p {
    font-size: 15px;
    line-height: 26px;
  }

  .feature-card {
    padding: 28px;
  }

  .feature-card h3 {
    font-size: 26px;
  }
}

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

  .primary-button {
    transition: none;
  }

  .page-deck {
    scroll-behavior: auto;
  }
}
