@font-face {
  font-family: "Mia Lettering";
  src: url("assets/mia-lettering.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  background: #f8e5d4;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  isolation: isolate;
  color: #58370f;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(ellipse at 48% 46%, #ffeede 0%, transparent 66%),
    radial-gradient(ellipse at 9% 42%, #fff2e6 2%, transparent 45%),
    linear-gradient(128deg, #e8cbb1, #fae5d3 32%, #f8e4d6 75%, #f3d8bd);
}

body::before,
body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background: url("assets/grain.png") repeat;
  mix-blend-mode: soft-light;
  opacity: .26;
}

body::after {
  background-image: url("assets/palm.webp"), url("assets/palm-bottom.webp");
  background-repeat: no-repeat;
  background-position: top left, bottom right;
  background-size: clamp(195px, 57vw, 570px) auto, clamp(150px, 41vw, 420px) auto;
}

.profile {
  width: min(100%, 32rem);
  width: min(100%, 32rem, max(22.5rem, 57svh));
  margin-block: auto;
  padding-block: max(1.65rem, env(safe-area-inset-top)) max(1.65rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  container-type: inline-size;
  text-align: center;
}

.portrait {
  position: relative;
  width: 62cqw;
  aspect-ratio: 1;
  overflow: hidden;
  border: clamp(3px, 1cqw, 5px) solid #fff0e2;
  border-radius: 50%;
  background: #dbc4ac;
  box-shadow: 0 1.3cqw 2.8cqw rgb(111 70 32 / 19%);
}

/* Более крупный портрет. Четыре величины ниже управляют кадром. */
.portrait img {
  position: absolute;
  width: 185%;
  height: 185%;
  left: -32%;
  top: -42%;
  object-fit: cover;
  object-position: center 17.5%;
}

.signature {
  font-family: "Mia Lettering", "Segoe Script", cursive;
  font-weight: normal;
  font-size: 22cqw;
  line-height: 1;
  margin: 3.8cqw 0 0;
}

.flourish {
  width: 31.5cqw;
  height: auto;
  margin: -3.3cqw 0 0 7cqw;
  overflow: visible;
}

.flourish path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.7;
  stroke-linecap: round;
}

.greeting {
  width: min(77%, 25rem);
  margin: 8.2cqw 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.7cqw;
  font-size: max(1.1rem, 5.2cqw);
  line-height: 1.3;
}

.greeting::before,
.greeting::after {
  content: "";
  flex: 1 1 1rem;
  height: 1px;
  background: linear-gradient(to right, transparent, #ac8563);
}

.greeting::after { transform: rotate(180deg); }

.telegram {
  width: 72%;
  min-height: max(3.65rem, 15cqw);
  margin-top: 7.4cqw;
  padding: .5rem 5cqw;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(145deg, #479ac4, #337fae 55%, #24699e);
  border: 1px solid #f6f4e9;
  border-radius: 8rem;
  box-shadow: 0 1.4cqw 2.4cqw rgb(106 70 34 / 17%);
  text-decoration: none;
  font-family: "Segoe UI", Arial, sans-serif;
  transition: transform .18s ease, box-shadow .18s ease;
}

.plane {
  display: grid;
  place-items: center;
  align-self: stretch;
  flex: 0 0 24%;
  padding-right: 3cqw;
  border-right: 1px solid rgb(255 255 255 / 82%);
}

.plane svg { width: 8cqw; }

.button-copy {
  flex: 0 1 auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 4.5cqw;
  line-height: 1.15;
}

.button-copy strong {
  font-size: max(1.2rem, 5.35cqw);
  font-weight: 600;
}

.button-copy > span {
  font-size: max(.875rem, 3.25cqw);
  margin-top: .25cqw;
  font-weight: 350;
}

.arrow {
  width: 4.8cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.telegram:focus-visible {
  outline: 3px solid #69441e;
  outline-offset: 4px;
}

@media (hover: hover) {
  .telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 1.8cqw 2.8cqw rgb(106 70 34 / 22%);
  }
}

.telegram:active { transform: translateY(1px); }

.heart {
  margin-top: 9cqw;
  font: normal 20.5cqw / .47 "Mia Lettering", Georgia, serif;
}

@media (max-width: 21rem) {
  .telegram { width: 82%; }
  .greeting { width: 88%; }
}

@media (max-height: 32rem) {
  .profile { padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .telegram { transition: none; transform: none; }
}
