@charset "UTF-8";
/* ==========================================================================
   国庆 77 周年庆祝元素（临时组件）—— 广西景恒食品有限公司官网
   --------------------------------------------------------------------------
   设计基线：中国红 + 亮金，与站点原有绿色/暖棕体系互不干扰
   命名空间：全部选择器以 .gjnd- / #gjnd- 前缀隔离，不覆盖 style.css 任何规则
   生效窗口：2026-09-20 00:00 → 2026-10-08 00:01（北京时间，由服务端判定）
   下线方式：窗口外服务端直接不渲染本组件（DOM 中不留任何痕迹）
   创建日期：2026-09-16
   ========================================================================== */

:root {
  --gjnd-red-deepest: #6E0C13;
  --gjnd-red-deep: #8E1018;
  --gjnd-red: #C2262C;
  --gjnd-red-flag: #DE2910;      /* 国旗标准红 */
  --gjnd-red-soft: #E8503F;
  --gjnd-gold: #F7DE9C;
  --gjnd-gold-bright: #FFD24A;   /* 国旗星标准黄（提亮版） */
  --gjnd-cream: #FFF3D6;
  --gjnd-bar-h: 56px;
  --gjnd-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ==========================================================================
   1. 顶部庆祝横幅
   ========================================================================== */

#gjnd-bar {
  position: relative;
  z-index: 900;
  width: 100%;
  height: var(--gjnd-bar-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg,
      var(--gjnd-red-deepest) 0%,
      var(--gjnd-red) 20%,
      var(--gjnd-red-flag) 50%,
      var(--gjnd-red) 80%,
      var(--gjnd-red-deepest) 100%);
  box-shadow:
    inset 0 1px 0 rgba(247, 222, 156, 0.30),
    inset 0 -2px 0 rgba(247, 222, 156, 0.55),
    0 2px 12px rgba(110, 12, 19, 0.22);
}

/* 斜织暗纹，增加绸带质感 */
#gjnd-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, 0.055) 0 7px,
    rgba(255, 255, 255, 0) 7px 19px);
}

/* 高光横扫 */
#gjnd-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -35%;
  z-index: 0;
  width: 30%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(255, 243, 214, 0) 0%,
    rgba(255, 243, 214, 0.20) 50%,
    rgba(255, 243, 214, 0) 100%);
  animation: gjnd-sheen 5.2s var(--gjnd-ease, ease-in-out) infinite;
}

@keyframes gjnd-sheen {
  0%        { transform: translateX(0); opacity: 0; }
  12%       { opacity: 1; }
  55%, 100% { transform: translateX(460%); opacity: 0; }
}

.gjnd-inner {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ==========================================================================
   2. 五星红旗（SVG，3:2 标准比例）
   ========================================================================== */

.gjnd-flag {
  flex: 0 0 auto;
  width: 39px;
  height: 26px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(247, 222, 156, 0.35);
  transform-origin: 12% 72%;
  animation: gjnd-flag-wave 4.2s ease-in-out infinite;
  will-change: transform;
}

.gjnd-flag svg { display: block; width: 100%; height: 100%; }

@keyframes gjnd-flag-wave {
  0%, 100% { transform: rotate(-2deg) skewY(-1.2deg); }
  50%      { transform: rotate(1.6deg) skewY(1.4deg); }
}

/* ==========================================================================
   3. 标语 / 星饰 / 年号
   ========================================================================== */

.gjnd-slogan {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gjnd-slogan-text {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  font-weight: 700;
  font-size: clamp(11.5px, 2.5vw, 17.5px);
  letter-spacing: 0.10em;
  line-height: 1.4;
  color: var(--gjnd-cream);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(60, 0, 4, 0.5), 0 0 18px rgba(247, 222, 156, 0.25);
}

.gjnd-stars {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gjnd-gold-bright);
  text-shadow: 0 0 8px rgba(255, 210, 74, 0.6);
}

.gjnd-stars span {
  line-height: 1;
  animation: gjnd-twinkle 2.4s ease-in-out infinite;
}

.gjnd-stars span:nth-child(2) { animation-delay: 0.24s; }
.gjnd-stars span:nth-child(3) { animation-delay: 0.48s; }
.gjnd-stars span:nth-child(4) { animation-delay: 0.72s; }
.gjnd-stars span:nth-child(5) { animation-delay: 0.96s; }

@keyframes gjnd-twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

.gjnd-era {
  flex: 0 0 auto;
  font-family: "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--gjnd-gold);
  border: 1px solid rgba(247, 222, 156, 0.5);
  border-radius: 999px;
  padding: 3px 11px;
  background: rgba(110, 12, 19, 0.35);
  white-space: nowrap;
}

/* ==========================================================================
   4. 关闭按钮（触控热区 ≥ 44px，符合 WCAG 2.5.5）
   ========================================================================== */

.gjnd-close {
  position: relative;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(247, 222, 156, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  color: var(--gjnd-cream);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
}

.gjnd-close::after {
  content: '';
  position: absolute;
  inset: -8px;
}

.gjnd-close:hover {
  background: rgba(247, 222, 156, 0.26);
  border-color: var(--gjnd-gold);
  transform: rotate(90deg);
}

.gjnd-close:focus-visible {
  outline: 2px solid var(--gjnd-gold-bright);
  outline-offset: 2px;
}

/* ==========================================================================
   5. 烟花画布与氛围光（短时燃放，约 10 秒后自动移除）
   ========================================================================== */

#gjnd-fx {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
}

#gjnd-fx.gjnd-fade { opacity: 0; }

#gjnd-glow {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: 42vh;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg,
    rgba(194, 38, 44, 0.11) 0%,
    rgba(194, 38, 44, 0.04) 48%,
    rgba(194, 38, 44, 0) 100%);
  transition: opacity 0.9s ease;
}

#gjnd-glow.gjnd-on { opacity: 1; }

/* ==========================================================================
   6. 响应式（桌面 / 平板 / 手机）
   ========================================================================== */

@media (max-width: 1024px) {
  :root { --gjnd-bar-h: 52px; }
  .gjnd-slogan-text { font-size: clamp(11.5px, 2.05vw, 16.5px); }
}

@media (max-width: 820px) {
  .gjnd-era { display: none; }
}

@media (max-width: 640px) {
  :root { --gjnd-bar-h: 46px; }
  .gjnd-inner { padding: 0 12px; gap: 10px; }
  .gjnd-flag { width: 30px; height: 20px; }
  .gjnd-stars { display: none; }
  .gjnd-slogan-text { letter-spacing: 0.02em; font-size: clamp(11px, 3.35vw, 14px); }
  .gjnd-close { width: 28px; height: 28px; font-size: 14px; }
  #gjnd-glow { height: 34vh; }
}

@media (max-width: 400px) {
  .gjnd-inner { padding: 0 10px; gap: 8px; }
  .gjnd-flag { width: 26px; height: 17.5px; }
  .gjnd-slogan-text { font-size: clamp(10.5px, 3.25vw, 13px); }
}

/* ==========================================================================
   7. 无障碍与降级
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .gjnd-flag,
  .gjnd-stars span,
  #gjnd-bar::after {
    animation: none !important;
  }
  .gjnd-close:hover { transform: none; }
  #gjnd-fx, #gjnd-glow { display: none !important; }
}

@media print {
  #gjnd-bar, #gjnd-fx, #gjnd-glow { display: none !important; }
}
