/* ============================================================
   THE PARRISH FOUNDATION — BUILD TO GIVE
   Aesthetic: the open ledger — warm paper, ink, ruled lines,
   editorial serif manifesto voice, monospace money.
   ============================================================ */

:root {
  --paper: #f7f1e5;      /* light — used for text ON the dark video hero */
  --paper-deep: #efe6d3;
  --ink: #eef1f6;        /* primary text on the dark-blue pages */
  --ink-soft: rgba(238, 241, 246, 0.74);
  --ink-faint: rgba(238, 241, 246, 0.5);
  --rule: rgba(238, 241, 246, 0.16);
  --navy: #0f1b2e;       /* page background */
  --navy-2: #17263d;     /* raised panels / cards */
  --accent: #7fc9a4;     /* light green, reads on navy */
  --green: #1c6b47;
  --green-deep: #114b31;
  --amber: #d98a3d;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Schibsted Grotesk", -apple-system, sans-serif;
  --mono: "Spline Sans Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
  /* one flick of the wheel = the next page */
  scroll-snap-type: y mandatory;
}

/* every .page is a full screen that the scroll snaps to */
.page {
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

body {
  background: var(--navy);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green); color: var(--paper); }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem) 2rem;
  border: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* navy feathering to transparent — blends into both the video and the pages */
  background: linear-gradient(
    to bottom,
    rgba(15, 27, 46, 0.95) 0%,
    rgba(15, 27, 46, 0.82) 45%,
    rgba(15, 27, 46, 0) 100%
  );
  z-index: 50;
}

.wordmark { text-decoration: none; color: #fff; line-height: 1.05; }
.wordmark-small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.wordmark-big {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.topnav { display: flex; align-items: center; gap: clamp(0.9rem, 2.5vw, 1.8rem); }
.topnav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.topnav a:hover { color: #7fc9a4; }

.btn-give {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: transparent;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  font-family: var(--mono);
  padding: 0.45rem 0.95rem;
  border-radius: 2px;
  font-size: 0.8rem !important;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-give:hover { background: #fff; color: #14110c !important; border-color: #fff; transform: translateY(-1px); }
/* a touch thicker arrow, vertically centered with the text */
.give-arrow { -webkit-text-stroke: 0.7px currentColor; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .topnav a:not(.btn-give) { display: none; }
}

/* ---------- page 1 · home (full-screen video) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 14vh, 8rem) clamp(1.2rem, 6vw, 5rem) clamp(3rem, 8vh, 5rem);
}

.hero-video,
.hero-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the one-time intro sits underneath; it holds its last frame when it ends */
.hero-video { z-index: 0; }

/* the seamless boomerang idle loop fades in on top once the intro finishes */
.hero-loop {
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-loop.live { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-loop { transition: none; }
}

/* subtle bottom vignette only — lets the full animation show, keeps DONATE readable */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(10, 14, 12, 0) 62%,
    rgba(10, 14, 12, 0.55) 100%
  );
}

/* the public ledger total — top-center of the home hero */
.hero-ledger {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: clamp(5.5rem, 17vh, 9.5rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  text-decoration: none;
}

.hero-ledger-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.hero-ledger-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
}

/* DONATE NOW — the single CTA, bottom-center */
.hero-donate {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(2.2rem, 6vh, 4rem);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-decoration: none;
  color: var(--paper);
  padding: 0.95rem 2.2rem;
  border: 1.5px solid rgba(247, 241, 229, 0.55);
  border-radius: 2px;
  background: rgba(10, 14, 12, 0.25);
  backdrop-filter: blur(2px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.hero-donate:hover {
  background: var(--green);
  border-color: var(--green);
  transform: translateX(-50%) translateY(-2px);
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #e8c574;
  margin-bottom: 2.2rem;
}

.hero-line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 8.5vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.hero-line.accent em { color: #7fc9a4; }

.hero-sub {
  max-width: 34rem;
  margin-top: 2rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: rgba(247, 241, 229, 0.82);
}
.hero-sub strong { color: var(--paper); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.4rem; }

/* on the video, the primary button flips to paper */
.hero .btn-primary {
  background: var(--paper);
  color: var(--green-deep);
  border-color: var(--paper);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}
.hero .btn-primary:hover { box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35); }
.hero .btn-ghost {
  color: var(--paper);
  border-color: rgba(247, 241, 229, 0.7);
}
.hero .btn-ghost:hover { background: rgba(247, 241, 229, 0.12); }

.scroll-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.4rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  line-height: 1.7;
  color: rgba(247, 241, 229, 0.8);
  text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.btn-primary {
  display: inline-block;
  background: var(--green);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  border: 1.5px solid var(--green-deep);
  box-shadow: 3px 3px 0 var(--green-deep);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--green-deep); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--green-deep); }
.btn-primary.big { font-size: 1.05rem; padding: 1rem 2rem; }

.btn-ghost {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.85rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-ghost:hover { background: var(--paper-deep); }

/* ---------- section label ---------- */
.story-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
}
.story-label .folio { color: var(--accent); font-weight: 600; }
.story-label.light { border-top-color: var(--rule); color: var(--paper-deep); }
.story-label.light .folio { color: #7fc9a4; }

/* ---------- story ---------- */
.story {
  padding: clamp(4rem, 10vh, 6rem) clamp(1.2rem, 6vw, 5rem) clamp(2rem, 5vh, 3rem);
  max-width: 1100px;
}

.story-body { max-width: 40rem; margin-left: auto; }

.story-lede {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 1.6rem;
}
.story-lede em { color: var(--accent); }

.story-body p:not(.story-lede) {
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}
.story-body strong { color: var(--ink); }

/* ---------- how ---------- */
.how {
  padding: clamp(4rem, 10vh, 6rem) clamp(1.2rem, 6vw, 5rem) clamp(2rem, 5vh, 3rem);
  max-width: 1250px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border: 1px solid var(--rule);
  background: var(--rule);
  gap: 1px;
}

.how-card {
  background: var(--navy-2);
  padding: 2rem 1.6rem 2.2rem;
  position: relative;
}
.how-card:hover { background: #1d3050; }

.how-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--paper);
  background: var(--green);
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.1rem;
}

.how-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  margin-bottom: 0.7rem;
}

.how-card p { color: var(--ink-soft); font-size: 0.95rem; }
.how-card strong { color: var(--ink); }

.how-honest {
  margin-top: 1.8rem;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--amber);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink-soft);
  font-size: 0.9rem;
  max-width: 52rem;
}
.how-honest strong { color: var(--ink); }

/* ---------- ledger (the dark heart of the site) ---------- */
.ledger {
  background: var(--ink);
  color: var(--paper);
  /* ruled ledger lines */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 38px,
    rgba(247, 241, 229, 0.05) 38px 39px
  );
}

.ledger-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 5rem) clamp(1.2rem, 6vw, 5rem) clamp(2rem, 5vh, 3rem);
}

.ledger-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: #7fc9a4;
}

.ledger-total {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-shadow: 0 0 60px rgba(127, 201, 164, 0.25);
}

.ledger-vow {
  max-width: 30rem;
  color: #b5ab97;
  font-size: 0.98rem;
  margin-top: 1rem;
}

.ledger-table-wrap { overflow-x: auto; margin-top: 2.5rem; }

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.ledger-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #7fc9a4;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(247, 241, 229, 0.25);
}

.ledger-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(247, 241, 229, 0.12);
  color: var(--paper);
}

.ledger-table .num, .ledger-table td.num { text-align: right; }

.ledger-table .empty td {
  color: #b5ab97;
  font-style: italic;
  padding: 1.4rem 0.9rem;
}

/* ---------- charity ---------- */
.charity {
  padding: clamp(4rem, 10vh, 6rem) clamp(1.2rem, 6vw, 5rem) clamp(2rem, 5vh, 3rem);
  max-width: 1100px;
}

.charity-body { max-width: 44rem; }

.charity-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 1.2rem;
}
.charity-name span { color: var(--accent); font-style: italic; }

.charity-why { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 1.6rem; }
.charity-why strong { color: var(--ink); }

.charity-facts {
  list-style: none;
  font-family: var(--mono);
  font-size: 0.86rem;
  margin-bottom: 2.2rem;
}
.charity-facts li {
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-soft);
}
.fact-check { color: var(--accent); font-weight: 600; margin-right: 0.6rem; }

/* ---------- footer ---------- */
.foot {
  border: none;
  padding: 3rem clamp(1.2rem, 6vw, 5rem) 3.5rem;
  text-align: center;
  align-items: center;
}

.foot-mark {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}

.foot-line { color: var(--ink-soft); font-size: 0.92rem; max-width: 34rem; margin: 0 auto 1.4rem; }

.foot-nav { font-size: 0.85rem; display: flex; justify-content: center; gap: 0.7rem; margin-bottom: 1.6rem; }
.foot-nav a { color: var(--ink); }
.foot-nav span { color: var(--ink-faint); }

.foot-legal {
  color: var(--ink-faint);
  font-size: 0.72rem;
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- legal pages ---------- */
.legal-page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem clamp(1.2rem, 5vw, 2rem) 5rem;
}
.legal-page h1 { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; margin-bottom: 0.4rem; }
.legal-page .updated { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em; color: var(--ink-faint); margin-bottom: 2.2rem; }
.legal-page h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 2rem 0 0.6rem; }
.legal-page p, .legal-page li { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0.8rem; }
.legal-page ul { padding-left: 1.3rem; }
.legal-page a { color: var(--accent); }
.back-home { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-decoration: none; color: var(--accent); display: inline-block; margin-bottom: 2.5rem; }

/* ---------- reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal.d1 { animation-delay: 0.12s; }
.reveal.d2 { animation-delay: 0.24s; }
.reveal.d3 { animation-delay: 0.4s; }
.reveal.d4 { animation-delay: 0.55s; }
.reveal.d5 { animation-delay: 0.7s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* scroll-reveal below the fold: paused until .in-view */
section:not(.hero) .reveal { animation-play-state: paused; }
section:not(.hero) .reveal.in-view { animation-play-state: running; }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
