:root {
  --coral: #ff6b57;
  --coral-strong: #ff5d48;
  --coral-soft: rgba(255, 107, 87, 0.18);
  --ink: #17223b;
  --muted: #5d6985;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-line: rgba(255, 255, 255, 0.58);
  --surface-shadow: 0 32px 72px -38px rgba(22, 34, 59, 0.38);
  --intro-height: clamp(17rem, 42svh, 25rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 107, 87, 0.14), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(255, 107, 87, 0.09), transparent 30%),
    linear-gradient(180deg, #fff8f4 0%, #ffffff 100%);
  overflow: hidden;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.7;
  pointer-events: none;
  animation: ambient-drift 12s ease-in-out infinite;
}

.ambient-one {
  top: 18%;
  left: -6rem;
  width: 16rem;
  height: 16rem;
  background: rgba(255, 107, 87, 0.14);
}

.ambient-two {
  right: -4rem;
  bottom: 8%;
  width: 14rem;
  height: 14rem;
  background: rgba(255, 214, 204, 0.7);
  animation-delay: -6s;
}

.intro-panel {
  position: fixed;
  inset: 0 0 auto;
  z-index: 3;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #ff7d6d 0%, #ff6b57 52%, #ff604c 100%);
  transition:
    height 1.1s cubic-bezier(0.76, 0, 0.24, 1),
    box-shadow 0.45s ease;
}

body.is-ready .intro-panel {
  height: var(--intro-height);
  box-shadow: 0 18px 38px -28px rgba(23, 34, 59, 0.28);
}

.intro-noise,
.intro-glow {
  position: absolute;
  inset: 0;
}

.intro-noise {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0.6px, transparent 0.7px),
    radial-gradient(circle at 78% 34%, rgba(255, 255, 255, 0.8) 0.7px, transparent 0.8px),
    radial-gradient(circle at 34% 76%, rgba(255, 255, 255, 0.85) 0.6px, transparent 0.7px),
    radial-gradient(circle at 65% 68%, rgba(255, 255, 255, 0.75) 0.6px, transparent 0.7px);
  background-size: 26px 26px, 32px 32px, 24px 24px, 30px 30px;
}

.intro-glow {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.18), transparent 32%),
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.1), transparent 26%);
}

.language-switch {
  position: absolute;
  top: clamp(1rem, 2.8vw, 1.7rem);
  right: clamp(1rem, 2.8vw, 1.8rem);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.language-button {
  position: relative;
  padding: 0.2rem 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: clamp(0.82rem, 1vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    color 0.24s ease,
    transform 0.24s ease;
}

.language-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.12rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: scaleX(0.7);
  transform-origin: center;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.language-button:hover,
.language-button:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.language-button.is-active {
  color: #ffffff;
}

.language-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.intro-logo-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(80vw, 45rem);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  transition:
    top 1.1s cubic-bezier(0.76, 0, 0.24, 1),
    transform 1.1s cubic-bezier(0.76, 0, 0.24, 1),
    width 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}

body.is-ready .intro-logo-wrap {
  top: 50%;
  width: min(84vw, 45rem);
  transform: translate(-50%, -50%) scale(0.96);
}

.intro-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(255, 107, 87, 0.18));
}

.hero-spacer {
  flex: 0 0 var(--intro-height);
}

.hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: calc(100svh - var(--intro-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3.5rem, 8svh, 6rem) clamp(1.25rem, 3vw, 2.5rem) clamp(3rem, 7svh, 5rem);
}

.hero-card {
  width: min(100%, 52rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(2rem);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-ready .hero-card {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.34s;
}

.story-stage {
  position: relative;
  width: min(100%, 38rem);
  min-height: clamp(8.5rem, 24svh, 11rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: clamp(-5.75rem, -11svh, -4rem);
}

.story-text,
.story-thinking {
  width: 100%;
  margin: 0;
  text-align: center;
}

.story-text {
  color: var(--ink);
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.04em;
  white-space: pre-wrap;
  text-wrap: balance;
  opacity: 0;
  text-shadow: 0 10px 24px rgba(23, 34, 59, 0.08);
  transition: opacity 0.2s ease;
}

.story-text.is-visible {
  opacity: 1;
}

.story-char {
  opacity: 0;
  transition: opacity 0.09s ease;
}

.story-char.is-visible {
  opacity: 1;
}

.story-thinking {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
}

.story-thinking.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-thinking span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 107, 87, 0.55);
  animation: thinking-dot 0.8s ease-in-out infinite;
}

.story-thinking span:nth-child(2) {
  animation-delay: 0.12s;
}

.story-thinking span:nth-child(3) {
  animation-delay: 0.24s;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  margin-top: clamp(11rem, 21svh, 13.2rem);
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-width: 16rem;
  min-height: 4.75rem;
  padding: 1.15rem 1.9rem 1.2rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.65rem, 2.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  box-shadow: 0 0 0 rgba(23, 34, 59, 0);
  transition:
    transform 0.3s ease,
    color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    text-shadow 0.3s ease;
}

.social-link::after {
  content: "";
  position: absolute;
  left: 1.9rem;
  right: 1.9rem;
  bottom: 0.7rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(23, 34, 59, 0.16);
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    opacity 0.3s ease;
}

.social-link svg {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-4px);
  background: rgba(255, 107, 87, 0.06);
  box-shadow: 0 18px 34px -26px rgba(23, 34, 59, 0.26);
  text-shadow: 0 8px 16px rgba(23, 34, 59, 0.08);
  outline: none;
}

.social-link:hover::after,
.social-link:focus-visible::after {
  transform: scaleX(0.92);
}

.social-link-instagram:hover,
.social-link-instagram:focus-visible {
  color: #d84f79;
  background: rgba(216, 79, 121, 0.08);
}

.social-link-instagram:hover::after,
.social-link-instagram:focus-visible::after {
  background: linear-gradient(90deg, #feda75 0%, #fa7e1e 32%, #d62976 65%, #962fbf 100%);
}

.social-link-telegram:hover,
.social-link-telegram:focus-visible {
  color: #229ed9;
  background: rgba(34, 158, 217, 0.08);
}

.social-link-telegram:hover::after,
.social-link-telegram:focus-visible::after {
  background: #229ed9;
}

.social-link:active {
  transform: translateY(0);
}

@keyframes ambient-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -1.25rem, 0) scale(1.06);
  }
}

@keyframes thinking-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-0.24rem);
    opacity: 1;
  }
}

@media (max-width: 820px) {
  :root {
    --intro-height: clamp(15rem, 39svh, 20rem);
  }

  body {
    overflow-y: auto;
  }

  body.is-ready .intro-logo-wrap {
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
  }

  .language-switch {
    top: 0.95rem;
    right: 1rem;
    gap: 0.7rem;
  }

  .language-button {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .hero {
    padding: 3rem 1.2rem 2.5rem;
  }

  .story-stage {
    width: min(100%, 22rem);
    min-height: 8.5rem;
    margin-top: clamp(-4.25rem, -8svh, -2.75rem);
  }

  .story-text {
    font-size: clamp(1.55rem, 6.4vw, 2.2rem);
    line-height: 1.16;
  }

  .hero-actions {
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 8.5rem;
  }

  .social-link {
    width: min(100%, 19rem);
    min-height: 4.5rem;
    font-size: clamp(1.45rem, 6vw, 1.7rem);
  }

  .social-link svg {
    width: 2rem;
    height: 2rem;
  }
}

@media (max-width: 520px) {
  .ambient-one {
    width: 12rem;
    height: 12rem;
  }

  .ambient-two {
    width: 10rem;
    height: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .story-text,
  .story-thinking {
    transform: none !important;
  }

  .story-char {
    transition: none !important;
  }
}
