/* =========================================================
 * home.css — 首页
 * ========================================================= */

.view-home {
  align-items: center;
  justify-content: space-between;
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

.home-header {
  width: 100%;
  animation: fadeInDown 1s ease both;
}

.ornament-top {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--color-gold);
}

.home-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.home-title-zh {
  font-family: var(--font-serif);
  font-size: 2rem;
  letter-spacing: 0.5em;
  padding-left: 0.5em; /* 补偿字间距造成的偏移 */
  color: var(--color-gold-bright);
  font-weight: normal;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.home-title-en {
  font-family: var(--font-decorative);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--color-parchment-dim);
  font-weight: 300;
  text-transform: uppercase;
}

.ornament-sub { color: var(--color-gold); }

/* 咖啡杯 */
.home-cup {
  position: relative;
  width: 180px;
  height: 200px;
  animation: floatUp 4s ease-in-out infinite;
}

.cup-body {
  position: relative;
  width: 140px;
  height: 110px;
  margin: 50px auto 0;
  background: linear-gradient(180deg, #d4c4a0 0%, #b8a578 30%, #8b7355 60%, #6b5842 100%);
  border-radius: 8px 8px 60% 60% / 8px 8px 20% 20%;
  box-shadow:
    inset -8px 0 12px rgba(0, 0, 0, 0.3),
    inset 8px 0 6px rgba(255, 240, 200, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

.cup-inner {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  height: 20px;
  background: radial-gradient(ellipse, #2a1810 0%, #1a0f08 70%, #0d0704 100%);
  border-radius: 50% 50% 4px 4px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.8);
}

.cup-saucer {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 20px;
  background: linear-gradient(180deg, #b8a578 0%, #8b7355 50%, #6b5842 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.cup-steam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 60px;
}

.cup-steam span {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 40px;
  background: linear-gradient(to top, rgba(255, 240, 200, 0.5), transparent);
  border-radius: 50%;
  animation: steam 3s ease-in-out infinite;
}

.cup-steam span:nth-child(1) { left: 20%; animation-delay: 0s; }
.cup-steam span:nth-child(2) { left: 50%; animation-delay: 0.6s; height: 50px; }
.cup-steam span:nth-child(3) { left: 80%; animation-delay: 1.2s; }

@keyframes steam {
  0%   { transform: translateY(0) scaleY(1); opacity: 0.6; }
  50%  { transform: translateY(-20px) scaleY(1.2); opacity: 0.9; }
  100% { transform: translateY(-40px) scaleY(0.8); opacity: 0; }
}

.cup-glow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.35) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-quote {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--color-parchment-dim);
  font-style: italic;
  padding: 0 1.5rem;
  margin: 0;
  letter-spacing: 0.05em;
  animation: fadeInUp 1.2s ease 0.3s both;
}

#btn-start {
  padding: 1.1rem 3rem;
  font-size: 1.1rem;
  animation: fadeInUp 1.2s ease 0.5s both;
}

.home-footer {
  color: var(--color-parchment-dim);
  animation: fadeInUp 1.2s ease 0.7s both;
}

.ornament-bottom {
  font-size: 1rem;
  color: var(--color-gold);
  margin-bottom: 0.4rem;
  letter-spacing: 0.6em;
  padding-left: 0.6em;
}

.home-footer p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-muted);
}

/* 小屏幕适配（iPhone SE 等 <= 375x667） */
@media (max-height: 700px) {
  .home-title-zh { font-size: 1.7rem; }
  .home-cup { width: 150px; height: 170px; }
  .cup-body { width: 120px; height: 90px; margin-top: 40px; }
  .cup-saucer { width: 150px; }
  .home-quote { font-size: 0.85rem; line-height: 1.7; }
  #btn-start { padding: 0.9rem 2.5rem; font-size: 1rem; }
}
