:root {
  --frame-ratio: 764 / 478;
  --sand-clip: polygon(0 112%, 100% 112%, 100% 100%, 0 100%);
  --details-alpha: 0;
  --start-alpha: 1;
  --cue-alpha: 1;
  --sand-nav-alpha: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #dfe9e7;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.54), transparent 36rem),
    linear-gradient(180deg, #dfe9e7 0%, #d7e5e2 100%);
  color: #fff;
}

.scroll-track {
  height: 260vh;
  min-height: 1500px;
}

.sticky-stage {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 0;
}

.travel-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  overflow: hidden;
  isolation: isolate;
  background: #efb879;
}

.plate {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  will-change: transform, opacity, clip-path;
}

.ocean-plate {
  z-index: 1;
  background-image: url("https://cdn.corenexis.com/files/c/7376998720.jpg");
  transform-origin: 50% 52%;
}

.sand-reveal {
  z-index: 4;
  clip-path: var(--sand-clip);
  background-image: url("https://cdn.corenexis.com/files/c/1878763720.jpg");
  transform: translateZ(0);
}

.sand-reveal::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(255, 226, 184, 0.28), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(223, 137, 67, 0.08));
  content: "";
  pointer-events: none;
}

.nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 14;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: clamp(32px, 7.8%, 54px);
  padding: 0 clamp(14px, 2.1vw, 28px);
  color: #fff;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  pointer-events: none;
}

.nav.sand-nav {
  z-index: 15;
  color: #121516;
  background: rgba(255, 255, 255, 0.94);
  opacity: var(--sand-nav-alpha);
}

.brand {
  justify-self: start;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(16px, 1.45vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

.nav-links,
.socials {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
  white-space: nowrap;
}

.nav-links {
  justify-self: center;
}

.socials {
  justify-self: end;
  gap: clamp(7px, 1.1vw, 16px);
}

.nav a,
.nav span {
  color: inherit;
  text-decoration: none;
}

.nav .active {
  position: relative;
}

.copy-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 7% 8% 5%;
  pointer-events: none;
}

.sand-reveal .copy-layer {
  z-index: 2;
}

.headline {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: min(90%, 780px);
  margin: 0 auto;
  color: #fff;
  text-align: center;
  text-shadow: 0 7px 22px rgba(22, 91, 97, 0.12);
  transform: translateY(-2%);
  will-change: transform, opacity;
}

.headline .serif {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 9vw, 122px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.headline .script {
  margin-left: clamp(4px, 0.7vw, 12px);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(58px, 11vw, 150px);
  font-weight: 400;
  line-height: 0.8;
  transform: translateY(0.08em);
}

.beach-copy {
  opacity: var(--start-alpha);
}

.beach-copy .headline {
  margin-top: -1%;
}

.destination-copy {
  grid-template-rows: 45% auto;
  align-items: start;
}

.destination-stack {
  display: grid;
  justify-items: center;
  width: min(88%, 720px);
  margin-top: 12%;
  text-align: center;
}

.destination-copy .headline {
  width: 100%;
}

.destination-copy .headline .serif {
  font-size: clamp(42px, 7.2vw, 94px);
}

.destination-copy .headline .script {
  margin-left: clamp(6px, 0.7vw, 13px);
  font-size: clamp(52px, 9.2vw, 118px);
}

.details {
  display: grid;
  justify-items: center;
  width: min(64%, 520px);
  margin-top: clamp(18px, 3.2vw, 36px);
  opacity: var(--details-alpha);
  transform: translateY(calc((1 - var(--details-alpha)) * 18px));
  transition: opacity 0.08s linear;
}

.eyebrow,
.scroll-copy {
  margin: 0;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

.body-copy {
  margin: clamp(18px, 2.1vw, 30px) 0 clamp(24px, 3vw, 40px);
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.8;
  text-align: center;
}

.map-button {
  display: inline-grid;
  min-width: clamp(126px, 14vw, 180px);
  min-height: clamp(42px, 4.5vw, 58px);
  place-items: center;
  border: 0;
  background: #209aa0;
  color: #fff;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(10px, 0.8vw, 12px);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(21, 119, 126, 0.16);
}

.scroll-cue {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 13;
  display: grid;
  justify-items: center;
  gap: clamp(16px, 2vw, 24px);
  padding-bottom: clamp(0px, 0.5vw, 8px);
  opacity: var(--cue-alpha);
  pointer-events: none;
}

.arrow-box {
  display: grid;
  width: clamp(44px, 4.6vw, 58px);
  aspect-ratio: 1;
  place-items: center;
  background: #209aa0;
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(18px, 1.9vw, 25px);
  line-height: 1;
}

.foam-field {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  will-change: opacity;
}

.foam-shadow,
.foam-main,
.foam-spark {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.foam-shadow {
  stroke: rgba(0, 111, 124, 0.38);
  stroke-width: 20;
  filter: blur(12px);
}

.foam-main {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 10;
  filter: drop-shadow(0 2px 6px rgba(0, 91, 103, 0.26));
}

.foam-spark {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-dasharray: 24 18 5 28;
  stroke-width: 2.5;
}

.foam-band {
  fill: url(#foamGradient);
  stroke: none;
}

.foam-spray circle {
  fill: rgba(255, 255, 255, 0.95);
  stroke: none;
}

.grain {
  position: absolute;
  inset: -50%;
  z-index: 19;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='180'%20height='180'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: grainShift 0.55s steps(1) infinite;
  will-change: background-position;
}

@keyframes grainShift {
  0%   { background-position: 0 0; }
  12%  { background-position: -32px 12px; }
  25%  { background-position: 26px -28px; }
  37%  { background-position: -18px 24px; }
  50%  { background-position: 36px 14px; }
  62%  { background-position: -28px -22px; }
  75%  { background-position: 16px 32px; }
  87%  { background-position: -36px -8px; }
  100% { background-position: 0 0; }
}

.socials svg {
  display: block;
  width: clamp(12px, 1vw, 16px);
  height: auto;
}

.socials .divider {
  opacity: 0.55;
}

@media (max-width: 720px) {
  .travel-frame {
    width: 100vw;
    height: 100svh;
  }

  .plate {
    background-size: cover;
  }

  .nav {
    grid-template-columns: auto 1fr auto;
    padding: 0 14px;
  }

  .nav-links a:nth-child(n + 3),
  .socials span:first-child {
    display: none;
  }

  .nav-links {
    gap: 12px;
  }

  .headline .serif {
    font-size: clamp(44px, 13vw, 84px);
  }

  .headline .script {
    font-size: clamp(54px, 15vw, 100px);
  }

  .destination-stack {
    width: 92%;
    margin-top: 18svh;
  }

  .details {
    width: min(84%, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-track {
    height: 100vh;
    min-height: 0;
  }

  .sand-reveal {
    clip-path: polygon(0 -8%, 100% -8%, 100% 100%, 0 100%);
    transform: none;
  }

  .beach-copy,
  .scroll-cue {
    opacity: 0;
  }

  .sand-nav {
    opacity: 1;
  }

  .details,
  .foam-field {
    opacity: 1;
  }

  .grain {
    animation: none;
  }
}