/* ============ 基础 ============ */
:root {
  --ink: #0a0a0a;
  --ink-2: #1d1d1f;
  --gray: #86868b;
  --line: #e5e5e7;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --accent: #0a84ff;
  --maxw: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ============ 导航 ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--line);
}
.nav-in {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  transition: color .35s;
}
.nav.solid .brand { color: var(--ink); }
.brand span { font-weight: 300; opacity: .7; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 13.5px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.82);
  transition: color .2s;
}
.nav.solid .nav-links a { color: var(--ink-2); }
.nav-links a:hover { opacity: .55; }

/* ============ 汉堡菜单 ============ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 22px;
  padding: 0;
  position: relative;
  z-index: 102;
}
.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s ease, top .3s ease, bottom .3s ease, opacity .2s, background .2s;
}
.nav.solid .nav-toggle span { background: var(--ink); }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 0; }
/* 汉堡 → X 动画 */
.nav.open .nav-toggle span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); background: var(--ink); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); background: var(--ink); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/themes/theme-studio/assets/img/hero.jpg") center/cover no-repeat;
  transform: scale(1.06);
  animation: heroZoom 18s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,.62) 100%);
}
.hero-in {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}
.hero-kicker {
  font-size: 12px;
  letter-spacing: .42em;
  text-transform: uppercase;
  opacity: .78;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.05;
}
.hero-sub {
  margin-top: 22px;
  font-size: clamp(12px, 1.4vw, 14px);
  letter-spacing: .34em;
  text-transform: uppercase;
  opacity: .8;
}
.hero-scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 11px;
  letter-spacing: .3em;
  opacity: .7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-scroll i {
  width: 1px; height: 44px;
  background: rgba(255,255,255,.6);
  animation: drop 1.8s infinite;
  transform-origin: top;
}
@keyframes drop {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ============ 区块 ============ */
.section { padding: 110px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 54px;
  gap: 24px;
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.12;
}
.section-head p {
  color: var(--gray);
  max-width: 380px;
  font-size: 14.5px;
}
.link-more {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  white-space: nowrap;
}
.link-more:hover { opacity: .5; }

/* ============ 作品 ============ */
.works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.work {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  display: block;
}
.work img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.work:hover img { transform: scale(1.06); }
.work::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.66));
  opacity: .85;
  transition: opacity .4s;
}
.work-meta {
  position: absolute;
  z-index: 2;
  left: 26px; right: 26px; bottom: 24px;
  color: #fff;
}
.work-meta small {
  display: block;
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: 8px;
}
.work-meta strong {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* ============ 服务 ============ */
.section-dark {
  background: var(--ink);
  color: #fff;
}
.section-dark .eyebrow { color: rgba(255,255,255,.5); }
.section-dark .section-head p { color: rgba(255,255,255,.6); }
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
}
.service {
  background: var(--ink);
  padding: 46px 36px 52px;
  transition: background .3s;
}
.service:hover { background: #141414; }
.service .num {
  font-size: 12px;
  letter-spacing: .3em;
  color: rgba(255,255,255,.4);
  margin-bottom: 44px;
}
.service h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: .02em;
}
.service p {
  font-size: 14px;
  color: rgba(255,255,255,.58);
  line-height: 1.75;
}

/* ============ 关于 ============ */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 26px;
}
.about-text p {
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.85;
}
.about-media { overflow: hidden; }
.about-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ============ 数据 ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 76px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat b {
  display: block;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ============ 产品 ============ */
.section-soft { background: var(--bg-soft); }
.product-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 56px;
}
.product-intro h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.product-intro h2 em {
  font-style: normal;
  color: var(--gray);
}
.product-intro p { color: var(--gray); font-size: 15px; line-height: 1.85; }
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.module {
  background: #fff;
  border: 1px solid var(--line);
  padding: 34px 26px 38px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.module:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
  border-color: #d0d0d4;
}
.module b {
  display: block;
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--gray);
  margin-bottom: 44px;
}
.module h3 { font-size: 20px; font-weight: 600; letter-spacing: .04em; margin-bottom: 12px; }
.module p { font-size: 13.5px; color: var(--gray); line-height: 1.75; }

/* ============ 联系 ============ */
.contact { text-align: center; }
.contact h2 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 22px;
}
.contact p { color: var(--gray); margin-bottom: 40px; }
.contact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 60px;
  font-size: 15px;
}
.contact-grid span { color: var(--gray); display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 8px; }

/* ============ 页脚 ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 40px;
  font-size: 12.5px;
  color: var(--gray);
}
.footer-in {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer a:hover { color: var(--ink); }

/* ============ 动效 ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .product-intro { grid-template-columns: 1fr; gap: 26px; align-items: start; }
}

/* --- 平板竖屏 / 大屏手机（≤900px）--- */
@media (max-width: 900px) {
  .nav { height: 56px; }
  .nav-toggle { display: block; }
  .nav-links {
    /* 默认隐藏，点击汉堡后由 JS 加 .nav.open 显示 */
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    z-index: 99;
    color: var(--ink-2);
    overflow-y: auto;
  }
  .nav-links a {
    display: block;
    padding: 16px 32px;
    font-size: 17px;
    letter-spacing: .1em;
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
  }
  .nav-links a:hover { background: var(--bg-soft); opacity: 1; }
  .nav.open { background: rgba(255,255,255,.86); backdrop-filter: blur(20px); border-bottom-color: var(--line); }
  .nav.open .brand { color: var(--ink); }
  .nav.open .nav-links { display: flex; }

  /* Hero 移动端 */
  .hero { min-height: 85vh; }
  .hero-bg { background-position: center 40%; }
  .hero h1 { font-size: clamp(32px, 9vw, 72px); }
  .hero-sub { font-size: clamp(12px, 2.8vw, 14px); letter-spacing: .2em; }
  .hero-kicker { font-size: 10px; letter-spacing: .3em; margin-bottom: 18px; }
  .hero-scroll { display: none; }

  /* 区块布局 */
  .works { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr; }
  .work { aspect-ratio: 16/10; }
  .services { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; padding: 56px 0; }
  .product-intro { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 40px; gap: 16px; }
  .section-head h2 { font-size: clamp(26px, 6vw, 40px); }
  .about-text h2 { font-size: clamp(26px, 6vw, 38px); margin-bottom: 20px; }
  .module, .service { padding: 32px 26px 36px; }
  .service h3, .module h3 { font-size: 18px; }
  .wrap, .nav-in { padding: 0 24px; }
  .brand { font-size: 15px; }
}

/* --- 小屏手机（≤600px）--- */
@media (max-width: 600px) {
  .nav { height: 52px; }
  .nav-toggle { width: 28px; height: 20px; }
  .nav.open .nav-links { inset: 52px 0 0 0; }
  .nav-links a { padding: 14px 24px; font-size: 15px; }

  .section { padding: 48px 0; }
  .wrap, .nav-in { padding: 0 16px; }
  .section-head h2 { font-size: clamp(24px, 7vw, 32px); }
  .about-text h2 { font-size: clamp(22px, 7vw, 30px); }

  .hero h1 { font-size: clamp(28px, 10vw, 52px); }
  .hero-in { padding: 0 20px; }

  .service, .module { padding: 26px 20px 30px; }
  .service h3, .module h3 { font-size: 17px; }
  .service p, .module p { font-size: 13px; }

  .stats { gap: 20px; padding: 44px 0; }
  .stat b { font-size: clamp(28px, 8vw, 38px); }
  .stat span { font-size: 11px; }

  .contact h2 { font-size: clamp(26px, 7vw, 40px); }
  .contact-grid { gap: 24px; flex-direction: column; }

  .footer { padding: 36px 0 32px; font-size: 12px; }
  .footer-in { gap: 12px; }

  .product-intro h2 { font-size: clamp(24px, 7vw, 32px); }
  .contact h2 { font-size: clamp(24px, 7vw, 36px); }
}
