:root {
  color-scheme: dark;
  --ink: #063365;
  --muted: rgba(5, 49, 94, 0.64);
  --blue: #076cc2;
  --gold: #f3b948;
  --door-x: 60%;
  --door-y: 66%;
  --door-w: 5rem;
  --door-h: 8rem;
  --beacon-x: 62%;
  --beacon-y: 15%;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #72c4f4;
}

body {
  overflow: hidden;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
}

a {
  color: inherit;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #72c4f4;
}

.scene__image {
  position: absolute;
  inset: 0;
  z-index: -6;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  transform: scale(1);
  filter: saturate(0.96) contrast(1.01);
  animation: reveal-image 2.2s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(228, 247, 255, 0.58) 0%, rgba(232, 248, 255, 0.12) 45%, transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 45%, rgba(0, 62, 111, 0.12) 100%),
    radial-gradient(circle at 70% 20%, rgba(255, 250, 222, 0.2), transparent 35%);
}

.grain {
  position: absolute;
  inset: -50%;
  z-index: 6;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grain 0.24s steps(2) infinite;
}

.beam {
  position: absolute;
  z-index: -4;
  left: var(--beacon-x);
  top: var(--beacon-y);
  width: min(82vw, 80rem);
  height: min(18vw, 15rem);
  pointer-events: none;
  opacity: 0.13;
  transform: translate(-100%, -50%) rotate(1deg);
  transform-origin: 100% 50%;
  clip-path: polygon(0 0, 100% 46%, 100% 54%, 0 100%);
  background: linear-gradient(90deg, transparent 3%, rgba(179, 220, 255, 0.44) 72%, rgba(255, 236, 181, 0.9));
  filter: blur(2px);
  animation: sweep 9s ease-in-out infinite alternate;
  display: none;
}

.mist {
  position: absolute;
  z-index: -3;
  bottom: -13%;
  left: -20%;
  width: 90%;
  height: 42%;
  pointer-events: none;
  opacity: 0.07;
  filter: blur(34px);
  background: radial-gradient(ellipse, rgba(240, 252, 255, 0.9), transparent 68%);
  animation: drift 19s ease-in-out infinite alternate;
}

.mist--two {
  left: 45%;
  bottom: -17%;
  width: 82%;
  opacity: 0.045;
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

.topbar,
.footer {
  position: absolute;
  z-index: 3;
  left: clamp(1.5rem, 4.3vw, 5rem);
  right: clamp(1.5rem, 4.3vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.19em;
}

.topbar {
  top: clamp(1.5rem, 4.7vh, 3.5rem);
  animation: fade-down 1.4s 0.5s both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand__mark {
  width: 1.1rem;
  height: 1.65rem;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.coordinates {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 500;
  text-shadow: 0 1px 12px rgba(235, 249, 255, 0.55);
}

.coordinates i {
  width: 2rem;
  height: 1px;
  background: rgba(5, 49, 94, 0.34);
}

.intro {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: clamp(1.5rem, 8.3vw, 10rem);
  transform: translateY(-48%);
  pointer-events: none;
}

.intro p {
  margin: 0 0 1.25rem 0.2rem;
  color: rgba(4, 50, 96, 0.69);
  font-size: clamp(0.52rem, 0.67vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  animation: fade-up 1.2s 0.85s both;
}

.intro h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4.6rem, 8.5vw, 9.6rem);
  font-weight: 500;
  line-height: 0.72;
  letter-spacing: -0.045em;
  text-shadow: 0 7px 35px rgba(227, 247, 255, 0.42);
  animation: fade-up 1.5s 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.door {
  position: absolute;
  z-index: 5;
  left: var(--door-x);
  top: var(--door-y);
  width: var(--door-w);
  height: var(--door-h);
  display: grid;
  place-items: center;
  text-decoration: none;
  outline: none;
}

.door::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50% 50% 12% 12%;
  opacity: 0;
  background: radial-gradient(ellipse, rgba(71, 172, 255, 0.42), transparent 67%);
  filter: blur(9px);
  transition: opacity 350ms ease;
}

.door__outline {
  position: absolute;
  inset: 6%;
  border: 1px solid rgba(209, 237, 255, 0);
  box-shadow: inset 0 0 0 1px rgba(72, 169, 255, 0);
  transition: border-color 350ms ease, box-shadow 350ms ease, transform 350ms ease;
}

.door__label {
  position: absolute;
  top: calc(100% + 1.15rem);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #f4fbff;
  font-size: clamp(0.5rem, 0.6vw, 0.62rem);
  font-weight: 600;
  letter-spacing: 0.31em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 0.45rem);
  transition: opacity 350ms ease, transform 350ms ease;
  text-shadow: 0 2px 12px #001025;
}

.door__label::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: currentColor;
}

.door:hover::before,
.door:focus-visible::before {
  opacity: 1;
}

.door:hover .door__outline,
.door:focus-visible .door__outline {
  border-color: rgba(208, 235, 255, 0.78);
  box-shadow: inset 0 0 18px rgba(69, 164, 255, 0.2), 0 0 28px rgba(62, 155, 255, 0.2);
  transform: scale(1.04);
}

.door:hover .door__label,
.door:focus-visible .door__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer {
  bottom: clamp(1.35rem, 3.7vh, 3rem);
  color: rgba(240, 249, 255, 0.78);
  font-size: 0.5rem;
  font-weight: 500;
  text-shadow: 0 2px 14px rgba(0, 38, 75, 0.65);
  animation: fade-up 1.3s 1.1s both;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 2.4rem;
  overflow: hidden;
  background: rgba(220, 238, 255, 0.18);
}

.scroll-cue i {
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: rgba(238, 247, 255, 0.9);
  animation: line-drop 2.4s ease-in-out infinite;
}

.cursor {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(4, 58, 108, 0.55);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.cursor span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #063b70;
  transform: translate(-50%, -50%);
}

.cursor.is-visible {
  opacity: 1;
}

.cursor.is-door {
  width: 4.6rem;
  height: 4.6rem;
  border-color: rgba(4, 92, 157, 0.88);
}

@keyframes reveal-image {
  from { opacity: 0; transform: scale(1.09); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  from { transform: translate3d(-5%, 0, 0) scale(1); }
  to { transform: translate3d(20%, -4%, 0) scale(1.14); }
}

@keyframes sweep {
  0% { transform: translate(-100%, -50%) rotate(-7deg); opacity: 0.08; }
  100% { transform: translate(-100%, -50%) rotate(7deg); opacity: 0.17; }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -3%); }
  50% { transform: translate(-3%, 2%); }
  75% { transform: translate(3%, 4%); }
  100% { transform: translate(-2%, -3%); }
}

@keyframes line-drop {
  0% { transform: translateY(0); }
  55%, 100% { transform: translateY(205%); }
}

@media (pointer: fine) {
  body,
  a {
    cursor: none;
  }
}

@media (max-width: 700px) {
  .coordinates span:first-child,
  .coordinates i,
  .footer span:first-child {
    display: none;
  }

  .intro {
    top: 40%;
    left: 1.5rem;
  }

  .intro h1 {
    font-size: clamp(4.3rem, 21vw, 6.2rem);
    line-height: 0.76;
  }

  .vignette {
    background:
      linear-gradient(90deg, rgba(232, 249, 255, 0.5), transparent 72%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%, rgba(0, 58, 105, 0.14));
  }

  .door__label {
    opacity: 0.8;
    transform: translate(-50%, 0);
  }

  .door__outline {
    border-color: rgba(208, 235, 255, 0.34);
    animation: door-pulse 2.8s ease-in-out infinite;
  }
}

@keyframes door-pulse {
  50% { box-shadow: 0 0 24px rgba(62, 155, 255, 0.38); }
}

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