/* ===== Палитра: бежевые + красно-розовые пастельные ===== */
:root {
  --cream: #f7f0e6;
  --sand: #efe3d3;
  --blush: #f7d9d8;
  --rose: #e9a7a8;
  --deep-rose: #c86b74;
  --wine: #a4444f;
  --coffee: #5c4033;
  --soft-coffee: #7a5f52;
  --text: #4a3a33;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  overflow-x: hidden;
}

/* ===== Фон: мягкие пастельные пятна ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 100%);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
}

.b1 {
  width: 45vmax; height: 45vmax;
  background: radial-gradient(circle, var(--blush) 0%, rgba(247, 217, 216, 0) 68%);
  top: -10%; left: -8%;
}

.b2 {
  width: 38vmax; height: 38vmax;
  background: radial-gradient(circle, #f3d3c7 0%, rgba(243, 211, 199, 0) 68%);
  bottom: -12%; right: -10%;
}

.b3 {
  width: 28vmax; height: 28vmax;
  background: radial-gradient(circle, #f2c9c4 0%, rgba(242, 201, 196, 0) 68%);
  top: 18%; left: 58%;
}

.b4 {
  width: 20vmax; height: 20vmax;
  background: radial-gradient(circle, #eec9be 0%, rgba(238, 201, 190, 0) 68%);
  bottom: 22%; left: 12%;
}

.b5 {
  width: 24vmax; height: 24vmax;
  background: radial-gradient(circle, var(--rose) 0%, rgba(233, 167, 168, 0) 68%);
  top: -6%; right: 24%;
  opacity: 0.5;
}

/* ===== Карточка ===== */
.page {
  width: 100%;
  max-width: 460px;
}

.card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  padding: 44px 32px 28px;
  box-shadow:
    0 24px 60px -20px rgba(164, 68, 79, 0.28),
    0 6px 20px -8px rgba(92, 64, 51, 0.15);
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Аватарка ===== */
.avatar {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--blush), var(--rose), var(--deep-rose), var(--blush));
  padding: 5px;
  box-shadow: 0 12px 30px -12px rgba(164, 68, 79, 0.55);
  animation: pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.avatar img,
.avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  background: linear-gradient(150deg, var(--blush), var(--rose));
  color: var(--wine);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 2px;
  display: none;
  align-items: center;
  justify-content: center;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== Имя и подпись ===== */
.name {
  font-size: 30px;
  font-weight: 800;
  color: var(--coffee);
  letter-spacing: -0.5px;
}

.tagline {
  margin-top: 8px;
  color: var(--soft-coffee);
  font-size: 15px;
  font-weight: 500;
}

/* ===== Кнопки ===== */
.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 18px;
  border-radius: 18px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--coffee);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(233, 167, 168, 0.45);
  box-shadow: 0 8px 20px -12px rgba(164, 68, 79, 0.35);
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--blush), var(--rose));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  color: var(--wine);
  box-shadow: 0 16px 32px -14px rgba(164, 68, 79, 0.5);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(-1px) scale(0.99);
}

.btn:focus-visible {
  outline: 3px solid var(--deep-rose);
  outline-offset: 3px;
}

/* ===== Появление элементов сверху вниз ===== */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.links .btn {
  animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.links .btn:nth-child(1) { animation-delay: 0.14s; }
.links .btn:nth-child(2) { animation-delay: 0.21s; }
.links .btn:nth-child(3) { animation-delay: 0.28s; }
.links .btn:nth-child(4) { animation-delay: 0.35s; }
.links .btn:nth-child(5) { animation-delay: 0.42s; }
.links .btn:nth-child(6) { animation-delay: 0.49s; }

/* ===== Подвал ===== */
.foot {
  margin-top: 30px;
  color: var(--soft-coffee);
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
  animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.56s backwards;
}

.foot a {
  color: var(--wine);
  text-decoration: none;
  font-weight: 700;
}

.foot a:hover {
  text-decoration: underline;
}

/* ===== Уважение к настройке «уменьшить движение» ===== */
@media (prefers-reduced-motion: reduce) {
  .card,
  .avatar,
  .links .btn,
  .foot {
    animation: none;
  }
}

/* ===== Мобильная адаптация ===== */
@media (max-width: 420px) {
  .card { padding: 36px 22px 24px; }
  .name { font-size: 26px; }
  .avatar { width: 108px; height: 108px; }
  .btn { padding: 15px; font-size: 16px; }
}
