/* ==========================================================================
  公司介绍区块 — 样式
  设计基调：日本精密制造企业（Sodick / sodick.co.jp）
   - 区块主色：青绿 #2e9c27（Sodick 绿系一档）
   - 浅底：柔和绿 #cbe5be；按钮渐变：鲜草绿 #22bc65 → 青绿 #0fa05c
   - 背景：sodick.co.jp 的 business-bg.webp（本地化），原色展示不加覆盖
   - 交互：滚动入场动画 + 公司简介面板
   ========================================================================== */

.company {
  /* 设计变量：作用域限定在区块内，避免污染站点全局变量 */
  --ci-primary: #2e9c27;              /* 主色（青绿） */
  --ci-tint: #cbe5be;                 /* 柔和绿底块 */
  --ci-paper: #f7f6f2;                /* 区块背景：暖白 */
  --ci-ink: #161a17;                  /* 标题 / 主文字 */
  --ci-mute: #8b908b;                 /* 辅助文字 */
  --ci-line: #e5e5df;                 /* 1px 分割线 */
  --ci-frame: #c8cdc2;                /* 图片偏移细框 */
  --ci-font: "Inter", "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --ci-aspect: 4 / 3;                 /* 图片宽高比（放大展示） */

  box-sizing: border-box;
  position: relative;
  font-family: var(--ci-font);
  line-height: 1.7;
  color: var(--ci-ink);
  background-color: var(--ci-paper);
  background-image: url("../img/business-bg.webp");
  background-size: cover;
  background-position: center;
  padding-block: clamp(56px, 7vw, 104px);
}

.company *,
.company *::before,
.company *::after {
  box-sizing: border-box;
}

.company__inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* --------------------------------------------------------------------------
   1. 区块标题（英文眉标 + 主色短横线 + 中文标题）
   -------------------------------------------------------------------------- */
.company__head {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
  border-top: 1px solid var(--ci-line);
  padding-top: clamp(28px, 3.4vw, 46px);
}

.company__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.company__eyebrow-line {
  width: 60px;
  height: 1px;
  background: #fff;
}

.company__title {
  margin-top: 0;
  font-size: clamp(30px, 3.4vw, 35px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   2. 内容面板
   -------------------------------------------------------------------------- */
.company__panels {
  margin-top: clamp(40px, 5vw, 56px);
}

.company__panel {
  display: none;
}

.company__panel.is-active {
  display: block;
  animation: company-fade-up 0.45s ease-out;
}

@keyframes company-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 面板内通用标签（绿色小字眉标） */
.company__panel-label {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #fff;
}

.company__desc {
  margin-top: 18px;
  font-size: 15px;
  line-height: 2.05;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 公司简介面板：55% / 45% 左右两栏 */
.company__panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}

.company__content {
  max-width: 600px;
  border-top: 1px solid var(--ci-line);
  padding-top: clamp(24px, 3vw, 40px);
}

/* 内容正文第一段作为引导文案，使用白色增强可读性 */
.company__content-body > p:first-child {
  color: #fff;
  font-size: 15px;
  line-height: 2.05;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 查看更多入口 */
.company__more {
  display: flex;
  justify-content: flex-end;
  margin: 28px 0 0;
}

.company__more a {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 0;
  background: linear-gradient(120deg, #22bc65 0%, #0fa05c 100%);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 160, 92, 0.26);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* 流光扫过特效 */
.company__more a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
}

.company__more svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: square;
  transition: transform 0.3s ease;
}

.company__more a:hover,
.company__more a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 160, 92, 0.34);
}

.company__more a:hover::before,
.company__more a:focus-visible::before {
  left: 130%;
}

.company__more a:focus-visible {
  color: #fff;
}

.company__more a:hover svg,
.company__more a:focus-visible svg {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   3. 图片模块
   层次：浅色底块（右下偏移）< 细线框（左上偏移）< 图片
   -------------------------------------------------------------------------- */
.company__media {
  position: relative;
}

.company__media-block {
  position: absolute;
  top: 34px;
  right: -34px;
  bottom: -34px;
  left: 34px;
  background: var(--ci-tint);
  z-index: 0;
}

.company__figure {
  position: relative;
  margin: 0;
}

.company__frame {
  position: absolute;
  top: -24px;
  left: -24px;
  width: 100%;
  aspect-ratio: var(--ci-aspect);
  border: 1px solid var(--ci-frame);
  z-index: 1;
}

.company__link {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ci-aspect);
  background: #e5e5df;
}

.company__link:focus-visible {
  outline: 1px solid var(--ci-primary);
  outline-offset: 3px;
}

.company__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.company__link:hover .company__overlay,
.company__link:focus-visible .company__overlay {
  opacity: 1;
}

.company__readmore {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: #fff;
}

.company__arrow {
  display: inline-flex;
  color: #fff;
  transition: transform 0.3s ease;
}

.company__arrow svg {
  display: block;
  width: 20px;
  height: 20px;
}

.company__link:hover .company__arrow,
.company__link:focus-visible .company__arrow {
  transform: translateX(4px);
}

.company__caption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.company__caption-dot {
  width: 5px;
  height: 5px;
  background: var(--ci-primary);
}

/* --------------------------------------------------------------------------
   4. 滚动入场动画（仅在 JS 可用时隐藏初始态）
   - 文案：淡入 + 上移 20px，依次出现
   - 图片：进入视口后 1.2s 缓慢放大到 1.05
   -------------------------------------------------------------------------- */
html.js .company [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  transition-delay: var(--ci-delay, 0ms);
}

html.js .company [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.js .company [data-reveal-media] .company__img {
  transform: scale(1);
  transition: transform 1.2s ease-out;
}

html.js .company [data-reveal-media].is-visible .company__img {
  transform: scale(1.05);
}

/* 文案依次出现 */
.company__title {
  --ci-delay: 120ms;
}

.company__desc:nth-of-type(2) {
  --ci-delay: 120ms;
}

/* --------------------------------------------------------------------------
   5. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .company__panel-grid {
    grid-template-columns: 1fr;
    gap: clamp(36px, 6vw, 48px);
  }

  /* 单列布局时：公司介绍图片移到文字（含查看更多）上方 */
  .company__panel-grid > .company__media {
    order: -1;
  }

  .company__tab {
    padding: 14px 16px 16px;
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .company {
    padding-block: clamp(48px, 10vw, 72px);
  }

  .company__title {
    font-size: clamp(26px, 6.5vw, 34px);
  }

  .company__desc {
    font-size: 14.5px;
  }

  .company__frame {
    top: -12px;
    left: -12px;
  }

  .company__media-block {
    top: 16px;
    right: -16px;
    bottom: -16px;
    left: 16px;
  }

  .company__tabs {
    margin-top: clamp(32px, 8vw, 44px);
  }

  .company__tab {
    padding: 12px 12px 14px;
    gap: 8px;
    font-size: 13.5px;
  }

  .company__quote {
    padding: 18px;
  }

  .company__info-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }
}

/* --------------------------------------------------------------------------
   6. 无障碍：尊重系统“减弱动态效果”设置
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.js .company [data-reveal],
  html.js .company [data-reveal-media] .company__img {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .company__panel.is-active {
    animation: none;
  }

}
