body {
  margin: 0;
}
#mykapi {
  margin: 0;
  overflow: hidden;
  color: #392f32;
  font-family: Montserrat, Arial, sans-serif;
}
#mykapi *,
#mykapi *::before,
#mykapi *::after {
  box-sizing: border-box;
}

:root {
  --ink: #392f32;
  --cream: #fff6dc;
  --peach: #ffc792;
  --pink: #f4a9bd;
  --blue: #aee5ef;
  --green: #b8d66b;
  --purple: #8463ad;
  --white: #fff;
  --soft-gradient: linear-gradient(135deg, #fff4d5 0%, #ffd5df 50%, #cceff3 100%);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  color: var(--ink);
  background: #fffaf0;
  overflow-x: hidden;
}
button,
a {
  font: inherit;
}
a {
  color: inherit;
}
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 40px 20px;
  background: var(--soft-gradient);
  overflow: hidden;
}
.hero:before,
.hero:after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}
.hero:before {
  width: 300px;
  height: 300px;
  background: #cceff5;
  left: -100px;
  top: -90px;
}
.hero:after {
  width: 260px;
  height: 260px;
  background: #f8bfd0;
  right: -90px;
  bottom: -90px;
}
.hero-inner {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-copy h1 {
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1.03;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.hero-copy p {
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.45;
  margin: 0;
  max-width: 520px;
}
.scene {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: end center;
}
.capy-frame {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1/1;
  border-radius: 48% 48% 34% 34%/44% 44% 30% 30%;
  overflow: hidden;
  background: #f4dda0;
  box-shadow: 0 30px 70px rgba(91, 56, 24, 0.18);
  transform-origin: 50% 80%;
  transition: transform 0.4s ease;
}
.capy-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 92%;
  transform: scale(1.02);
  filter: saturate(0.96);
}
.sleep-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(87, 52, 28, 0.04), transparent 55%);
  pointer-events: none;
}
.zzz {
  position: absolute;
  right: 10%;
  top: 8%;
  font-weight: 800;
  color: var(--purple);
  font-size: clamp(28px, 4vw, 54px);
  letter-spacing: 0.15em;
  animation: float 2.1s ease-in-out infinite;
}
.rub-zone {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 44%;
  height: 34%;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  display: grid;
  place-items: center;
  outline: none;
}
.rub-zone:active {
  cursor: grabbing;
}
.rub-zone:focus-visible {
  outline: 3px dashed var(--purple);
  outline-offset: 6px;
}
.rub-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 210, 145, 0.16) 55%, transparent 72%);
  opacity: 0.25;
  transform: scale(0.85);
  transition: 0.2s;
}
.rub-zone.is-rubbing .rub-glow {
  opacity: 1;
  transform: scale(1.08);
}
.rub-hint {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(64, 45, 35, 0.12);
  font-weight: 700;
  font-size: 15px;
  transition: 0.4s;
}
.progress {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: 170px;
  height: 8px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f3a8bc, #ef796d);
  border-radius: inherit;
  transition: width 0.08s linear;
}
.logo-reveal {
  position: absolute;
  inset: auto 50% 7%;
  transform: translateX(-50%) translateY(16px) scale(0.86);
  width: 42%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 28px;
  opacity: 0;
  transition: 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.2);
  mix-blend-mode: multiply;
}
.hero.awake .logo-reveal {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.hero.awake .zzz,
.hero.awake .rub-hint,
.hero.awake .progress {
  opacity: 0;
  pointer-events: none;
}
.hero.awake .capy-frame {
  animation: dance 1.1s ease-in-out 2;
}
@keyframes float {
  50% {
    transform: translateY(-12px) rotate(-3deg);
  }
}
@keyframes dance {
  0%,
  100% {
    transform: rotate(0) translateY(0);
  }
  25% {
    transform: rotate(-3deg) translateY(-8px);
  }
  50% {
    transform: rotate(3deg) translateY(0);
  }
  75% {
    transform: rotate(-2deg) translateY(-5px);
  }
}
.section {
  padding: 110px 24px;
}
.inner {
  width: min(1120px, 100%);
  margin: auto;
}
.about {
  background: var(--soft-gradient);
  position: relative;
  overflow: hidden;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.about h2,
.shop h2,
.contacts h2 {
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.08;
  margin: 0 0 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.about p {
  font-size: clamp(17px, 1.75vw, 22px);
  line-height: 1.62;
  margin: 0 0 18px;
  max-width: 680px;
}
.about p:last-child {
  margin-bottom: 0;
}
.soft-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  padding: 34px;
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(83, 60, 62, 0.12);
}
.about-capy {
  width: 100%;
  aspect-ratio: 1.15/1;
  border-radius: 40px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(83, 60, 62, 0.12);
}
.about-capy img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}
.shop {
  background: var(--soft-gradient);
  text-align: center;
}
.shop p {
  font-size: 20px;
  line-height: 1.5;
  margin: 0 auto 48px;
  max-width: 700px;
}
.markets {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 5vw, 70px);
  flex-wrap: wrap;
}
.market {
  width: clamp(130px, 16vw, 210px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 16px 20px rgba(60, 40, 30, 0.12));
}
.market:hover {
  transform: translateY(-12px) scale(1.05);
  filter: drop-shadow(0 24px 28px rgba(60, 40, 30, 0.2));
}
.market:active {
  transform: scale(0.96);
}
.market img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.contacts {
  background: #7f61a8;
  color: white;
  position: relative;
  overflow: hidden;
}
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
}
.contact-list {
  display: grid;
  gap: 18px;
}
.contact {
  display: block;
  padding: 22px 26px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  text-decoration: none;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
  transition: 0.25s;
}
.contact:hover {
  background: white;
  color: #6e4c99;
  transform: translateY(-3px);
}
.contact-capy {
  height: 340px;
  border-radius: 36px;
  overflow: hidden;
  background: #f8dfa6;
  box-shadow: 0 24px 60px rgba(35, 18, 56, 0.22);
}
.contact-capy img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 88%;
}

.contact-intro {
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.55;
  margin: 0 0 30px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
}
.contact-main {
  display: block;
  margin: 0 0 28px;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}
.contact-main:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.contact-label {
  display: block;
  font-size: clamp(14px, 1.35vw, 17px);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 7px;
  opacity: 0.8;
}
.contact-signoff {
  margin: 38px 0 0;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  font-weight: 700;
  font-style: italic;
}
.note {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  background: #392f32;
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  opacity: 0.8;
}
@media (max-width: 760px) {
  .hero-inner,
  .about-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    gap: 20px;
    text-align: center;
  }
  .hero-copy p {
    margin: auto;
  }
  .scene {
    min-height: 430px;
  }
  .capy-frame {
    width: min(430px, 100%);
  }
  .section {
    padding: 78px 18px;
  }
  .about-grid {
    gap: 30px;
  }
  .contacts-grid {
    gap: 28px;
  }
  .contact-capy {
    height: 280px;
  }
  .rub-hint {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.capy-frame {
  overflow: visible;
  border-radius: 0;
  background: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/capy-sleep.svg') center / contain no-repeat;
  box-shadow: none;
}

.capy-frame .capy-img {
  opacity: 0;
}

.sleep-overlay {
  display: none;
}

.capy-frame::before {
  position: absolute;
  z-index: 1;
  top: 38%;
  left: 45%;
  width: 34%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 244, 218, 0.28), transparent 72%);
  content: '';
  mix-blend-mode: screen;
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: belly-breathe 3s ease-in-out infinite;
}

.capy-frame::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: '';
  pointer-events: none;
  transform-origin: 50% 68%;
  animation: capy-breathe 3s ease-in-out infinite;
}

.hero:not(.awake) .capy-frame {
  animation: capy-breathe 3s ease-in-out infinite;
}

.zzz {
  z-index: 2;
  top: 18%;
  right: auto;
  left: 20%;
}

.zzz span {
  display: inline-block;
  animation: sleep-drift 2.2s ease-in-out infinite;
}

.zzz span:nth-child(2) {
  animation-delay: 0.3s;
}

.zzz span:nth-child(3) {
  animation-delay: 0.6s;
}

.rub-zone {
  top: 47%;
  left: 61%;
  width: 30%;
  height: 25%;
}

.rub-hint {
  z-index: 3;
  bottom: 6%;
  min-width: 210px;
  padding: 13px 22px;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.progress {
  z-index: 2;
  bottom: 6%;
  width: 230px;
  height: 48px;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.progress span {
  background: linear-gradient(90deg, rgba(239, 225, 248, 0.56), rgba(213, 184, 232, 0.6) 58%, rgba(190, 151, 218, 0.62));
}

.hero.awake .capy-frame {
  background-image: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/capy-awake.svg');
  animation: capy-dance 1.4s ease-in-out infinite;
}

.music-notes {
  position: absolute;
  z-index: 6;
  top: 12%;
  right: -3%;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.music-notes span {
  display: block;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  animation: note-rise 1.5s ease-in-out infinite;
}

.music-notes span:nth-child(1) {
  color: #f28aa8;
  animation-delay: 0.1s;
}
.music-notes span:nth-child(2) {
  color: #8463ad;
  animation-delay: 0.35s;
}
.music-notes span:nth-child(3) {
  color: #62bdd0;
  animation-delay: 0.6s;
}

.hero.awake .music-notes {
  opacity: 1;
}

.hero-copy {
  position: relative;
}

.hero-copy::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(360px, 100%);
  aspect-ratio: 632.05 / 425.72;
  background: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/logo.svg') left center / contain no-repeat;
  content: '';
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.hero.awake .hero-copy h1,
.hero.awake .hero-copy p {
  opacity: 0;
  transform: translateY(-12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.hero.awake .hero-copy::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.hero.awake .rub-zone,
.logo-reveal {
  pointer-events: none;
  display: none;
}

.hero.awake .capy-frame::before,
.hero.awake .capy-frame::after {
  opacity: 0;
  animation-play-state: paused;
}

.soft-card h2 {
  display: none;
}

.soft-card::before {
  display: block;
  width: min(86%, 520px);
  height: clamp(52px, 10vw, 92px);
  margin: 0 0 32px;
  background: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/logo-about.svg') left center / contain no-repeat;
  content: '';
  filter: brightness(0);
}

.about-capy {
  width: 115%;
  max-width: none;
  justify-self: center;
  overflow: visible;
  border-radius: 0;
  background: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/capy-bath.svg') center / contain no-repeat;
  box-shadow: none;
  transform-origin: 50% 70%;
  animation: capy-art-pulse 4s ease-in-out infinite;
}

.about p {
  font-size: clamp(14px, 1.5vw, 19px);
}

.about-capy img,
.contact-capy img {
  opacity: 0;
}

.market {
  --market-circle-size: clamp(160px, 17vw, 210px);
  display: block;
  width: var(--market-circle-size);
  height: var(--market-circle-size);
  aspect-ratio: auto;
}

.market img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.markets .market:nth-child(3) {
  overflow: hidden;
}

.markets .market:nth-child(3) img {
  position: relative;
  left: 50%;
  display: block;
  width: auto;
  max-width: none;
  height: var(--market-circle-size);
  object-fit: initial;
  transform: translateX(-53%);
}

.shop p {
  display: none;
}

.shop h2 {
  margin-bottom: 68px;
}

body {
  letter-spacing: 0.025em;
}

.hero-copy h1,
.about h2,
.shop h2,
.contacts h2,
.contact,
.rub-hint {
  letter-spacing: 0.025em;
}

.contact-capy {
  overflow: visible;
  height: auto;
  min-height: 340px;
  border-radius: 0;
  background: url('https://dcontract-brand-media.storage.yandexcloud.net/v1/mykapi/capy-contacts.svg') center bottom / contain no-repeat;
  box-shadow: none;
  transform-origin: 50% 100%;
  animation: capy-art-pulse 4s ease-in-out infinite;
}

@keyframes capy-breathe {
  50% {
    transform: scale(1.012, 1.028);
  }
}

@keyframes belly-breathe {
  50% {
    opacity: 0.88;
    transform: scaleY(1.18) translateY(-5px);
  }
}

@keyframes sleep-drift {
  50% {
    opacity: 0.55;
    transform: translate(-8px, -22px) rotate(-6deg);
  }
}

@keyframes capy-dance {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(-10px, -12px) rotate(-3deg) scale(1.02);
  }
  50% {
    transform: translate(10px, 0) rotate(3deg) scale(1);
  }
  75% {
    transform: translate(-6px, -8px) rotate(-2deg) scale(1.02);
  }
}

@keyframes note-rise {
  50% {
    transform: translateY(-18px) rotate(-8deg) scale(1.08);
  }
}

@keyframes capy-art-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.09);
  }
}

.hero-copy p,
.about p,
.shop h2,
.contacts h2,
.contact {
  text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  .capy-frame::before,
  .capy-frame::after,
  .hero.awake .capy-frame {
    animation: none;
  }

  .about-capy,
  .contact-capy {
    animation: none;
  }
}

.hero.awake .rub-glow,
.hero.awake .capy-frame::before,
.hero.awake .capy-frame::after {
  opacity: 0;
  animation: none;
}

@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
    padding: 28px 18px 20px;
  }

  .shop h2,
  .contacts h2 {
    font-size: clamp(24px, 7.8vw, 38px);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 12vw, 54px);
    margin-bottom: 14px;
  }

  .hero-copy p {
    max-width: 34ch;
    font-size: 16px;
  }

  .scene {
    min-height: min(108vw, 460px);
    width: min(100%, 440px);
    margin: 0 auto;
  }

  .capy-frame {
    width: min(100%, 430px);
  }

  .rub-zone {
    top: 49%;
    left: 61%;
    width: 35%;
    height: 29%;
  }

  .rub-hint {
    bottom: 6%;
    max-width: calc(100vw - 36px);
    white-space: normal;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 12px;
  }

  .progress {
    bottom: 6%;
    width: 210px;
    height: 44px;
  }

  .zzz {
    top: 17%;
    left: 14%;
  }

  .music-notes {
    top: 9%;
    right: -4%;
  }

  .section {
    padding: 72px 18px;
  }

  .about-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .soft-card {
    padding: 24px 20px;
  }

  .about-capy {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
  }

  .markets {
    gap: 24px;
  }

  .market {
    --market-circle-size: min(42vw, 166px);
  }

  .contact-capy {
    min-height: min(90vw, 360px);
  }
}

@media (max-width: 380px) {
  .market {
    --market-circle-size: 132px;
  }

  .contact {
    padding: 18px 20px;
    font-size: 17px;
  }
}
