/* ==========================================================================
   Taimei Homepage — 响应式适配（仅 index.html 引入）
   设计稿基准 1440px；所有规则都包在 ≤979px 媒体查询内，
   PC 端（≥980px，含 1280–1439 的 zoom 缩放）一条都不命中，渲染保持不变。
   导航汉堡菜单由共享 common/css/header.css 负责，此处只处理页面内容。
   ========================================================================= */

/* 移动端专用切换容器：PC 端不渲染，保证 ≥980px 布局零变化 */
.screen__tabs {
  display: none;
}

@media (max-width: 979px) {
  /* ---------- 页面容器 ---------- */

  .page {
    width: 100%;
    min-height: auto;
  }

  /* 区块标题：绝对定位 → 文档流 */
  .section-title {
    position: static;
    transform: none;
    width: auto;
    padding: 0 20px;
    font-size: clamp(26px, 6vw, 40px);
    line-height: 1.3;
  }

  /* ---------- Hero ---------- */

  .hero {
    height: auto;
    padding: 108px 0 48px;
    overflow: hidden;
    text-align: center;
  }

  .hero__banner {
    top: -140px;
    left: 0;
    width: 100%;
    height: 540px;
    object-fit: cover;
    object-position: center 28%;
  }

  .hero__cube {
    top: 40px;
    left: 50%;
    transform: translateX(-50%) scaleY(-1);
    width: min(720px, 150%);
    height: auto;
  }

  .hero__glow {
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 130%;
    max-width: 720px;
    height: auto;
  }

  .hero__badge {
    position: static;
    transform: none;
    padding: 6px 12px;
  }

  .hero__badge-text {
    font-size: 14px;
    line-height: 22px;
  }

  .hero__title {
    /* 用 relative 才能让 z-index 生效（否则被 hero__cube / hero__glow 盖住）；
       基础样式带 top/left，relative 下会真的生效，必须一并复位 */
    position: relative;
    top: auto;
    left: auto;
    z-index: 3;
    transform: none;
    width: auto;
    /* 复位基础样式的定高 + flex（PC 用来给单行标题占住两行的高度） */
    height: auto;
    min-height: auto;
    display: block;
    margin-top: 20px;
    padding: 0 20px;
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.18;
  }

  .hero__subtitle {
    position: relative;
    top: auto;
    left: auto;
    z-index: 3;
    transform: none;
    width: auto;
    max-width: 620px;
    margin: 16px auto 0;
    padding: 0 20px;
    font-size: 15px;
    line-height: 26px;
  }

  /* ---------- 浏览器 mockup：全宽卡片，隐藏侧栏，内容改文档流 ---------- */

  .screen {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    max-width: 640px;
    height: auto;
    margin: 32px auto 0;
    border-width: 2px;
    border-radius: 20px;
  }

  .screen__bar {
    top: 12px;
    left: 12px;
  }

  /* 移动端切换标题：水平居中，只显示当前面板名称，靠左右滑动切换 */
  .screen__tabs {
    display: block;
    margin: 44px 16px 0;
    text-align: center;
  }

  .screen__tab {
    display: none;
    font-size: 15px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--white);
  }

  .screen__tab.is-active {
    display: block;
  }

  .screen__sidebar,
  .screen__icon,
  .screen__axis,
  .screen__gridline,
  .screen__commercial-icon,
  .screen__pv-icon {
    display: none;
  }

  /* 面板并排成横向轨道：三屏等宽同高（高度取最高者，切换不跳动），
     切换时整条轨道平移，配合 transition 得到左右滑动动画。
     注意：裁剪必须由外层 .screen 负责，此处不能加 overflow:hidden，
     否则裁剪区域会随轨道一起平移，第 2/3 屏永远不可见。 */
  .screen__content {
    position: static;
    inset: auto;
    display: flex;
    align-items: stretch;
    transition: transform 0.32s ease;
  }

  .screen__panel {
    display: block;
    position: static;
    inset: auto;
    flex: 0 0 100%;
    min-width: 0;
  }

  /* 轨道平移量由 JS 写入的索引决定（PC 端不消费该属性，故无位移） */
  .screen[data-active-index="1"] .screen__content {
    transform: translateX(-100%);
  }

  .screen[data-active-index="2"] .screen__content {
    transform: translateX(-200%);
  }

  .screen__desc {
    position: static;
    width: auto;
    margin: 16px 16px 0;
    font-size: 14px;
    line-height: 24px;
    text-align: left;
  }

  .screen__chart {
    position: static;
    width: calc(100% - 32px);
    height: auto;
    margin: 12px 16px 20px;
  }

  .screen__chart-img {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
  }

  .screen__commercial-img {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    height: auto;
    margin: 12px 16px 20px;
  }

  .screen__pv-img {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    height: auto;
    margin: 12px 16px 20px;
  }

  /* ---------- AI Agents ---------- */

  .agents {
    height: auto;
    padding: 48px 0 56px;
  }

  .agents__bg {
    left: 50%;
    transform: translateX(-50%);
  }

  .agents__title {
    margin: 0 0 28px;
  }

  .video {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    max-width: 720px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
  }

  .video__logo {
    top: 16px;
    left: 16px;
    width: 88px;
    height: 32px;
  }

  .video__wordmark {
    top: 30%;
    left: 16px;
    width: 180px;
    height: 36px;
  }

  .video__caption {
    top: auto;
    bottom: 32px;
    left: 16px;
    width: calc(100% - 32px);
    font-size: 15px;
    line-height: 24px;
  }

  .video__play {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 8px;
  }

  .video__play svg {
    width: 24px;
    height: 24px;
  }

  /* ---------- Solutions ---------- */

  .solutions {
    height: auto;
    padding: 48px 0 56px;
  }

  .solutions__cube {
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scaleY(-1);
    width: min(720px, 150%);
    height: auto;
  }

  .solutions__title {
    margin: 0 0 24px;
  }

  .solution-grid {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .solution-card {
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
  }

  .solution-card__icon {
    position: static;
    top: auto;
    left: auto;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
  }

  .solution-card__title {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 28px;
  }

  .solution-card__text {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    font-size: 14px;
    line-height: 24px;
  }

  /* 触屏无 hover：按钮常显 */
  .solution-card__btn {
    position: static;
    top: auto;
    left: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    align-self: flex-start;
    margin-top: 16px;
    padding: 8px 20px 8.5px;
    font-size: 14px;
    line-height: 24px;
  }

  /* ---------- Experience：地图与图钉为 1440 画布装饰，手机端隐藏 ---------- */

  .experience {
    height: auto;
    padding: 48px 0 40px;
  }

  .experience__blur {
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    max-width: 900px;
  }

  .experience__map,
  .offices {
    display: none;
  }

  .experience__title {
    margin: 0 0 24px;
  }

  .stats {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stat__head {
    min-height: auto;
  }

  .stat__num {
    font-size: 36px;
    line-height: 44px;
  }

  .stat__label {
    font-size: 15px;
    line-height: 24px;
  }

  .stat__desc {
    font-size: 14px;
    line-height: 24px;
  }

  /* ---------- News：左右布局 → 上下堆叠 ---------- */

  .news {
    height: auto;
    padding: 48px 0 56px;
  }

  .news__glow,
  .news__block {
    display: none;
  }

  .news__title {
    position: static;
    width: auto;
    white-space: normal;
    margin: 0 0 24px;
  }

  .news__layout {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    max-width: 720px;
    height: auto;
    margin: 0 auto;
  }

  .news__featured-list {
    position: static;
    width: 100%;
  }

  .news__featured,
  .news__item {
    width: 100%;
    height: auto;
    min-height: 60px;
  }

  .news__featured-text {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    padding: 16px 20px;
    font-size: 16px;
    line-height: 24px;
  }

  .news__item span {
    width: auto;
    margin: 14px 20px;
    font-size: 16px;
    line-height: 24px;
  }

  .news__detail {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    margin-top: 24px;
  }

  .news__detail-media {
    width: 100%;
    height: auto;
    aspect-ratio: 640 / 300;
  }

  .news__detail-date {
    margin-top: 8px;
    font-size: 14px;
    line-height: 22px;
  }

  .news__detail-text {
    width: auto;
    margin-top: 8px;
    font-size: 14px;
    line-height: 24px;
  }

  .news__detail::after {
    display: none;
  }

  /* ---------- Resources ---------- */

  .resources {
    height: auto;
    padding: 0 0 8px;
  }

  .resource-grid {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    margin: 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .resource-card {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
  }

  .resource-card__icon {
    position: static;
    top: auto;
    left: auto;
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
  }

  .resource-card__title {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    font-size: 20px;
    line-height: 28px;
  }

  .resource-card__btn {
    position: static;
    top: auto;
    left: auto;
    align-self: flex-start;
    margin-top: 16px;
    padding: 0;
    font-size: 15px;
    line-height: 24px;
  }

  /* ---------- Request a Demo ---------- */

  .demo {
    height: auto;
    padding: 24px 0 64px;
  }

  .demo__card {
    position: static;
    top: auto;
    left: auto;
    width: calc(100% - 32px);
    max-width: 720px;
    height: auto;
    margin: 0 auto;
    padding: 36px 16px 44px;
  }

  .demo__pattern {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .demo__glow {
    left: 50%;
    transform: translateX(-50%);
  }

  .demo__title {
    position: static;
    transform: none;
    width: auto;
    margin: 0 0 24px;
    padding: 0 16px;
    font-size: clamp(26px, 6.5vw, 40px);
    line-height: 1.3;
  }

  .demo__form {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    margin: 0 auto;
  }

  .demo__field {
    padding: 12px;
    gap: 8px;
  }

  .demo__note {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 48px);
    margin: 14px auto 0;
    font-size: 14px;
    line-height: 22px;
  }

  /* ---------- Footer（首页页脚样式在自身 style.css 内，选择器一致） ---------- */

  .footer {
    height: auto;
    padding: 44px 20px 32px;
  }

  /* 移动端 .footer 自身即为全宽且已铺黑，全屏黑底层不再需要；
     同时它 z-index:0 会盖住改为 static 的内容，必须移除 */
  .footer::before {
    display: none;
  }

  .footer__brands .footer__logo,
  .footer__logo {
    position: static;
    top: auto;
    left: auto;
    width: 124px;
    height: 45px;
  }

  .footer__nav {
    position: static;
    top: auto;
    left: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
    margin-top: 28px;
  }

  .footer__nav-col a {
    white-space: normal;
  }

  .footer__nav::before,
  .footer__info::before {
    display: none;
  }

  .footer__info {
    position: static;
    top: auto;
    left: auto;
    width: auto;
    margin-top: 28px;
  }

  .footer__social {
    position: static;
    top: auto;
    left: auto;
    margin-top: 16px;
    gap: 24px;
  }

  .footer__qr {
    position: static;
    top: auto;
    left: auto;
    display: inline-block;
    width: 74px;
    height: 74px;
    margin: 18px 12px 0 0;
  }

  .footer__qr--taimei {
    left: auto;
  }

  .footer__badge {
    position: static;
    top: auto;
    left: auto;
    display: block;
    margin: 24px auto 0;
  }

  .footer__legal {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 16px;
    margin-top: 24px;
    white-space: normal;
  }

  .footer__legal span,
  .footer__legal a.footer__legal-link {
    white-space: normal;
    font-size: 12px;
    line-height: 20px;
  }

  /* ---------- 视频灯箱 ---------- */

  .lightbox {
    padding: 16px;
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 32px;
  }

  .lightbox__content video {
    border-radius: 10px;
  }
}

/* ==========================================================================
   600px–979px：平板 — 卡片/数据双列
   ========================================================================== */

@media (min-width: 600px) and (max-width: 979px) {
  .solution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }
}

/* ==========================================================================
   ≤599px：手机 — 视频卡加高容纳文字，隐藏 wordmark 防重叠
   ========================================================================== */

@media (max-width: 599px) {
  .video {
    aspect-ratio: 4 / 3;
  }

  .video__wordmark {
    display: none;
  }
}
