/* The home page: the bay behind everything, the list on a solid sheet that rises over it,
   and the page ending back out on the water. */

/* ---- the scene: a picture that is there at once, and a canvas that wakes it up */
.scene { position: fixed; top: 0; left: 0; right: 0; z-index: 0; height: 100vh; height: 100lvh; overflow: hidden; }
#scene-plate, #scene-gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
#scene-gl { opacity: 0; transition: opacity .9s ease; }
.scene.is-live #scene-gl { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #scene-gl { display: none; } }

/* ---- the first screen. It stops short, so the sheet's edge always shows the page goes on. */
.hero {
  --lamp: #f6cf8c;
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100svh - 104px);
  padding-block: calc(var(--topbar-h) + 24px) 40px;
  color: #f6f1e6;
}
.hero-title {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: clamp(58px, 10.2vw, 136px); line-height: .98; letter-spacing: -.022em;
  transition: opacity .35s ease;
}
.hero-title.is-loading { opacity: 0; }   /* a moment for its font, rather than a visible swap */
/* each letter catches the same beam the scene draws */
.hero-title span {
  --l: 0;
  color: color-mix(in srgb, #ffe2b6 calc(var(--l) * 100%), #f8f3e8);
  text-shadow: 0 0 calc(var(--l) * 30px) rgba(255, 205, 140, calc(var(--l) * .7)), 0 2px 40px rgba(6, 8, 16, .4);
}
.hero-lede { margin-top: 14px; font-size: clamp(17px, 1.5vw, 20px); text-shadow: 0 1px 18px rgba(6, 8, 16, .6); }

.hero-search { margin-top: 26px; width: min(100%, 35rem); }
.hero-search .search-field {
  height: 58px; border-radius: 16px; color: #fff;
  border-color: rgba(255, 248, 235, .24);
  background: rgba(9, 12, 20, .42);
  box-shadow: 0 22px 50px -24px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: border-color .2s, background-color .2s;
}
.hero-search .search-field:focus-within {
  border-color: var(--lamp); background: rgba(9, 12, 20, .58);
  box-shadow: 0 22px 50px -24px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hero-search .search-field > .ico { left: 18px; color: rgba(248, 243, 232, .72); }
.hero-search input { padding-left: 48px; font-size: 17px; }
.hero-search input::placeholder { color: rgba(248, 243, 232, .72); }
.search-go {
  flex: none; height: 42px; margin-right: 8px; padding: 0 18px;
  border: 0; border-radius: 11px; background: var(--lamp); color: #15171e;
  font-size: 15px; font-weight: 600;
  transition: background-color .15s;
}
.search-go:hover { background: #ffdca3; }
.search-go:focus-visible { outline-color: #fff; }

/* ---- everything you read sits on solid ground */
.sheet {
  position: relative; min-height: 60vh; padding-block: 30px 72px;
  background: var(--bg); color: var(--ink);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -30px 60px -20px rgba(4, 6, 12, .55);
  transition: background-color .5s ease;
}

/* ---- the page ends on the night sea, whichever theme you're in */
.coda {
  --ink: #f1ecdf; --ink-2: rgba(241, 236, 223, .88); --accent: #fff;
  --beam: #f8d594; --beam-glow: rgba(248, 213, 148, .5);
  padding-block: clamp(72px, 16vh, 150px);
  color: var(--ink);
}
.coda h2 { text-shadow: 0 1px 24px rgba(4, 6, 12, .8); }
.coda p { text-shadow: 0 1px 16px rgba(4, 6, 12, .9); }
/* no live scene to dim the water or frost the search box (reduced motion, no WebGL, or the moment before it starts) */
.scene:not(.is-live) ~ .main .coda { background: rgba(6, 9, 16, .5); }
.scene:not(.is-live) ~ .main .hero-search .search-field { background: rgba(9, 12, 20, .74); }
