:root {
  color-scheme: light;
  --paper: oklch(0.925 0.026 86);
  --paper-soft: oklch(0.967 0.018 88);
  --ink: oklch(0.19 0.024 75);
  --muted: oklch(0.43 0.024 74);
  --sand: oklch(0.78 0.055 82);
  --shell: oklch(0.83 0.06 52);
  --tide: oklch(0.62 0.095 190);
  --deep: oklch(0.24 0.046 228);
  --line: oklch(0.19 0.024 75 / 0.16);
  --light-line: oklch(0.97 0.018 88 / 0.34);
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 0%, oklch(0.99 0.012 88 / 0.75), transparent 35rem),
    var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 Manrope, system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  content: "";
  opacity: 0.42;
  background-image:
    radial-gradient(circle at 20% 18%, oklch(0.19 0.02 75 / 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 72% 64%, oklch(0.19 0.02 75 / 0.06) 0 1px, transparent 1px);
  background-size: 46px 52px, 68px 74px;
  mix-blend-mode: multiply;
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

button {
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 80;
  transform: translateY(-150%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  padding: 0.7rem 1rem;
  font-weight: 700;
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 7rem) 0.85rem;
  color: var(--ink);
  transition:
    background 240ms var(--ease),
    border-color 240ms var(--ease),
    padding 240ms var(--ease);
}

.site-header.is-scrolled {
  border-bottom: 1px solid oklch(0.19 0.024 75 / 0.12);
  background: oklch(0.94 0.018 86 / 0.86);
}

.brand,
.main-nav,
.nav-cta {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: clamp(9.8rem, 16vw, 15rem);
  min-height: 44px;
}

.brand-logo {
  width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  color: oklch(0.32 0.02 75);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.88rem, 1.2vw, 1.08rem);
}

.main-nav a,
.nav-cta,
.hero-enter,
.join-form button {
  min-height: 44px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  transition:
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--tide);
  outline: none;
  transform: translateY(-1px);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: 86px;
  border: 1px solid #7e6b86;
  border-radius: 999px;
  background: #7e6b86;
  color: #fff;
  padding: 0.52rem 1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.94rem;
  transition:
    background 180ms var(--ease),
    color 180ms var(--ease),
    transform 180ms var(--ease);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: #7e6b86;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.shore-chapter {
  position: relative;
  isolation: isolate;
}

.shore-backdrop {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  margin-bottom: -100svh;
  overflow: hidden;
}

.shore-backdrop img,
.shore-backdrop video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.shore-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, oklch(0.96 0.018 88 / 0.22), transparent 30%, oklch(0.94 0.02 86 / 0.72) 100%),
    radial-gradient(circle at 50% 48%, oklch(0.97 0.018 88 / 0.22), transparent 34rem);
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  place-items: center;
  padding: 7rem clamp(1rem, 4vw, 6rem) 5rem;
  text-align: center;
}

.night-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hero-kicker,
.eyebrow,
.flow-marker,
.hero-enter span {
  font-size: clamp(0.74rem, 1vw, 0.88rem);
  font-weight: 600;
  line-height: 1.2;
  color: oklch(0.36 0.018 75 / 0.72);
}

.hero-kicker {
  margin-top: 5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 1.5vw, 1.26rem);
}

.hero-title {
  margin-top: 1.1rem;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.8rem, 17vw, 15.5rem);
  font-weight: 600;
  line-height: 0.78;
}

.hero-line {
  width: min(36rem, 86vw);
  margin-top: clamp(1.2rem, 2.5vw, 1.85rem);
  color: oklch(0.3 0.018 75 / 0.76);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.08rem, 2vw, 1.55rem);
  font-style: italic;
  line-height: 1.3;
}

.hero-enter {
  display: inline-grid;
  gap: 0.52rem;
  justify-items: center;
  margin-top: clamp(1.8rem, 4vw, 3.2rem);
  padding: 0.4rem 0.8rem;
}

.hero-enter i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, oklch(0.19 0.024 75 / 0.36), transparent);
}

.flow-marker {
  position: absolute;
  bottom: max(1.7rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.poem-section,
.river-section {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 86svh;
  padding: clamp(6rem, 14vw, 12rem) clamp(1rem, 6vw, 8rem);
  text-align: center;
}

.shore-chapter .poem-section {
  min-height: 100svh;
}

.shore-chapter .poem-section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, transparent, oklch(0.93 0.025 86 / 0.66) 74%, var(--paper) 100%),
    radial-gradient(circle at 50% 46%, oklch(0.97 0.018 88 / 0.62), transparent 36rem);
}

.section-number {
  margin-bottom: 1.4rem;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--tide);
  color: var(--paper-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: oklch(0.42 0.035 185);
}

.poem-section h2,
.story-copy h2,
.river-section h2,
.join-panel h2 {
  max-width: 11.5ch;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 8.4vw, 8.8rem);
  font-weight: 500;
  line-height: 0.9;
}

.section-copy,
.story-copy p,
.river-grid p,
.join-panel > p {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
}

.section-copy {
  margin-top: 1.6rem;
}

.image-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 37rem);
  justify-content: start;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 7vw, 9rem);
  isolation: isolate;
}

.image-story::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, var(--paper) 0%, oklch(0.925 0.026 86 / 0.88) 26%, oklch(0.925 0.026 86 / 0.5) 52%, transparent 78%),
    linear-gradient(180deg, oklch(0.925 0.026 86 / 0.18), transparent 42%, oklch(0.925 0.026 86 / 0.3));
}

.image-frame {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  min-height: 100%;
  border-radius: 0;
}

.image-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 100%;
  object-fit: cover;
}

.image-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, oklch(0.925 0.026 86 / 0.12), transparent 42%, oklch(0.925 0.026 86 / 0.34)),
    radial-gradient(circle at 80% 70%, transparent, oklch(0.16 0.03 190 / 0.12) 72%);
}

.story-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 1.1rem;
  width: min(37rem, 100%);
}

.story-copy h2 {
  max-width: 8ch;
}

.quiet-list {
  display: grid;
  gap: 0;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.quiet-list li {
  display: grid;
  grid-template-columns: minmax(6rem, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.quiet-list span {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
}

.quiet-list b {
  color: var(--muted);
  font-weight: 500;
}

.river-section {
  min-height: 100svh;
  overflow: hidden;
  padding-top: clamp(6rem, 11vw, 10rem);
  color: var(--ink);
  isolation: isolate;
  background: var(--paper);
}

.directory-image,
.directory-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.directory-image {
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.directory-shade {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 40%, oklch(0.97 0.018 88 / 0.58), transparent 32rem),
    linear-gradient(180deg, oklch(0.925 0.026 86 / 0.16), oklch(0.925 0.026 86 / 0.42) 78%, var(--paper) 100%),
    linear-gradient(90deg, oklch(0.925 0.026 86 / 0.58), transparent 44%, oklch(0.925 0.026 86 / 0.12));
}

.river-section h2 {
  max-width: 13.5ch;
}

.river-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(68rem, 100%);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border: 1px solid var(--line);
  background: var(--line);
}

.river-grid article {
  min-height: 17rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: oklch(0.948 0.02 86 / 0.84);
  text-align: left;
}

.river-grid span {
  display: block;
  color: var(--tide);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  line-height: 0.9;
}

.river-grid p {
  margin-top: 1.4rem;
}

.night-section {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 6vw, 8rem);
  color: var(--paper-soft);
  isolation: isolate;
}

.night-image {
  object-position: center center;
}

.night-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, oklch(0.15 0.04 234 / 0.88), oklch(0.15 0.04 234 / 0.34) 58%, oklch(0.15 0.04 234 / 0.1)),
    linear-gradient(180deg, transparent, oklch(0.12 0.03 234 / 0.58));
}

.join-panel {
  width: min(35rem, 100%);
}

.join-panel .eyebrow,
.join-panel h2,
.join-panel > p {
  color: var(--paper-soft);
}

.join-panel h2 {
  max-width: 9ch;
}

.join-panel > p {
  margin-top: 1.2rem;
  color: oklch(0.93 0.018 88 / 0.74);
}

.join-form {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.join-form label {
  display: grid;
  gap: 0.35rem;
}

.join-form label span {
  color: oklch(0.93 0.018 88 / 0.72);
  font-size: 0.84rem;
  font-weight: 600;
}

.join-form label small {
  color: oklch(0.93 0.018 88 / 0.58);
  font-size: 0.78rem;
  line-height: 1.4;
}

.join-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid oklch(0.93 0.018 88 / 0.22);
  border-radius: 999px;
  background: oklch(0.93 0.018 88 / 0.1);
  color: var(--paper-soft);
  padding: 0.8rem 1rem;
  outline: none;
}

.join-form input:focus {
  border-color: var(--paper-soft);
  box-shadow: 0 0 0 3px oklch(0.93 0.018 88 / 0.18);
}

.join-form input::placeholder {
  color: oklch(0.93 0.018 88 / 0.48);
}

.join-form button {
  margin-top: 0.45rem;
  border: 1px solid oklch(0.93 0.018 88 / 0.62);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--deep);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms var(--ease),
    background 180ms var(--ease);
}

.join-form button:hover,
.join-form button:focus-visible {
  background: oklch(0.83 0.055 82);
  outline: none;
  transform: translateY(-1px);
}

.form-status {
  min-height: 1.4em;
  color: oklch(0.88 0.08 175) !important;
  font-size: 0.94rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 7rem);
  background: oklch(0.14 0.035 232);
  color: oklch(0.93 0.018 88 / 0.78);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.site-footer p {
  color: inherit;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: 94svh;
    padding-top: 6rem;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(3.1rem, 15vw, 8rem);
  }

  .image-story {
    grid-template-columns: 1fr;
    min-height: 100svh;
  }

  .image-frame {
    min-height: 100%;
  }

  .river-grid {
    grid-template-columns: 1fr;
  }

  .river-grid article {
    min-height: 12rem;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 0.85rem;
  }

  .brand {
    width: clamp(8.4rem, 42vw, 10.5rem);
  }

  .nav-cta {
    min-width: 72px;
  }

  .hero {
    text-align: center;
  }

  .hero-kicker {
    margin-top: 3.4rem;
  }

  .hero-line {
    font-size: 1.08rem;
  }

  .poem-section h2,
  .story-copy h2,
  .river-section h2,
  .join-panel h2 {
    font-size: clamp(2.7rem, 16vw, 4.6rem);
  }

  .poem-section,
  .river-section,
  .image-story,
  .night-section {
    padding-inline: 1rem;
  }

  .image-story::before {
    background:
      linear-gradient(180deg, oklch(0.94 0.024 86 / 0.68) 0%, oklch(0.94 0.024 86 / 0.48) 54%, oklch(0.94 0.024 86 / 0.34) 100%),
      linear-gradient(90deg, oklch(0.94 0.024 86 / 0.82) 0%, oklch(0.94 0.024 86 / 0.5) 58%, oklch(0.94 0.024 86 / 0.18) 100%);
  }

  .story-copy {
    text-shadow: 0 1px 12px oklch(0.96 0.02 86 / 0.62);
  }

  .quiet-list {
    margin-top: 1.5rem;
    border-top-color: oklch(0.28 0.02 78 / 0.3);
  }

  .quiet-list li {
    grid-template-columns: 1fr;
    gap: 0.34rem;
    padding: 1.15rem 0;
    border-bottom-color: oklch(0.28 0.02 78 / 0.3);
  }

  .quiet-list span {
    font-size: 1.4rem;
    line-height: 1;
  }

  .quiet-list b {
    color: oklch(0.25 0.014 75 / 0.9);
    font-size: 1rem;
    line-height: 1.45;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
