/* =========================================================
   Peter's Journey — core stylesheet
   Design system: warm paper background, river-green accent,
   Fraunces (display) + IBM Plex Sans (body/UI).
   ========================================================= */

:root {
  --bg: #efeae0;
  --bg-alt: #e4decf;
  --bg-deep: #dcd4c1;
  --ink: #2a271f;
  --ink-soft: #5b564a;
  --ink-faint: #85806f;
  --accent: #3f5a4e;
  --accent-dark: #2c4038;
  --accent-soft: #c9cbb5;
  --line: #d8d0bf;
  --white: #faf8f3;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --measure: 640px;
  --measure-wide: 780px;

  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.2em; }

a { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--measure);
}

.prose-wide {
  max-width: var(--measure-wide);
}

.section {
  padding: 88px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--deep {
  background: var(--bg-deep);
}

.eyebrow-free-heading {
  /* intentionally no eyebrow label above headings — see design principles */
}

.lede {
  font-size: 1.25rem;
  color: var(--ink-soft);
}

.big-line {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.3;
  color: var(--ink);
  margin: 0.8em 0;
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3em 0;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 234, 224, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--ink); }

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 500;
}

.nav-cta:hover { background: var(--accent-dark); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 18px;
  }

  .nav-links.is-open .nav-cta {
    width: 100%;
    text-align: center;
  }
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 96px;
}

.hero-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-deep);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: reveal 1.1s ease-out both;
}

@keyframes reveal {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.hero-copy .lede {
  margin-top: 20px;
}

.cta-row {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink-soft); }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
  .hero-photo { order: -1; aspect-ratio: 4/3; }
}

/* ---------- Photo break (full width) ---------- */

.photo-break {
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  background: var(--bg-deep);
}
.photo-break img { width: 100%; height: 100%; object-fit: cover; }
.photo-break figcaption {
  max-width: 1140px;
  margin: 12px auto 0;
  padding: 0 24px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Story blocks ---------- */

.chapter-mark {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.stat-inline {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-dark);
}

.callout-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.callout-list li {
  border-left: 2px solid var(--accent-soft);
  padding: 10px 0 10px 16px;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .callout-list { grid-template-columns: 1fr; }
}

blockquote.stand-alone {
  margin: 2.4em 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink);
  border: none;
}

/* ---------- Dashboard ---------- */

.dashboard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 40px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}

.dashboard-cell {
  padding: 24px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.dashboard-cell:nth-child(3n) { border-right: none; }

.dashboard-label {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.dashboard-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink);
}

.progress-track {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 18px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 0.6s ease;
}

@media (max-width: 700px) {
  .dashboard { padding: 24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-cell { border-right: none; }
}

/* ---------- Support panel ---------- */

.support-panel {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 460px;
}

.support-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.support-toggle button {
  flex: 1;
  padding: 10px;
  background: var(--bg);
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.support-toggle button.is-active {
  background: var(--accent);
  color: var(--white);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.amount-grid button {
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink);
}
.amount-grid button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.custom-amount {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.custom-amount span {
  padding: 12px 14px;
  color: var(--ink-faint);
  background: var(--bg-alt);
  font-size: 0.9rem;
}
.custom-amount input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
  width: 100%;
}
.custom-amount input:focus { outline: none; }

.support-note {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 14px;
}

.support-status {
  margin-top: 14px;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: var(--radius);
  display: none;
}
.support-status.is-visible { display: block; }
.support-status.is-error { background: #f6e4de; color: #7a3524; }
.support-status.is-info { background: var(--bg-alt); color: var(--ink-soft); }

/* ---------- Transparency ---------- */

.category-bar {
  margin-bottom: 18px;
}
.category-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--ink-soft);
}
.category-bar-track {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
}
.category-bar-fill {
  height: 100%;
  background: var(--accent);
}

/* ---------- Timeline ---------- */

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item.is-pending::before {
  background: var(--bg);
  border: 1px solid var(--ink-faint);
}
.timeline-date {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.timeline-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

/* ---------- Updates ---------- */

.update-card {
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.update-card:first-child { padding-top: 0; }
.update-date {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.update-figures {
  display: flex;
  gap: 32px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.update-figure-label { font-size: 0.85rem; color: var(--ink-faint); }
.update-figure-value { font-family: var(--font-display); font-size: 1.3rem; }

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink-soft);
  text-align: left;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.faq-question .sign {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--ink-soft);
}
.faq-item.is-open .faq-answer {
  max-height: 400px;
}
.faq-answer-inner { padding-bottom: 22px; }

/* ---------- Contact form ---------- */

.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.form-field textarea { min-height: 140px; resize: vertical; }

.form-status {
  margin-top: 16px;
  font-size: 0.95rem;
  display: none;
}
.form-status.is-visible { display: block; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--bg-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h4 {
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-family: var(--font-body);
  margin-bottom: 12px;
  font-weight: 500;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  padding: 4px 0;
  font-size: 0.95rem;
}
.footer-grid a:hover { color: var(--ink); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Sticky mobile CTA ---------- */

.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}
@media (max-width: 640px) {
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 76px; }
}
.mobile-sticky-cta .btn { width: 100%; text-align: center; }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.page-hero {
  padding: 64px 0 32px;
}
