/* YIDIMU 中文首页正文样式
   文件建议位置：/assets/css/home.css
   不依赖框架，不覆盖现有页头和页脚类名。
*/

:root {
  --ydm-bg: #ffffff;
  --ydm-surface: #f5f7fa;
  --ydm-surface-2: #eef2f6;
  --ydm-ink: #0b1220;
  --ydm-muted: #5d6878;
  --ydm-line: rgba(15, 23, 42, .11);
  --ydm-blue: #1463ff;
  --ydm-blue-dark: #0b46c8;
  --ydm-red: #e1262f;
  --ydm-radius: 22px;
  --ydm-shadow: 0 22px 70px rgba(15, 23, 42, .10);
  --ydm-shell: 1320px;
  --ydm-gutter: clamp(20px, 4vw, 56px);
  --ydm-section-space: clamp(76px, 9vw, 138px);
}

.ydm-home,
.ydm-home * {
  box-sizing: border-box;
}

.ydm-home {
  overflow: clip;
  color: var(--ydm-ink);
  background: var(--ydm-bg);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

.ydm-home img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.ydm-home a {
  color: inherit;
  text-decoration: none;
}

.ydm-home p,
.ydm-home h1,
.ydm-home h2,
.ydm-home h3,
.ydm-home ul,
.ydm-home ol {
  margin-top: 0;
}

.ydm-home :focus-visible {
  outline: 3px solid rgba(20, 99, 255, .45);
  outline-offset: 4px;
}

.ydm-shell {
  width: min(100%, calc(var(--ydm-shell) + var(--ydm-gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--ydm-gutter);
}

.ydm-section {
  padding-block: var(--ydm-section-space);
}

.ydm-eyebrow {
  margin-bottom: 18px;
  color: var(--ydm-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ydm-section-heading {
  max-width: 820px;
  margin: 0 auto clamp(42px, 5vw, 72px);
  text-align: center;
}

.ydm-section-heading--left {
  margin: 0;
  text-align: left;
}

.ydm-section-heading h2,
.ydm-workflow__content h2,
.ydm-samples__content h2,
.ydm-cta h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 55px);
  font-weight: 760;
  letter-spacing: 0.05em;
  line-height: 1.08;
}

.ydm-section-heading > p:last-child,
.ydm-workflow__content > p,
.ydm-samples__content > p,
.ydm-cta__inner > div > p:last-child {
  color: var(--ydm-muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.85;
}

.ydm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.ydm-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.ydm-button:hover {
  transform: translateY(-2px);
}

.ydm-button--primary {
  color: #fff;
  background: var(--ydm-blue);
}

.ydm-button--primary:hover {
  background: var(--ydm-blue-dark);
}

.ydm-button--ghost {
  color: #fff;
  border-color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

.ydm-button--dark {
  color: #fff;
  background: #0b1220;
}

.ydm-button--outline {
  color: var(--ydm-ink);
  border-color: var(--ydm-line);
  background: #fff;
}

.ydm-button--light {
  color: var(--ydm-ink);
  background: #fff;
}

.ydm-text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 15px;
  font-weight: 750;
}

.ydm-text-link span {
  transition: transform .2s ease;
}

.ydm-text-link:hover span {
  transform: translateX(4px);
}

/* Hero */
.ydm-hero {
  position: relative;
  min-height: clamp(680px, 88vh, 960px);
  display: grid;
  align-items: center;
  isolation: isolate;
  background: #07101e;
}

.ydm-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(4, 10, 20, .96) 0%, rgba(4, 10, 20, .79) 35%, rgba(4, 10, 20, .19) 68%, rgba(4, 10, 20, .08) 100%),
    linear-gradient(0deg, rgba(4, 10, 20, .38), transparent 44%);
}

.ydm-hero__media,
.ydm-hero__media picture,
.ydm-hero__media img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ydm-hero__media img {
  object-fit: cover;
  object-position: center;
}

.ydm-hero__inner {
  width: 100%;
  padding-block: clamp(100px, 13vw, 180px) clamp(70px, 8vw, 120px);
}

.ydm-hero__copy {
  max-width: 760px;
  color: #fff;
}

.ydm-hero .ydm-eyebrow {
  color: #72a7ff;
}

.ydm-hero h1 {
  max-width: 760px;
  margin-bottom: 46px;
  font-size: clamp(48px, 6.2vw, 92px);
  font-weight: 780;
  letter-spacing: 0.05em;
  line-height: .99;
}

.ydm-hero__lead {
  max-width: 680px;
  margin-bottom: 34px;
  color: rgba(255,255,255,.78);
  font-size: clamp(27px, 1.55vw, 21px);
  line-height: 1.8;
}

.ydm-hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  font-weight: 650;
}

.ydm-hero__points li {
  position: relative;
  padding-left: 17px;
}

.ydm-hero__points li::before {
  position: absolute;
  top: .48em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: #72a7ff;
}

/* Quick navigation */
.ydm-quick-nav {
  border-bottom: 1px solid var(--ydm-line);
  background: #fff;
}

.ydm-quick-nav__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.ydm-quick-nav a {
  display: flex;
  min-height: 88px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--ydm-line);
  font-size: 15px;
  font-weight: 720;
}

.ydm-quick-nav a:first-child {
  border-left: 1px solid var(--ydm-line);
}

.ydm-quick-nav a span {
  color: #9aa5b5;
  font-size: 11px;
  letter-spacing: .1em;
}

/* Intro */
.ydm-intro {
  padding-block: clamp(70px, 8vw, 110px);
}

.ydm-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}

.ydm-intro__text > p {
  margin-bottom: 26px;
  color: #3d4858;
  font-size: clamp(17px, 1.65vw, 22px);
  line-height: 1.9;
}

.ydm-inline-links,
.ydm-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.ydm-inline-links a,
.ydm-link-row a {
  position: relative;
  font-size: 14px;
  font-weight: 750;
}

.ydm-inline-links a::after,
.ydm-link-row a::after {
  display: inline-block;
  margin-left: 7px;
  content: "↗";
  color: var(--ydm-blue);
}

/* Products */
.ydm-products {
  background: var(--ydm-surface);
}

.ydm-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 30px);
}

.ydm-product-card {
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--ydm-radius);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}

.ydm-product-card--feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
}

.ydm-product-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e9eef5;
}

.ydm-product-card:not(.ydm-product-card--feature) .ydm-product-card__media {
  aspect-ratio: 4 / 3;
}

.ydm-product-card--feature .ydm-product-card__media {
  min-height: 520px;
}

.ydm-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}

.ydm-product-card:hover .ydm-product-card__media img {
  transform: scale(1.025);
}

.ydm-product-card__body {
  padding: clamp(28px, 3vw, 48px);
}

.ydm-product-card--feature .ydm-product-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ydm-product-card__type {
  margin-bottom: 12px;
  color: var(--ydm-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.ydm-product-card h3 {
  margin-bottom: 15px;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.035em;
  line-height: 1.08;
}

.ydm-product-card__body > p:not(.ydm-product-card__type) {
  margin-bottom: 25px;
  color: var(--ydm-muted);
  font-size: 16px;
  line-height: 1.78;
}

.ydm-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.ydm-specs li {
  padding: 17px 18px;
  border: 1px solid var(--ydm-line);
  border-radius: 13px;
  background: #fafbfd;
}

.ydm-specs strong,
.ydm-specs span {
  display: block;
}

.ydm-specs strong {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.25;
}

.ydm-specs span {
  color: #7b8797;
  font-size: 12px;
  line-height: 1.4;
}

.ydm-section-action {
  margin-top: 44px;
  text-align: center;
}

/* Applications */
.ydm-applications {
  background: #07101e;
  color: #fff;
}

.ydm-section-heading--light > p:last-child {
  color: rgba(255,255,255,.63);
}

.ydm-application-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ydm-application-card {
  position: relative;
  min-height: clamp(360px, 40vw, 540px);
  overflow: hidden;
  border-radius: var(--ydm-radius);
  isolation: isolate;
}

.ydm-application-card--wide {
  grid-column: span 1;
}

.ydm-application-card img,
.ydm-application-card__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ydm-application-card img {
  z-index: -2;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
}

.ydm-application-card__shade {
  z-index: -1;
  background: linear-gradient(0deg, rgba(3,8,15,.88), rgba(3,8,15,.08) 70%);
}

.ydm-application-card__content {
  position: absolute;
  right: clamp(24px, 4vw, 44px);
  bottom: clamp(24px, 4vw, 42px);
  left: clamp(24px, 4vw, 44px);
}

.ydm-application-card small,
.ydm-application-card strong,
.ydm-application-card em {
  display: block;
}

.ydm-application-card small {
  margin-bottom: 9px;
  color: #8ab3ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

.ydm-application-card strong {
  margin-bottom: 10px;
  font-size: clamp(25px, 3vw, 40px);
  letter-spacing: 0.05em;
  line-height: 1.12;
}

.ydm-application-card em {
  color: rgba(255,255,255,.69);
  font-size: 14px;
  font-style: normal;
}

.ydm-application-card:hover img {
  transform: scale(1.035);
}

.ydm-applications .ydm-link-row {
  justify-content: center;
  margin-top: 34px;
}

.ydm-applications .ydm-link-row a {
  color: rgba(255,255,255,.78);
}

/* Workflow */
.ydm-workflow {
  background: #fff;
}

.ydm-workflow__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.ydm-workflow__media {
  overflow: hidden;
  border-radius: var(--ydm-radius);
  background: var(--ydm-surface);
  box-shadow: var(--ydm-shadow);
}

.ydm-workflow__media img {
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.ydm-steps {
  display: grid;
  gap: 0;
  margin: 34px 0 36px;
  padding: 0;
  list-style: none;
}

.ydm-steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding-block: 19px;
  border-top: 1px solid var(--ydm-line);
}

.ydm-steps li:last-child {
  border-bottom: 1px solid var(--ydm-line);
}

.ydm-steps > li > span {
  color: #9aa5b5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.ydm-steps strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.ydm-steps p {
  margin-bottom: 0;
  color: var(--ydm-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Capability */
.ydm-capability {
  background: var(--ydm-surface);
}

.ydm-capability__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  gap: 24px;
}

.ydm-capability__visual {
  overflow: hidden;
  border-radius: var(--ydm-radius);
  background: #e7ecf3;
}

.ydm-capability__visual img {
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.ydm-capability__cards {
  display: grid;
  gap: 14px;
}

.ydm-capability-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 17px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.ydm-capability-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(15,23,42,.08);
}

.ydm-capability-card > span {
  color: var(--ydm-blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .09em;
}

.ydm-capability-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}

.ydm-capability-card p {
  margin-bottom: 0;
  color: var(--ydm-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Samples */
.ydm-samples__grid {
  display: grid;
  grid-template-columns: minmax(420px, .88fr) minmax(0, 1.12fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.ydm-samples__media {
  overflow: hidden;
  border-radius: var(--ydm-radius);
  background: var(--ydm-surface);
}

.ydm-samples__media img {
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.ydm-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px 24px;
  margin: 30px 0 35px;
  padding: 0;
  list-style: none;
}

.ydm-check-list li {
  position: relative;
  padding-left: 25px;
  color: #3d4858;
  font-size: 14px;
  line-height: 1.7;
}

.ydm-check-list li::before {
  position: absolute;
  top: .25em;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle at center, var(--ydm-blue) 0 3px, rgba(20,99,255,.13) 4px 100%);
}

/* Insights */
.ydm-insights {
  background: var(--ydm-surface);
}

.ydm-section-heading--split {
  max-width: none;
  display: flex;
  gap: 28px;
  align-items: end;
  justify-content: space-between;
  text-align: left;
}

.ydm-section-heading--split > div {
  max-width: 820px;
}

.ydm-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ydm-insight-card {
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: #fff;
}

.ydm-insight-card__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 10 / 7;
  background: #e9eef5;
}

.ydm-insight-card__media img {
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ydm-insight-card:hover img {
  transform: scale(1.03);
}

.ydm-insight-card__body {
  padding: 26px;
}

.ydm-insight-card__body > p {
  margin-bottom: 9px;
  color: var(--ydm-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.ydm-insight-card h3 {
  margin-bottom: 12px;
  font-size: 21px;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.ydm-insight-card__body > span {
  color: var(--ydm-muted);
  font-size: 13px;
  line-height: 1.65;
}

/* CTA */
.ydm-cta {
  position: relative;
  min-height: 500px;
  display: grid;
  align-items: center;
  isolation: isolate;
  color: #fff;
  background: #07101e;
}

.ydm-cta::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(3,8,15,.95), rgba(3,8,15,.55) 55%, rgba(3,8,15,.22));
}

.ydm-cta__media,
.ydm-cta__media img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ydm-cta__media img {
  object-fit: cover;
}

.ydm-cta__inner {
  display: flex;
  gap: 50px;
  align-items: center;
  justify-content: space-between;
  padding-block: 90px;
}

.ydm-cta__inner > div:first-child {
  max-width: 820px;
}

.ydm-cta .ydm-eyebrow {
  color: #8ab3ff;
}

.ydm-cta__inner > div > p:last-child {
  color: rgba(255,255,255,.72);
}

/* Progressive reveal: optional, enabled by home.js */
html.ydm-js .ydm-home [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}

html.ydm-js .ydm-home [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1080px) {
  .ydm-product-card--feature,
  .ydm-workflow__grid,
  .ydm-capability__grid,
  .ydm-samples__grid {
    grid-template-columns: 1fr;
  }

  .ydm-product-card--feature .ydm-product-card__media {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

  .ydm-workflow__content,
  .ydm-samples__content {
    max-width: 820px;
  }

  .ydm-capability__visual img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .ydm-samples__media {
    order: -1;
  }

  .ydm-cta__inner {
    display: grid;
  }
}

@media (max-width: 820px) {
  .ydm-hero {
    min-height: 720px;
    align-items: end;
  }

  .ydm-hero::after {
    background: linear-gradient(0deg, rgba(4,10,20,.97) 0%, rgba(4,10,20,.72) 60%, rgba(4,10,20,.22) 100%);
  }

  .ydm-hero__media img {
    object-position: 68% center;
  }

  .ydm-quick-nav__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ydm-quick-nav a:nth-child(3) {
    border-left: 1px solid var(--ydm-line);
  }

  .ydm-quick-nav a:nth-child(-n+2) {
    border-bottom: 1px solid var(--ydm-line);
  }

  .ydm-intro__grid,
  .ydm-product-grid,
  .ydm-application-grid,
  .ydm-insight-grid {
    grid-template-columns: 1fr;
  }

  .ydm-application-card--wide {
    grid-column: auto;
  }

  .ydm-application-card {
    min-height: 430px;
  }

  .ydm-section-heading--split {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 560px) {
  :root {
    --ydm-gutter: 18px;
    --ydm-radius: 17px;
  }

  .ydm-section {
    padding-block: 72px;
  }

  .ydm-hero {
    min-height: 700px;
  }

  .ydm-hero__inner {
    padding-top: 120px;
    padding-bottom: 56px;
  }

  .ydm-hero h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .ydm-actions,
  .ydm-cta .ydm-actions {
    align-items: stretch;
  }

  .ydm-button {
    width: 100%;
  }

  .ydm-hero__points {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .ydm-quick-nav a {
    min-height: 72px;
    font-size: 13px;
  }

  .ydm-product-card__body,
  .ydm-insight-card__body {
    padding: 24px;
  }

  .ydm-specs,
  .ydm-check-list {
    grid-template-columns: 1fr;
  }

  .ydm-application-card {
    min-height: 380px;
  }

  .ydm-workflow__grid,
  .ydm-samples__grid {
    gap: 34px;
  }

  .ydm-capability-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ydm-cta {
    min-height: 560px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ydm-home *,
  .ydm-home *::before,
  .ydm-home *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
