/* ============================================
   《腌笃鲜》维基百科 - Hero Styles
   ============================================ */

.hero {
  position: relative;
  width: 100%;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0f0f13;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

.hero-bg-layer {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: opacity, transform, filter;
}

.hero-bg-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 默认态极缓漂移，让首屏画面「呼吸」。 */
@property --kb-scale {
  syntax: '<number>';
  initial-value: 1.05;
  inherits: false;
}

.hero-bg-default {
  opacity: 1;
  transform: scale(var(--kb-scale, 1.05)) translate(var(--parallax-x), var(--parallax-y));
  filter: brightness(0.95);
  z-index: 0;
  transition: opacity 3s cubic-bezier(0.4, 0, 0.2, 1),
              filter 3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: heroBreathe 36s ease-in-out infinite alternate;
}

@keyframes heroBreathe {
  from { --kb-scale: 1.05; }
  to { --kb-scale: 1.12; }
}

.hero-bg-hover {
  opacity: 0;
  transform: scale(1.05) translate(calc(var(--parallax-x) * 0.5), calc(var(--parallax-y) * 0.5));
  filter: brightness(0.75);
  z-index: 1;
  transition: opacity 3.5s cubic-bezier(0.4, 0, 0.2, 1),
              filter 3.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.is-hover.hero-hover-ready .hero-bg-default {
  opacity: 0.12;
  filter: brightness(1.25) blur(1.5px);
}

.hero.is-hover.hero-hover-ready .hero-bg-hover {
  opacity: 1;
  filter: brightness(1);
}

.hero-sun-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse 80% 60% at 50% 25%,
    rgba(255, 230, 180, 0.35) 0%,
    rgba(255, 210, 140, 0.15) 35%,
    transparent 70%
  );
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 2.5s ease-out 0.3s;
}

.hero.is-hover .hero-sun-glow {
  opacity: 1;
}

.hero-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 35%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 3;
  pointer-events: none;
  transition: opacity 2.5s ease;
}

.hero.is-hover .hero-vignette {
  opacity: 0.55;
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 19, 0.55) 0%,
    rgba(15, 15, 19, 0.2) 50%,
    rgba(15, 15, 19, 0.65) 100%
  );
  z-index: 4;
  pointer-events: none;
  transition: background 2.5s ease;
}

.hero.is-hover .hero-gradient-overlay {
  background: linear-gradient(
    to bottom,
    rgba(15, 15, 19, 0.35) 0%,
    rgba(15, 15, 19, 0.1) 50%,
    rgba(15, 15, 19, 0.45) 100%
  );
}

.hero-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  z-index: 5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 820px;
  margin: 0 auto;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.2rem;
}

.hero-title-row::before {
  content: "";
  flex: 0 0 68px;
}

.hero-title {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.7rem, 5vw, 4.15rem);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-seal {
  position: relative;
  top: 5px;
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  filter: saturate(1.06) contrast(1.04);
  user-select: none;
  opacity: 0;
  animation: sealStampIn 0.5s var(--ease-standard) 0.35s forwards;
}

@keyframes sealStampIn {
  0% { opacity: 0; transform: scale(1.45); }
  60% { opacity: 1; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-subtitles {
  position: absolute;
  right: clamp(20px, 6vw, 90px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row-reverse;
  gap: 16px;
  z-index: 10;
  pointer-events: none;
}

.hero-subtitle {
  writing-mode: vertical-rl;
  font-family: var(--font-calligraphy);
  font-size: clamp(0.85rem, 1.9vh, 1.2rem);
  letter-spacing: 0;
  color: rgba(240, 231, 216, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1.5;
  opacity: 0;
  animation: heroFadeIn 1s ease 0.5s forwards;
}

.hero-subtitle + .hero-subtitle {
  animation-delay: 0.75s;
}

@keyframes heroFadeIn {
  to { opacity: 1; }
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-btn {
  display: inline-block;
  padding: 12px 36px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease 0.4s forwards;
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal),
              background var(--transition-normal),
              background-color var(--transition-normal),
              color var(--transition-normal);
}

.hero-btn-primary {
  background: var(--cinnabar);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 16px rgba(165, 47, 40, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-fire);
  border-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
}

.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.hero-btn:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.hero-btn-primary:hover,
.hero-btn-primary:focus-visible {
  background: var(--cinnabar-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 6px 20px rgba(165, 47, 40, 0.42),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hero-btn-secondary:hover,
.hero-btn-secondary:focus-visible {
  background: var(--cinnabar);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

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

/* 触屏设备不能依赖 hover 切换背景。 */
@media (hover: none) and (pointer: coarse) {
  .hero.hero-hover-ready .hero-bg-default {
    opacity: 0.12;
    filter: brightness(1.25) blur(1.5px);
    transform: scale(1.05);
  }
  .hero.hero-hover-ready .hero-bg-hover {
    opacity: 1;
    filter: brightness(1);
    transform: scale(1.05);
  }
  .hero.hero-hover-ready .hero-sun-glow {
    opacity: 1;
  }
  .hero.hero-hover-ready .hero-vignette {
    opacity: 0.55;
  }
  .hero.hero-hover-ready .hero-gradient-overlay {
    background: linear-gradient(
      to bottom,
      rgba(15, 15, 19, 0.35) 0%,
      rgba(15, 15, 19, 0.1) 50%,
      rgba(15, 15, 19, 0.45) 100%
    );
  }
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

.hero-torn-edge {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 44px;
  z-index: 7;
  fill: var(--bg-page);
  pointer-events: none;
}
