:root {
  --night-mere: #082d2c;
  --deep-mere: #0f4542;
  --mere: #1f6862;
  --sea-glass: #6fb5a5;
  --filament: #8ad8c3;
  --mist: #d7e1d5;
  --paper: #eee8d4;
  --paper-soft: #d9d4bd;
  --ink: #112e2b;
  --brass: #c4a96c;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night-mere);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 16%, rgba(111, 181, 165, 0.20), transparent 26%),
    radial-gradient(circle at 12% 72%, rgba(93, 145, 126, 0.18), transparent 32%),
    linear-gradient(154deg, #082d2c 0%, #0c3937 28%, #15514d 58%, #315f55 100%);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.10;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0, rgba(255,255,255,0.07) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 5px);
}

.world-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cartography {
  position: absolute;
  width: max(125vw, 1500px);
  height: max(105vh, 980px);
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%) rotate(-1.2deg);
  opacity: 0.50;
}

.contour,
.old-path,
.mere-line,
.filament,
.compass circle,
.compass path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.contour {
  stroke: rgba(213, 232, 215, 0.18);
  stroke-width: 1.1;
}

.contour-b {
  opacity: 0.7;
}

.contour-c {
  opacity: 0.48;
}

.old-path {
  stroke: rgba(238, 232, 212, 0.46);
  stroke-width: 1.45;
  stroke-dasharray: 4 8;
  stroke-linecap: round;
}

.mere-line {
  stroke: rgba(122, 204, 187, 0.34);
  stroke-width: 1.4;
}

.mere-line-b {
  opacity: 0.55;
}

.node {
  fill: rgba(238, 232, 212, 0.88);
  stroke: rgba(138, 216, 195, 0.78);
  stroke-width: 3;
}

.filament {
  stroke: rgba(138, 216, 195, 0.64);
  stroke-width: 2.1;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px rgba(111, 181, 165, 0.75));
  animation: filament-breathe 7s ease-in-out infinite alternate;
}

.map-label text,
.compass text {
  fill: rgba(238, 232, 212, 0.36);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.16em;
}

.map-label-b text {
  font-size: 14px;
}

.map-label-c text {
  font-size: 15px;
}

.compass circle,
.compass path {
  stroke: rgba(238, 232, 212, 0.22);
  stroke-width: 1;
}

.compass path {
  fill: rgba(238, 232, 212, 0.08);
}

.compass text {
  text-anchor: middle;
  font-size: 15px;
}

.mist {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.22;
}

.mist-a {
  width: 66vw;
  height: 25vw;
  right: -12vw;
  top: 20vh;
  background: rgba(222, 232, 218, 0.60);
  transform: rotate(-9deg);
}

.mist-b {
  width: 72vw;
  height: 24vw;
  left: -20vw;
  bottom: 8vh;
  background: rgba(166, 203, 188, 0.42);
  transform: rotate(7deg);
}

.water-glow {
  position: absolute;
  width: 80vw;
  height: 32vh;
  left: 50%;
  bottom: -17vh;
  transform: translateX(-50%);
  border-radius: 50%;
  border-top: 1px solid rgba(138, 216, 195, 0.34);
  box-shadow:
    0 -12px 80px rgba(111, 181, 165, 0.18),
    inset 0 22px 80px rgba(111, 181, 165, 0.06);
}

.page-shell,
.site-footer {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.page-shell {
  padding: clamp(66px, 9vh, 104px) 0 46px;
}

.hero {
  min-height: 66vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(48px, 8vw, 126px);
  align-items: center;
}

.wordmark-wrap {
  position: relative;
  padding: 28px 0 34px;
}

.wordmark-wrap::before {
  content: "";
  position: absolute;
  width: clamp(190px, 21vw, 320px);
  height: clamp(190px, 21vw, 320px);
  left: clamp(-96px, -7vw, -54px);
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(238, 232, 212, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(238, 232, 212, 0.018),
    0 0 0 58px rgba(238, 232, 212, 0.012);
}

.county-line,
.quote-label,
.field-note,
.world-hints,
.site-footer {
  text-transform: uppercase;
  letter-spacing: 0.19em;
}

.county-line {
  position: relative;
  margin: 0 0 14px 6px;
  color: rgba(238, 232, 212, 0.58);
  font-family: var(--serif);
  font-size: 0.82rem;
}

.wordmark {
  position: relative;
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(4.7rem, 9.7vw, 9rem);
  font-weight: 400;
  line-height: 0.83;
  letter-spacing: -0.062em;
  text-shadow: 0 13px 40px rgba(0, 20, 19, 0.28);
}

.mere-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(340px, 70%);
  margin: 30px 0 0 7px;
}

.mere-mark span {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(138, 216, 195, 0.88), rgba(138, 216, 195, 0.16));
}

.mere-mark span:nth-child(1) { width: 58%; }
.mere-mark span:nth-child(2) { width: 24%; opacity: 0.68; }
.mere-mark span:nth-child(3) { width: 11%; opacity: 0.42; }

.intro {
  max-width: 560px;
  padding: 26px 0 22px;
}

.headline {
  margin: 0;
  color: #f6f1df;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  font-weight: 400;
  line-height: 1.01;
  letter-spacing: -0.035em;
}

.subhead {
  max-width: 500px;
  margin: 28px 0 0;
  color: rgba(238, 232, 212, 0.76);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.7;
}

.world-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 34px;
  color: rgba(194, 223, 208, 0.68);
  font-size: 0.65rem;
  line-height: 1.6;
}

.world-hints span {
  position: relative;
}

.world-hints span:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -12px;
  color: rgba(196, 169, 108, 0.72);
}

.story-fragments {
  position: relative;
  width: min(820px, 76%);
  margin: 3vh 0 0 auto;
  padding: 30px 34px 32px 42px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(238, 232, 212, 0.96), rgba(220, 223, 204, 0.90));
  border: 1px solid rgba(246, 241, 223, 0.38);
  box-shadow:
    0 24px 70px rgba(0, 24, 22, 0.22),
    inset 0 0 0 1px rgba(17, 46, 43, 0.05);
  clip-path: polygon(0.55% 1.3%, 99.4% 0, 100% 97.7%, 1.2% 100%, 0 56%);
}

.story-fragments::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(17, 46, 43, 0.10);
  clip-path: inherit;
  pointer-events: none;
}

.fragment-heading {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(17, 46, 43, 0.18);
}

.quote-label,
.field-note {
  margin: 0;
  font-size: 0.64rem;
}

.quote-label {
  color: var(--deep-mere);
}

.field-note {
  color: rgba(17, 46, 43, 0.45);
  text-align: right;
}

.quote-stage {
  position: relative;
  min-height: 184px;
  margin-top: 26px;
}

.quote {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  animation: quote-cycle 48s cubic-bezier(0.33, 1, 0.68, 1) infinite;
}

.quote:nth-child(1) { animation-delay: -2s; }
.quote:nth-child(2) { animation-delay: 6s; }
.quote:nth-child(3) { animation-delay: 14s; }
.quote:nth-child(4) { animation-delay: 22s; }
.quote:nth-child(5) { animation-delay: 30s; }
.quote:nth-child(6) { animation-delay: 38s; }

.story-fragments:hover .quote {
  animation-play-state: paused;
}

.quote p {
  max-width: 720px;
  margin: 0;
  color: #163b37;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.55vw, 2.3rem);
  line-height: 1.33;
  letter-spacing: -0.015em;
}

.quote footer {
  margin-top: 20px;
  color: #7b6843;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fragment-trace {
  display: flex;
  align-items: center;
  width: min(290px, 55%);
  gap: 8px;
  margin-top: 8px;
  opacity: 0.55;
}

.fragment-trace span {
  height: 1px;
  flex: 1;
  background: var(--mere);
}

.fragment-trace i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--mere);
  border-radius: 50%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 36px;
  color: rgba(238, 232, 212, 0.46);
  font-size: 0.62rem;
}

.site-footer p {
  margin: 0;
}

.footer-place {
  color: rgba(180, 219, 203, 0.46);
}

@keyframes quote-cycle {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  4.75% {
    opacity: 1;
    transform: translateY(0);
  }
  11.5% {
    opacity: 1;
    transform: translateY(0);
  }
  16.666% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes filament-breathe {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.92;
  }
}

@media (max-width: 880px) {
  .page-shell,
  .site-footer {
    width: min(100% - 36px, 720px);
  }

  .page-shell {
    padding-top: 52px;
  }

  .cartography {
    width: 1900px;
    left: 44%;
    opacity: 0.38;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .wordmark-wrap {
    padding-top: 34px;
  }

  .wordmark-wrap::before {
    left: -62px;
  }

  .wordmark {
    font-size: clamp(4.2rem, 17vw, 7rem);
  }

  .intro {
    padding-top: 4px;
  }

  .headline {
    max-width: 620px;
  }

  .story-fragments {
    width: 100%;
    margin-top: 82px;
    padding: 28px 28px 30px 32px;
  }

  .quote-stage {
    min-height: 210px;
  }
}

@media (max-width: 540px) {
  .world-hints {
    display: grid;
    gap: 6px;
  }

  .world-hints span::after {
    display: none;
  }

  .fragment-heading {
    display: block;
  }

  .field-note {
    margin-top: 8px;
    text-align: left;
  }

  .story-fragments {
    clip-path: polygon(1% 0, 99% 1%, 100% 98%, 2% 100%, 0 55%);
  }

  .quote-stage {
    min-height: 238px;
  }

  .site-footer {
    display: grid;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filament {
    animation: none;
  }

  .quote {
    display: none;
    animation: none;
    transform: none;
  }

  .quote:first-child {
    display: block;
    opacity: 1;
  }
}
