/* ===== СКАЧАТЬ CV: кнопка в подвале + окно мини-игры «Долети до CV» (js/cv-game.js) ===== */

/* — кнопка под контактами: по центру, без подписей — */
.cvbox {
  --c: calc(100cqw / 1440);
  position: relative; z-index: 2;
  display: flex; justify-content: center;
  margin-top: calc(56 * var(--c));
}
.cvbox__play {
  display: flex; align-items: center; gap: calc(14 * var(--c));
  padding: calc(10 * var(--c)) calc(28 * var(--c)) calc(10 * var(--c)) calc(10 * var(--c));
  border: 1px solid rgba(231, 85, 174, 0.6); border-radius: calc(14 * var(--c));
  background: linear-gradient(120deg, rgba(231, 85, 174, 0.14), rgba(58, 122, 196, 0.14));
  color: #fff; font: inherit; cursor: pointer;
  transition: transform 0.25s cubic-bezier(.2,.9,.1,1), border-color 0.25s, box-shadow 0.25s;
}
.cvbox__play b { font-weight: 600; font-size: calc(18 * var(--c)); }
.cvbox__play:hover { transform: translateY(calc(-3 * var(--c))); border-color: var(--pink); box-shadow: 0 0 calc(24 * var(--c)) rgba(231, 85, 174, 0.35); }
/* значок-файл «CV» с загнутым уголком; при наведении подпрыгивает */
.cvbox__icon {
  position: relative; display: grid; place-items: center;
  width: calc(40 * var(--c)); height: calc(48 * var(--c)); border-radius: calc(4 * var(--c));
  background: #fff; color: #18161a; font-weight: 800; font-size: calc(13 * var(--c));
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
}
.cvbox__icon::after { content: ""; position: absolute; right: 0; top: 0; width: 28%; height: 22%; background: #c9c3d6; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.cvbox__play:hover .cvbox__icon { animation: cv-hop 0.6s ease; }
@keyframes cv-hop { 40% { transform: translateY(calc(-8 * var(--c))) rotate(-8deg); } }

/* — окно игры — */
.cvgame { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 3vmin; background: rgba(8, 8, 12, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cvgame[hidden] { display: none; }
.cvgame__wrap { display: grid; justify-items: center; gap: 16px; width: min(1000px, 100%); }
.cvgame__box { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 92vh; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.cvgame__canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.cvgame__close { position: absolute; top: 10px; right: 12px; z-index: 3; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 24px; cursor: pointer; }
.cvgame__close:hover { background: rgba(231, 85, 174, 0.6); }
.cvgame__plain { /* под окном игры — заметная ссылка, чтобы скачать без игры */
  padding: 10px 22px; border-radius: 30px; border: 1px solid #FFD83A;
  color: #FFD83A; font-weight: 600; font-size: 14px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.cvgame__plain:hover { background: #FFD83A; color: #18161a; }

/* экраны поверх холста: старт, проигрыш, победа */
.cvgame__screen { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 20px; text-align: center; pointer-events: none; }
.cvgame__screen > div { pointer-events: auto; max-width: 460px; padding: 22px 26px; border-radius: 14px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 0 rgba(24, 22, 26, 0.18), 0 0 0 3px #18161a; animation: cv-pop 0.35s cubic-bezier(.3,1.5,.5,1); }
@keyframes cv-pop { from { transform: scale(0.85); opacity: 0; } }
.cvgame__screen h3 { margin: 0 0 16px; font-weight: 800; font-size: 22px; color: #18161a; }
.cvgame__screen p { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: #3a3346; }
.cvgame__screen button { padding: 10px 22px; border: 0; border-radius: 30px; background: linear-gradient(90deg, var(--pink), var(--blue)); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: transform 0.2s; }
.cvgame__screen button:hover { transform: scale(1.05); }
.cvgame__screen.is-hidden > div { display: none; }
.cvgame__screen.is-top { place-items: start center; padding-top: 50px; }

/* телефон: крупнее кнопка, окно игры — во весь экран */
@media (max-aspect-ratio: 4 / 5) {
  .cvbox { --c: calc(100cqw / 640); }
  .cvbox__play b { font-size: calc(24 * var(--c)); }
  .cvgame__wrap { width: min(480px, 100%); }
  .cvgame__box { aspect-ratio: 9 / 16; max-height: 80vh; }
}
