/* ===========================================
   OusiaLife.com — 全局样式
   配色方向：温暖明亮 + 精致生活感
   =========================================== */

/* --- 1. 自定义属性 (Design Tokens) --- */
:root {
  /* 背景色 */
  --bg-primary: #faf9f7;
  --bg-secondary: #f3f1ee;
  --bg-card: #ffffff;

  /* 文字色 */
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;

  /* 边框 */
  --border-light: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);

  /* 品牌渐变 */
  --gradient-brand: linear-gradient(135deg, #f59e0b, #f97316, #ec4899, #8b5cf6, #6366f1);
  --gradient-brand-soft: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(236, 72, 153, 0.08), rgba(99, 102, 241, 0.1));

  /* 各 App 品牌色 */
  --ousia-color: #6366f1;
  --ousia-gradient: linear-gradient(135deg, #6366f1, #818cf8);
  --ousia-bg: linear-gradient(135deg, #eef2ff, #e0e7ff, #c7d2fe);

  --enstamp-color: #f59e0b;
  --enstamp-gradient: linear-gradient(135deg, #f59e0b, #f97316);
  --enstamp-bg: linear-gradient(135deg, #fffbeb, #fef3c7, #fde68a);

  --starflow-color: #8b5cf6;
  --starflow-gradient: linear-gradient(135deg, #8b5cf6, #a78bfa);
  --starflow-bg: linear-gradient(135deg, #f5f3ff, #ede9fe, #ddd6fe);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* 阴影 */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.08);
  --shadow-nav: 0 1px 12px rgba(0, 0, 0, 0.04);

  /* 过渡曲线 */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* 布局 */
  --container-max: 1200px;
  --section-spacing: 140px;

  /* 字体 */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- 2. CSS 重置 --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease-smooth);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- 3. 布局工具类 --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-spacing) 0;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 4. 导航栏 (毛玻璃效果) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 249, 247, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.4s var(--ease-smooth);
}

.nav--scrolled {
  background: rgba(250, 249, 247, 0.95);
  box-shadow: var(--shadow-nav);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav__logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 1px;
  transition: width 0.3s var(--ease-smooth);
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 100%;
}

/* 语言切换器 (地球图标 + 下拉) */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease-smooth);
  color: var(--text-secondary);
}

.lang-switcher__btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.lang-switcher__btn svg {
  stroke: currentColor;
}

.lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  padding-top: 8px;
  /* 视觉间距，但保持 hover 区域连续 */
  z-index: 1001;
}

/* 下拉菜单内容容器（真正可见的部分） */
.lang-switcher__dropdown::after {
  content: '';
  display: block;
}

.lang-switcher__dropdown>a:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lang-switcher__dropdown>a:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.lang-switcher__dropdown>a {
  background: var(--bg-card);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.lang-switcher__dropdown>a:first-child {
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.lang-switcher__dropdown>a:last-child {
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.lang-switcher:hover .lang-switcher__dropdown,
.lang-switcher__dropdown:hover {
  display: block;
}

.lang-switcher__option {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth);
}

.lang-switcher__option:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.lang-switcher__option--active {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
}

.lang-switcher__option--active::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

/* 移动端菜单按钮 */
.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav__mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s var(--ease-smooth);
}

/* --- 5. 英雄区域 (Hero) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 64px;
}

/* 浮动环境光球 */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

.hero-orb--amber {
  width: 500px;
  height: 500px;
  background: rgba(251, 191, 36, 0.15);
  top: -10%;
  right: -5%;
  animation: floatOrb 15s ease-in-out infinite;
}

.hero-orb--rose {
  width: 400px;
  height: 400px;
  background: rgba(244, 114, 182, 0.10);
  bottom: -5%;
  left: -8%;
  animation: floatOrb 18s ease-in-out infinite reverse;
}

.hero-orb--indigo {
  width: 350px;
  height: 350px;
  background: rgba(129, 140, 248, 0.10);
  top: 35%;
  left: 25%;
  animation: floatOrb 20s ease-in-out infinite 3s;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
  cursor: pointer;
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-tertiary);
}

/* --- 6. 产品矩阵 (Products) --- */
.products {
  background: var(--bg-secondary);
}

.products__header {
  text-align: center;
  margin-bottom: 64px;
}

.products__header .section-subtitle {
  margin: 0 auto;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* 产品卡片 */
.app-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
}

.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

/* 卡片顶部预览区域 */
.app-card__preview {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-card__preview--ousia {
  background: var(--ousia-bg);
}

.app-card__preview--enstamp {
  background: var(--enstamp-bg);
}

.app-card__preview--starflow {
  background: var(--starflow-bg);
}

/* App 大图标 (rounded square) */
.app-icon-large {
  width: 88px;
  height: 88px;
  border-radius: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  color: white;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transition: transform 0.5s var(--ease-smooth);
}

.app-card:hover .app-icon-large {
  transform: scale(1.08);
}

.app-card[data-app="ousia"] .app-icon-large {
  background: var(--ousia-gradient);
}

.app-card[data-app="enstamp"] .app-icon-large {
  background: var(--enstamp-gradient);
}

.app-card[data-app="starflow"] .app-icon-large {
  background: var(--starflow-gradient);
}

/* 使用真实图片的 App 图标 */
.app-icon-img {
  width: 88px;
  height: 88px;
  border-radius: 22%;
  object-fit: cover;
  background: none;
  font-size: 0;
}

/* 卡片 body */
.app-card__body {
  padding: 28px 28px 32px;
}

.app-card__name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.app-card__tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.app-card__features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.app-card__feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.app-card__feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.app-card[data-app="ousia"] .app-card__feature-icon {
  background: rgba(99, 102, 241, 0.1);
  color: var(--ousia-color);
}

.app-card[data-app="enstamp"] .app-card__feature-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--enstamp-color);
}

.app-card[data-app="starflow"] .app-card__feature-icon {
  background: rgba(139, 92, 246, 0.1);
  color: var(--starflow-color);
}

/* 应用商店徽章 */
.store-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--text-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: opacity 0.3s var(--ease-smooth);
  position: relative;
}

.store-badge:hover {
  opacity: 0.85;
}

.store-badge__label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-badge__small {
  font-size: 0.6rem;
  opacity: 0.8;
}

.store-badge__name {
  font-weight: 600;
  font-size: 0.8rem;
}

.store-badge svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.coming-soon-tag {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gradient-brand);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* --- 7. 核心理念 (Philosophy) --- */
.philosophy__header {
  text-align: center;
  margin-bottom: 64px;
}

.philosophy__header .section-subtitle {
  margin: 0 auto;
}

.philosophy__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.philosophy-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}

.philosophy-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.philosophy-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  background: var(--gradient-brand-soft);
}

.philosophy-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--text-primary);
  stroke-width: 1.5;
  fill: none;
}

.philosophy-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.philosophy-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- 8. 联系方式 (Contact) --- */
.contact {
  background: var(--bg-secondary);
}

.contact__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 16px 32px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.contact__email:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.contact__email svg {
  width: 22px;
  height: 22px;
  stroke: var(--ousia-color);
  fill: none;
  stroke-width: 1.5;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.contact__social {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s var(--ease-smooth);
}

.contact__social:hover {
  transform: translateY(-2px);
}

.contact__social svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 1.5;
}

/* --- 9. 底部栏 (Footer) --- */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.footer__links {
  display: flex;
  gap: 28px;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  transition: color 0.3s var(--ease-smooth);
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  width: 100%;
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

/* --- 10. 法律页面 (Legal) --- */
.legal {
  padding-top: calc(64px + 80px);
  padding-bottom: 80px;
}

.legal__content {
  max-width: 760px;
  margin: 0 auto;
}

.legal__content h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal__date {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-bottom: 48px;
}

.legal__content h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.legal__content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal__content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal__content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.legal__content li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  list-style: disc;
  margin-bottom: 6px;
}

.legal__content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__content a {
  color: var(--ousia-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- 11. 滚动入场动画 --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 {
  transition-delay: 0.1s;
}

.fade-in-delay-2 {
  transition-delay: 0.2s;
}

.fade-in-delay-3 {
  transition-delay: 0.3s;
}

/* --- 12. 关键帧动画 --- */
@keyframes floatOrb {

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

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

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

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* --- 13. 响应式 --- */
@media (max-width: 1024px) {
  :root {
    --section-spacing: 100px;
  }

  .products__grid,
  .philosophy__grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --section-spacing: 80px;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 249, 247, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-nav);
  }

  .nav__links--open {
    display: flex;
  }

  .nav__mobile-toggle {
    display: flex;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-orb {
    opacity: 0.7;
  }

  .hero-orb--amber {
    width: 300px;
    height: 300px;
  }

  .hero-orb--rose {
    width: 250px;
    height: 250px;
  }

  .hero-orb--indigo {
    width: 200px;
    height: 200px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .app-card__body {
    padding: 20px 20px 24px;
  }

  .store-badges {
    flex-direction: column;
  }

  .store-badge {
    justify-content: center;
  }
}