/* =========================================================
  global.css
  Загальні змінні й базові стилі для всього сайту.
========================================================= */

:root {
  --purple: #5b10a6;
  --purple-deep: #2e075a;
  --yellow: #ffdc1d;
  --amber: #ffb000;
  --fire: #f06a2a;
  --forest: #164734;
  --forest-dark: #0d2b20;
  --paper: #f4ead8;
  --paper-light: #fff8ec;
  --ink: #2d2723;
  --muted: #75695f;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 28px 80px rgba(16, 20, 18, 0.28);
  --radius-xl: 38px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--forest-dark);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 0;
  padding: 15px 24px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(255, 220, 29, 0.30);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.13);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.badge-main {
  background: rgba(255, 220, 29, 0.15);
  color: #fff3b4;
  border-color: rgba(255, 220, 29, 0.30);
}

/* =========================================================
  Кнопка швидкого повернення нагору
========================================================= */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;

  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;

  border: 0;
  border-radius: 18px;

  color: var(--ink);
  background: var(--yellow);

  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;

  box-shadow: 0 18px 42px rgba(45, 39, 35, 0.22);

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);

  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(45, 39, 35, 0.28);
}

.back-to-top:active {
  transform: translateY(-1px);
}

@media (max-width: 680px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 21px;
  }
}