:root {
  --pointer-x: 0;
  --pointer-y: 0;
  --image-transition-duration: 180ms;
  --ivory: #f3ead5;
  --sand: #d5c39c;
  --gold: #e7bd65;
  --ink: #10161a;
  color-scheme: dark;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--ivory);
  font-family: "Marcellus", "Times New Roman", serif;
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 7px;
}

.page {
  position: relative;
  display: grid;
  width: 100%;
  height: 100svh;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.scene,
.scene__layer,
.scene__contrast {
  position: absolute;
  inset: 0;
}

.scene {
  z-index: -1;
  overflow: hidden;
  background: #79bad6;
}

.scene__layer {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.scene__placeholder {
  opacity: 1;
  filter: blur(14px);
  transition: opacity var(--image-transition-duration) linear;
  will-change: transform, opacity;
}

.scene__placeholder--fading {
  opacity: 0;
}

.scene__placeholder--hidden {
  display: none;
}

.scene__image {
  opacity: 0;
  transition: opacity var(--image-transition-duration) ease;
  will-change: transform, opacity;
}

.scene__image--loaded {
  opacity: 1;
}

.scene__layer--background,
.atmosphere--wind {
  transform: translate3d(calc(var(--pointer-x) * -13px),
      calc(var(--pointer-y) * -9px),
      0) scale(1.055);
}


.scene__birds {
  z-index: 0;
  overflow: visible;
  color: #243844;
}

.scene__bird {
  fill: currentColor;
  opacity: 0.5;
}

.scene__bird--far {
  opacity: 0.32;
}

.scene__bird-flap {
  transform-box: fill-box;
  transform-origin: center;
  animation: bird-flap 2.8s ease-in-out infinite;
}

.scene__bird-flap--delayed {
  animation-delay: -1.4s;
}

.scene__boat-layer {
  z-index: 0;
  overflow: visible;
}

.scene__sailboat-drift {
  transform-box: fill-box;
  transform-origin: center;
  animation: sailboat-drift 560s ease-in-out infinite;
}

.scene__sailboat-bob {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: sailboat-bob 4.8s ease-in-out infinite;
}

.scene__sailboat-ripple {
  fill: none;
  stroke: rgba(226, 235, 224, 0.42);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.scene__sailboat-hull {
  fill: #c6a17f;
}

.scene__sailboat-mast {
  fill: none;
  stroke: #c9bea0;
  stroke-width: 1.3;
  stroke-linecap: round;
}

.scene__sailboat-sail--main {
  fill: #e3e4d2;
}

.scene__sailboat-sail--jib {
  fill: #d8c8a5;
}

.scene__plane-track {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
}

.scene__plane-flight {
  position: absolute;
  top: clamp(4rem, 10vh, 6rem);
  left: -3rem;
  width: clamp(18px, 1.25vw, 24px);
  aspect-ratio: 64 / 40;
  opacity: 0;
  animation: plane-crossing 60s linear infinite;
  will-change: transform, opacity;
}

.scene__plane {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  color: #c7d1ce;
  fill: currentColor;
  stroke: #314650;
  stroke-width: 1.2;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

.scene__plane-trail {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: calc(100% - 2px);
  width: clamp(2rem, 4vw, 4.5rem);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(225, 235, 231, 0.42));
  filter: blur(0.7px);
  transform: translateY(-50%);
}

.scene__layer--foreground {
  z-index: 1;
  transform: translate3d(calc(var(--pointer-x) * 25px),
      calc(var(--pointer-y) * 17px),
      0) scale(1.075);
}


.scene__contrast {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 14, 18, 0.84) 0%, rgba(8, 14, 18, 0.58) 34%, transparent 64%),
    linear-gradient(0deg, rgba(8, 14, 18, 0.22), transparent 36%);
  pointer-events: none;
}

.atmosphere {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  image-rendering: pixelated;
  pointer-events: none;
}

.atmosphere--wind {
  z-index: 0;
}

.atmosphere--leaves {
  z-index: 3;
}

.intro {
  position: relative;
  z-index: 2;
  width: min(42rem, calc(100% - 3rem));
  margin-left: clamp(1.5rem, 7vw, 7.5rem);
  text-shadow: 0 2px 2px rgba(5, 10, 13, 0.68);
}

.intro__role,
.intro__description,
.intro__contacts {
  text-shadow:
    0 1px 1px rgba(5, 10, 13, 0.98),
    0 3px 8px rgba(5, 10, 13, 0.92),
    0 6px 18px rgba(5, 10, 13, 0.68);
}

.intro__role {
  margin: 0 0 1.1rem;
  color: var(--gold);
  font-size: clamp(0.78rem, 1.15vw, 0.96rem);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ivory);
  font-size: clamp(3.6rem, 7.1vw, 7.2rem);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.intro__description {
  max-width: 35rem;
  margin: clamp(1.7rem, 3.6vh, 2.6rem) 0 0;
  color: var(--sand);
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

.intro__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: clamp(1.4rem, 3.2vh, 2.2rem);
}

.intro__contact {
  color: var(--ivory);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4rem;
  transition: color 160ms ease;
}

.intro__contact:hover {
  color: var(--gold);
}

@media (max-width: 760px) {
  .scene__layer {
    object-position: 70% center;
  }

  .scene__contrast {
    background:
      linear-gradient(0deg, rgba(7, 12, 15, 0.92) 0%, rgba(7, 12, 15, 0.72) 43%, transparent 76%),
      linear-gradient(90deg, rgba(7, 12, 15, 0.3), transparent 75%);
  }

  .intro {
    align-self: end;
    width: calc(100% - 2rem);
    margin: 0 1rem clamp(2.2rem, 7vh, 4.25rem);
  }

  .intro__role {
    margin-bottom: 0.8rem;
  }

  h1 {
    font-size: clamp(3.05rem, 15vw, 5.1rem);
  }

  .intro__description {
    max-width: 31rem;
    margin-top: 1.35rem;
    font-size: 1rem;
    line-height: 1.45;
  }

  .intro__contacts {
    margin-top: 1.25rem;
    gap: 0.65rem 1rem;
  }

  .intro__contact {
    font-size: 1.04rem;
  }
}

@media (max-height: 620px) and (min-width: 761px) {
  .intro__role {
    margin-bottom: 0.6rem;
  }

  .intro__description {
    margin-top: 1.2rem;
  }

  .intro__contacts {
    margin-top: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .scene__placeholder,
  .scene__image {
    transition: none;
  }

  .atmosphere,
  .scene__birds,
  .scene__boat-layer,
  .scene__plane-track {
    display: none;
  }

  .scene__layer--background,
  .scene__layer--foreground {
    transform: scale(1.055);
  }
}

@keyframes bird-flap {

  0%,
  100% {
    transform: scaleY(0.72) rotate(-2deg);
  }

  50% {
    transform: scaleY(1.08) rotate(2deg);
  }
}

@keyframes sailboat-drift {

  0%,
  100% {
    transform: translateX(-55px);
  }

  50% {
    transform: translateX(55px);
  }
}

@keyframes sailboat-bob {

  0%,
  100% {
    transform: translateY(0) rotate(-0.8deg) scale(0.7);
  }

  50% {
    transform: translateY(-2px) rotate(0.8deg) scale(0.7);
  }
}

@keyframes plane-crossing {

  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.92);
  }

  1% {
    opacity: 0.72;
  }

  64% {
    opacity: 0.72;
    transform: translate3d(calc(100vw + 6rem), -0.75rem, 0) scale(1);
  }

  66%,
  100% {
    opacity: 0;
    transform: translate3d(calc(100vw + 6rem), -0.75rem, 0) scale(1);
  }
}


.scene__birds {
  color: #ffffff;
}

.scene__bird {
  opacity: 0.8;
}

.scene__bird--far {
  opacity: 0.55;
}
