﻿/* ============================================================
   KASTON · 卡斯顿网络工作室 主页样式 v3
   高端克制 · 未来科技
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg-deep: #05070c;
  --bg-soft: #0a0f18;
  --ink: #f2f6fb;
  --ink-dim: #9aa8bd;
  --ink-faint: #64748f;
  --cyan: #7fd4ff;
  --cyan-deep: #2b8fc9;
  --line: rgba(148, 163, 184, 0.16);
  --line-soft: rgba(148, 163, 184, 0.1);
  --font-display: 'Orbitron', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   背景层（克制、静谧）
   ============================================================ */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-deep);
}

.bg-hero {
  position: absolute;
  left: -4%;
  right: -4%;
  top: -12%;
  bottom: -12%;
  background-image: url('../images/bg-hero.jpg');
  background-size: cover;
  background-position: center 34%;
  opacity: 0.6;
  will-change: transform;
}

/* 全屏粒子画布 */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 细腻压暗，保证可读性 */
.bg-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0.55) 0%, rgba(5, 7, 12, 0.35) 42%, rgba(5, 7, 12, 0.58) 78%, rgba(5, 7, 12, 0.94) 100%);
}

/* ============================================================
   顶部导航（简洁、留白）
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(24px, 6vw, 80px);
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.85), rgba(5, 7, 12, 0.45));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

/* LOGO */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px;
  opacity: 0.96;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 1;
}

.logo-core {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(127, 212, 255, 0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.34em;
  color: var(--ink);
}

/* 联系我们按钮（细描边、克制的点亮） */
.btn-contact {
  display: inline-flex;
  align-items: center;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-contact:hover {
  color: var(--cyan);
  border-color: rgba(127, 212, 255, 0.55);
  background: rgba(127, 212, 255, 0.06);
}

/* ============================================================
   主视觉区（大留白、细字重）
   ============================================================ */
.site-main {
  position: relative;
  z-index: 1;
  padding: 0 clamp(24px, 6vw, 80px);
}

.hero {
  text-align: center;
  padding: clamp(96px, 17vh, 168px) 0 clamp(64px, 10vh, 110px);
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.62em;
  text-indent: 0.62em;
  color: var(--ink-faint);
  margin-bottom: 34px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.t-line {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 9.5vw, 104px);
  line-height: 1.04;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--ink);
  animation: titleDrift 7s ease-in-out infinite;
}

/* 动态模糊拖影层 */
.t-line::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  letter-spacing: inherit;
  text-indent: inherit;
  color: transparent;
  z-index: -1;
  filter: blur(14px);
  opacity: 0.55;
  background: linear-gradient(90deg, transparent 5%, var(--cyan-deep) 45%, var(--cyan) 70%, transparent 95%);
  -webkit-background-clip: text;
  background-clip: text;
  transform: translateX(-14px) scale(1.06);
  animation: trailBlur 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes titleDrift {
  0%, 100% { transform: translateX(0); text-shadow: 0 0 8px rgba(127, 212, 255, 0.12); }
  50% { transform: translateX(-5px); text-shadow: 0 0 22px rgba(127, 212, 255, 0.4); }
}

@keyframes trailBlur {
  0%, 100% { transform: translateX(-22px) scale(1.06); opacity: 0.35; filter: blur(18px); }
  50% { transform: translateX(4px) scale(1.02); opacity: 0.7; filter: blur(10px); }
}

.t-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(20px, 2.8vw, 30px);
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: var(--ink-dim);
}

.hero-sub {
  margin-top: 40px;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* ============================================================
   服务区（极简卡片）
   ============================================================ */
.services {
  padding: 20px 0 70px;
}

.services-head {
  text-align: center;
  margin-bottom: 44px;
}

.services-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  margin-bottom: 12px;
}

.services-desc {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.8vw, 22px);
  max-width: 1220px;
  margin: 0 auto;
}

/* 简洁卡片 */
.service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(34px, 3.6vw, 48px) 16px 30px;
  background: rgba(10, 15, 24, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.service-btn:hover {
  transform: translateY(-4px);
  background: rgba(12, 19, 30, 0.75);
  border-color: rgba(127, 212, 255, 0.4);
}

.s-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--ink-dim);
  transition: color 0.35s ease;
}

.s-icon svg {
  width: 28px;
  height: 28px;
}

.service-btn:hover .s-icon {
  color: var(--cyan);
}

.s-label {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--ink);
}

.s-en {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* 按钮内漂浮微粒子 */
.service-btn .btn-particle {
  position: absolute;
  bottom: 14%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  pointer-events: none;
  animation: btnParticleFloat 3s ease-in-out infinite;
}

.service-btn:hover .btn-particle {
  background: #bdeeff;
}

@keyframes btnParticleFloat {
  0% {
    transform: translate(0, 0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    transform: translate(var(--drift, 0px), -52px) scale(1);
    opacity: 0;
  }
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 24px 34px;
  border-top: 1px solid var(--line-soft);
}

.icp-link {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  transition: color 0.3s ease;
}

.icp-link:hover {
  color: var(--ink-dim);
}

.beian-icon {
  display: inline-block;
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
  margin-top: -2px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 15px 20px;
  }

  .logo-core {
    width: 34px;
    height: 34px;
  }

  .logo-text {
    font-size: 13px;
  }

  .btn-contact {
    padding: 9px 18px;
    font-size: 13px;
  }

  .hero {
    padding-top: 72px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
