/*
 * GSAP 建材外贸网站动效作品页
 * 页面视觉：现代极简 + 建材行业色彩 + 本地 SVG 场景图
 */

:root {
  --ink: #17221c;
  --muted: #667169;
  --line: #dfe4df;
  --paper: #f6f7f4;
  --white: #ffffff;
  --accent: #b8935c;
  --accent-dark: #967343;
  --dark: #132019;
  --dark-card: #1c2821;
  --radius: 24px;
  --container: 1180px;
  --shadow: 0 24px 70px rgba(22, 35, 27, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.04em;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section {
  padding: 130px 0;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

/* 顶部滚动进度 */
.scroll-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* 导航 */
.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  display: flex;
  width: min(calc(100% - 40px), var(--container));
  height: 86px;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 34px;
  font-size: 0.92rem;
}

.main-nav a {
  position: relative;
  opacity: 0.82;
  transition: opacity 0.25s ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.main-nav a:hover {
  opacity: 1;
}

.main-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta {
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.header-cta:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  min-height: 860px;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 30%, rgba(184, 147, 92, 0.24), transparent 25%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 52px 52px;
  opacity: 0.8;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 80px;
  align-items: center;
  padding-top: 80px;
}

.hero-title {
  margin-bottom: 28px;
  font-size: clamp(3rem, 6vw, 6.4rem);
  letter-spacing: -0.065em;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line-mask > span {
  display: block;
}

.hero-text {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-width: 145px;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.button-primary {
  color: #101710;
  background: var(--accent);
}

.button-primary:hover {
  background: #c7a46f;
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
  position: relative;
}

.visual-frame {
  height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.26);
  transform: rotate(2deg);
}

.visual-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.visual-frame:hover img {
  transform: scale(1.025);
}

.floating-label {
  position: absolute;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  font-size: 0.88rem;
  font-weight: 800;
}

.label-one {
  bottom: 80px;
  left: -40px;
}

.label-two {
  top: 65px;
  right: -25px;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  width: 28px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
}

.scroll-cue span {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 4px;
  height: 8px;
  background: var(--white);
  border-radius: 10px;
}

/* 通用标题 */
.section-heading {
  max-width: 760px;
  margin-bottom: 55px;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

/* 产品分类 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  height: 330px;
  overflow: hidden;
  background: #e9eee9;
}

.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.035);
}

.product-image span {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--white);
  background: rgba(19, 32, 25, 0.72);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 800;
}

.product-body {
  padding: 28px;
}

.product-body h3 {
  margin-bottom: 12px;
  font-size: 1.42rem;
}

.product-body p {
  color: var(--muted);
}

.product-body a {
  font-weight: 800;
}

/* 数据统计 */
.stats-section {
  padding: 130px 0;
  background: var(--paper);
}

.stats-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 90px;
  align-items: center;
}

.stats-intro p:last-child {
  color: var(--muted);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid #ccd3cc;
  border-left: 1px solid #ccd3cc;
}

.stat-item {
  padding: 36px;
  border-right: 1px solid #ccd3cc;
  border-bottom: 1px solid #ccd3cc;
}

.counter {
  display: block;
  color: var(--dark);
  font-size: clamp(2.3rem, 4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-item span {
  display: block;
  margin-top: 14px;
  color: var(--muted);
}

/* 应用场景视差 */
.parallax-section {
  position: relative;
  display: flex;
  height: 780px;
  align-items: flex-end;
  overflow: hidden;
  background: #dfe6df;
}

.parallax-image {
  position: absolute;
  inset: -80px 0;
  overflow: hidden;
  transform: scale(1.08);
  will-change: transform;
}

.parallax-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 25, 17, 0.16), rgba(10, 25, 17, 0.43));
  content: "";
}

.parallax-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  will-change: transform;
}

.parallax-content {
  position: relative;
  padding-bottom: 80px;
}

.glass-panel {
  max-width: 640px;
  padding: 42px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(19, 32, 25, 0.12);
  backdrop-filter: blur(14px);
}

.glass-panel p:last-child {
  color: var(--muted);
}

/* 横向工程案例 */
.projects {
  padding: 130px 0 40px;
  color: var(--white);
  background: #111a15;
}

.projects .section-heading > p:last-child {
  color: rgba(255, 255, 255, 0.58);
}

.horizontal-wrap {
  overflow: hidden;
}

.horizontal-track {
  display: flex;
  width: max-content;
  gap: 26px;
  padding: 20px max(20px, calc((100vw - var(--container)) / 2)) 110px;
}

.project-card {
  width: min(70vw, 760px);
  flex: none;
  overflow: hidden;
  background: var(--dark-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.project-visual {
  position: relative;
  display: flex;
  height: 430px;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  background: #e7ece7;
}

.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.035);
}

.project-visual::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(17, 26, 21, 0.72), rgba(17, 26, 21, 0));
  content: "";
}

.project-visual span {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  left: 24px;
  padding: 8px 12px;
  background: rgba(19, 32, 25, 0.68);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.project-card > div:last-child {
  padding: 30px;
}

.project-card small {
  color: var(--accent);
  letter-spacing: 0.14em;
}

.project-card h3 {
  max-width: 26ch;
  margin: 10px 0;
  font-size: 1.75rem;
}

.project-card p {
  color: rgba(255, 255, 255, 0.58);
}

/* OEM 流程 */
.process-section {
  background: var(--paper);
}

.process-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.process-step {
  position: relative;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.process-step b {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--white);
  background: var(--dark);
  border-radius: 50%;
}

.process-step h3 {
  margin: 50px 0 12px;
}

.process-step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* 底部 CTA */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 150px 0;
  text-align: center;
  background: var(--accent);
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
}

.cta-section .eyebrow {
  color: var(--white);
}

.cta-section h2 {
  font-size: clamp(2.5rem, 5vw, 5.5rem);
}

.cta-section p {
  max-width: 670px;
  margin-right: auto;
  margin-left: auto;
}

.button-light {
  margin-top: 24px;
  background: var(--white);
}

.button-light:hover {
  color: var(--white);
  background: var(--dark);
}

.cta-orb {
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.orb-one {
  top: -160px;
  left: -120px;
  width: 380px;
  height: 380px;
}

.orb-two {
  right: -210px;
  bottom: -280px;
  width: 500px;
  height: 500px;
}

footer {
  padding: 28px 0;
  color: rgba(255, 255, 255, 0.55);
  background: #0c120f;
  font-size: 0.85rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
}

.magnetic {
  will-change: transform;
}

/* 平板和手机 */
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .hero {
    min-height: 900px;
  }

  .hero-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-grid {
    padding-top: 140px;
  }

  .hero-visual {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .section,
  .stats-section {
    padding: 90px 0;
  }

  .process-line {
    grid-template-columns: 1fr 1fr;
  }

  .horizontal-track {
    display: grid;
    width: auto;
    padding: 20px 20px 90px;
  }

  .project-card {
    width: 100%;
  }

  .project-visual {
    height: 300px;
  }

  .parallax-section {
    height: 660px;
  }

  .parallax-image {
    inset: -40px 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    height: 70px;
  }

  .header-cta {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .hero {
    min-height: 760px;
  }

  .hero-title {
    font-size: 3.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-list {
    grid-template-columns: 1fr;
  }

  .process-line {
    grid-template-columns: 1fr;
  }

  .glass-panel {
    padding: 28px;
  }

  .parallax-section {
    height: 620px;
  }

  footer .container {
    display: grid;
    gap: 6px;
  }
}

/* 无障碍：用户开启“减少动态效果”时关闭非必要运动 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-progress {
    display: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
