/* ========================================
   home.css — 首页专属样式
   作用：定义首页各区块的布局和视觉效果
   区块顺序：Hero → 关于我们 → 精选项目 → 行业领域 → 客户评价 → CTA
   ======================================== */

/* ===== 首屏 Hero 区 =====
   Cinematic 全屏单图 hero，右文左图非对称布局
   Ken Burns 慢速缩放 + 首次加载交错入场动画
   ======================================== */

.hero-cinematic {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background-color: #0f0f0f;
  color: #fff;
}

/* ---- Video Background + Fallback Image ---- */
.hero-cinematic__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #0f0f0f;
}

.hero-cinematic__video,
.hero-cinematic__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* video 默认透明但可见（浏览器会加载），加载成功后淡入覆盖 fallback */
.hero-cinematic__video {
  display: block;
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 1;
}

.hero-cinematic__video.is-loaded {
  opacity: 1;
}

/* fallback 默认显示在 video 下方 */
.hero-cinematic__fallback {
  display: block;
  z-index: 0;
}

/* ---- Overlay: 极 subtle 的右侧暗化，不遮挡图片主体 ---- */
.hero-cinematic__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    270deg,
    rgba(10, 10, 10, 0.62) 0%,
    rgba(10, 10, 10, 0.35) 40%,
    rgba(10, 10, 10, 0.08) 65%,
    transparent 85%
  );
}

/* 移动端：全幅暗化，因为文字居中 */
@media (max-width: 767px) {
  .hero-cinematic__overlay {
    background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.4) 50%,
      rgba(10, 10, 10, 0.6) 100%
    );
  }
}

/* ---- Content: 右侧定位，非对称构图 ---- */
.hero-cinematic__content {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-width: 680px;
  margin-right: calc(8% - 110px);
  padding-inline: var(--space-md);
  padding-block: var(--space-md);
  transform: translateY(-80px);
}

@media (max-width: 767px) {
  .hero-cinematic__content {
    text-align: center;
    align-items: center;
    padding-inline: var(--space-md);
    max-width: 100%;
    right: auto;
    left: 0;
    margin-right: 0;
    transform: translateY(0);
  }
}

/* ---- Eyebrow: 金色细线 + 小号大写字母 ---- */
.hero-cinematic__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  margin-block-end: var(--space-lg);
  overflow: hidden;
}

.hero-cinematic__line {
  display: inline-block;
  width: 1px;
  height: 40px;
  background-color: var(--color-accent);
  transform: scaleY(0);
  transform-origin: top;
  animation: lineGrow 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

@keyframes lineGrow {
  to { transform: scaleY(1); }
}

.hero-cinematic__eyebrow-text {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
  opacity: 0;
  transform: translateX(-12px);
  animation: fadeSlideRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

@keyframes fadeSlideRight {
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Title: 超大衬线体，视觉冲击 ---- */
.hero-cinematic__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.05;
  margin-block-end: var(--space-lg);
  opacity: 0;
  transform: translateY(24px);
  animation: fadeSlideUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

/* ---- Description ---- */
.hero-cinematic__desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
  max-width: 520px;
  margin-block-end: 14px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

/* ---- Actions ---- */
.hero-cinematic__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

@media (max-width: 767px) {
  .hero-cinematic__actions {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero-cinematic__actions {
    flex-wrap: nowrap;
  }
}

@keyframes fadeSlideUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Scroll Indicator ---- */
.hero-cinematic__scroll {
  position: absolute;
  bottom: var(--space-xl);
  right: 8%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-base);
}

.hero-cinematic__scroll:hover {
  color: rgba(255, 255, 255, 0.85);
}

.hero-cinematic__scroll-text {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  writing-mode: vertical-rl;
}

.hero-cinematic__scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@media (max-width: 767px) {
  .hero-cinematic__scroll {
    display: none;
  }
}

/* ===== 关于我们 =====
   左右两栏布局：左侧文字 + 右侧图片
   桌面端双列，移动端单列 */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 992px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
  }
}

/* 文字区 — 略大字号 + 宽松行高，提升长文可读性 */
.about-layout__text {
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* 图片区 — 大圆角 + 阴影，视觉上更精致 */
.about-layout__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-layout__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===== 精选项目 =====
   使用交替背景色（浅灰）与前一区块区分 */
#section-home-projects {
  background-color: var(--color-bg-alt);
}

/* "查看全部"按钮 — 居中显示 */
.projects-footer {
  text-align: center;
  margin-block-start: var(--space-xl);
}

/* ===== 行业领域 =====
   industry-card 与 service-card 结构相同但单独定义，
   因为行业卡片使用 16:10 横版图片比例（而非 service-card 的 4:3） */
.industry-card {
  display: block;
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.industry-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* 行业图片 — 16:10 横版比例 */
.industry-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.industry-card__body {
  padding: var(--space-lg);
}

.industry-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-block-end: var(--space-xs);
}

.industry-card__text {
  color: var(--color-text-light);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-block-end: 0;
}

/* ===== 客户评价 =====
   双列网格，最大宽度 900px 居中（不需要撑满 1200px） */
.testimonials-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 900px;
  margin-inline: auto;
}

/* 平板及以上变为双列 */
@media (min-width: 768px) {
  .testimonials-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 底部 CTA 行动号召 =====
   绿色渐变背景，居中白色文字，引导用户联系 */
#section-home-cta {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  text-align: center;
  padding-block: var(--space-2xl);
}

/* CTA 标题 — 白色，响应式字号 */
.cta__title {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-block-end: var(--space-md);
}

/* CTA 副标题 — 半透明白色，限制最大宽度保证阅读舒适 */
.cta__subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.0625rem;
  max-width: 560px;
  margin-inline: auto;
  margin-block-end: var(--space-xl);
  line-height: 1.7;
}

/* ========================================
   Carousel — 横向无限轮播
   ======================================== */

.carousel {
  overflow: hidden;
  width: 100%;
}

.carousel__track {
  display: flex;
  gap: var(--space-lg);
  width: max-content;
  will-change: transform;
}

.carousel__card {
  flex: 0 0 320px;
  max-width: 320px;
}

@media (max-width: 768px) {
  .carousel__card {
    flex: 0 0 260px;
    max-width: 260px;
  }
}
