:root {
  --pearl-cream: #FFF3D8;
  --foam-mint: #9FF3DC;
  --lagoon-cyan: #35C9D0;
  --coral-smile: #FF8E9E;
  --lavender-shell: #C9B8FF;
  --deep-teal: #145A63;
  --butter-pearl: #FFE8A3;
  --ink-soft: rgba(20, 90, 99, 0.68);
  --glass: rgba(255, 243, 216, 0.72);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Commissioner", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--deep-teal);
  background: var(--pearl-cream);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.lagoon-canvas {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 9%, rgba(201, 184, 255, 0.72) 0 9rem, transparent 9.3rem),
    radial-gradient(circle at 32% 30%, rgba(159, 243, 220, 0.52) 0 13rem, transparent 13.4rem),
    radial-gradient(circle at 74% 63%, rgba(255, 142, 158, 0.34) 0 16rem, transparent 16.4rem),
    linear-gradient(160deg, #FFF3D8 0%, #FFF3D8 34%, #9FF3DC 100%);
}

.lagoon-canvas::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(20, 90, 99, 0.12) 1.5px, transparent 1.7px),
    linear-gradient(90deg, transparent 0 48px, rgba(255,255,255,0.25) 49px 50px, transparent 51px);
  background-size: 38px 38px, 100px 100px;
  mix-blend-mode: multiply;
  opacity: 0.38;
  z-index: 0;
}

.wave-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.78;
  pointer-events: none;
}

.wave-line {
  fill: none;
  stroke: var(--lagoon-cyan);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 18 28;
  filter: drop-shadow(0 11px 0 rgba(201, 184, 255, 0.38));
  animation: tideDash 15s linear infinite;
}
.wave-line-b { stroke: var(--foam-mint); animation-duration: 18s; }
.wave-line-c { stroke: var(--coral-smile); animation-duration: 21s; opacity: 0.55; }
.wave-line-d { stroke: var(--butter-pearl); animation-duration: 16s; }

.marquee {
  position: fixed;
  top: 18px;
  left: 22px;
  right: 22px;
  height: 86px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border: 3px solid var(--deep-teal);
  border-radius: 32px 32px 46px 26px;
  background: rgba(255, 243, 216, 0.88);
  box-shadow: 0 16px 0 rgba(201, 184, 255, 0.45), inset 0 -8px 0 rgba(255, 232, 163, 0.65);
  backdrop-filter: blur(10px);
}

.brand-shell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.05rem, 2vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}
.shell-mark { color: var(--coral-smile); font-family: "Fraunces", serif; font-size: 1.35em; }

.top-ribbon { display: flex; gap: 8px; flex-wrap: wrap; }
.top-ribbon a {
  display: inline-flex;
  padding: 9px 14px;
  border: 2px solid var(--deep-teal);
  border-radius: 999px;
  background: var(--foam-mint);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 4px 5px 0 var(--butter-pearl);
  transition: transform 220ms ease, background 220ms ease;
}
.top-ribbon a:hover { transform: rotate(-2deg) translateY(-3px); background: var(--coral-smile); }

.parade { margin-left: auto; display: flex; gap: 12px; overflow: hidden; min-width: 210px; }
.mini-mask {
  width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--deep-teal);
  border-radius: 50% 50% 45% 45%;
  font-weight: 900;
  animation: paradeFloat 10s linear infinite;
}
.mini-mask.coral { background: var(--coral-smile); }
.mini-mask.mint { background: var(--foam-mint); animation-delay: -2s; }
.mini-mask.lavender { background: var(--lavender-shell); animation-delay: -4s; }
.mini-mask.butter { background: var(--butter-pearl); animation-delay: -6s; }

.tide-rail {
  position: fixed;
  z-index: 18;
  top: 132px;
  left: 30px;
  width: 188px;
  bottom: 28px;
  padding: 20px 14px;
  border: 3px solid var(--deep-teal);
  border-radius: 34px;
  background: rgba(159, 243, 220, 0.48);
  box-shadow: 12px 12px 0 rgba(255, 142, 158, 0.32);
  backdrop-filter: blur(8px);
}
.rail-title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 22px;
}
.rail-path {
  position: absolute;
  top: 75px;
  bottom: 72px;
  left: 28px;
  width: 8px;
  border-radius: 999px;
  background: rgba(255, 243, 216, 0.9);
  border: 2px solid var(--deep-teal);
  overflow: hidden;
}
.path-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(var(--coral-smile), var(--lagoon-cyan), var(--butter-pearl));
  transition: height 260ms ease;
}
.rail-step {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 66px;
  padding-left: 0;
  margin: 8px 0;
}
.pearl {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 50%;
  background: var(--pearl-cream);
  border: 3px solid var(--deep-teal);
  box-shadow: inset -4px -5px 0 var(--butter-pearl);
  z-index: 2;
  transition: transform 220ms ease, background 220ms ease;
}
.rail-step b { font-size: 0.68rem; color: var(--coral-smile); }
.rail-step em { grid-column: 2; margin-top: -28px; font-style: normal; font-weight: 800; font-size: 0.86rem; }
.rail-step.active .pearl { background: var(--lagoon-cyan); transform: scale(1.28); }
.rail-step.active em { color: var(--deep-teal); text-decoration: underline wavy var(--coral-smile); }
.tide-gauge { position: absolute; bottom: 18px; left: 22px; right: 22px; display: flex; gap: 6px; }
.tide-gauge span { height: 7px; flex: 1; border-radius: 999px; background: var(--butter-pearl); border: 1px solid var(--deep-teal); }

.story {
  position: relative;
  z-index: 5;
  padding: 138px 5vw 120px 255px;
}
.scene {
  min-height: 88vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.2fr);
  align-items: center;
  gap: 38px;
}
.arrival { min-height: 100vh; }
.hero-copy { max-width: 710px; align-self: start; padding-top: 12vh; }
.kicker, .scene-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--butter-pearl);
  border: 2px solid var(--deep-teal);
  border-radius: 999px;
  padding: 8px 13px;
  box-shadow: 5px 5px 0 var(--lavender-shell);
}
.hero-copy h1 {
  margin: 28px 0 22px;
  font-size: clamp(4.2rem, 11vw, 10.5rem);
  line-height: 0.78;
  letter-spacing: -0.09em;
  font-weight: 900;
  text-wrap: balance;
}
.hero-copy h1 span {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  color: var(--coral-smile);
  text-shadow: 7px 7px 0 var(--foam-mint), 12px 12px 0 var(--deep-teal);
}
.lede, .platform-copy p, .final-card p {
  font-size: clamp(1.02rem, 1.5vw, 1.34rem);
  line-height: 1.65;
  font-weight: 500;
  color: var(--ink-soft);
}

.gate-stage { position: relative; min-height: 540px; }
.glass-card, .lagoon-platform {
  border: 3px solid var(--deep-teal);
  background: var(--glass);
  box-shadow: 16px 16px 0 rgba(53, 201, 208, 0.42), -10px 13px 0 rgba(201, 184, 255, 0.48);
  backdrop-filter: blur(14px);
}
.ritual-card {
  position: absolute;
  right: 5%;
  top: 21%;
  width: min(410px, 88%);
  padding: 34px;
  border-radius: 46px 30px 58px 34px;
  transform: rotate(2deg);
}
.ornamental, .flourish {
  font-family: "Fraunces", Georgia, serif;
  color: var(--coral-smile);
}
.ornamental { float: left; font-size: 6rem; line-height: 0.8; margin-right: 10px; text-shadow: 5px 5px 0 var(--butter-pearl); }
.ritual-card h2, .platform-copy h2, .final-card h2 {
  font-size: clamp(2rem, 4.4vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 18px;
  font-weight: 900;
}
.shell-envelope {
  display: inline-block;
  margin-top: 16px;
  padding: 13px 22px;
  border: 3px solid var(--deep-teal);
  border-radius: 18px 18px 34px 34px;
  background: var(--butter-pearl);
  font-weight: 900;
  transform: rotate(-4deg);
}

.mask, .mask-large, .split-mask {
  position: absolute;
  border: 4px solid var(--deep-teal);
  box-shadow: 9px 10px 0 rgba(20, 90, 99, 0.16);
}
.mask, .mask-large {
  border-radius: 48% 52% 44% 46%;
  transition: transform 320ms ease;
  transform-style: preserve-3d;
}
.mask::before, .mask::after, .mask-large::before, .mask-large::after {
  content: "";
  position: absolute;
  width: 17%;
  height: 16%;
  top: 39%;
  border: 3px solid var(--deep-teal);
  border-radius: 50%;
  background: var(--pearl-cream);
}
.mask::before, .mask-large::before { left: 25%; }
.mask::after, .mask-large::after { right: 25%; }
.mask span, .mask-large span {
  position: absolute;
  left: 50%;
  bottom: 17%;
  width: 31%;
  height: 13%;
  border-bottom: 4px solid var(--deep-teal);
  border-radius: 50%;
  transform: translateX(-50%);
}
.mask::selection { background: transparent; }
.mask.revealed, .mask-large.revealed { transform: rotateY(18deg) rotate(-7deg) translateY(-8px); }
.mask.revealed span::after, .mask-large.revealed span::after {
  content: attr(data-symbol);
}
.mask-cream { width: 146px; height: 94px; background: var(--pearl-cream); left: 2%; top: 10%; animation: bob 5.8s ease-in-out infinite; }
.mask-coral { width: 128px; height: 82px; background: var(--coral-smile); right: 2%; top: 3%; animation: bob 6.5s ease-in-out infinite -1.2s; }
.mask-lavender { width: 176px; height: 108px; background: var(--lavender-shell); left: 18%; bottom: 6%; animation: bob 7.2s ease-in-out infinite -2.3s; }
.mask[data-symbol]::after { content: attr(data-symbol); display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; color: transparent; }
.mask.revealed[data-symbol]::after { color: var(--deep-teal); }

.stagger { grid-template-columns: 1fr; padding: 4vh 0; }
.scene-label { margin-left: clamp(0px, 5vw, 90px); position: relative; z-index: 3; }
.lagoon-platform {
  position: relative;
  width: min(930px, 95%);
  min-height: 440px;
  border-radius: 62px 36px 80px 44px;
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(280px, 1fr);
  gap: 34px;
  align-items: center;
}
.platform-a { margin: 24px 0 0 9%; background: rgba(255, 243, 216, 0.82); }
.platform-b { margin: 22px 0 0 22%; background: rgba(159, 243, 220, 0.72); box-shadow: 16px 16px 0 rgba(255, 142, 158, 0.34), -10px 13px 0 rgba(255, 232, 163, 0.7); }
.platform-c { margin: 22px 0 0 6%; background: rgba(255, 232, 163, 0.7); box-shadow: 16px 16px 0 rgba(201, 184, 255, 0.46), -10px 13px 0 rgba(53, 201, 208, 0.38); }
.platform-d { margin: 22px 0 0 18%; background: rgba(201, 184, 255, 0.68); box-shadow: 16px 16px 0 rgba(159, 243, 220, 0.46), -10px 13px 0 rgba(255, 142, 158, 0.28); }
.platform-copy { position: relative; z-index: 2; }
.flourish { font-size: 1.35em; text-shadow: 4px 4px 0 var(--butter-pearl); }
.mask-large {
  position: relative;
  width: min(270px, 80vw);
  height: 175px;
  background: var(--pearl-cream);
  transform: rotate(-6deg);
  animation: bob 6s ease-in-out infinite;
}
.mask-large.blank { background: linear-gradient(135deg, var(--pearl-cream), #ffffff 65%, var(--foam-mint)); }
.mask-large[data-symbol]::after {
  content: attr(data-symbol);
  position: absolute;
  left: 50%;
  top: 72%;
  transform: translateX(-50%);
  opacity: 0;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mask-large.revealed[data-symbol]::after { opacity: 1; }
.pearl-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pearl-list li, .bubble-row span, .shell-stamps span {
  border: 2px solid var(--deep-teal);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--pearl-cream);
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--foam-mint);
}
.doodle.curly {
  position: absolute;
  right: 8%;
  bottom: 10%;
  color: var(--coral-smile);
  font-family: "Fraunces", serif;
  font-size: clamp(1.3rem, 3vw, 3rem);
  transform: rotate(8deg);
}

.handshake-drawing { width: 100%; max-width: 360px; overflow: visible; }
.handshake-drawing .draw-path, .handshake-drawing circle {
  fill: var(--butter-pearl);
  stroke: var(--deep-teal);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.handshake-drawing .draw-path {
  fill: none;
  stroke: var(--lagoon-cyan);
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
}
.scene.visible .draw-path { animation: drawWave 1.8s ease forwards; }
.bubble-row, .shell-stamps { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.jelly-cape {
  position: absolute;
  right: 38px;
  bottom: -28px;
  padding: 24px 28px 34px;
  border: 3px solid var(--deep-teal);
  border-radius: 50% 50% 35% 35%;
  background: var(--lavender-shell);
  font-family: "Fraunces", serif;
  font-weight: 800;
  animation: bob 5s ease-in-out infinite -1s;
}

.keychain { position: relative; width: 270px; height: 230px; margin: auto; }
.key-pearl {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid var(--deep-teal);
  background: radial-gradient(circle at 30% 25%, #ffffff 0 12%, var(--butter-pearl) 13% 65%, #FFE8A3 66%);
  box-shadow: 8px 10px 0 rgba(20, 90, 99, 0.14);
  animation: pearlPulse 3s ease-in-out infinite;
}
.p1 { left: 15px; top: 22px; }
.p2 { left: 92px; top: 84px; animation-delay: -0.8s; }
.p3 { left: 174px; top: 32px; animation-delay: -1.6s; }
.key-ring {
  position: absolute;
  left: 58px;
  top: 48px;
  width: 170px;
  height: 125px;
  border: 6px dashed var(--lagoon-cyan);
  border-radius: 48%;
  transform: rotate(-18deg);
}
.shell-stamps span:nth-child(2) { background: var(--foam-mint); }
.shell-stamps span:nth-child(3) { background: var(--coral-smile); }

.split-mask {
  position: relative;
  width: 292px;
  height: 190px;
  border: none;
  box-shadow: none;
  margin: auto;
}
.half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  border: 4px solid var(--deep-teal);
  background: var(--coral-smile);
  transition: transform 700ms cubic-bezier(.2,.9,.2,1);
}
.half.left { left: 0; border-radius: 90px 18px 18px 90px; transform-origin: right center; }
.half.right { right: 0; border-radius: 18px 90px 90px 18px; transform-origin: left center; background: var(--pearl-cream); }
.split-mask.open .left { transform: rotate(-8deg) translateX(-26px); }
.split-mask.open .right { transform: rotate(8deg) translateX(26px); }
.split-mask b {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--butter-pearl);
  border: 2px solid var(--deep-teal);
  border-radius: 999px;
  padding: 10px 14px;
  z-index: -1;
}
.coral-brackets { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-weight: 900; }
.coral-brackets span { font-family: "Fraunces", serif; font-size: 3.4rem; color: var(--coral-smile); }
.coral-brackets em { font-style: normal; background: var(--pearl-cream); border-radius: 999px; border: 2px solid var(--deep-teal); padding: 10px 18px; }

.exit { min-height: 74vh; display: grid; grid-template-columns: minmax(220px, 0.5fr) minmax(300px, 0.8fr); }
.coral-arch { position: relative; width: 280px; height: 280px; margin: auto; }
.coral-arch span {
  position: absolute;
  border: 4px solid var(--deep-teal);
  background: var(--coral-smile);
  border-radius: 999px 999px 28px 28px;
  box-shadow: 7px 8px 0 rgba(255, 232, 163, 0.8);
}
.coral-arch span:nth-child(1) { width: 42px; height: 210px; left: 28px; bottom: 0; transform: rotate(-10deg); }
.coral-arch span:nth-child(2) { width: 42px; height: 210px; right: 28px; bottom: 0; transform: rotate(10deg); }
.coral-arch span:nth-child(3) { width: 182px; height: 42px; left: 49px; top: 44px; transform: rotate(2deg); }
.coral-arch span:nth-child(4) { width: 85px; height: 38px; left: 98px; top: 12px; background: var(--foam-mint); }
.final-card { padding: clamp(30px, 5vw, 58px); border-radius: 56px 36px 70px 34px; background: rgba(255, 243, 216, 0.86); }

.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.floater {
  position: absolute;
  color: var(--deep-teal);
  font-size: clamp(2rem, 4vw, 4.7rem);
  opacity: 0.48;
  filter: drop-shadow(5px 5px 0 rgba(255, 142, 158, 0.28));
  animation: drift 12s ease-in-out infinite;
}
.floater.fish { left: 76%; top: 22%; color: var(--coral-smile); }
.floater.star { left: 91%; top: 52%; color: var(--butter-pearl); animation-delay: -4s; }
.floater.shell { left: 41%; top: 15%; color: var(--lavender-shell); animation-delay: -7s; }
.floater.bubble { left: 58%; top: 78%; color: var(--lagoon-cyan); animation-delay: -2s; }
.floater.two { left: 84%; top: 83%; animation-delay: -8s; }
.floater.star.two { left: 26%; top: 68%; animation-delay: -5s; }

.scene .lagoon-platform, .scene .ritual-card, .scene .hero-copy, .scene-label {
  opacity: 0;
  transform: translateY(34px) rotate(var(--tilt, 0deg));
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.2,.9,.2,1);
}
.scene.visible .lagoon-platform, .scene.visible .ritual-card, .scene.visible .hero-copy, .scene.visible .scene-label {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg));
}
.arrival .ritual-card { --tilt: 2deg; }

@keyframes tideDash { to { stroke-dashoffset: -280; } }
@keyframes paradeFloat {
  0% { transform: translateX(140px) rotate(0deg); }
  100% { transform: translateX(-260px) rotate(-360deg); }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(-26px, 18px) rotate(9deg); }
}
@keyframes drawWave { to { stroke-dashoffset: 0; } }
@keyframes pearlPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08) translateY(-8px); }
}

@media (max-width: 980px) {
  .marquee { left: 12px; right: 12px; height: auto; flex-wrap: wrap; }
  .parade { min-width: 130px; }
  .tide-rail { display: none; }
  .story { padding: 152px 18px 80px; }
  .scene, .exit { grid-template-columns: 1fr; min-height: auto; padding: 64px 0; }
  .hero-copy { padding-top: 0; }
  .lagoon-platform { grid-template-columns: 1fr; margin-left: 0; width: 100%; }
  .platform-b, .platform-d { margin-left: 0; }
  .ritual-card { position: relative; top: auto; right: auto; margin: 90px auto 0; }
  .gate-stage { min-height: 620px; }
  .mask-coral { right: 8%; top: 0; }
}

@media (max-width: 620px) {
  .top-ribbon { display: none; }
  .brand-shell { font-size: 1.1rem; }
  .marquee { border-radius: 24px; }
  .hero-copy h1 { font-size: clamp(3.2rem, 18vw, 5.8rem); }
  .lagoon-platform { border-radius: 38px 24px 46px 28px; }
  .mask-large, .split-mask { transform: scale(0.82); transform-origin: left center; }
}
