@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --cream: #fff6e7;
  --gold: #e8c58d;
  --card: rgba(40, 5, 13, 0.56);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #650b19;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
  color: var(--cream);
  background:
    radial-gradient(ellipse at center, rgba(111, 15, 31, 0.22), rgba(37, 0, 8, 0.52)),
    linear-gradient(135deg, #8d1727 0%, #650b19 48%, #3e0610 100%),
    url("../images/background.png") center / cover no-repeat fixed;
  font-family: "Manrope", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(20, 0, 5, 0.25) 100%);
}

.holiday-content {
  width: min(100% - 40px, 1050px);
  padding: 54px 24px;
  text-align: center;
  position: relative;
  z-index: 2;
  animation: content-appear 900ms ease-out both;
}

.decorations {
  color: var(--gold);
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  text-shadow: 0 0 18px rgba(232, 197, 141, 0.35);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: 0.28em;
}

h1 {
  margin: 0;
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(44px, 7.5vw, 88px);
  font-weight: 500;
  line-height: 1.05;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.2);
}

.subtitle {
  margin: 12px 0 30px;
  color: rgba(255, 246, 231, 0.84);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(22px, 3vw, 31px);
  font-style: italic;
}

.timer {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(5px, 2vw, 22px);
  margin: 0 auto;
}

.unit {
  width: clamp(64px, 12vw, 150px);
  min-height: clamp(82px, 12vw, 132px);
  padding: 18px 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(232, 197, 141, 0.34);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 12px 35px rgba(22, 0, 4, 0.18), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(7px);
}

.unit span {
  color: var(--cream);
  font-size: clamp(25px, 5vw, 54px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.unit small {
  color: var(--gold);
  font-size: clamp(8px, 1.1vw, 11px);
  font-weight: 700;
  letter-spacing: 0.13em;
}

.separator {
  align-self: center;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 4vw, 42px);
  transform: translateY(-7px);
}

.holiday-message {
  margin: 34px 0 0;
  color: rgba(255, 246, 231, 0.88);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(19px, 2.5vw, 27px);
}

.holiday-message span { color: var(--gold); }

/* Слой снега всегда поверх фона и под текстом */
.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  contain: strict;
}

.snowflake {
  position: absolute;
  top: -12vh;
  left: var(--left);
  display: block;
  color: #fff;
  opacity: var(--opacity);
  font-size: var(--size);
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.8);
  will-change: transform;
  animation: snow-fall var(--duration) linear var(--delay) infinite;
  -webkit-animation: snow-fall var(--duration) linear var(--delay) infinite;
}

@keyframes snow-fall {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift), 115vh, 0) rotate(360deg); }
}

@-webkit-keyframes snow-fall {
  0% { -webkit-transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { -webkit-transform: translate3d(var(--drift), 115vh, 0) rotate(360deg); }
}

@keyframes content-appear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

noscript {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  text-align: center;
  color: white;
  z-index: 1000;
}

@media (max-width: 600px) {
  body {
    background-attachment: scroll;
  }

  .holiday-content {
    width: 100%;
    padding: 36px 10px;
  }

  .decorations { margin-bottom: 20px; }

  .eyebrow { letter-spacing: 0.15em; }

  .timer { gap: 4px; }

  .unit {
    width: min(21vw, 84px);
    min-height: 76px;
    padding: 12px 3px 10px;
    border-radius: 10px;
    gap: 8px;
  }

  .unit span { font-size: clamp(22px, 6vw, 34px); }
  .unit small { font-size: 7px; letter-spacing: 0.03em; }
  .separator { font-size: 22px; }
  .holiday-message { margin-top: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .holiday-content { animation: none; }
}
