/* ==========================================================================
   Новогодний промосайт «Новогодний адвент RISOY»
   Стили оформления по предоставленному ТЗ и дизайн-макетам
   ========================================================================== */

:root {
  /* Цветовая палитра */
  --bg-dark-deep: #051112;
  --bg-dark-main: #071718;
  --bg-dark-card: #0c1c22;
  --bg-dark-card-hover: #10242c;
  --bg-light-section: #f5f6f8;
  --bg-light-card: #ffffff;
  --bg-parchment: #fbf6ee;
  
  --color-lime: #9dd33b;
  --color-lime-glow: rgba(157, 211, 59, 0.45);
  --color-lime-dark: #82b52b;
  --color-gold: #e5c158;
  --color-gold-glow: rgba(229, 193, 88, 0.45);
  --color-emerald-deep: #0d261e;
  
  --text-white: #ffffff;
  --text-muted: #8ea3a8;
  --text-dark: #121f1d;
  --text-dark-muted: #5e6f6d;
  
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-card: rgba(157, 211, 59, 0.16);
  --border-light: #e4e7eb;

  /* Шрифты */
  --font-heading: 'Unbounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Скругления и тени */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-flip: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark-deep);
  color: var(--text-white);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Снежный канвас */
#snow-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1300px;
  pointer-events: none;
  z-index: 5;
}

/* Контейнеры */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Шапка сайта (Header)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(5, 17, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 0;
  transition: var(--transition-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-white);
  transition: opacity var(--transition-fast);
}

.logo-brand:hover {
  opacity: 0.92;
}

.logo-brand-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(157, 211, 59, 0.35));
  transition: transform var(--transition-fast);
}

.logo-brand:hover .logo-brand-img {
  transform: scale(1.05);
}

.logo-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.logo-advent-tag {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-white);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover {
  color: var(--text-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--color-lime);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-sound-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-lime);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: 8px;
}

.btn-sound-toggle:hover {
  background: rgba(157, 211, 59, 0.18);
  border-color: var(--color-lime);
  transform: scale(1.08);
  box-shadow: 0 0 15px rgba(157, 211, 59, 0.3);
}

.btn-sound-toggle.is-muted {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: transparent;
}

/* ==========================================================================
   Главный приветственный блок (Hero)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 60px 0 80px;
  background: radial-gradient(circle at 75% 30%, #0d2a23 0%, #071718 55%, #051112 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 6;
}

.hero-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 35px rgba(157, 211, 59, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: perspective(1000px) rotateY(1deg);
  transition: transform var(--transition-normal);
}

.hero-image-wrap:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.01);
}

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

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(157, 211, 59, 0.12);
  border: 1px solid rgba(157, 211, 59, 0.3);
  color: var(--color-lime);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title-accent {
  color: var(--color-lime);
  display: block;
  text-shadow: 0 0 25px rgba(157, 211, 59, 0.35);
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-highlight {
  color: var(--color-lime);
  font-weight: 700;
  text-shadow: 0 0 14px var(--color-lime-glow);
  display: inline;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--color-lime);
  color: #061814;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(157, 211, 59, 0.38);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: #acf244;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(157, 211, 59, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  transition: transform var(--transition-fast);
}

.btn-primary:hover svg {
  transform: translateY(3px);
}

/* ==========================================================================
   Раздел с Адвент-календарем (12 окон)
   ========================================================================== */
.calendar-section {
  position: relative;
  padding: 90px 0 110px;
  background: #071718;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-header {
  margin-bottom: 36px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  line-height: 1.6;
}

/* Статус-панель времени и активности */
.calendar-status-bar {
  margin-bottom: 40px;
}

.date-status-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(12, 28, 34, 0.7);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.msk-clock {
  color: var(--text-muted);
}

.msk-clock strong {
  color: var(--text-white);
  font-weight: 600;
}

.status-active-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(157, 211, 59, 0.18);
  border: 1px solid var(--color-lime);
  color: var(--color-lime);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  animation: pulsePill 2s infinite ease-in-out;
}

.status-waiting-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(229, 193, 88, 0.15);
  border: 1px solid rgba(229, 193, 88, 0.4);
  color: var(--color-gold);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
}

.status-past-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
}

.date-status-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.85;
}

@keyframes pulsePill {
  0%, 100% { box-shadow: 0 0 0 0 rgba(157, 211, 59, 0.4); }
  50% { box-shadow: 0 0 12px 3px rgba(157, 211, 59, 0.25); }
}

/* ==========================================================================
   Сетка адвент-окошек (3 колонки десктоп / 2 колонки мобайл)
   ========================================================================== */
.advent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 3D Flip Card контейнер */
.advent-card {
  perspective: 1200px;
  min-height: 310px;
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-lg);
  user-select: none;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  transition: transform var(--transition-flip);
}

.advent-card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

/* Общие стили граней карточки */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Лицевая сторона (Закрытое окно) */
.card-front {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

/* Точечный узор на карточке */
.card-decor-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.6;
}

.card-status-dot {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-lime);
  box-shadow: 0 0 10px var(--color-lime);
  z-index: 2;
}

.card-date-wrap {
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.card-day-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--text-white);
  letter-spacing: -0.03em;
}

.card-month-text {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-top: 6px;
  text-transform: uppercase;
}

.card-action-bar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.badge-action {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.badge-today {
  background: var(--color-lime);
  color: #061814;
  font-weight: 700;
  box-shadow: 0 0 15px var(--color-lime-glow);
}

.badge-future {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-past {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   3 Состояния окошек (По ТЗ)
   ========================================================================== */

/* 1. БУДУЩАЯ ДАТА (Закрыта, подсвечена, ожидает) */
.advent-card.status-future .card-front {
  border-color: rgba(157, 211, 59, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(157, 211, 59, 0.04);
}

.advent-card.status-future:hover .card-front {
  border-color: rgba(157, 211, 59, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(157, 211, 59, 0.2);
  transform: translateY(-3px);
}

.advent-card.status-future .card-status-dot {
  background: var(--color-lime);
  box-shadow: 0 0 8px var(--color-lime);
}

/* 2. ТЕКУЩАЯ ДАТА (Активна, доступна к открытию) */
.advent-card.status-today .card-front {
  border-color: var(--color-lime);
  box-shadow: 0 0 25px rgba(157, 211, 59, 0.4), inset 0 0 25px rgba(157, 211, 59, 0.1);
  animation: pulseCardToday 2.5s infinite ease-in-out;
}

@keyframes pulseCardToday {
  0%, 100% {
    box-shadow: 0 0 20px rgba(157, 211, 59, 0.35), inset 0 0 20px rgba(157, 211, 59, 0.08);
    border-color: var(--color-lime);
  }
  50% {
    box-shadow: 0 0 35px rgba(157, 211, 59, 0.6), inset 0 0 30px rgba(157, 211, 59, 0.2);
    border-color: #c4f26b;
  }
}

.advent-card.status-today:hover .card-front {
  transform: translateY(-4px) scale(1.02);
}

.advent-card.status-today .card-status-dot {
  background: #ffffff;
  box-shadow: 0 0 12px #ffffff, 0 0 20px var(--color-lime);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.8; }
}

/* 3. ПРОШЕДШАЯ ДАТА (Потухшая, неактивна) */
.advent-card.status-past {
  cursor: default;
  opacity: 0.38;
}

.advent-card.status-past .card-front {
  background: #091519;
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.advent-card.status-past .card-status-dot {
  background: #3e5055;
  box-shadow: none;
}

.advent-card.status-past .card-day-number {
  color: #55686d;
}

.advent-card.status-past .card-month-text {
  color: #3b494d;
}

/* ==========================================================================
   Обратная сторона (Открытое окно с подарком)
   ========================================================================== */
.card-back {
  background: var(--bg-parchment);
  color: var(--text-dark);
  transform: rotateY(180deg);
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(220, 205, 185, 0.8);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.card-back-decor {
  display: none;
}

.card-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b83321;
  background: #fae4df;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.card-badge.badge-main-gift {
  color: #ffffff;
  background: linear-gradient(135deg, #d32f2f, #f57c00);
  box-shadow: 0 2px 8px rgba(211, 47, 47, 0.35);
}

.card-back-date {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7b8885;
  z-index: 2;
  text-align: center;
  line-height: 1;
}

.card-back-date::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(230, 215, 195, 0.45);
  z-index: -1;
  pointer-events: none;
}

.card-gift-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.card-gift-desc {
  font-size: 0.82rem;
  color: var(--text-dark-muted);
  line-height: 1.4;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.card-gift-composition {
  font-size: 0.74rem;
  color: #7b8885;
  line-height: 1.35;
  margin-bottom: 8px;
  font-style: italic;
  position: relative;
  z-index: 2;
}

.card-promo-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px dashed #cfc5b4;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  margin-top: auto;
  margin-bottom: 6px;
}

.card-promo-code {
  font-family: monospace, var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #122822;
  flex-grow: 1;
  text-align: center;
}

.btn-copy-code {
  background: var(--color-emerald-deep);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy-code:hover {
  background: #1b4537;
}

.btn-copy-code.is-copied {
  background: #278546;
}

.card-back-footnote {
  font-size: 0.72rem;
  color: #8c9794;
  text-align: center;
  position: relative;
  z-index: 2;
  padding-bottom: 2px;
}

/* Анимация покачивания при попытке открыть будущее окно */
@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px) rotate(-1deg); }
  40%, 80% { transform: translateX(7px) rotate(1deg); }
}

.card-shake {
  animation: shakeCard 0.5s ease;
}

/* ==========================================================================
   Нижний информационный раздел «Как забрать подарок»
   (Светлый контрастный фон по ТЗ и макету)
   ========================================================================== */
.how-section {
  background: var(--bg-light-section);
  color: var(--text-dark);
  padding: 90px 0 100px;
  position: relative;
}

.how-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 60px;
  align-items: flex-start;
}

.how-info {
  display: flex;
  flex-direction: column;
}

.how-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.how-desc {
  color: var(--text-dark-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 540px;
}

/* Шаги участия */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 36px;
}

.how-step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #e9edf0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  flex-shrink: 0;
}

.step-content h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-dark-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Условия акции */
.how-rules {
  background: rgba(0, 0, 0, 0.03);
  border-left: 3px solid var(--color-lime-dark);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-dark-muted);
  line-height: 1.55;
}

/* Правая колонка с изображением суши */
.how-visual-card {
  background: var(--bg-light-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-normal);
}

.how-visual-card:hover {
  transform: translateY(-4px);
}

.how-img-box {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.how-sushi-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.how-visual-card:hover .how-sushi-img {
  transform: scale(1.03);
}

.how-card-text {
  padding: 28px;
}

.how-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.how-card-desc {
  font-size: 0.95rem;
  color: var(--text-dark-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Подвал сайта (Footer)
   ========================================================================== */
.site-footer {
  background: var(--bg-dark-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  height: 26px;
  width: auto;
  object-fit: contain;
}

.footer-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--color-lime);
  background: rgba(157, 211, 59, 0.1);
  border: 1px solid rgba(157, 211, 59, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.footer-note {
  font-size: 0.85rem;
  color: #6d8185;
}

.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-support {
  color: var(--color-lime);
  font-weight: 600;
}

.footer-support svg {
  stroke: var(--color-lime);
}

.footer-link:hover {
  color: var(--text-white);
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Flash animation on copy */
@keyframes promoPulse {
  0% { transform: scale(1); border-color: #cfc5b4; }
  50% { transform: scale(1.03); border-color: var(--color-lime); box-shadow: 0 0 15px rgba(157, 211, 59, 0.4); }
  100% { transform: scale(1); border-color: #cfc5b4; }
}

.card-promo-wrap.is-copied-flash {
  animation: promoPulse 0.6s ease;
}

.advent-card:focus-visible {
  outline: 3px solid var(--color-lime);
  outline-offset: 4px;
}

/* ==========================================================================
   Всплывающие уведомления (Toast)
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 0, 0, 0.3);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.toast-show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast-success {
  background: rgba(20, 56, 39, 0.92);
  color: #c8ffd4;
  border: 1px solid #2da664;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 25px rgba(45, 166, 100, 0.25);
}

.toast-info {
  background: rgba(16, 38, 49, 0.92);
  color: #d1f0ff;
  border: 1px solid #236585;
}

.toast-neutral {
  background: rgba(28, 34, 37, 0.92);
  color: #cbd5e1;
  border: 1px solid #3d4a52;
}

.toast-error {
  background: rgba(60, 20, 20, 0.92);
  color: #ffd1d1;
  border: 1px solid #c93b3b;
}

/* ==========================================================================
   Панель тестирования (Dev / QA Toolbar)
   ========================================================================== */
#dev-test-toolbar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  font-family: var(--font-body);
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 8px;
}

.test-toolbar-toggle {
  background: #122822;
  color: var(--color-lime);
  border: 1px solid var(--color-lime);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-fast);
}

.test-toolbar-toggle:hover {
  background: var(--color-lime);
  color: #061814;
}

.test-toolbar-panel {
  display: block;
  width: 320px;
  background: #09171a;
  border: 1px solid rgba(157, 211, 59, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

#dev-test-toolbar.collapsed .test-toolbar-panel {
  display: none;
}

.test-btn-reset {
  border-color: rgba(229, 193, 88, 0.35);
  color: var(--color-gold);
}

.test-btn-reset:hover {
  background: rgba(229, 193, 88, 0.15);
  border-color: var(--color-gold);
}

.test-toolbar-header {
  margin-bottom: 14px;
}

.test-toolbar-header strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-white);
  margin-bottom: 4px;
}

.test-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.test-scenarios {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.test-btn {
  background: #102127;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-fast);
}

.test-btn:hover {
  background: #173038;
  border-color: var(--color-lime);
}

.test-btn.active {
  background: rgba(157, 211, 59, 0.18);
  border-color: var(--color-lime);
  color: var(--color-lime);
  font-weight: 700;
}

.test-btn-real {
  background: #172a23;
  border-color: #265545;
  color: #92e0be;
}

.test-custom-date {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border-dark);
  padding-top: 12px;
}

.test-custom-date label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.test-custom-date input {
  background: #061114;
  border: 1px solid var(--border-dark);
  color: var(--text-white);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  outline: none;
}

.test-custom-date button {
  background: var(--color-lime);
  color: #061814;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-end;
}

/* ==========================================================================
   Адаптивность (Mobile, Tablet) в соответствии с макетом image2.png
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-image-wrap {
    max-width: 580px;
    margin: 0 auto;
  }

  .advent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advent-card {
    min-height: 330px;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .how-visual-card {
    max-width: 580px;
    margin: 0 auto;
  }
}

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

  .logo-brand-img {
    height: 26px;
  }

  .logo-divider,
  .logo-advent-tag {
    display: none;
  }

  .main-nav {
    gap: 10px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .btn-sound-toggle {
    width: 32px;
    height: 32px;
    margin-left: 2px;
  }

  .footer-brand-wrap {
    justify-content: center;
  }

  .footer-nav {
    justify-content: center;
    gap: 10px 18px;
  }

  .hero-section {
    padding: 40px 0 60px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-desc {
    font-size: 0.98rem;
  }

  .btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
  }

  .calendar-section {
    padding: 60px 0 80px;
  }

  /* Сетка 2 колонки на мобильных, точно как в мобильном макете */
  .advent-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .advent-card {
    min-height: 425px;
  }

  .card-front {
    padding: 18px 14px 14px;
  }

  .card-back {
    padding: 14px 12px 10px;
  }

  .card-day-number {
    font-size: 2.5rem;
  }

  .card-badge {
    font-size: 0.70rem;
    padding: 3px 8px;
  }

  .card-back-date {
    font-size: 0.74rem;
  }

  .card-back-date::before {
    width: 68px;
    height: 68px;
  }

  .card-gift-title {
    font-size: 0.96rem;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .card-gift-desc {
    font-size: 0.74rem;
    line-height: 1.32;
    margin-bottom: 5px;
  }

  .card-promo-wrap {
    flex-direction: column;
    gap: 6px;
    padding: 6px 8px;
    margin-top: auto;
    margin-bottom: 5px;
  }

  .card-promo-code {
    font-size: 0.92rem;
    letter-spacing: 0.05em;
  }

  .btn-copy-code {
    width: 100%;
    min-height: 36px;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .card-back-footnote {
    font-size: 0.65rem;
  }

  .how-section {
    padding: 60px 0 70px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .footer-nav {
    justify-content: center;
  }

  #toast-container {
    left: 16px;
    right: 16px;
    bottom: 80px;
  }

  .toast-item {
    min-width: unset;
    width: 100%;
  }

  #dev-test-toolbar {
    left: 10px;
    bottom: 10px;
  }

  .test-toolbar-panel {
    width: calc(100vw - 20px);
    max-width: 320px;
  }
}

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

  .main-nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 0.78rem;
  }

  .btn-sound-toggle {
    width: 28px;
    height: 28px;
    margin-left: 0;
  }

  .btn-sound-toggle svg {
    width: 14px;
    height: 14px;
  }

  .advent-grid {
    gap: 8px;
  }

  .advent-card {
    min-height: 415px;
  }

  .card-front {
    padding: 14px 10px;
  }

  .card-back {
    padding: 12px 10px 8px;
  }

  .card-day-number {
    font-size: 2.2rem;
  }

  .card-gift-title {
    font-size: 0.88rem;
    line-height: 1.2;
    margin-bottom: 3px;
  }

  .card-gift-desc {
    font-size: 0.72rem;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .card-promo-wrap {
    padding: 5px 6px;
    gap: 4px;
    margin-bottom: 4px;
  }

  .card-promo-code {
    font-size: 0.86rem;
  }

  .btn-copy-code {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .card-back-footnote {
    font-size: 0.62rem;
  }
}

@media (max-width: 330px) {
  .advent-card {
    min-height: 425px;
  }

  .card-day-number {
    font-size: 2rem;
  }

  .card-gift-title {
    font-size: 0.82rem;
  }

  .card-gift-desc {
    font-size: 0.68rem;
    line-height: 1.25;
  }
}
