/* ==========================================================================
   PILGRIM THERAPY :: SHARED SUBPAGE STYLES
   Mirrors the design tokens + nav + footer from the homepage.
   ========================================================================== */

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

:root {
  --ink: #1a1916;
  --ink-soft: #2a2822;
  --parchment: #f5f0e8;
  --parchment-light: #faf7f2;
  --stone: #7a715f;
  --stone-light: #c4baa8;
  --trail: #6f5a3e;
  --trail-light: #c4a982;
  --moss: #5a6b4a;
  --white: #ffffff;
  --text: #2f2c26;
  --text-soft: #5e584e;
  --focus-ring: #c4a982;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--parchment);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.15;
  font-weight: 400;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--ink); color: #fff;
  padding: 8px 16px; z-index: 1000; text-decoration: none;
}
.skip-link:focus { top: 0; }

.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--trail); margin-bottom: 1rem;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 3rem); height: 72px;
  background: rgba(26,25,22,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s;
}
.nav-links { list-style: none; display: flex; gap: 1.75rem; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,0.88); font-size: 13px; font-weight: 500;
  letter-spacing: 0.5px; transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 2px;
  font-size: 12px; font-weight: 600;
  color: #fff; transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover { background: var(--trail); border-color: var(--trail); }
.nav-logo img { height: 50px; width: auto; filter: brightness(0) invert(1); }
.nav-right-group { display: flex; align-items: center; }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
  flex-direction: column; justify-content: space-between;
}
.hamburger span {
  display: block; width: 100%; height: 2px; background: #fff; border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ── PAGE HEADER ── */
.page-hero {
  padding: 140px clamp(1.5rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);
  background: var(--ink);
  color: #fff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  opacity: 0.55;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(26,25,22,0.96) 0%, rgba(26,25,22,0.75) 45%, rgba(26,25,22,0.55) 100%),
    radial-gradient(ellipse at 20% 70%, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}
.page-hero-inner { max-width: 880px; margin: 0 auto; position: relative; z-index: 1; }

/* Media break: full-width image accent between sections */
.media-break {
  position: relative;
  height: clamp(260px, 40vw, 420px);
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.media-break--overlay::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,25,22,0.2), rgba(26,25,22,0.35));
  pointer-events: none;
}
.page-hero .eyebrow { color: var(--trail-light); }
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  margin-bottom: 1.25rem;
}
.page-hero h1 em { font-style: italic; color: var(--trail-light); }
.page-hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,0.88);
  max-width: 680px; line-height: 1.65; font-weight: 400;
}
.breadcrumbs {
  font-size: 0.82rem; color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem; letter-spacing: 0.3px;
}
.breadcrumbs a { color: rgba(255,255,255,0.85); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs-sep { margin: 0 0.5rem; color: rgba(255,255,255,0.45); }

/* ── CONTENT SECTIONS ── */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}
.section-inner { max-width: 880px; margin: 0 auto; }
.section--light { background: var(--parchment-light); }
.section--parchment { background: var(--parchment); }
.section--dark { background: var(--ink-soft); color: rgba(255,255,255,0.92); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--trail-light); }

.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 1.25rem; line-height: 1.2; }
.section h3 {
  font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  margin: 2rem 0 0.75rem;
}
.section p {
  font-size: 1.05rem; line-height: 1.8;
  margin-bottom: 1.25rem;
}
.section ul, .section ol {
  margin: 1rem 0 1.5rem 1.5rem;
}
.section li {
  font-size: 1.02rem; line-height: 1.75;
  margin-bottom: 0.6rem;
}
.section a {
  color: var(--trail); text-decoration: underline; text-underline-offset: 3px;
}
.section a:hover { color: #5a4830; }

.lede { font-size: 1.18rem; color: var(--ink-soft); line-height: 1.7; font-weight: 400; }

/* ── FACT GRID ── */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
}
.fact {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid rgba(160,152,133,0.3);
  border-radius: 4px;
}
.fact dt {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--trail); margin-bottom: 0.5rem;
}
.fact dd {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem; color: var(--ink); line-height: 1.35;
}

/* ── CTA BLOCK ── */
.cta-block {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.cta-block-inner { max-width: 600px; margin: 0 auto; }
.cta-block .eyebrow { color: var(--trail-light); }
.cta-block h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-block p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 2rem; }

.btn-primary {
  display: inline-block;
  padding: 0.95rem 2.25rem;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: var(--trail-light); color: var(--ink); transform: translateY(-2px); }

.btn-secondary {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: transparent; color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 2px; margin-left: 0.75rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ── RELATED SERVICES ── */
.related {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  background: var(--parchment-light);
}
.related-inner { max-width: 1100px; margin: 0 auto; }
.related h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem; text-align: center;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.related-card {
  padding: 1.75rem 1.5rem;
  background: #fff;
  border: 1px solid rgba(160,152,133,0.3);
  border-radius: 4px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--trail);
  box-shadow: 0 12px 24px rgba(26,25,22,0.08);
}
.related-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem; color: var(--ink);
  margin-bottom: 0.5rem;
}
.related-card p { font-size: 0.95rem; color: var(--text); line-height: 1.55; }
.related-card .arrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1rem; font-size: 0.82rem; font-weight: 600;
  color: var(--trail); letter-spacing: 0.4px;
}

/* ── IGNATIAN ASIDE ── */
.ignatian-note {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--trail);
  background: rgba(196,169,130,0.10);
  border-radius: 0 8px 8px 0;
}
.ignatian-note .eyebrow {
  color: var(--trail);
  margin-bottom: 0.5rem;
}
.ignatian-note p:not(.eyebrow) {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── VERIFIED BADGES ── */
.verified-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.verified-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.2px;
  color: var(--trail); background: rgba(196,169,130,0.12);
  border: 1px solid rgba(111,90,62,0.25);
  border-radius: 999px;
  text-decoration: none !important;
  transition: all 0.2s;
}
.verified-badge:hover { background: rgba(196,169,130,0.22); border-color: var(--trail); }
.verified-badge svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── STICKY CTA ── */
.sticky-cta {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  background: var(--trail); color: #fff;
  font-size: 0.92rem; font-weight: 600; letter-spacing: 0.3px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(26,25,22,0.28), 0 2px 6px rgba(26,25,22,0.15);
  transition: transform 0.2s, background 0.2s;
}
.sticky-cta:hover { background: #5a4830; transform: translateY(-2px); }
.sticky-cta svg { width: 15px; height: 15px; }

/* ── FOOTER ── */
.footer {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem) 2rem;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 2.5rem;
  max-width: 1100px; margin: 0 auto;
}
.footer-brand img { height: 60px; width: auto; filter: brightness(0) invert(1); margin-bottom: 0.8rem; }
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.82); max-width: 280px; line-height: 1.7; }
.footer-col h4 {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.92); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.88); transition: color 0.2s; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-col .static-text { color: rgba(255,255,255,0.88); font-size: 0.92rem; }
.footer-bottom {
  max-width: 1100px; margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  font-size: 0.82rem; color: rgba(255,255,255,0.82);
}
.footer-legal { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-legal a { color: rgba(255,255,255,0.82); font-size: 0.82rem; }
.footer-legal a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── RESPONSIVE ── */
@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 0;
    background: rgba(26,25,22,0.98);
    padding: 2rem;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.9rem 0; width: 100%; text-align: center; }
  .nav-links a { font-size: 20px; color: rgba(255,255,255,0.92); }
  .nav-cta { margin-top: 1rem; padding: 0.7rem 1.6rem; font-size: 14px; }

  /* Drop backdrop-filter on the nav while the menu is open so the
     fixed-positioned dropdown isn't trapped inside the navbar's
     containing block. transition:none kills the flash. */
  .nav.menu-open {
    background: rgba(26,25,22,0.98) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
  }
  .hamburger { display: flex; }
  .page-hero { padding: 120px 1.5rem clamp(3rem, 7vw, 5rem); }
  .sticky-cta { right: 1rem; bottom: 1rem; padding: 0.8rem 1.2rem; font-size: 0.88rem; }
  .footer-inner { flex-direction: column; gap: 2rem; }
}

/* ── MOBILE HORIZONTAL SLIDERS ── */
@media (max-width: 620px) {
  .fact-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem;
    margin: 1.75rem -1.25rem 2rem;
    padding: 0 1.25rem 0.5rem;
    scrollbar-width: none;
  }
  .fact-grid::-webkit-scrollbar { display: none; }
  .fact {
    flex: 0 0 72%;
    scroll-snap-align: start;
    min-height: 110px;
  }

  .related {
    padding-left: 0;
    padding-right: 0;
  }
  .related h2 {
    padding: 0 1.25rem;
  }
  .related-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.8rem;
    padding: 0 1.25rem 0.5rem;
    scrollbar-width: none;
  }
  .related-grid::-webkit-scrollbar { display: none; }
  .related-card {
    flex: 0 0 80%;
    scroll-snap-align: start;
    min-height: 150px;
  }
}

@media print {
  .nav, .sticky-cta, .cta-block { display: none; }
  body { background: #fff; color: #000; }
  .page-hero { background: #fff; color: #000; padding-top: 2rem; }
  .page-hero h1, .page-hero .eyebrow, .page-hero-sub { color: #000; }
}
