@font-face {
  font-family: "Cloude";
  src: url("fonts/Cloude Trial.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: #ffffff;
  font-family: "Lora", Georgia, "Times New Roman", serif;
  background-color: #76a4c5;
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15)
    ),
    url("images/zbynek-skrceny-MSrUdvVrKEE-unsplash.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vh, 40px);
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 48px);
  text-align: center;
}

.headline {
  margin: 0;
  font-family: "Cloude", "Lora", Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 9vw, 120px);
  line-height: 1;
  letter-spacing: 0.5px;
}

.block {
  width: min(100%, 880px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.5vh, 28px);
}

.bio {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 40px);
  line-height: 1.25;
  text-align: center;
}

.rain-btn {
  position: relative;
  display: inline-block;
  margin: 0 0.22em;
  padding: 0.18em 0.55em;
  font: inherit;
  font-weight: 700;
  font-style: italic;
  color: #4e7a93;
  background: linear-gradient(180deg, #ffffff 0%, #eaf3fa 100%);
  border: 2px solid #4e7a93;
  border-radius: 8px;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.35),
    10px 10px 0 0 #4e7a93,
    14px 14px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  vertical-align: baseline;
  line-height: 1;
  letter-spacing: 0.01em;
  transform: translate(0, 0) rotate(-2deg);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
  animation: rainBtnIdle 2.6s ease-in-out infinite;
  z-index: 1;
}

.rain-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 30% 25%,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0) 55%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

.rain-btn:hover,
.rain-btn:focus-visible {
  color: #ffffff;
  background: linear-gradient(180deg, #5f8eaa 0%, #4e7a93 100%);
  transform: translate(-2px, -3px) rotate(-3deg) scale(1.06);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.45),
    14px 14px 0 0 #2f4f63,
    18px 22px 26px rgba(0, 0, 0, 0.35);
  animation-play-state: paused;
  outline: none;
}

.rain-btn:active {
  transform: translate(6px, 6px) rotate(-1deg) scale(0.98);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.3),
    2px 2px 0 0 #2f4f63,
    4px 6px 10px rgba(0, 0, 0, 0.3);
  animation-play-state: paused;
}

.rain-btn:disabled {
  cursor: default;
  animation-play-state: paused;
  opacity: 0.85;
}

@keyframes rainBtnIdle {
  0%,
  100% {
    transform: translate(0, 0) rotate(-2deg);
  }
  50% {
    transform: translate(0, -3px) rotate(-3deg);
  }
}


.divider {
  margin: 0;
  width: 100%;
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
  letter-spacing: 0.5px;
  user-select: none;
}

.contacts {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 40px);
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-size: clamp(16px, 1.6vw, 20px);
}

.contacts__label {
  white-space: nowrap;
}

.contacts__link {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transform: translateY(0);
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    text-shadow 0.2s ease,
    background-size 0.28s ease,
    color 0.2s ease;
}

.contacts__link:hover,
.contacts__link:focus-visible {
  transform: translateY(-2px) rotate(-1.5deg);
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(0, 0, 0, 0.3);
  background-size: 100% 1.5px;
  outline: none;
}

.contacts__link:active {
  transform: translateY(0) rotate(-1deg) scale(0.98);
  transition-duration: 0.08s;
}

.contacts__item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.email-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translate(-50%, 6px);
  background: #ffffff;
  color: #4e7a93;
  font-family: "Lora", Georgia, serif;
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(78, 122, 147, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  user-select: text;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0s linear 0.18s;
  z-index: 5;
}

.email-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #ffffff;
  filter: drop-shadow(0 1px 0 rgba(78, 122, 147, 0.18));
  transform: translateX(-50%);
}

.email-tooltip.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 0s linear 0s;
}

.cloud-layer,
.rain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.rain-layer {
  z-index: 9;
}

.cloud {
  --flip: 1;
  position: absolute;
  height: auto;
  max-width: 60vw;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22));
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  transition: transform 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cloud--left {
  transform: translateX(calc(-100vw - 100%)) scaleX(var(--flip));
}

.cloud--right {
  transform: translateX(calc(100vw + 100%)) scaleX(var(--flip));
}

.cloud.is-in {
  transform: translateX(0) scaleX(var(--flip));
}

.drop {
  position: absolute;
  top: 0;
  width: 2px;
  height: 14px;
  border-radius: 1px;
  background: linear-gradient(
    to bottom,
    rgba(174, 194, 224, 0) 0%,
    rgba(174, 194, 224, 0.6) 50%,
    rgba(220, 235, 250, 1) 100%
  );
  opacity: 0.9;
  filter: blur(0.3px);
  will-change: transform;
  pointer-events: none;
}

@media (max-width: 600px) {
  .rain-btn {
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.3),
      6px 6px 0 0 #4e7a93,
      8px 10px 12px rgba(0, 0, 0, 0.25);
  }
  .contacts {
    gap: 14px 24px;
  }
  .divider {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud {
    transition: opacity 0.4s ease;
    opacity: 0;
    transform: translateX(0) !important;
  }
  .cloud.is-in {
    opacity: 1;
  }
  .rain-btn {
    animation: none;
    transition: none;
  }
}
