*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-text: #1a2332;
  --color-link: #2b5f7a;
  --color-link-hover: #1e4a5f;
  --card-bg: rgba(255, 255, 255, 0.82);
  --slide-hold: 3s;
  --slide-fade: 1s;
  --slide-count: 3;
  --slide-slot: calc(var(--slide-hold) + var(--slide-fade));
  --slide-duration: calc(var(--slide-count) * var(--slide-slot));
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation-duration: var(--slide-duration);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.hero__slide:nth-child(1) {
  animation-name: heroSlide1;
}

.hero__slide:nth-child(2) {
  animation-name: heroSlide2;
}

.hero__slide:nth-child(3) {
  animation-name: heroSlide3;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(14, 28, 35, 0.32) 0%,
    rgba(17, 36, 45, 0.08) 42%,
    rgba(9, 24, 33, 0.36) 100%
  );
}

.hero__slide-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 12s cycle: 3s hold + 1s fade per slide */
@keyframes heroSlide1 {
  0%,
  25% {
    opacity: 1;
  }

  33.333%,
  91.667% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes heroSlide2 {
  0%,
  25% {
    opacity: 0;
  }

  33.333%,
  58.333% {
    opacity: 1;
  }

  66.667%,
  100% {
    opacity: 0;
  }
}

@keyframes heroSlide3 {
  0%,
  58.333% {
    opacity: 0;
  }

  66.667%,
  91.667% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.5rem;
}

.hero__card {
  max-width: 28rem;
  width: 100%;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1rem;
  box-shadow:
    0 4px 24px rgba(26, 35, 50, 0.12),
    0 1px 3px rgba(26, 35, 50, 0.08);
}

.hero__title {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.hero__contact {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  font-weight: 500;
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero__contact:hover,
.hero__contact:focus-visible {
  color: var(--color-link-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
  .hero__slide {
    animation: none;
    opacity: 0;
  }

  .hero__slide:first-child {
    opacity: 1;
  }
}
