/* THE ★ BOYS — страницы питомцев (подключается после style.css) */

/* ---------- Входная анимация: играет после прелоадера (body.is-ready из pet.js) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body.is-ready .fx {
    animation: pet-in .8s var(--ease-out) both;
    animation-delay: calc(.09s * var(--fx, 0));
  }
}
@keyframes pet-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Герой ---------- */
.pet__hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 5vw, 64px) 60px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(224, 54, 44, .07), transparent 70%),
    radial-gradient(50% 60% at 12% 85%, rgba(242, 239, 232, .04), transparent 70%),
    var(--bg);
}
/* тонкая «сетка следов» на фоне */
.pet__hero::before {
  content: "🐾";
  position: absolute;
  inset: 0;
  font-size: 26px;
  line-height: 120px;
  letter-spacing: 84px;
  text-align: center;
  opacity: .035;
  transform: rotate(-8deg) scale(1.4);
  pointer-events: none;
}

.pet__hero-inner {
  display: grid;
  grid-template-columns: minmax(280px, 430px) 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

/* Фото-полароид */
.pet__photo {
  position: relative;
  margin: 0;
  padding: 14px 14px 52px;
  background: #f4f1ea;
  transform: rotate(-2.5deg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  will-change: transform;
}
.pet__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(.92);
}
.pet__photo figcaption {
  position: absolute;
  left: 0; right: 0;
  bottom: 14px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #40453f;
}

/* Заглушка, если фото в архиве нет (Оскар) */
.pet__noimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #10140f;
  border: 1px dashed rgba(64, 69, 63, .6);
}
.pet__noimg i {
  font-style: normal;
  font-size: 84px;
  filter: grayscale(1) brightness(.8);
}
.pet__noimg p {
  max-width: 220px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #5a615a;
  line-height: 1.8;
}

/* Текст героя */
.pet__kicker {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pet__kicker .line {
  width: 44px;
  height: 1px;
  background: var(--line);
}
.pet__species {
  margin-top: 26px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pet__species b {
  color: var(--red);
  font-weight: 600;
}
.pet__name {
  margin: 6px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 150px);
  line-height: .95;
  letter-spacing: .02em;
}
.pet__owner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color .25s;
}
.pet__owner b {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
  transition: color .25s;
}
.pet__owner i {
  font-style: normal;
  color: var(--red);
  transition: transform .3s var(--ease-out);
}
.pet__owner:hover b { color: var(--red); }
.pet__owner:hover i { transform: translateX(6px); }

/* Кнопка «Погладить» */
.pet__actions { margin-top: 36px; }
.pet__pat {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  background: none;
  border: 1px solid rgba(224, 54, 44, .6);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s, background .25s, transform .15s;
}
.pet__pat:hover {
  background: rgba(224, 54, 44, .1);
  border-color: var(--red);
}
.pet__pat:active { transform: scale(.96); }
.pet__count {
  min-width: 30px;
  padding: 3px 8px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  border-radius: 999px;
}
.pet__pat-hint {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: .7;
}

/* Вылетающие сердечки и следы лапок */
.fly {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  font-size: 22px;
  will-change: transform, opacity;
}
.pawmark {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-size: 26px;
  opacity: 0;
  animation: paw-fade 2.6s ease-out forwards;
}
@keyframes paw-fade {
  0%   { opacity: 0; transform: scale(.4) rotate(var(--rot, 0deg)); }
  12%  { opacity: .8; transform: scale(1.05) rotate(var(--rot, 0deg)); }
  20%  { transform: scale(1) rotate(var(--rot, 0deg)); }
  100% { opacity: 0; transform: scale(1) rotate(var(--rot, 0deg)); }
}

/* ---------- Досье ---------- */
.pet__body {
  position: relative;
  padding: clamp(60px, 9vw, 120px) 20px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.pet__watermark {
  position: absolute;
  top: 40px;
  left: 0;
  font-family: var(--font-display);
  font-size: clamp(120px, 22vw, 300px);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(242, 239, 232, .07);
  pointer-events: none;
  will-change: transform;
}
.pet__body-inner {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
}
.pet__sec { margin-bottom: clamp(40px, 6vw, 64px); }
.pet__sec h3 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(21px, 2.6vw, 27px);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.pet__sec h3 span {
  font-size: 13px;
  color: var(--red);
  letter-spacing: .2em;
}
.pet__sec p {
  color: #c9cec8;
  line-height: 1.75;
  margin-bottom: 12px;
}
.pet__sec p:last-child { margin-bottom: 0; }

.pet__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.pet__nav a {
  color: var(--ink-dim);
  transition: color .25s;
}
.pet__nav a:hover { color: var(--ink); }
.pet__nav .next {
  margin-left: auto;
  color: var(--red);
}
.pet__nav .next:hover { color: var(--ink); }

/* Строка «Питомец» в досье персонажа */
.dossier__pet { color: var(--ink); }
.dossier__pet .paw {
  display: inline-block;
  margin-left: 4px;
  transition: transform .3s var(--ease-out);
}
.dossier__pet:hover { color: var(--red); }
.dossier__pet:hover .paw { transform: rotate(-14deg) scale(1.25); }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .pet__hero { padding-top: 100px; }
  .pet__hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pet__photo {
    width: min(360px, 86%);
    margin: 0 auto;
  }
  .pet__intro { text-align: center; }
  .pet__kicker { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .pawmark { display: none; }
  .fly { display: none; }
}
