/*
Theme Name: Boyatriz AI
Theme URI: https://boyatriz.ai
Author: 博雅创智
Author URI: https://boyatriz.ai
Description: 博雅创智官网主题 — 深色太空风格，含星空背景、滚动动画、视差效果
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boyatriz
*/

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0f;
  --text: #e8e8f0;
  --text-dim: #7a7a9a;
  --accent-1: #6c5ce7;
  --accent-2: #00cec9;
  --accent-3: #fd79a8;
  --glow-1: rgba(108, 92, 231, .35);
  --glow-2: rgba(0, 206, 201, .35);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-1) var(--bg);
}

body {
  font-family: "SF Pro Display", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  cursor: default;
}

/* ==================== Starfield Canvas ==================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ==================== Cursor Glow ==================== */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.4;
  transition: opacity 0.3s;
  mix-blend-mode: screen;
}

/* ==================== Navigation ==================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, .6);
  border-bottom: 1px solid rgba(108, 92, 231, .1);
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
}

.site-nav.hidden {
  transform: translateY(-100%);
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo a {
  text-decoration: none;
  color: inherit;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.3s cubic-bezier(.4, 0, .2, 1);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ==================== Sections ==================== */
section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
}

/* ==================== Hero ==================== */
.hero {
  text-align: center;
  overflow: hidden;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid rgba(108, 92, 231, .3);
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s 0.3s forwards;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 .line {
  display: block;
  opacity: 0;
  transform: translateY(80px) rotateX(15deg);
  animation: heroTextIn 1s forwards;
  transform-origin: bottom center;
}

.hero h1 .line:nth-child(1) {
  animation-delay: 0.5s;
}

.hero h1 .line:nth-child(2) {
  animation-delay: 0.7s;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 3rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s 1s forwards;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s 1.2s forwards;
}

.btn {
  padding: 0.9rem 2.4rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px var(--glow-1), 0 5px 20px var(--glow-2);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .15);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s 1.6s forwards;
}

.scroll-indicator span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ==================== About / Mission ==================== */
.about {
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(108, 92, 231, .08), transparent);
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.5rem;
}

.about h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  text-align: center;
  max-width: 900px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.about h2 .highlight {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-desc {
  text-align: center;
  max-width: 650px;
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-top: 2rem;
  line-height: 1.8;
}

/* ==================== Products ==================== */
.products {
  padding: 8rem 2rem;
}

.products-header {
  text-align: center;
  margin-bottom: 6rem;
}

.products-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 3rem;
  max-width: 1100px;
  width: 100%;
}

.product-card {
  position: relative;
  border-radius: 24px;
  padding: 3rem;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
  cursor: default;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .06);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.product-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: opacity 0.5s;
}

.card-bowen .product-card-bg {
  background: linear-gradient(160deg, rgba(108, 92, 231, .12) 0%, rgba(10, 10, 15, .9) 60%);
}

.card-zhian .product-card-bg {
  background: linear-gradient(160deg, rgba(0, 206, 201, .12) 0%, rgba(10, 10, 15, .9) 60%);
}

.product-card:hover .product-card-bg {
  opacity: 1.5;
}

.product-card-content {
  position: relative;
  z-index: 1;
}

.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.card-bowen .product-icon {
  background: linear-gradient(135deg, rgba(108, 92, 231, .2), rgba(108, 92, 231, .05));
  box-shadow: 0 0 40px var(--glow-1);
}

.card-zhian .product-icon {
  background: linear-gradient(135deg, rgba(0, 206, 201, .2), rgba(0, 206, 201, .05));
  box-shadow: 0 0 40px var(--glow-2);
}

.product-icon svg {
  width: 36px;
  height: 36px;
}

.product-card h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card-bowen h3 {
  color: #a29bfe;
}

.card-zhian h3 {
  color: #81ecec;
}

.product-card .product-en {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.product-card p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-tags span {
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.card-bowen .product-tags span {
  background: rgba(108, 92, 231, .12);
  color: #a29bfe;
  border: 1px solid rgba(108, 92, 231, .2);
}

.card-zhian .product-tags span {
  background: rgba(0, 206, 201, .12);
  color: #81ecec;
  border: 1px solid rgba(0, 206, 201, .2);
}

/* Floating orbs in cards */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.3;
  animation: orbFloat 8s ease-in-out infinite;
}

.card-bowen .orb {
  width: 200px;
  height: 200px;
  background: var(--accent-1);
  right: -40px;
  top: -40px;
}

.card-zhian .orb {
  width: 200px;
  height: 200px;
  background: var(--accent-2);
  right: -40px;
  top: -40px;
  animation-delay: -4s;
}

/* ==================== Metrics ==================== */
.metrics {
  min-height: auto;
  padding: 6rem 2rem;
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(0, 206, 201, .05), transparent);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.metric-item {
  padding: 2rem;
}

.metric-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==================== Footer ==================== */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 4rem 3rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, .05);
  text-align: center;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ==================== Reveal Animations ==================== */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s cubic-bezier(.4, 0, .2, 1),
    transform 0.8s cubic-bezier(.4, 0, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ==================== Keyframes ==================== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(1.3);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(20px, -20px) scale(1.1);
  }

  66% {
    transform: translate(-10px, 15px) scale(0.95);
  }
}

/* ==================== WP Overrides ==================== */
/* Remove default WP admin bar gap */
html {
  margin-top: 0 !important;
}

#wpadminbar {
  z-index: 200;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .site-nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  section {
    padding: 4rem 1.5rem;
  }

  .product-card {
    padding: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none;
  }
}
