:root {
  color-scheme: dark;
  --color-black: #080604;
  --color-cream: #f4eee5;
  --color-cream-soft: rgba(244, 238, 229, 0.72);
  --font-title: "Bodoni 72", Georgia, serif;
  --ease-ray: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-title: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  min-width: 320px;
  background: var(--color-black);
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background: var(--color-black);
  color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.landing {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: max(28px, env(safe-area-inset-top)) 22px max(76px, env(safe-area-inset-bottom));
}

.landing__photo,
.landing::before,
.landing::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.landing__photo {
  z-index: -3;
  background-image: url("assets/sandra-sol-pool.jpg");
  background-size: cover;
  background-position: center 25%;
  filter: saturate(0.88) contrast(1.03) brightness(0.92);
  transform: scale(1.01);
  animation: photo-reveal 2000ms linear both;
}

.landing::before {
  content: "";
  z-index: -2;
  background:
    radial-gradient(circle at 52% 35%, rgba(244, 238, 229, 0.08), transparent 30rem),
    linear-gradient(180deg, rgba(8, 6, 4, 0.28), rgba(8, 6, 4, 0.48) 52%, rgba(8, 6, 4, 0.72));
}

.landing::after {
  content: "";
  z-index: -1;
  background:
    linear-gradient(
      132deg,
      rgba(8, 6, 4, 0.56) 0%,
      rgba(8, 6, 4, 0.58) 37%,
      rgba(255, 255, 255, 0.02) 44%,
      rgba(8, 6, 4, 0.54) 52%,
      rgba(8, 6, 4, 0.64) 100%
    );
  background-size: 260% 260%;
  animation: diagonal-ray 12s var(--ease-ray) infinite alternate;
}

.landing__title {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.2em;
  margin: 0;
  padding: 0 0.16em 0.12em;
  color: rgba(244, 238, 229, 0.9);
  font-family: var(--font-title);
  font-size: clamp(3.8rem, 11vw, 11.2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 2px 18px rgba(0, 0, 0, 0.28),
    0 24px 80px rgba(0, 0, 0, 0.52);
  transform: translateY(-1vh);
  animation:
    title-presence 1800ms var(--ease-title) both,
    title-drift 9200ms ease-in-out 1800ms infinite;
}

.title-word-wrap {
  display: inline-block;
  overflow: visible;
}

.title-word {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, 0.22em, 0) rotate(0.8deg);
  animation: title-word-in 1350ms var(--ease-title) forwards;
  will-change: transform, opacity, filter;
}

.title-word-wrap:nth-child(2) .title-word {
  animation-delay: 220ms;
}

.social-links {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: translateX(-50%);
}

.social-link {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(244, 238, 229, 0.22);
  border-radius: 50%;
  background: rgba(8, 6, 4, 0.18);
  color: var(--color-cream-soft);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(244, 238, 229, 0.12);
  border-color: rgba(244, 238, 229, 0.52);
  color: var(--color-cream);
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 2px solid rgba(244, 238, 229, 0.86);
  outline-offset: 5px;
}

.social-link__icon {
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.social-link--instagram .social-link__icon {
  mask-image: url("assets/icons/instagram.svg");
  -webkit-mask-image: url("assets/icons/instagram.svg");
}

.social-link--facebook .social-link__icon {
  mask-image: url("assets/icons/facebook.svg");
  -webkit-mask-image: url("assets/icons/facebook.svg");
}

@keyframes diagonal-ray {
  0% {
    background-position: 0% 18%;
  }

  100% {
    background-position: 100% 82%;
  }
}

@keyframes photo-reveal {
  0% {
    filter: blur(22px) saturate(0.72) contrast(0.96) brightness(0.72);
    transform: scale(1.055);
  }

  45% {
    filter: blur(12px) saturate(0.78) contrast(0.98) brightness(0.8);
    transform: scale(1.038);
  }

  75% {
    filter: blur(4px) saturate(0.84) contrast(1.01) brightness(0.88);
    transform: scale(1.018);
  }

  100% {
    filter: blur(0) saturate(0.88) contrast(1.03) brightness(0.92);
    transform: scale(1.01);
  }
}

@keyframes title-presence {
  0% {
    letter-spacing: 0.035em;
    text-shadow:
      0 2px 10px rgba(0, 0, 0, 0.2),
      0 18px 60px rgba(0, 0, 0, 0.38);
    transform: translate3d(0, 1.4vh, 0) scale(0.985);
  }

  100% {
    letter-spacing: 0.01em;
    text-shadow:
      0 2px 18px rgba(0, 0, 0, 0.28),
      0 24px 80px rgba(0, 0, 0, 0.52);
    transform: translate3d(0, -1vh, 0) scale(1);
  }
}

@keyframes title-word-in {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translate3d(0, 0.22em, 0) rotate(0.8deg);
  }

  58% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

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

  50% {
    transform: translate3d(0, -1.55vh, 0) scale(1.006);
  }
}

@media (max-aspect-ratio: 1 / 1) {
  .landing__photo {
    background-position: center center;
  }
}

@media (max-width: 520px) {
  .landing {
    padding-inline: 16px;
    padding-bottom: max(70px, env(safe-area-inset-bottom));
  }

  .landing__title {
    font-size: clamp(3.45rem, 17vw, 4.75rem);
    animation-name: title-presence-mobile, title-drift-mobile;
  }

  .social-link {
    width: 28px;
    height: 28px;
  }

  .social-link__icon {
    width: 13px;
    height: 13px;
  }
}

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

  .landing::after {
    animation: none !important;
    background-position: 52% 48%;
  }

  .landing__photo {
    animation: none !important;
    filter: blur(0) saturate(0.88) contrast(1.03) brightness(0.92) !important;
    transform: scale(1.01) !important;
  }

  .landing__title {
    animation: none !important;
    transform: translateY(-1vh);
  }

  .title-word {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

@keyframes title-presence-mobile {
  0% {
    letter-spacing: 0.035em;
    transform: translate3d(0, 0.8vh, 0) scale(0.985);
  }

  100% {
    letter-spacing: 0.01em;
    transform: translate3d(0, -2vh, 0) scale(1);
  }
}

@keyframes title-drift-mobile {
  0%,
  100% {
    transform: translate3d(0, -2vh, 0) scale(1);
  }

  50% {
    transform: translate3d(0, -2.45vh, 0) scale(1.005);
  }
}
