/* Шрифт Vanset: положите файлы в /public/fonts — при их отсутствии используется системный шрифт */
@font-face { font-family: 'Vanset'; src: url('/fonts/Vanset-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vanset'; src: url('/fonts/Vanset-Medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Vanset'; src: url('/fonts/Vanset-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #fff;
  --text: #111;
  --muted: #6b6b6b;
  --line: #ececec;
  --soft: #f4f4f4;
  --accent: #111;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .03);
  --font: 'Vanset', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
[hidden] { display: none !important; }

.screen { max-width: 1080px; margin: 0 auto; padding: 32px 16px 48px; }

/* ---------- Колесо ---------- */
.wheel-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 88px; }
.wheel-title { font-size: 22px; font-weight: 600; margin: 0 0 24px; }
.wheel-wrap { position: relative; width: min(84vw, 340px); aspect-ratio: 1; }
.wheel-rotor { width: 100%; height: 100%; transform: rotate(0deg); will-change: transform; }
.wheel-rotor.spinning { transition: transform 3.2s cubic-bezier(.15, .7, .2, 1); }
.wheel-rotor svg { display: block; width: 100%; height: 100%; }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--accent);
}
.wheel-result { min-height: 64px; margin-top: 28px; }
.wheel-result p { margin: 0; }
.wheel-result .big { font-size: 26px; font-weight: 700; }
.wheel-result .small { margin-top: 6px; color: var(--muted); font-size: 15px; }
.fade-in { animation: fade .25s ease-out both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Шапка ---------- */
.site-head { position: absolute; top: 0; left: 0; right: 0; padding: 24px 32px; display: flex; justify-content: center; pointer-events: none; z-index: 2; }
.site-head .logo { display: block; height: 40px; width: auto; pointer-events: auto; }
@media (max-width: 640px) { .site-head { padding: 16px; } .site-head .logo { height: 34px; } }

/* ---------- Список подарков ---------- */
.offers-screen { padding-top: 100px; }
@media (max-width: 640px) { .offers-screen { padding-top: 84px; } }
.offers-head { text-align: center; margin-bottom: 40px; }
.offers-head h1 { font-size: 32px; font-weight: 700; margin: 0 0 20px; letter-spacing: -.02em; line-height: 1.15; }
@media (max-width: 640px) { .offers-head h1 { font-size: 26px; } }

/* Таймер: цифры на тёмных плашках */
/* Сетка 1fr | auto | 1fr — цифры всегда ровно по центру, независимо от длины подписей */
.timer-box { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--muted); font-size: 16px; }
.timer-box .timer-text:first-child { justify-self: end; text-align: right; }
.timer-box .timer-text:last-child { justify-self: start; text-align: left; }
.timer { display: inline-flex; align-items: center; gap: 4px; }
.timer b {
  display: inline-grid; place-items: center; width: 34px; height: 44px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background .3s;
}
.timer i { font-style: normal; font-size: 24px; font-weight: 700; color: var(--text); padding: 0 2px; margin-top: -3px; }
.timer.urgent b { background: #e5484d; }
.timer.urgent i { color: #e5484d; }
.timer.done b { background: #bdbdbd; }
@media (max-width: 480px) { .timer-box { gap: 8px; font-size: 14px; } .timer b { width: 28px; height: 38px; font-size: 20px; } .timer i { font-size: 20px; } }

.offers { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .offers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .offers { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-top { display: flex; align-items: center; gap: 14px; }
.card-logo { flex: none; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--soft); }
.card-logo.letter { display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 700; }
.card-title { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.25; color: var(--muted); }
.card-sub { margin: 2px 0 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.card-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }

/* Кнопка: светло-серая, при наведении чёрный круг расходится от курсора (координаты задаёт gifts.js) */
.btn {
  position: relative; z-index: 0; overflow: hidden; isolation: isolate;
  display: block; width: 100%; padding: 14px 16px; border: 0; border-radius: 10px;
  background: #f2f2f2; color: var(--text); font: 600 16px/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer;
  transition: color .45s cubic-bezier(.22, .61, .36, 1), transform .2s ease;
}
.btn::before {
  content: ''; position: absolute; z-index: -1; left: var(--x, 50%); top: var(--y, 50%);
  width: var(--d, 700px); height: var(--d, 700px); border-radius: 50%; background: var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}
.btn:hover, .btn:focus-visible, .card.clicked .btn { color: #fff; }
.btn:hover::before, .btn:focus-visible::before, .card.clicked .btn::before { transform: translate(-50%, -50%) scale(1); }
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Подвал ---------- */
.site-foot {
  /* ширина = контентная колонка .screen (1080 − 2×16), чтобы линия совпадала с краями карточек */
  flex: none; width: calc(100% - 32px); max-width: 1048px; margin: 0 auto; padding: 24px 0 32px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.site-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .site-foot { flex-direction: column-reverse; text-align: center; } .site-foot nav { justify-content: center; } }

/* ---------- Юридические страницы ---------- */
.legal { max-width: 720px; padding-top: 100px; line-height: 1.6; font-size: 15px; }
.legal h1 { font-size: 32px; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.legal .updated { color: var(--muted); margin: 0 0 32px; font-size: 14px; }
.legal h2 { font-size: 18px; margin: 32px 0 8px; }
.legal p, .legal li { color: #333; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--text); }
.legal .fill { background: #fff4d6; border-radius: 4px; padding: 0 3px; }
.site-head a { pointer-events: auto; }

.empty-state { text-align: center; color: var(--muted); padding: 48px 0; }

@media (prefers-reduced-motion: reduce) {
  .wheel-rotor.spinning { transition-duration: 1.2s; }
  .fade-in { animation: none; }
  .btn::before { transition-duration: .01s; }
}
