:root {
  --bg: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);

  /* 支援色：浅粉为主，稍带高级感 */
  --accent: #ff6ea6;
  --accent-soft: rgba(255, 110, 166, 0.14);
  --accent-soft-2: rgba(255, 110, 166, 0.08);
  --deep: #171a26;

  --radius: 18px;
  --radius-lg: 26px;
  /* 内容区最大宽度（偏“留白高级感”） */
  --max: 980px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, Segoe UI, Roboto,
    Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      1200px 600px at 20% -10%,
      var(--accent-soft) 0%,
      transparent 55%
    ),
    radial-gradient(
      1000px 520px at 90% 10%,
      var(--accent-soft-2) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 60%, #ffffff 100%);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

/* Layout */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.spacer-top {
  height: 76px; /* 给固定导航留空间 */
}

/* Top Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(
      16px 16px at 30% 30%,
      rgba(255, 255, 255, 0.9) 0%,
      transparent 60%
    ),
    linear-gradient(
      135deg,
      rgba(255, 110, 166, 0.9),
      rgba(255, 186, 216, 0.9)
    );
  box-shadow: 0 10px 18px rgba(255, 110, 166, 0.18);
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name strong {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand-name span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.menu {
  display: flex;
  align-items: center;
  gap: 18px;
}
.menu a {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.menu a:hover {
  background: rgba(17, 24, 39, 0.04);
  color: var(--text);
  transform: translateY(-1px);
}
.menu a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 110, 166, 0.1);
  border: 1px solid rgba(255, 110, 166, 0.18);
}

/* Hero / Carousel */
.hero {
  padding: 22px 0 10px;
}
.hero-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.hero-title h1 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.hero-title p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  margin-left: auto;
  text-align: right;
  max-width: 56ch;
}
.carousel-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.swiper {
  width: 100%;
}
.slide {
  position: relative;
  /* 更接近“宽屏横图”的高级比例 */
  height: clamp(300px, 34vw, 440px);
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(1.02) contrast(1.02);
}
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.12) 65%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
}
.member-tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: rgba(17, 24, 39, 0.86);
  font-size: 13px;
  letter-spacing: 0.2px;
}
.member-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(255, 110, 166, 0.35);
}

.swiper-button-next,
.swiper-button-prev {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  transform: translateY(-1px) scale(1.02);
  background: rgba(255, 255, 255, 0.82);
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 16px;
  color: rgba(17, 24, 39, 0.82);
  font-weight: 700;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(17, 24, 39, 0.22);
  opacity: 1;
}
.swiper-pagination-bullet-active {
  background: var(--accent);
  box-shadow: 0 8px 16px rgba(255, 110, 166, 0.35);
}

/* Intro */
.intro {
  padding: 34px 0 22px;
}
.intro-card {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
  padding: clamp(18px, 3.2vw, 28px);
  text-align: center;
}
.intro-card h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.intro-card h2 .accent {
  color: var(--accent);
}
.intro-card p {
  margin: 0 auto;
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

/* Members section (anchor target) */
.members {
  padding: 14px 0 30px;
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.member-card {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.1);
}
.member-card .thumb {
  height: 180px;
  background: rgba(255, 110, 166, 0.08);
  position: relative;
}
.member-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-card .info {
  padding: 14px 14px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.member-card .info strong {
  font-weight: 600;
}
.member-card .info span {
  font-size: 12px;
  color: var(--muted-2);
}

/* Works (anchor target) */
.works {
  padding: 10px 0 34px;
}
.works-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.work-item {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
  padding: 14px 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.work-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 110, 166, 0.12);
  border: 1px solid rgba(255, 110, 166, 0.18);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.work-item h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.work-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

/* Chat */
.chat {
  padding: 10px 0 36px;
}
.chat-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.08);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-header h2 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
}
.chat-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.chat-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 110, 166, 0.35);
  background: rgba(255, 110, 166, 0.12);
  color: var(--accent);
}
.chat-body {
  border-radius: 16px;
  background: rgba(248, 249, 252, 0.9);
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-messages {
  max-height: 260px;
  overflow-y: auto;
  padding: 2px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-message {
  display: flex;
  gap: 8px;
}
.chat-message.user {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
}
.chat-message.ai .chat-avatar {
  background: rgba(255, 110, 166, 0.1);
  border-color: rgba(255, 110, 166, 0.3);
  color: var(--accent);
}
.chat-bubble {
  max-width: 100%;
  border-radius: 16px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.7;
}
.chat-message.ai .chat-bubble {
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.06);
}
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #ffb8d6, #ff8fbc);
  color: #1f2933;
  border-radius: 16px 2px 16px 16px;
}
.chat-input-row {
  margin-top: 4px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.chat-input-row textarea {
  resize: none;
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  min-height: 40px;
  max-height: 96px;
  outline: none;
  background: rgba(255, 255, 255, 0.96);
}
.chat-input-row textarea:focus {
  border-color: rgba(255, 110, 166, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 110, 166, 0.2);
}
.chat-send-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(255, 110, 166, 0.35);
}
.chat-send-btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.chat-send-btn:disabled {
  opacity: 0.7;
  cursor: default;
  box-shadow: none;
}
.chat-hint {
  margin: 2px 4px 0;
  font-size: 11px;
  color: var(--muted-2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Footer social */
footer {
  margin-top: 18px;
  background: var(--deep);
  color: rgba(255, 255, 255, 0.82);
}
.footer-inner {
  padding: 26px 0 18px;
}
.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.social {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 160ms ease, background 160ms ease;
}
.social:hover {
  transform: translateY(-2px) scale(1.06);
  background: rgba(255, 255, 255, 0.12);
}
.social i {
  font-size: 18px;
}
.copyright {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* Section titles */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 920px) {
  .members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .works-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }
  .nav-inner {
    height: 64px;
  }
  .brand-name span {
    display: none;
  }
  .menu {
    gap: 8px;
  }
  .menu a {
    padding: 10px 9px;
    font-size: 13px;
  }
  .hero-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .hero-title p {
    text-align: left;
    margin-left: 0;
    max-width: none;
  }
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
  .member-card .thumb {
    height: 160px;
  }
  .chat-card {
    padding: 14px 12px 12px;
  }
  .chat-messages {
    max-height: 220px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #ff6ea6, #ffb8d6);
  z-index: 9999;
  transition: width 80ms linear;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 110, 166, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease, transform 300ms ease, background 180ms ease;
  z-index: 100;
  box-shadow: 0 10px 20px rgba(255, 110, 166, 0.35);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: rgba(255, 110, 166, 1);
  transform: translateY(-2px);
}
.back-to-top i {
  font-size: 18px;
}

/* Loading Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: rgba(248, 249, 252, 0.5);
  border-radius: 999px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.15);
  border-radius: 999px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(17, 24, 39, 0.25);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
  }
  .back-to-top {
    transition: none;
  }
}
