/* Animated Phewa Lake story. All visual rules are scoped to this section. */
.lake-story {
  --ls-accent: #bfd2c4;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 600px;
  height: 100vh;
  height: 100svh;
  background: linear-gradient(135deg, #18383b, #456c5c);
  color: #fff;
  font-family: inherit;
}

.lake-story .ls-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.lake-story .ls-panel {
  position: absolute;
  z-index: 1;
  left: clamp(20px, 6vw, 88px);
  bottom: clamp(20px, 5vw, 64px);
  width: min(520px, calc(100% - 40px));
  padding: clamp(22px, 3.4vw, 34px);
  border-left: 3px solid var(--ls-accent);
  background: rgba(17, 43, 40, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 70px rgba(6, 15, 27, .24);
}

.lake-story .ls-kicker {
  margin: 0 0 .45rem;
  color: var(--ls-accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lake-story h1 {
  margin: 0 0 1.2rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.02;
  color: #fff;
}

.lake-story h3 {
  margin: .35rem 0 .45rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.45rem, 2.5vw, 1.8rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ls-accent);
}

.lake-story p {
  margin: 0;
  line-height: 1.6;
  max-width: 60ch;
  color: rgba(255, 255, 255, .92);
  font-size: .9rem;
}

.lake-story .ls-chapters {
  min-height: 10rem;
}

.lake-story .ls-chapter-count {
  color: rgba(255, 255, 255, .68);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.lake-story.is-js .ls-chapter {
  display: none;
}

.lake-story.is-js .ls-chapter.is-active {
  display: block;
  animation: ls-in .65s ease both;
}

.lake-story .ls-progress {
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .22);
}

.lake-story .ls-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ls-accent);
  transform: scaleX(.25);
  transform-origin: left center;
  transition: transform .6s ease;
}

.lake-story .ls-nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: .85rem;
}

.lake-story .ls-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.lake-story .ls-btn:hover,
.lake-story .ls-btn:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, .16);
}

.lake-story .ls-btn:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.lake-story .ls-dots {
  display: flex;
  margin-left: .25rem;
}

.lake-story .ls-dot {
  width: 24px;
  height: 44px;
  padding: 21px 3px;
  border: 0;
  background: rgba(255, 255, 255, .4);
  background-clip: content-box;
  cursor: pointer;
}

.lake-story .ls-dot[aria-current="true"] {
  background-color: var(--ls-accent);
}

.lake-story .ls-play {
  min-height: 40px;
  margin-left: .2rem;
  padding: .45rem .65rem;
  border: 1px solid rgba(255, 255, 255, .34);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.lake-story .ls-play:hover,
.lake-story .ls-play:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, .16);
}

.lake-story .ls-cta {
  margin-left: auto;
  padding: .7rem 1rem;
  background: var(--color-sage, #55766a);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter .2s;
}

.lake-story .ls-cta:hover {
  filter: brightness(1.08);
}

.lake-story :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lake-story.is-static .ls-nav,
.lake-story.is-static .ls-progress {
  display: none;
}

@keyframes ls-in {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@media (prefers-reduced-motion:reduce) {
  .lake-story.is-js .ls-chapter.is-active {
    animation: none
  }
  .lake-story .ls-progress-fill,
  .lake-story .ls-btn,
  .lake-story .ls-play,
  .lake-story .ls-cta {
    transition: none;
  }
}

@media (max-width:767.98px) {
  .lake-story {
    display: grid;
    /* canvas takes whatever the panel doesn't need */
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    height: 100vh;
    height: 100svh;
  }

  .lake-story .ls-canvas {
    position: relative;
    inset: auto;
    grid-row: 1;
    width: 100%;
    height: 100%;
    min-height: 34svh;
  }

  .lake-story .ls-panel {
    position: relative;
    inset: auto;
    grid-row: 2;
    width: auto;
    max-height: 62svh;
    margin: 0;
    padding: 18px clamp(16px, 5vw, 22px) calc(16px + env(safe-area-inset-bottom, 0px));
    border-left: 0;
    border-top: 3px solid var(--ls-accent);
    background: var(--color-lake, #18383b);
    box-shadow: none;
    overflow-y: auto;
  }

  .lake-story .ls-kicker {
    margin: 0 0 .4rem;
    font-size: .62rem;
  }

  .lake-story h1 {
    margin: 0 0 .9rem;
    font-size: clamp(1.35rem, 5.4vw, 1.75rem);
    line-height: 1.12;
  }

  /* fixed height so the panel doesn't resize between chapters */
  .lake-story .ls-chapters {
    min-height: 8.5rem;
  }

  .lake-story .ls-chapter-count {
    display: block;
    margin-bottom: .4rem;
    font-size: .62rem;
  }

  .lake-story h3 {
    margin: 0 0 .5rem;
    font-size: clamp(1.15rem, 4.6vw, 1.4rem);
    line-height: 1.15;
  }

  .lake-story .ls-chapter p {
    font-size: .84rem;
    line-height: 1.55;
  }

  .lake-story .ls-progress {
    margin-top: .9rem;
  }

  .lake-story .ls-nav {
    gap: .4rem;
    margin-top: .8rem;
  }

  .lake-story .ls-btn {
    width: 40px;
    height: 40px;
  }

  .lake-story .ls-dot {
    width: 16px;
    height: 40px;
    padding: 19px 3px;
  }

  .lake-story .ls-play {
    margin-left: auto;
    min-height: 40px;
    padding: .35rem .7rem;
    font-size: .72rem;
  }

  /* CTA gets its own full-width row */
  .lake-story .ls-cta {
    flex: 1 1 100%;
    margin: .35rem 0 0;
    padding: .75rem 1rem;
    font-size: .78rem;
    text-align: center;
  }
}

/* short phones: trim the redundant intro to give the story room */
@media (max-width:767.98px) and (max-height:700px) {
  .lake-story h1 {
    display: none;
  }

  .lake-story .ls-kicker {
    margin-bottom: .6rem;
  }

  .lake-story .ls-chapters {
    min-height: 7.5rem;
  }

  .lake-story .ls-canvas {
    min-height: 30svh;
  }
}
