:root {
  --navy: #14396b;
  --blue: #1e6fe0;
  --bg: #eaf2fa;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
  overflow: hidden;
}

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

.stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Motion toggle */

.motion-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(20, 57, 107, 0.2);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motion-toggle-icon {
  display: block;
  width: 0;
  height: 12px;
  border-left: 4px solid var(--navy);
  border-right: 4px solid var(--navy);
}

.motion-toggle.is-paused .motion-toggle-icon {
  width: 0;
  height: 0;
  border-left: 7px solid var(--navy);
  border-right: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-radius: 1px;
}

.motion-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Contacts overlay */

.contacts {
  position: absolute;
  top: 4%;
  right: 3%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--navy);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(30, 111, 224, 0.35);
  backdrop-filter: blur(3px);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-link svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--blue);
}

.contact-link .tip {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  white-space: nowrap;
  background: rgba(20, 57, 107, 0.94);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.contact-link .tip.tip-end {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.contact-link:hover,
.contact-link:focus-visible {
  background: #fff;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 57, 107, 0.22);
}

.contact-link:hover .tip,
.contact-link:focus-visible .tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.contact-link:hover .tip.tip-end,
.contact-link:focus-visible .tip.tip-end {
  transform: translateY(0);
}

.contact-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Footer credit */

.credit {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  margin: 0;
  font-size: 0.62rem;
  color: rgba(20, 57, 107, 0.5);
  z-index: 3;
  white-space: nowrap;
}

/* Responsive */

@media (max-width: 640px) {
  html, body {
    height: auto;
    overflow: visible;
  }

  .stage {
    height: auto;
    min-height: auto;
    display: block;
  }

  .hero-video {
    width: 100%;
    height: auto;
  }

  .contacts {
    top: auto;
    bottom: 8px;
    right: 8px;
    gap: 8px;
  }

  .contact-link {
    width: 32px;
    height: 32px;
  }

  .contact-link svg {
    width: 15px;
    height: 15px;
  }

  .contact-link .tip {
    top: auto;
    bottom: calc(100% + 8px);
    font-size: 0.62rem;
  }

  .credit {
    top: auto;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.56rem;
    max-width: 60vw;
    text-align: center;
    white-space: normal;
  }

  .motion-toggle {
    left: 8px;
    bottom: 8px;
    width: 30px;
    height: 30px;
  }
}

