/* ============================================================================
   Liberty Springs Foundation — Deep Spring Water aesthetic (concept mockup)
   The page floats over a live water canvas; everything is glass, light, and
   one --accent color that the JS engine re-tints as you pass each spring.
   ============================================================================ */

:root {
  --accent: rgb(191, 239, 251);          /* re-tinted per spring by water.js */
  --ink: #eaf4f7;
  --ink-dim: #a8c3cc;
  --deep: #04141c;
  --glass: rgba(6, 22, 30, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.10);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--deep);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--deep); }

/* --------------------------------------------------------- water canvas */
#water {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
}

/* subtle vignette above the water so edges read as depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(2, 10, 14, 0.55) 100%);
}

main, .site-header, .site-footer { position: relative; z-index: 2; }

/* ------------------------------------------------------------- header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
  z-index: 10;
}
.site-header.scrolled {
  background: rgba(4, 16, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-block: 0.8rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark em { font-style: italic; font-weight: 300; color: var(--ink-dim); }
.wordmark-drop {
  width: 9px; height: 9px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}
.site-nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-donate {
  background: var(--accent);
  color: #04202a;
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-donate:hover { box-shadow: 0 4px 34px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-ghost {
  border: 1px solid var(--glass-edge);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* --------------------------------------------------- spring dot nav */
.spring-nav {
  position: fixed;
  right: clamp(0.7rem, 2vw, 1.6rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  z-index: 10;
}
.spring-nav a {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}
.spring-nav a:hover { transform: scale(1.4); }
.spring-nav a.active {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  border-color: var(--accent);
}

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}
.hero-inner { max-width: 860px; }

.kicker {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  transition: color 0.6s ease;
}

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-shadow: 0 4px 40px rgba(2, 12, 16, 0.8);
}
h1 em, h2 em {
  font-style: italic;
  color: var(--accent);
  transition: color 0.6s ease;
}
h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 1.6rem;
}

.lede {
  margin-top: 1.8rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 620px;
  margin-inline: auto;
  text-shadow: 0 2px 20px rgba(2, 12, 16, 0.9);
}

.touch-hint {
  margin-top: 3rem;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
  animation: hint-pulse 3.2s ease-in-out infinite;
}
@keyframes hint-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.95; } }
.hint-mobile { display: none; }
@media (pointer: coarse) {
  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
}

/* scroll cue: a drop falls, a ring blooms */
.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 64px;
  display: block;
}
.cue-drop {
  position: absolute;
  left: 50%; top: 0;
  width: 6px; height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--accent);
  animation: cue-fall 2.2s cubic-bezier(0.5, 0, 0.8, 0.6) infinite;
}
@keyframes cue-fall {
  0%   { top: 0; opacity: 0; }
  15%  { opacity: 1; }
  70%  { top: 44px; opacity: 1; }
  71%  { opacity: 0; }
  100% { top: 44px; opacity: 0; }
}
.cue-line {
  position: absolute;
  left: 50%; top: 48px;
  width: 24px; height: 1px;
  margin-left: -12px;
  background: rgba(255, 255, 255, 0.25);
}
.cue-ring {
  position: absolute;
  left: 50%; top: 44px;
  width: 8px; height: 8px;
  margin-left: -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: cue-ripple 2.2s ease-out infinite;
}
@keyframes cue-ripple {
  0%, 70% { transform: scale(0.4); opacity: 0; }
  72%     { opacity: 0.9; }
  100%    { transform: scale(3.2); opacity: 0; }
}

/* ------------------------------------------------- chapters & panels */
.chapter {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: clamp(5rem, 12vh, 8rem) clamp(1.2rem, 6vw, 6rem);
}

.panel {
  max-width: 600px;
  padding: clamp(1.8rem, 3.5vw, 3rem);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(8, 26, 35, 0.62), rgba(5, 16, 22, 0.42));
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: 0 24px 60px rgba(1, 8, 12, 0.45);
}
.panel p + p { margin-top: 1rem; }
.panel p { color: var(--ink-dim); }
.panel p strong, .panel p em { color: var(--ink); }
.panel p em { font-family: var(--serif); }

/* alternate sides like fonts along a creek walk */
.spring.flip .panel { margin-left: auto; }

/* ghost spring number behind the panel */
.spring-panel { position: relative; overflow: hidden; }
.spring-no {
  position: absolute;
  top: -2.5rem; right: -0.5rem;
  font-family: var(--serif);
  font-size: 11rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
  opacity: 0.08;
  pointer-events: none;
  transition: color 0.6s ease;
}

/* stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--glass-edge);
}
.stats dt {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--accent);
  transition: color 0.6s ease;
}
.stats dd {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* -------------------------------------------------------- springs index */
.index-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  max-width: 1100px;
}
.index-grid a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.4rem 1.6rem;
  border-radius: 16px;
  border: 1px solid var(--glass-edge);
  background: rgba(6, 20, 27, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.index-grid a:hover {
  transform: translateY(-4px);
  background: rgba(10, 30, 40, 0.65);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.index-grid span {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}
.index-grid em {
  font-size: 0.95rem;
  color: var(--ink-dim);
}

/* ------------------------------------------------------------- chips */
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.chips li {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.6s ease, border-color 0.6s ease;
}

.taste {
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* -------------------------------------------------------- stewardship */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.visit-notes {
  margin-top: 1.4rem;
  padding-left: 1.2rem;
  color: var(--ink-dim);
}
.visit-notes li { margin-top: 0.5rem; }
.visit-notes li::marker { color: var(--accent); }

/* ------------------------------------------------------------- footer */
.site-footer {
  padding: 4rem clamp(1.2rem, 6vw, 6rem) 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(3, 12, 17, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.footer-word {
  font-family: var(--serif);
  font-size: 1.3rem;
}
.footer-word em { color: var(--ink-dim); }
.footer-note {
  margin-top: 0.8rem;
  max-width: 640px;
  font-size: 0.78rem;
  color: rgba(168, 195, 204, 0.6);
}

/* ------------------------------------------------------------ reveals */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .spring-nav { display: none; }
  .site-nav a:not(.btn) { display: none; }
  .chapter { padding-inline: 1rem; }
  .panel { max-width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .spring-no { font-size: 7rem; top: -1.5rem; }
}

/* ----------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .touch-hint, .cue-drop, .cue-ring { animation: none; }
  .cue-drop, .cue-ring { display: none; }
}
