/* Overview scroll story. The category carousel and water canvas keep their own
   markup and interaction; this file only controls the surrounding layout. */
:root {
  --overview-header-height: 80px;
  --overview-stage-height: calc(100vh - var(--overview-header-height));
}

@supports (height: 100svh) {
  :root { --overview-stage-height: calc(100svh - var(--overview-header-height)); }
}

.overview-products-services-story {
  position: relative;
  display: flow-root;
  isolation: isolate;
  overflow: visible;
}

/* Featured Products */
.products-preview.section {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: visible;
  padding: clamp(64px, 7.5vh, 88px) 0 clamp(48px, 5.5vh, 66px);
  background: linear-gradient(180deg, #F0EEE4 0%, #F2EFE7 48%, #EAEDE5 100%);
}

.products-water-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .92;
  mix-blend-mode: screen;
}

.products-intro-track,
.products-intro-stage {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: visible;
  isolation: auto;
  background: transparent;
}

.products-intro-content {
  position: relative;
  z-index: 2;
  display: block;
  height: auto;
  padding-top: 0;
}

.products-intro {
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 7vw, 112px);
  width: 100%;
  margin: 0 0 clamp(44px, 5.5vh, 66px);
}

.products-title-window {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  min-width: 0;
  overflow: visible;
}

.products-intro #products-title {
  margin: 0;
  color: var(--teal-ink);
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  will-change: transform;
}

.products-intro > p {
  flex: 0 1 560px;
  max-width: 560px;
  margin: 9px 0 0;
  color: color-mix(in srgb, var(--teal-ink) 82%, #9c7b5f);
  font-size: clamp(.95rem, 1.13vw, 1.08rem);
  line-height: 1.7;
  text-align: right;
}

.products-gallery-area { position: relative; z-index: 2; padding: 0; }
html[lang^="zh"] .products-intro > p { text-align: justify; text-justify: inter-character; }

/* A readable normal-flow fallback is the default. The fixed curtain layout is
   enabled only after GSAP initializes, so a blocked script never hides content. */
.services-preview.section {
  position: relative;
  z-index: 3;
  overflow: visible;
  margin: 0;
  padding: clamp(52px, 7vh, 78px) 0;
  background: #E7ECE3;
  scroll-margin-top: 0;
}

.services-story-stage {
  position: relative;
  width: 100%;
  height: min(78vh, 760px);
  min-height: 500px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #aab7a7;
}

@supports (height: 78svh) {
  .services-story-stage { height: min(78svh, 760px); }
}

.services-video-surface {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #aab7a7;
}

.services-background-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .78;
  filter: saturate(.88);
}

.services-video-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(247 244 236 / .16), rgb(247 244 236 / .04) 68%, rgb(247 244 236 / .12));
  pointer-events: none;
}

.services-story-inner.container {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 56px));
  height: 100%;
  margin-inline: auto;
  padding: 28px 0;
  box-sizing: border-box;
}

.services-copy {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: max-content;
  max-width: 100%;
  margin: 0 0 22px;
}

.services-preview #services-title {
  flex: 0 1 auto;
  margin: 0;
  color: #003b3d;
  font-size: clamp(2.25rem, 3.3vw, 3.1rem);
  letter-spacing: .015em;
  word-spacing: .09em;
  line-height: 1.08;
}

.services-preview .service-list {
  position: relative;
  display: grid;
  width: min(540px, 100%);
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-auto-rows: minmax(132px, auto);
  box-sizing: border-box;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 20px;
  background: rgb(255 255 255 / 25%);
  box-shadow: 0 20px 48px rgb(3 59 62 / 14%), inset 0 1px 0 rgb(255 255 255 / 42%);
  -webkit-backdrop-filter: blur(19px) saturate(112%);
  backdrop-filter: blur(19px) saturate(112%);
}

.services-preview .service-item,
.services-preview .service-item:nth-of-type(n) {
  position: relative;
  display: flex;
  grid-column: auto;
  grid-row: auto;
  align-items: center;
  min-width: 0;
  min-height: 128px;
  margin: 0;
  padding: 8px 2px;
  flex-direction: row;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid rgb(6 77 80 / 17%);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-align: left;
  outline: none;
  transition: none;
  will-change: transform, opacity;
}

.services-preview .service-item:last-child { border-bottom: 0; }
.services-preview .service-item:hover,
.services-preview .service-item:focus-within {
  border-color: rgb(6 77 80 / 17%);
  background: transparent;
  box-shadow: none;
}
.services-preview .service-item::before { content: none; }
.services-preview .service-mark {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.services-preview .service-sticker { width: 52px; height: 52px; }
.services-preview .certificate-sticker { overflow: visible; }
.services-preview .certificate-outline {
  fill: none;
  stroke: #fff;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgb(3 59 62 / 42%));
}
.services-preview .certificate-accent {
  fill: none;
  stroke: var(--ginkgo);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgb(3 59 62 / 38%));
}
.services-preview .service-item > div { min-width: 0; }
.services-preview .service-item h3 {
  margin: 0;
  color: var(--teal-ink);
  font-size: calc(clamp(1rem, 1.25vw, 1.16rem) + 2px);
  line-height: 1.3;
  letter-spacing: .012em;
  word-spacing: .04em;
}
html[lang^="zh"] .services-preview .service-item h3 { font-size: calc(clamp(1.04rem, 1.35vw, 1.2rem) + 2px); }

.services-cta {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  margin: 0;
  pointer-events: auto;
}

.services-preview .services-learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 152px;
  min-height: 48px;
  margin: 0;
  padding: 13px 22px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  color: var(--ink-on-dark);
  background: var(--teal-deep);
  box-shadow: 0 18px 42px rgb(3 59 62 / 21%);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease, background-color .3s ease;
}
.services-preview .services-learn-more:hover,
.services-preview .services-learn-more:focus-visible {
  transform: translateY(-4px);
  background: #064D50;
  box-shadow: 0 23px 48px rgb(3 59 62 / 25%);
}
.services-preview .services-learn-more:focus-visible { outline: 3px solid var(--ginkgo); outline-offset: 4px; }
.contact-preview { position: relative; z-index: 1; }

/* One scroll-story layout. Keep the category rail and water canvas untouched. */
html.overview-scroll-story-ready {
  --overview-stage-height: calc(100vh - var(--overview-header-height));
}

@supports (height: 100svh) {
  html.overview-scroll-story-ready {
    --overview-stage-height: calc(100svh - var(--overview-header-height));
  }
}

html.overview-scroll-story-ready-wide .services-preview.section {
  position: relative;
  z-index: 3;
  height: var(--overview-stage-height);
  margin: calc(-1 * var(--overview-stage-height)) 0 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

html.overview-scroll-story-ready-stacked .services-preview.section {
  position: relative;
  z-index: 3;
  height: var(--overview-stage-height);
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

html.overview-scroll-story-ready-wide .services-story-stage,
html.overview-scroll-story-ready-stacked .services-story-stage {
  position: relative;
  width: 100%;
  height: var(--overview-stage-height);
  min-height: 0;
  max-height: none;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #aab7a7;
}

html.overview-story-wide-active .services-story-stage {
  position: fixed;
  z-index: 40;
  top: var(--overview-header-height);
  right: 0;
  left: 0;
  width: 100%;
  height: var(--overview-stage-height);
  max-width: none;
  margin: 0;
}

html.overview-scroll-story-ready-wide .services-story-inner.container,
html.overview-scroll-story-ready-stacked .services-story-inner.container {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

html.overview-scroll-story-ready-wide .services-copy,
html.overview-scroll-story-ready-stacked .services-copy {
  --overview-copy-inset: clamp(32px, 8vw, 145px);
  position: absolute;
  z-index: 3;
  top: clamp(20px, 3.4vh, 32px);
  left: var(--overview-copy-inset);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(10px, 1.5vw, 20px);
  width: max-content;
  max-width: calc(100% - var(--overview-copy-inset) - 24px);
  margin: 0;
  pointer-events: none;
}

html.overview-scroll-story-ready-stacked .services-copy {
  --overview-copy-inset: clamp(20px, 4vw, 40px);
}

html.overview-scroll-story-ready-wide .services-preview #services-title,
html.overview-scroll-story-ready-stacked .services-preview #services-title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.1rem);
  line-height: 1.08;
}

html.overview-scroll-story-ready-wide .services-cta,
html.overview-scroll-story-ready-stacked .services-cta {
  flex: 0 0 auto;
  margin: 0;
  pointer-events: auto;
}

html.overview-scroll-story-ready-wide .services-preview .service-list,
html.overview-scroll-story-ready-stacked .services-preview .service-list {
  --overview-panel-left: clamp(32px, 8vw, 145px);
  --overview-panel-top: clamp(112px, 15vh, 132px);
  position: absolute;
  z-index: 2;
  top: var(--overview-panel-top);
  left: var(--overview-panel-left);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: unset;
  row-gap: 0;
  width: min(560px, calc(100% - var(--overview-panel-left) - 28px));
  height: min(700px, 70vh, calc(100% - var(--overview-panel-top) - 14px));
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 18px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 52%);
  border-radius: 20px;
  background: rgb(255 255 255 / 25%);
  box-shadow: 0 20px 48px rgb(3 59 62 / 14%), inset 0 1px 0 rgb(255 255 255 / 42%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
  backdrop-filter: blur(14px) saturate(108%);
  pointer-events: none;
}

html.overview-scroll-story-ready-wide .services-preview .service-item,
html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
html.overview-scroll-story-ready-stacked .services-preview .service-item,
html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
  position: relative;
  display: flex;
  grid-column: 1;
  grid-row: auto;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 9px 5px;
  flex-direction: row;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgb(6 77 80 / 18%);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  outline: none;
  transition: none;
}

html.overview-scroll-story-ready-wide .services-preview .service-item:last-child,
html.overview-scroll-story-ready-stacked .services-preview .service-item:last-child {
  border-bottom: 0;
}

html.overview-scroll-story-ready-wide .services-preview .service-item::before,
html.overview-scroll-story-ready-stacked .services-preview .service-item::before {
  content: none;
}

html.overview-scroll-story-ready-wide .services-preview .service-mark,
html.overview-scroll-story-ready-stacked .services-preview .service-mark {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

html.overview-scroll-story-ready-wide .services-preview .service-sticker,
html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
  width: 48px;
  height: 48px;
}

html.overview-scroll-story-ready-wide .services-preview .service-item--right,
html.overview-scroll-story-ready-stacked .services-preview .service-item--right {
  flex-direction: row;
  text-align: left;
}

html.overview-scroll-story-ready-wide .service-type-char,
html.overview-scroll-story-ready-stacked .service-type-char {
  display: inline-block;
  will-change: auto;
}

html.overview-scroll-story-ready-wide .services-preview .service-item h3,
html.overview-scroll-story-ready-stacked .services-preview .service-item h3 {
  min-width: 0;
  margin: 0;
  line-height: 1.28;
  word-break: normal;
  overflow-wrap: anywhere;
}

html.overview-scroll-story-ready-wide .services-learn-more,
html.overview-scroll-story-ready-stacked .services-learn-more {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  /* Narrow desktop/tablet: keep the products in ordinary document flow, then
     pin one exact below-nav video viewport. Keep its panel compact and left. */
  .products-preview.section {
    padding-top: clamp(42px, 5.5vh, 60px);
    padding-bottom: clamp(16px, 2.4vh, 26px);
  }

  .products-intro {
    gap: 10px;
    margin-bottom: clamp(18px, 2.4vh, 26px);
  }

  html.overview-scroll-story-ready-stacked .services-copy {
    top: clamp(16px, 3vh, 26px);
    gap: clamp(9px, 1.5vw, 16px);
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    --overview-panel-left: clamp(20px, 4vw, 40px);
    --overview-panel-top: clamp(100px, 15vh, 126px);
    width: min(560px, calc(100% - var(--overview-panel-left) - 24px));
    height: min(700px, 70vh, calc(100% - var(--overview-panel-top) - 14px));
    padding: 10px 16px;
  }
}

@media (max-width: 760px) {
  .products-preview.section {
    padding-top: 40px;
    padding-bottom: 16px;
  }

  .products-intro { margin-bottom: 18px; }

  html.overview-scroll-story-ready-stacked .services-copy {
    top: 14px;
    left: 16px;
    max-width: calc(100% - 32px);
    gap: 8px 10px;
  }

  html.overview-scroll-story-ready-stacked .services-preview #services-title {
    font-size: clamp(1.65rem, 6.8vw, 2.35rem);
  }

  html.overview-scroll-story-ready-stacked .services-preview .services-learn-more {
    min-width: 124px;
    min-height: 42px;
    padding: 10px 14px;
    font-size: .66rem;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    --overview-panel-left: 16px;
    --overview-panel-top: clamp(98px, 15vh, 116px);
    width: min(560px, calc(100% - 32px));
    height: min(700px, 70vh, calc(100% - var(--overview-panel-top) - 14px));
    padding: 8px 12px;
    border-radius: 17px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
    gap: 10px;
    padding-inline: 3px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-mark {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
    width: 43px;
    height: 43px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-item h3 { font-size: calc(.94rem + 2px); }
  html[lang^="zh"].overview-scroll-story-ready-stacked .services-preview .service-item h3 { font-size: calc(1rem + 2px); }
}

@media (max-width: 420px) {
  html.overview-scroll-story-ready-stacked .services-copy {
    left: 12px;
    max-width: calc(100% - 24px);
    gap: 7px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .services-learn-more {
    min-width: 112px;
    padding-inline: 11px;
    font-size: .61rem;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    --overview-panel-left: 12px;
    --overview-panel-top: clamp(94px, 14vh, 108px);
    width: calc(100% - 24px);
    height: min(700px, 70vh, calc(100% - var(--overview-panel-top) - 12px));
    padding-inline: 9px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) { gap: 8px; }

  html.overview-scroll-story-ready-stacked .services-preview .service-mark {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
    width: 38px;
    height: 38px;
  }

  html.overview-scroll-story-ready-stacked .services-preview .service-item h3 { font-size: calc(.9rem + 2px); }
  html[lang^="zh"].overview-scroll-story-ready-stacked .services-preview .service-item h3 { font-size: calc(.96rem + 2px); }
}

/* Overview-only entrance motion for the carousel, plus GPU layers used by the
   pinned service scene. The carousel's card geometry stays unchanged. */
.category-gallery.is-entry-pending {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.category-gallery.is-entry-pending.is-entered {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity .65s cubic-bezier(.22, 1, .36, 1), transform .65s cubic-bezier(.22, 1, .36, 1);
}

html.overview-scroll-story-ready .services-story-stage,
html.overview-scroll-story-ready .services-preview .service-item,
html.overview-scroll-story-ready .services-preview #services-title,
html.overview-scroll-story-ready .services-cta {
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .category-gallery.is-entry-pending,
  .category-gallery.is-entry-pending.is-entered {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-height: 700px) {
  html.overview-scroll-story-ready .services-copy { top: 12px; }
  html.overview-scroll-story-ready-wide .services-preview .service-list,
  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    --overview-panel-top: 92px;
    height: min(70vh, calc(100% - 108px));
    padding-block: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.overview-scroll-story-ready-wide .services-story-stage,
  html.overview-scroll-story-ready-wide .service-type-char,
  html.overview-scroll-story-ready-stacked .service-type-char {
    will-change: auto;
  }
}





/* Our Services redesign: a compact two-column scene with a scroll-stacked card deck. */
.services-preview.section {
  position: relative;
  z-index: 3;
  overflow: visible;
  margin: 0;
  padding: clamp(36px, 5vh, 56px) 0;
  background: linear-gradient(180deg, #E8EEE7, #F0E9DE);
}

.services-story-stage {
  position: relative;
  width: 100%;
  height: min(78vh, 760px);
  min-height: 500px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #aab7a7;
}

.services-video-surface {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #aab7a7;
}

.services-background-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .65;
  filter: saturate(.88);
}

.services-video-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(247 244 236 / .16), rgb(247 244 236 / .04) 68%, rgb(247 244 236 / .12));
  pointer-events: none;
}

.services-story-inner.container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(205px, .36fr) minmax(0, .64fr);
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
  width: min(1240px, calc(100% - 56px));
  height: 100%;
  margin-inline: auto;
  padding: clamp(20px, 3vh, 32px) 0;
  box-sizing: border-box;
  pointer-events: none;
}

.services-copy {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.8vh, 28px);
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
  pointer-events: none;
}

.services-preview #services-title {
  margin: 0;
  color: #003B3D;
  font-size: clamp(2.4rem, 4vw, 3.85rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .99;
  text-align: center;
  text-shadow: 0 1px 18px rgb(250 248 239 / 62%);
  word-break: keep-all;
}

.services-title-line { display: block; }

.services-preview .service-list {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-self: center;
  width: 100%;
  height: min(60vh, 500px);
  min-height: 420px;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  gap: clamp(12px, 1.5vw, 20px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
  perspective: 1200px;
  pointer-events: none;
}

.services-preview .service-item,
.services-preview .service-item:nth-of-type(n) {
  position: relative;
  display: flex;
  grid-column: auto;
  grid-row: auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 20px;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 20px);
  border: 1px solid rgb(255 255 255 / 64%);
  border-radius: 22px;
  background: #F2EFE4;
  box-shadow: 0 18px 44px rgb(3 45 48 / 20%), inset 0 1px 0 rgb(255 255 255 / 78%);
  color: #12484A;
  text-align: center;
  outline: none;
  overflow: hidden;
  transition: none;
  will-change: auto;
  backface-visibility: hidden;
}

.services-preview .service-item:nth-of-type(1) {
  --service-card-background: linear-gradient(145deg, #FBF4E6 0%, #E8DDC8 100%);
  --service-card-ink: #12484A;
  background: var(--service-card-background);
  color: var(--service-card-ink);
}

.services-preview .service-item:nth-of-type(2) {
  --service-card-background: linear-gradient(145deg, #176267 0%, #07464A 100%);
  --service-card-ink: #FBF6E9;
  border-color: rgb(237 242 224 / 54%);
  background: var(--service-card-background);
  color: var(--service-card-ink);
  box-shadow: 0 20px 48px rgb(3 45 48 / 28%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

.services-preview .service-item:nth-of-type(3) {
  --service-card-background: linear-gradient(145deg, #E4F0EA 0%, #BFD9D1 100%);
  --service-card-ink: #164C4D;
  background: var(--service-card-background);
  color: var(--service-card-ink);
}

.services-preview .service-item:nth-of-type(4) {
  --service-card-background: linear-gradient(145deg, #485A45 0%, #263D35 100%);
  --service-card-ink: #FFF8E9;
  border-color: rgb(237 242 224 / 54%);
  background: var(--service-card-background);
  color: var(--service-card-ink);
  box-shadow: 0 20px 48px rgb(3 45 48 / 28%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

.services-preview .service-item h3 {
  width: 100%;
  margin: 0;
  color: inherit;
  font: 700 clamp(1.08rem, 1.5vw, 1.48rem)/1.24 var(--font-display);
  letter-spacing: .005em;
  text-align: center;
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
  transform: translateY(-7px);
}

html[lang^="zh"] .services-preview .service-item h3 {
  font-size: clamp(1.12rem, 1.62vw, 1.5rem);
  line-height: 1.3;
}

.services-preview .service-type-char {
  display: inline-block;
  will-change: auto;
}

.services-preview .service-type-word {
  display: inline-block;
  white-space: nowrap;
}

.services-preview .service-sticker {
  display: block;
  align-self: center;
  flex: 0 0 auto;
  width: clamp(148px, 22svh, 208px);
  height: clamp(148px, 22svh, 208px);
  max-width: 76%;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgb(3 44 47 / 15%));
}

.services-cta {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  margin: 0;
  pointer-events: auto;
}

.services-preview .services-learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 152px;
  min-height: 48px;
  margin: 0;
  padding: 13px 22px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  color: #FFF8E9;
  background: #064D50;
  box-shadow: 0 18px 42px rgb(3 59 62 / 25%);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease, background-color .3s ease;
}

.services-preview .services-learn-more:hover,
.services-preview .services-learn-more:focus-visible {
  transform: translateY(-4px);
  background: #003D40;
  box-shadow: 0 23px 48px rgb(3 59 62 / 29%);
}

.services-preview .services-learn-more:focus-visible {
  outline: 3px solid var(--ginkgo);
  outline-offset: 4px;
}

.contact-preview { position: relative; z-index: 1; }

/* Bring the following section's content into view as soon as the pinned story ends. */
html.overview-scroll-story-ready .overview-products-services-story + .contact-preview {
  padding-top: clamp(52px, 6dvh, 76px);
}

/* The pinned curtain and card sequence use the same viewport composition at all widths. */
html.overview-scroll-story-ready-wide .services-preview.section,
html.overview-scroll-story-ready-stacked .services-preview.section {
  position: relative;
  z-index: 3;
  height: var(--overview-stage-height);
  margin: calc(-1 * var(--overview-stage-height)) 0 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

html.overview-scroll-story-ready-wide .services-story-stage,
html.overview-scroll-story-ready-stacked .services-story-stage {
  position: relative;
  width: 100%;
  height: var(--overview-stage-height);
  min-height: 0;
  max-height: none;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
}

html.overview-story-active:not(.overview-scroll-story-ready-mobile-flow) .services-story-stage {
  position: fixed;
  z-index: 40;
  top: var(--overview-header-height);
  right: 0;
  left: 0;
  width: 100%;
  height: var(--overview-stage-height);
  max-width: none;
  margin: 0;
}

html.overview-scroll-story-ready-wide .services-story-inner.container,
html.overview-scroll-story-ready-stacked .services-story-inner.container {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(205px, .36fr) minmax(0, .64fr);
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
  width: min(1440px, 100%);
  max-width: none;
  height: 100%;
  margin-inline: auto;
  padding: 24px clamp(26px, 6vw, 98px);
  box-sizing: border-box;
  pointer-events: none;
}

html.overview-scroll-story-ready-wide .services-copy,
html.overview-scroll-story-ready-stacked .services-copy {
  position: relative;
  top: auto;
  left: auto;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(18px, 2.8vh, 28px);
  width: 100%;
  max-width: 100%;
  margin: 0;
  text-align: center;
  pointer-events: none;
}

html.overview-scroll-story-ready-wide .services-preview #services-title,
html.overview-scroll-story-ready-stacked .services-preview #services-title {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3.85rem);
  line-height: .99;
  text-align: center;
}

html.overview-scroll-story-ready-wide .services-cta,
html.overview-scroll-story-ready-stacked .services-cta {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  pointer-events: auto;
}

html.overview-scroll-story-ready-wide .services-preview .service-list,
html.overview-scroll-story-ready-stacked .services-preview .service-list {
  position: relative;
  top: auto;
  left: auto;
  grid-column: 2;
  grid-row: 1;
  display: block;
  align-self: center;
  justify-self: stretch;
  width: 100%;
  height: min(60vh, 520px);
  min-height: 300px;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  overflow: visible;
  pointer-events: none;
}

html.overview-scroll-story-ready-wide .services-preview .service-item,
html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
html.overview-scroll-story-ready-stacked .services-preview .service-item,
html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
  position: absolute;
  inset: 0;
  display: flex;
  grid-column: auto;
  grid-row: auto;
  align-items: center;
  justify-content: center;
  width: min(360px, 36vw, 42vh);
  min-width: 0;
  min-height: 0;
  height: auto;
  aspect-ratio: 5 / 7;
  max-height: none;
  box-sizing: border-box;
  margin: auto;
  padding: clamp(20px, 2.5vh, 30px) clamp(16px, 2vw, 28px);
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
  border: 1px solid rgb(255 255 255 / 64%);
  border-radius: 19px;
  background: var(--service-card-background);
  box-shadow: 0 20px 48px rgb(3 45 48 / 23%), inset 0 1px 0 rgb(255 255 255 / 78%);
  color: var(--service-card-ink);
  text-align: center;
  outline: none;
  overflow: hidden;
  transition: none;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(2),
html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(2),
html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(4),
html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(4) {
  box-shadow: 0 22px 52px rgb(3 45 48 / 29%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

html.overview-scroll-story-ready-wide .services-preview .service-item h3,
html.overview-scroll-story-ready-stacked .services-preview .service-item h3 {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.08rem, 1.5vw, 1.48rem);
  line-height: 1.24;
  word-break: normal;
  overflow-wrap: normal;
  transform: translateY(-7px);
}

html[lang^="zh"].overview-scroll-story-ready-wide .services-preview .service-item h3,
html[lang^="zh"].overview-scroll-story-ready-stacked .services-preview .service-item h3 {
  font-size: clamp(1.12rem, 1.62vw, 1.5rem);
  line-height: 1.3;
}

html.overview-scroll-story-ready-wide .services-preview .service-sticker,
html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
  width: clamp(148px, 22svh, 208px);
  height: clamp(148px, 22svh, 208px);
  max-width: 76%;
}

html.overview-scroll-story-ready-wide .services-learn-more,
html.overview-scroll-story-ready-stacked .services-learn-more {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  /* Keep the same left-title/right-card composition without narrow-screen gaps. */
  html.overview-scroll-story-ready-wide .services-story-inner.container,
  html.overview-scroll-story-ready-stacked .services-story-inner.container {
    grid-template-columns: minmax(150px, .34fr) minmax(0, .66fr);
    gap: clamp(12px, 2.2vw, 26px);
    padding-inline: clamp(20px, 4vw, 48px);
  }

  html.overview-scroll-story-ready-wide .services-preview #services-title,
  html.overview-scroll-story-ready-stacked .services-preview #services-title {
    font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  }

  html.overview-scroll-story-ready-wide .services-preview .service-list,
  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    height: min(60vh, 500px);
    min-height: 280px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-item,
  html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
    width: min(360px, 36vw, 42vh);
    height: auto;
    aspect-ratio: 5 / 7;
    max-height: none;
    padding-inline: 16px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-sticker,
  html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
    width: clamp(136px, 22svh, 190px);
    height: clamp(136px, 22svh, 190px);
  }
}

@media (max-width: 760px) {
  html.overview-scroll-story-ready-wide .services-story-inner.container,
  html.overview-scroll-story-ready-stacked .services-story-inner.container {
    grid-template-columns: minmax(0, .34fr) minmax(0, .66fr);
    gap: 8px;
    padding-inline: 12px;
  }

  html.overview-scroll-story-ready-wide .services-copy,
  html.overview-scroll-story-ready-stacked .services-copy {
    gap: 16px;
  }

  html.overview-scroll-story-ready-wide .services-preview #services-title,
  html.overview-scroll-story-ready-stacked .services-preview #services-title {
    font-size: clamp(1.15rem, 5.4vw, 1.8rem);
    letter-spacing: -.045em;
  }

  html[lang^="zh"].overview-scroll-story-ready-wide .services-preview #services-title,
  html[lang^="zh"].overview-scroll-story-ready-stacked .services-preview #services-title {
    font-size: clamp(1.45rem, 6vw, 2rem);
    letter-spacing: .04em;
  }

  html.overview-scroll-story-ready-wide .services-preview .services-learn-more,
  html.overview-scroll-story-ready-stacked .services-preview .services-learn-more {
    min-width: 0;
    min-height: 38px;
    width: 100%;
    padding: 9px 6px;
    gap: 6px;
    font-size: .61rem;
    letter-spacing: .02em;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-list,
  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    height: min(58vh, 440px);
    min-height: 260px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-item,
  html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
    width: min(100%, 58vw, 42vh);
    height: auto;
    aspect-ratio: 5 / 7;
    max-height: none;
    padding: 18px 10px;
    gap: 12px;
    border-radius: 18px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-item h3,
  html.overview-scroll-story-ready-stacked .services-preview .service-item h3 {
    font-size: clamp(.98rem, 3.45vw, 1.16rem);
    line-height: 1.24;
    letter-spacing: 0;
  }

  html[lang^="zh"].overview-scroll-story-ready-wide .services-preview .service-item h3,
  html[lang^="zh"].overview-scroll-story-ready-stacked .services-preview .service-item h3 {
    font-size: clamp(1.04rem, 3.8vw, 1.22rem);
    line-height: 1.28;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-sticker,
  html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
    width: clamp(108px, 27vw, 158px);
    height: clamp(108px, 27vw, 158px);
    max-width: 82%;
  }
}

@media (max-width: 420px) {
  html.overview-scroll-story-ready-wide .services-story-inner.container,
  html.overview-scroll-story-ready-stacked .services-story-inner.container {
    grid-template-columns: minmax(0, .35fr) minmax(0, .65fr);
    gap: 6px;
    padding-inline: 10px;
  }

  html.overview-scroll-story-ready-wide .services-preview #services-title,
  html.overview-scroll-story-ready-stacked .services-preview #services-title {
    font-size: clamp(1.08rem, 5.2vw, 1.35rem);
  }

  html.overview-scroll-story-ready-wide .services-preview .services-learn-more,
  html.overview-scroll-story-ready-stacked .services-preview .services-learn-more {
    font-size: .56rem;
    padding-inline: 4px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-item,
  html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
    padding-inline: 8px;
  }
}

@media (max-height: 700px) {
  html.overview-scroll-story-ready-wide .services-story-inner.container,
  html.overview-scroll-story-ready-stacked .services-story-inner.container {
    padding-block: 14px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-list,
  html.overview-scroll-story-ready-stacked .services-preview .service-list {
    height: min(58vh, 440px);
  }

  html.overview-scroll-story-ready-wide .services-preview .service-item,
  html.overview-scroll-story-ready-wide .services-preview .service-item:nth-of-type(n),
  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item:nth-of-type(n) {
    height: auto;
    aspect-ratio: 5 / 7;
    max-height: none;
    gap: 10px;
  }

  html.overview-scroll-story-ready-wide .services-preview .service-sticker,
  html.overview-scroll-story-ready-stacked .services-preview .service-sticker {
    width: clamp(118px, 20svh, 170px);
    height: clamp(118px, 20svh, 170px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.overview-scroll-story-ready-wide .services-story-stage,
  html.overview-scroll-story-ready-stacked .services-story-stage,
  html.overview-scroll-story-ready-wide .services-preview .service-item,
  html.overview-scroll-story-ready-stacked .services-preview .service-item,
  html.overview-scroll-story-ready-wide .service-type-char,
  html.overview-scroll-story-ready-stacked .service-type-char {
    will-change: auto;
  }
}

/* Slightly enlarge the Chinese CTA only; preserve the English sizing. */
html[lang^="zh"] .services-preview .services-learn-more { font-size: .82rem; }

@media (max-width: 760px) {
  html[lang^="zh"] .services-preview .services-learn-more { font-size: .67rem; }
}

@media (max-width: 420px) {
  html[lang^="zh"] .services-preview .services-learn-more { font-size: .62rem; }
}

/* Mobile: keep Featured Products in normal document flow and size the carousel
   by its real stage height. Only the subsequent Services animation is pinned. */
@media (max-width: 767px) {
  .products-preview.section {
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    padding: 56px 0 40px;
  }

  .products-intro-track,
  .products-intro-stage,
  .products-intro-content,
  .products-gallery-area,
  .category-gallery {
    height: auto;
    min-height: 0;
  }

  .products-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 28px;
  }

  .products-preview .products-intro > p {
    flex: 0 1 auto;
    width: 100%;
    max-width: none;
    margin-top: 0;
  }

  .category-gallery { margin-top: 0; }

  .category-gallery__viewport {
    height: clamp(260px, 76vw, 300px);
  }

  /* The parent section is the pin target on narrow screens, so its child
     remains in-flow and fills the below-navigation viewport exactly. */
  html.overview-scroll-story-ready-mobile-flow .services-preview.section {
    margin: 0;
  }

  html.overview-scroll-story-ready-mobile-flow.overview-story-active .services-story-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: var(--overview-stage-height);
    margin: 0;
  }
}
