/* ============================================================
   Lizhu Redesign — Design System
   Premium light, airy, editorial
   ============================================================ */

/* ----- Design Tokens ----- */
:root {
  --bg-warm: #faf9f6;
  --bg-card: #ffffff;
  --bg-muted: #f3f1ed;
  --bg-accent-soft: #fef9f0;
  --text-primary: #1c1917;
  --text-secondary: #78716c;
  --text-muted: #a8a29e;
  --accent: #b45309;
  --accent-light: #d97706;
  --accent-soft: #fef3c7;
  --surface: #334155;
  --surface-light: #475569;
  --border: #e7e5e4;
  --border-light: #f0efed;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.04);
  --shadow-md: 0 4px 16px rgba(28,25,23,0.06);
  --shadow-lg: 0 12px 40px rgba(28,25,23,0.08);
  --shadow-glow: 0 0 40px rgba(180,83,9,0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* ----- Base ----- */
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg-warm);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ----- Typography ----- */
h1, h2, h3, h4, .display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.02em;
}
.display-xl {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.display-lg {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
}
.display-md {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

/* ----- Glass Nav ----- */
.glass-nav {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}

/* ----- Cards ----- */
.card-premium {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.card-premium:hover {
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}
.card-magnetic {
  perspective: 1000px;
}
.card-magnetic-inner {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* ----- Bento Grid ----- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.bento-cell-4 { grid-column: span 4; }
.bento-cell-6 { grid-column: span 6; }
.bento-cell-8 { grid-column: span 8; }
.bento-cell-12 { grid-column: span 12; }
@media (max-width: 768px) {
  .bento-cell-4, .bento-cell-6, .bento-cell-8, .bento-cell-12 {
    grid-column: span 12;
  }
}

/* ----- Scroll Reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,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; }

/* ----- Glow Orbs (decorative) ----- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.glow-orb-amber {
  background: var(--accent-light);
  width: 400px; height: 400px;
}
.glow-orb-slate {
  background: var(--surface-light);
  width: 300px; height: 300px;
}

/* ----- Magnetic Tilt (JS-driven) ----- */
.magnetic-wrap {
  perspective: 1000px;
}

/* ----- Particle Canvas ----- */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ----- Hero 3D Canvas ----- */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ----- Smooth Section Transitions ----- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto;
  width: 80%;
  max-width: 800px;
}

/* ----- Animated Underline ----- */
.link-underline {
  position: relative;
}
.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.link-underline:hover::after {
  width: 100%;
}

/* ----- Gradient Text ----- */
.gradient-text {
  background: linear-gradient(135deg, var(--surface), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Spec Card ----- */
.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
}
.spec-card:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}
.spec-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ----- Timeline ----- */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), var(--accent));
  transform: translateX(-50%);
}

/* ----- Blog Magazine ----- */
.magazine-hero-card {
  grid-column: span 8;
  min-height: 400px;
}
.magazine-side-card {
  grid-column: span 4;
}

/* ----- Drop Cap (editorial) ----- */
.drop-cap::first-letter {
  float: left;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 0.8;
  padding-right: 0.5rem;
  color: var(--accent);
}

/* ----- Number Stat ----- */
.number-stat {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
}

/* ----- Animated Gradient Underline ----- */
.gradient-underline {
  position: relative;
  display: inline-block;
}
.gradient-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
  background-size: 200% 100%;
  animation: shimmer-underline 3s ease-in-out infinite;
}
@keyframes shimmer-underline {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ----- Card Glow Hover ----- */
.card-glow {
  position: relative;
  overflow: hidden;
}
.card-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(180,83,9,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 1;
}
.card-glow:hover::before {
  opacity: 1;
}

/* ----- Floating Animation ----- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
.float-anim {
  animation: float 5s ease-in-out infinite;
}

/* ----- Shimmer Loading ----- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-bg {
  background: linear-gradient(90deg, var(--bg-muted) 0%, var(--bg-card) 50%, var(--bg-muted) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ----- Staggered Fade In ----- */
.stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.stagger-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Section Divider Wave ----- */
.section-wave {
  position: relative;
}
.section-wave::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg-warm);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q150 0 300 20 Q450 40 600 20 Q750 0 900 20 Q1050 40 1200 20 L1200 40 L0 40 Z' fill='%23faf9f6'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  z-index: 1;
}

/* ----- Pulse Dot ----- */
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ----- Image Reveal Overlay ----- */
.img-reveal {
  position: relative;
  overflow: hidden;
}
.img-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-warm-muted);
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.8s cubic-bezier(0.16,1,0.3,1);
  z-index: 1;
}
.img-reveal.revealed::after {
  transform: scaleX(0);
}

/* ----- Tilt Card (subtle) ----- */
.tilt-card {
  transition: transform 0.3s ease-out;
  transform-style: preserve-3d;
}
.tilt-card:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
}

/* ----- Number Stat (about page) ----- */
.number-stat {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
