@keyframes typing {
  to {
    opacity: 0.3;
    transform: translateY(-3px);
  }
}

@keyframes unveil {
  from {
    clip-path: inset(100% 0 0 0);
  }
}

@keyframes settle {
  from {
    transform: scale(1.08);
  }
}

.hero {
  display: grid;
  gap: 48px;
}
.hero__assurance {
  max-width: 430px;
  margin-top: 24px !important;
  padding-left: 16px;
  border-left: 2px solid var(--color-accent);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.hero__copy .button {
  flex-grow: 1;
  font-size: 15px;
  padding-inline: 24px;
}
.hero__languages {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  margin-top: 32px;
  gap: 8px;
  font-size: 13px;
}
.hero__languages > span:first-child {
  margin-right: 4px;
}
/* Languages are set as text, RU · EN · DE, not as button-like chips. */
.language-code {
  place-items: center;
  font: 600 11px var(--font-ui);
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-ink);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hero__visual {
  position: relative;
  min-width: 0;
}
.hero__photo img {
  object-position: center 42%;
}
/* The live dialogue is the centrepiece of the first screen. */
.translation-card {
  position: relative;
  margin: -26px 14px 0;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-white);
  backdrop-filter: none;
  box-shadow: var(--shadow-floating);
  font-size: 14px;
}
.translation-card__heading {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.translation-card__heading strong {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
}
.translation-card__heading > span:last-child {
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
  padding: 4px 7px;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  background: var(--color-section-slate);
  color: var(--color-accent-text);
  font-size: 10px;
  letter-spacing: 0.08em;
}
.translation-card__heading .icon {
  width: 18px;
  height: 18px;
}
.translation-card small {
  display: block;
  color: var(--color-muted);
  margin-bottom: 5px;
  font-size: 11px;
}
.translation-card__original {
  line-height: 1.5;
  padding: 12px 14px;
  margin-right: 18px;
  border-radius: 12px 12px 12px 3px;
  background: var(--color-section-slate);
}
.translation-card__translated {
  color: var(--color-white);
  line-height: 1.5;
  position: relative;
  padding: 12px 14px;
  margin: 10px 0 0 18px;
  border-radius: 12px 12px 3px 12px;
  background: var(--color-ink);
}
.translation-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
}
.status-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-mint-text);
  box-shadow: 0 0 0 3px var(--color-section-slate);
}
.translation-card__typing {
  position: absolute;
  gap: 4px;
  display: none;
  top: 40px;
  left: 14px;
  right: auto;
  bottom: auto;
}
.translation-card__typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  animation: typing 0.55s infinite alternate;
  background: var(--color-on-ink);
}
.translation-card__typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.translation-card__typing i:nth-child(3) {
  animation-delay: 0.3s;
}
.hero__copy .button .icon {
  display: none;
}
.hero__copy h1 {
  font-size: clamp(42px, 9vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.hero__copy .lead {
  font-size: 17px;
  line-height: 1.7;
  max-width: 540px;
}
.hero__copy .button-row {
  margin-top: 36px;
  gap: 12px;
}
/* The one brass word in the headline; the serif has no italic cut loaded. */
.hero__accent {
  color: var(--color-accent-text);
  font-style: normal;
}
.language-code + .language-code::before {
  content: "·";
  margin-right: 8px;
  color: var(--color-accent);
}
.hero__photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.translation-card__heading .icon-circle {
  width: 32px;
  height: 32px;
}
.translation-card__translated small {
  color: var(--color-on-ink-muted);
}
.translation-card__original p,
.translation-card__translated p {
  min-height: 3em;
  line-height: 1.5;
}
.translation-card.is-typing .translation-card__typing {
  display: flex;
}
.translation-card.is-typing [data-dialogue-translated] {
  visibility: hidden;
}
.translation-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.translation-card__dots {
  display: flex;
  gap: 2px;
}
.translation-card__dots button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
}
.translation-card__dots button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-line-strong);
  transition: background var(--transition), width var(--transition);
}
.translation-card__dots button[aria-pressed="true"]::after {
  width: 16px;
  border-radius: 3px;
  background: var(--color-ink);
}
.translation-card [data-dialogue-fade] {
  transition: opacity 260ms ease, transform 260ms ease;
}
.translation-card.is-switching [data-dialogue-fade] {
  opacity: 0;
  transform: translateY(6px);
}
@media (min-width: 480px) {
  .hero__copy .button {
    flex-grow: 0;
  }
}
@media (min-width: 768px) {
  .hero__copy {
    max-width: 650px;
  }
  .hero__visual {
    max-width: 620px;
    width: 100%;
    justify-self: center;
  }
  .hero__copy h1 {
    font-size: 64px;
  }
  .hero__title-line {
    display: block;
  }
  .hero__copy .lead {
    font-size: 18px;
  }
  .hero__photo {
    aspect-ratio: 16/11;
  }
}
@media (min-width: 1024px) {
  .hero {
    align-items: center;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 64px;
    padding: 0 0 38px;
  }
  /* The longest title line ("Лечение в Германии") is ~9.8em wide, so 10cqi
     sizes the headline to fill its column without ever wrapping. */
  .hero__copy {
    position: relative;
    z-index: 1;
    padding: 16px 0 40px;
    container-type: inline-size;
  }
  .hero__copy .eyebrow {
    font-size: 10px;
    padding: 8px 11px;
    gap: 7px;
  }
  .hero__copy .eyebrow .icon {
    width: 16px;
    height: 16px;
  }
  .hero__copy .button {
    gap: 7px;
    font-size: 15px;
    padding-inline: 26px;
  }
  .hero__copy .button .icon {
    width: 17px;
    height: 17px;
  }
  .hero__visual {
    max-width: none;
    margin: 0;
    align-self: stretch;
  }
}
@media (min-width: 768px) {
  .hero__visual {
    margin-bottom: 0;
  }
}
@media (min-width: 1024px) {
  .hero__photo {
    max-height: 600px;
    aspect-ratio: auto;
    height: 100%;
    min-height: 580px;
  }
  .hero__copy h1 {
    font-size: clamp(48px, 4.6vw, 72px);
    font-size: min(10cqi, 80px);
  }
  .hero__copy .lead {
    font-size: 18px;
    line-height: 1.7;
  }
  .hero__assurance {
    font-size: 16px;
    max-width: 460px;
  }
  .hero__copy .button-row {
    flex-wrap: wrap;
    gap: 12px;
  }
  .hero__photo img {
    position: absolute;
    inset: 0;
    object-position: 55% 42%;
  }
  .translation-card__heading strong {
    font-size: 13px;
  }
}
@media (min-width: 1280px) {
  .hero__copy .eyebrow {
    font-size: 12px;
    padding: 9px 13px;
  }
  .hero__photo {
    max-height: 625px;
  }
  .translation-card {
    bottom: -26px;
  }
}
@media (min-width: 768px) {
  .translation-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(380px, calc(100% - 48px));
    margin: 10px 24px 0;
  }
}
@media (min-width: 1024px) {
  .translation-card {
    position: absolute;
    margin: 0;
    left: -40px;
    bottom: -62px;
    width: 350px;
    padding: 20px;
  }
}
@media (min-width: 1280px) {
  .translation-card__original {
    font-size: 13px;
  }
}
@media (min-width: 1024px) {
  .translation-card__original {
    font-size: 14px;
  }
}
@media (min-width: 1280px) {
  .translation-card__translated {
    font-size: 13px;
  }
}
@media (min-width: 1024px) {
  .translation-card__translated {
    font-size: 14px;
  }
}
@media (min-width: 1280px) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 88px;
  }
  .hero__copy .lead {
    max-width: 560px;
  }
  .hero__assurance {
    max-width: 480px;
  }
  .translation-card {
    width: 370px;
    left: -88px;
  }
}
@media (min-width: 1440px) {
  .translation-card {
    left: -185px;
  }
}
@media (max-width: 767px) {
  .hero__copy .eyebrow {
    margin-bottom: 24px;
    font-size: 11px;
    letter-spacing: 0.09em;
  }
  .hero__copy h1 {
    font-size: clamp(40px, 10.6vw, 56px);
    margin-bottom: 24px;
  }
  .hero__copy .button-row {
    flex-direction: column;
    align-items: stretch;
    margin-top: 28px;
    gap: 8px;
  }
  .hero__copy .button--secondary {
    align-self: center;
    flex-grow: 0;
    min-height: 44px;
    padding: 10px 16px;
    border-color: transparent;
    text-decoration: underline;
    text-decoration-color: var(--color-line-strong);
    text-underline-offset: 5px;
  }
  .hero__languages {
    margin-top: 24px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__copy .eyebrow {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero__title-line {
    animation: rise 900ms var(--ease-out) both;
    display: block;
  }
  .hero__copy .lead {
    animation: rise 900ms var(--ease-out) both;
    animation-delay: 360ms;
  }
  .hero__assurance {
    animation: rise 900ms var(--ease-out) both;
    animation-delay: 440ms;
  }
  .hero__copy .button-row {
    animation: rise 900ms var(--ease-out) both;
    animation-delay: 520ms;
  }
  .hero__languages {
    animation: rise 900ms var(--ease-out) both;
    animation-delay: 600ms;
  }
  .hero__title-line:nth-child(1) {
    animation-delay: 80ms;
  }
  .hero__title-line:nth-child(2) {
    animation-delay: 160ms;
  }
  .hero__title-line:nth-child(3) {
    animation-delay: 240ms;
  }
  .hero__photo {
    animation: unveil 1300ms 150ms var(--ease-out) both;
  }
  .hero__photo img {
    animation: settle 1800ms 150ms var(--ease-out) both;
  }
  .translation-card {
    animation: rise 900ms 750ms var(--ease-out) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .translation-card__typing {
    display: none !important;
  }
  .translation-card__original,
  .translation-card__translated,
  .translation-card {
    opacity: 1 !important;
    transform: none !important;
  }
  .translation-card.is-switching [data-dialogue-fade] {
    opacity: 1;
    transform: none;
  }
}
