/* ============================================================
   安安 Baby 日记 · 官网样式
   液态玻璃（Liquid Glass）特效 —— 纯 CSS 实现
   核心技法：backdrop-filter 毛玻璃 + 渐变光斑 + 高光边框 + 折射高光
   ============================================================ */

:root {
  /* 品牌色系（柔和母婴风） */
  --pink: #ff9ab5;
  --blue: #7cc5ff;
  --mint: #7fe0c8;
  --peach: #ffc9a3;
  --ink: #3a3a4a;
  --ink-soft: #7a7a8c;

  /* 液态玻璃参数 */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-blur: 20px;
  --glass-shadow: 0 8px 32px rgba(120, 140, 180, 0.15);
  --radius: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  /* 柔和渐变底，供玻璃卡片透出光斑 */
  background: linear-gradient(160deg, #fdf2f7 0%, #eef6ff 45%, #eefaf5 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 背景光斑装饰 ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  animation: float 16s ease-in-out infinite;
}

.orb--pink {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  top: -120px;
  left: -80px;
}

.orb--blue {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--blue), transparent 70%);
  top: 20%;
  right: -160px;
  animation-delay: -4s;
}

.orb--mint {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--mint), transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -8s;
}

.orb--peach {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--peach), transparent 70%);
  top: 55%;
  left: -100px;
  animation-delay: -12s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -40px) scale(1.08);
  }
}

/* ---------- 通用布局 ---------- */
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* ============================================================
   液态玻璃核心组件 .glass
   ============================================================ */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

/* 高光折射描边：顶部与左侧的亮边，营造玻璃厚度感 */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0) 60%,
      rgba(255, 255, 255, 0.25) 100%
    );
  opacity: 0.6;
  mix-blend-mode: screen;
}

/* 鼠标跟随高光：--mx / --my 由 main.js 动态更新，
   在卡片上叠加一圈随指针移动的折射光斑 */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.55),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

.glass:hover::after {
  opacity: 1;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;
  margin-top: 16px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(120, 140, 180, 0.25);
}

.nav {
  display: flex;
  gap: 26px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--ink);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pink), #ff7aa0);
  box-shadow: 0 8px 20px rgba(255, 122, 160, 0.4);
}

.btn--primary:hover {
  box-shadow: 0 12px 26px rgba(255, 122, 160, 0.55);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- 首屏 Hero ---------- */
.hero {
  padding: 72px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-copy .badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.hero-title {
  font-size: 52px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--pink), var(--blue), var(--mint));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- 手机预览 ---------- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.phone {
  width: 270px;
  height: 560px;
  border-radius: 42px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(120, 140, 180, 0.28);
  transform: rotate(-3deg);
  transition: transform 0.4s ease;
}

.phone:hover {
  transform: rotate(0deg) translateY(-6px);
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8ff 100%);
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phone-status {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.phone-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0e0ea;
}

.phone-dot:first-child {
  background: var(--pink);
}

.phone-greeting .phone-hi {
  font-size: 20px;
  font-weight: 700;
}

.phone-greeting .phone-date {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.phone-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff0f5, #eef4ff);
  box-shadow: 0 6px 18px rgba(120, 140, 180, 0.12);
}

.phone-card-icon {
  font-size: 26px;
}

.phone-card-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.phone-card-value {
  font-size: 28px;
  font-weight: 700;
}

.phone-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.phone-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(120, 140, 180, 0.1);
}

.phone-mini span:first-child {
  font-size: 22px;
}

/* 漂浮小气泡 */
.float-chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  animation: float 6s ease-in-out infinite;
}

.chip--1 {
  top: 8%;
  left: 2%;
  animation-delay: -2s;
}

.chip--2 {
  bottom: 10%;
  right: 0;
  animation-delay: -4s;
}

/* ---------- 板块标题 ---------- */
.section-title {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.3px;
}

.section-sub {
  text-align: center;
  color: var(--ink-soft);
  margin-top: 10px;
  margin-bottom: 40px;
  font-size: 15px;
}

/* ---------- 功能特性 ---------- */
.features {
  padding: 60px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 28px 26px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(120, 140, 180, 0.22);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 12px rgba(120, 140, 180, 0.12);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- 下载区块 ---------- */
.download {
  padding: 40px 0 80px;
}

.download-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  padding: 48px;
  border-radius: 32px;
}

.download-card .section-title,
.download-card .section-sub {
  text-align: left;
}

.download-list {
  list-style: none;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.download-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.qr-frame {
  padding: 16px;
  border-radius: 20px;
}

.qr-frame img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
}

.qr-caption {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  font-weight: 600;
  font-size: 16px;
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ============================================================
   滚动入场动效（配合 main.js 添加 .in-view）
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   响应式适配
   ============================================================ */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-title {
    font-size: 40px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download-card .section-title,
  .download-card .section-sub {
    text-align: center;
  }

  .download-list {
    align-items: center;
  }
}

@media (max-width: 520px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .hero-title {
    font-size: 32px;
  }

  .phone {
    width: 220px;
    height: 460px;
  }
}
