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

:root {
  --bg: #faf8f5;
  --text: #2c2c2c;
  --text-muted: #888;
  --accent: #e8815b;
  --accent-soft: #fdf0ea;
  --accent-light: #f5a88a;
  --card-bg: #fff;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
  --radius: 20px;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== Progress Bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: 200;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  backdrop-filter: blur(12px);
  background: rgba(250, 248, 245, 0.7);
  transition: padding 0.35s ease, background 0.35s ease;
}

.header.scrolled {
  padding: 12px 40px;
  background: rgba(250, 248, 245, 0.92);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
}

.logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: inline-flex;
  gap: 1px;
}

.logo-char {
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

.logo:hover .logo-char {
  color: var(--accent);
}

.logo:hover .logo-char:nth-child(2) { transition-delay: 0s; }
.logo:hover .logo-char:nth-child(3) { transition-delay: 0.05s; }
.logo:hover .logo-char:nth-child(4) { transition-delay: 0.1s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 40%,
    var(--accent-soft),
    transparent 70%
  );
  pointer-events: none;
  animation: heroBreath 8s ease-in-out infinite;
}

@keyframes heroBreath {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ===== Floating Shapes ===== */
.float-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.12;
}

.shape-circle {
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  top: 18%;
  left: 10%;
  animation: floatA 7s ease-in-out infinite;
}

.shape-diamond {
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
  top: 65%;
  right: 12%;
  border-radius: 6px;
  animation: floatB 9s ease-in-out infinite;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 35px solid transparent;
  border-right: 35px solid transparent;
  border-bottom: 60px solid var(--accent);
  top: 25%;
  right: 20%;
  background: none !important;
  animation: floatC 8s ease-in-out infinite;
}

.shape-dot-ring {
  width: 50px;
  height: 50px;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  bottom: 22%;
  left: 18%;
  animation: floatA 10s ease-in-out infinite reverse;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-18px) rotate(5deg); }
  66% { transform: translateY(8px) rotate(-3deg); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-24px) rotate(55deg); }
}

@keyframes floatC {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-14px) rotate(-4deg); }
  75% { transform: translateY(10px) rotate(3deg); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.hero-title span {
  display: block;
}

/* Shimmer text */
.shimmer-text {
  background: linear-gradient(
    120deg,
    var(--text) 0%,
    var(--text) 35%,
    var(--accent) 50%,
    var(--text) 65%,
    var(--text) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease-in-out infinite;
}

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

.hero-sub {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-dot {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: scrollBounce 1.8s ease-in-out infinite;
  position: relative;
}

.scroll-dot::before {
  content: '';
  position: absolute;
  top: -18px;
  left: -4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0.4;
  animation: scrollRing 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.3; }
}

@keyframes scrollRing {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 0; }
}

/* ===== Animations ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.1s; }
.fade-up.delay-2 { animation-delay: 0.3s; }
.fade-up.delay-3 { animation-delay: 0.5s; }
.fade-up.delay-4 { animation-delay: 0.9s; }

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

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Card shine */
.card-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255, 255, 255, 0.35) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: var(--radius);
}

.card:hover .card-shine {
  opacity: 1;
}

/* Icon bounce on hover */
.icon-bounce {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .icon-bounce {
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin-bottom: 10px;
  position: relative;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  position: relative;
}

/* ===== Quote ===== */
.quote {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  text-align: center;
}

.quote blockquote p {
  font-size: 1.4rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
}

.quote blockquote cite {
  display: block;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: normal;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.heart-beat {
  display: inline-block;
  animation: heartBeat 1.2s ease-in-out infinite;
  color: var(--accent);
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger card reveals */
.card:nth-child(1).reveal { transition-delay: 0s; }
.card:nth-child(2).reveal { transition-delay: 0.12s; }
.card:nth-child(3).reveal { transition-delay: 0.24s; }

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 150;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text-muted);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease,
    color 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 129, 91, 0.35);
  transform: translateY(-4px);
}

.back-to-top:active {
  transform: scale(0.92);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .header {
    padding: 16px 20px;
  }

  .header.scrolled {
    padding: 10px 20px;
  }

  .cards {
    grid-template-columns: 1fr;
    padding: 40px 20px 60px;
  }

  .card {
    padding: 32px 24px;
  }

  .quote blockquote p {
    font-size: 1.15rem;
  }

  .float-shape {
    display: none;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
