:root {
  color-scheme: light;
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --pointer-x: 0;
  --pointer-y: 0;
  --ink: #17324b;
  --cobalt: #094d91;
  --coral: #ff5d45;
  --sun: #ffd43b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #10a8d2;
}

button {
  font: inherit;
}

.scene {
  position: relative;
  isolation: isolate;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(160deg, #29c1e5 0%, #087dc3 72%, #00558d 100%);
}

.layer {
  position: absolute;
  inset: -4%;
  pointer-events: none;
  will-change: transform;
}

.layer--sky {
  z-index: -5;
  background:
    radial-gradient(circle at 77% 21%, rgb(255 241 154 / 85%) 0 2%, transparent 18%),
    linear-gradient(165deg, #39c9e8 0%, #0c91ce 57%, #0876b6 100%);
  transform: translate(calc(var(--pointer-x) * -5px), calc(var(--pointer-y) * -4px));
}

.layer--backdrop {
  z-index: -3;
  inset: -3%;
  background-image:
    linear-gradient(90deg, transparent 54%, rgb(8 64 109 / 8%) 100%),
    url("/assets/malta-background.webp");
  background-position: center;
  background-size: cover;
  animation: scenic-breathe 16s ease-in-out infinite alternate;
  filter: saturate(1.06) contrast(1.02);
}

.layer--clouds {
  z-index: -2;
  inset: -7vw;
  transform: translate(
    calc(var(--pointer-x) * var(--cloud-shift-x)),
    calc(var(--pointer-y) * var(--cloud-shift-y))
  );
}

.layer--clouds img {
  position: absolute;
  width: 112vw;
  max-width: none;
  height: auto;
  object-fit: contain;
  animation: cloud-drift var(--cloud-speed) ease-in-out infinite alternate;
  filter: drop-shadow(0 18px 24px rgb(30 92 130 / 18%));
}

.layer--clouds-far {
  --cloud-shift-x: -7px;
  --cloud-shift-y: -4px;
  --cloud-speed: 28s;
  opacity: 0.44;
}

.layer--clouds-far img {
  top: -26%;
  left: -8%;
  transform: scale(0.74);
  filter: blur(0.5px) drop-shadow(0 12px 18px rgb(30 92 130 / 12%));
}

.layer--clouds-near {
  --cloud-shift-x: -15px;
  --cloud-shift-y: -9px;
  --cloud-speed: 19s;
  opacity: 0.82;
}

.layer--clouds-near img {
  top: -8%;
  left: 6%;
}

.sun-glow {
  position: absolute;
  z-index: -1;
  top: 9%;
  right: 11%;
  width: min(31vw, 32rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 235 122 / 42%), transparent 67%);
  animation: glow 5s ease-in-out infinite alternate;
  pointer-events: none;
}

.copy {
  position: absolute;
  z-index: 4;
  top: clamp(3rem, 12vh, 8rem);
  right: clamp(2rem, 7vw, 8rem);
  width: min(38rem, 43vw);
  color: white;
  text-align: right;
  text-shadow: 0 5px 22px rgb(0 68 112 / 34%);
  transform: translate(
    calc(var(--pointer-x) * 5px),
    calc(var(--pointer-y) * 4px)
  );
  transition: transform 180ms ease-out;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
  font-weight: 900;
  letter-spacing: 0.24em;
}

h1 {
  margin: 0;
  font-family: "Arial Black", ui-rounded, system-ui, sans-serif;
  font-size: clamp(4.3rem, 9.5vw, 9rem);
  font-weight: 1000;
  line-height: 0.74;
  letter-spacing: -0.085em;
}

h1 span {
  display: block;
  transform-origin: right center;
}

h1 span:first-child {
  color: white;
  -webkit-text-stroke: 2px rgb(255 255 255 / 15%);
  animation: word-bob 3.6s steps(2, jump-none) infinite;
}

h1 span:last-child {
  color: var(--sun);
  transform: rotate(-3deg) translateX(-0.03em);
  -webkit-text-stroke: clamp(2px, 0.27vw, 5px) var(--coral);
  paint-order: stroke fill;
  filter: drop-shadow(0 8px 0 rgb(8 73 123 / 38%));
  animation: word-pop 3.6s steps(2, jump-none) infinite;
}

.domain {
  margin: clamp(1.2rem, 2.5vh, 2rem) 0 0;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  font-weight: 850;
  letter-spacing: 0.04em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 999px;
  background: rgb(2 64 110 / 30%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 28%);
  backdrop-filter: blur(12px);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status span {
  width: 0.58rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff26a;
  box-shadow: 0 0 0 0 rgb(255 242 106 / 62%);
  animation: pulse 2.2s ease-out infinite;
}

.contact {
  display: block;
  width: max-content;
  margin: 0.85rem 0 0 auto;
  padding: 0.38rem 0.15rem;
  color: white;
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  font-weight: 750;
  letter-spacing: 0.035em;
  text-decoration-color: rgb(255 255 255 / 55%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.34rem;
  transition: color 160ms ease, transform 160ms ease;
}

.contact:hover {
  color: var(--sun);
  transform: translateY(-1px);
}

.contact:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid white;
  outline-offset: 4px;
}

.layer--characters {
  z-index: 3;
  inset: auto auto -5.8% -3.5%;
  width: min(72vw, 79rem);
  height: auto;
  transform:
    translate(calc(var(--pointer-x) * 18px), calc(var(--pointer-y) * 11px))
    rotate(-0.4deg);
  transform-origin: 45% 100%;
  animation: crowd-bob 2.8s steps(3, jump-none) infinite;
}

.layer--characters img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1.3rem 1rem rgb(44 37 16 / 34%));
}

.foreground-shadow {
  position: absolute;
  z-index: 2;
  right: -10%;
  bottom: -12%;
  left: -10%;
  height: 30%;
  background: radial-gradient(ellipse at 34% 75%, rgb(42 25 7 / 34%), transparent 58%);
  transform: translateX(calc(var(--pointer-x) * 8px));
  pointer-events: none;
}

.motion-toggle {
  position: absolute;
  z-index: 10;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 46%);
  border-radius: 999px;
  color: white;
  background: rgb(5 53 88 / 38%);
  box-shadow: 0 0.5rem 2rem rgb(4 46 78 / 18%);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.motion-toggle:hover {
  background: rgb(5 53 88 / 58%);
  transform: translateY(-2px);
}

.motion-toggle:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}

.motion-toggle__icon {
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 18%);
  font-weight: 900;
}

.motion-toggle__label {
  font-size: 0.78rem;
  font-weight: 750;
}

.scene.is-paused *,
.scene.is-paused *::before,
.scene.is-paused *::after {
  animation-play-state: paused !important;
}

@keyframes scenic-breathe {
  0% { transform: scale(1.035) translate3d(-0.35%, -0.1%, 0); }
  100% { transform: scale(1.075) translate3d(0.55%, 0.35%, 0); }
}

@keyframes cloud-drift {
  0% { transform: translate3d(-3.5%, -0.4%, 0); }
  100% { transform: translate3d(3.8%, 0.7%, 0); }
}

@keyframes crowd-bob {
  0%, 100% { rotate: -0.35deg; translate: 0 0; }
  42% { rotate: 0.2deg; translate: 0 -0.45%; }
  68% { rotate: -0.1deg; translate: 0 -0.15%; }
}

@keyframes glow {
  to { opacity: 0.65; transform: scale(1.08); }
}

@keyframes word-bob {
  45% { transform: rotate(1deg) translateY(-0.025em); }
}

@keyframes word-pop {
  45% { transform: rotate(-1.5deg) translate(-0.025em, -0.045em) scale(1.015); }
}

@keyframes pulse {
  55%, 100% { box-shadow: 0 0 0 0.55rem rgb(255 242 106 / 0%); }
}

@media (max-width: 760px) {
  .layer--backdrop {
    inset: -7%;
    background-position: 43% center;
  }

  .copy {
    top: 7vh;
    right: 1.25rem;
    width: calc(100vw - 2.5rem);
  }

  h1 {
    font-size: clamp(4rem, 20vw, 6.8rem);
  }

  .layer--characters {
    left: -23%;
    bottom: 2%;
    width: 135vw;
  }

  .layer--clouds-near img {
    top: -1%;
    left: -18%;
    width: 160vw;
  }

  .layer--clouds-far {
    opacity: 0.3;
  }

  .motion-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

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