/* The Scroll Centre: look and layout.
   Colours are set once in :root below; change one there and it changes everywhere. */

:root {
  --parchment: #F5EFE4;
  --parchment-deep: #EDE4D3;
  --ink: #1F2D4F;
  --ink-soft: #4A5672;
  --gold: #A97C2B;
  --gold-light: #D9B66A;
  --ridge-5: #3E5578;
  --rule: rgba(169,124,43,.35);
  --measure: 33rem;
  --space: clamp(5rem, 9vw, 7.5rem);
  --gap: clamp(2.5rem, 6vw, 5.5rem);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px;
}
.wrap { width: min(57rem, 100% - 2.5rem); margin-inline: auto; }

/* header */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 3; padding: 1.4rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand img { height: 4.95rem; width: auto; }
nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
nav a { text-decoration: none; font-size: 1.05rem; color: var(--ink-soft); }
nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
nav a.give { color: var(--ink); border: 1.5px solid var(--gold); padding: .35rem 1rem; border-radius: 999px; }
nav a.give:hover { background: rgba(169,124,43,.1); text-decoration: none; }

/* hero: the mountain at sunrise */
.hero {
  position: relative; min-height: min(100svh, 54rem);
  display: grid; align-items: start; overflow: hidden;
  background: linear-gradient(to bottom, var(--parchment) 0%, #F2E8D6 75%);
}
.hero-copy { position: relative; z-index: 2; text-align: center; padding-top: clamp(2.5rem, 5vh, 3.5rem); padding-bottom: 15rem; }
.hero h1 {
  margin: 0 auto; max-width: 15ch; font-weight: 500; letter-spacing: -0.015em;
  font-size: clamp(2.8rem, 7.2vw, 5.6rem); line-height: 1.02;
}
.hero .lede {
  margin: 1.6rem auto 0; max-width: 31rem;
  font-size: clamp(1.2rem, 2.1vw, 1.45rem); line-height: 1.5; color: var(--ink-soft); font-style: italic; text-wrap: balance;
}
.hero .lede strong { font-weight: 600; color: var(--ink); }
.actions { margin-top: 2.4rem; display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .8rem 1.7rem; font: inherit; font-size: 1.05rem; line-height: 1.3;
  text-decoration: none; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--ink); color: var(--parchment); background: var(--ink);
  transition: background-color .2s ease;
}
.btn:hover { background: #16213b; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: rgba(31,45,79,.06); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: #8f6822; }
.sun {
  position: absolute; z-index: 0; left: 84%; bottom: clamp(4rem, 13vh, 8rem);
  width: clamp(11rem, 24vw, 19rem); aspect-ratio: 1; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(247,214,128,.95) 0%, rgba(245,205,110,.55) 32%, rgba(245,205,110,0) 68%);
  animation: rise 3.2s cubic-bezier(.2,.7,.2,1) .2s both;
}
@keyframes rise { from { transform: translateY(45%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ridges { position: absolute; inset: auto 0 0 0; z-index: 1; width: 100%; height: clamp(12rem, 34vh, 20rem); }

/* shared section rhythm */
section { padding: var(--space) 0; }
h2 { font-weight: 500; font-size: clamp(2.05rem, 4.2vw, 3.05rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 1.4rem; }
h3 { font-weight: 500; }
.prose { max-width: var(--measure); }
.soft { color: var(--ink-soft); }
.intro { max-width: var(--measure); color: var(--ink-soft); margin-bottom: 0; }

/* invitation: the ridge colour carried into one line */
.invitation { background: var(--ridge-5); color: var(--parchment); padding: clamp(3.5rem, 7vw, 5.25rem) 1.25rem; }
.invitation p {
  margin: 0 auto; max-width: 38rem; text-align: center;
  font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.35; font-style: italic;
}

/* the four levels, set as a climb */
.levels .grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--gap); align-items: center; }
.climb { list-style: none; margin: 0; padding: 0; }
.climb li { white-space: nowrap; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.climb li:last-child { border-bottom: 0; }
.climb li:nth-child(2) { padding-left: 6%; }
.climb li:nth-child(3) { padding-left: 12%; }
.climb li:nth-child(4) { padding-left: 18%; color: var(--gold); }
.climb em { color: var(--ink-soft); }
.climb li:nth-child(4) em { color: var(--gold); }
.climb-note { margin: 1.1rem 0 0 18%; font-size: 1rem; font-style: italic; color: var(--ink-soft); }

/* the series */
.series { background: var(--parchment-deep); }
.series-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem var(--gap); align-items: end; margin-bottom: 3rem; }
.series-head h2 { margin: 0; }
.books { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.book { display: grid; grid-template-columns: 6rem 1fr 1.35fr; gap: 1.75rem; align-items: baseline; padding: 1.75rem 0; border-bottom: 1px solid rgba(31,45,79,.16); }
.book .no { color: var(--gold); font-size: 1.05rem; font-style: italic; }
.book h3 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 1.15; }
.book .line { margin: 0 0 .35rem; font-style: italic; font-size: 1.2rem; }
.book .desc { margin: 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; }

/* three branches */
.branches .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); margin-top: 3rem; }
.branch { border-top: 2px solid var(--gold); padding-top: 1.4rem; display: flex; flex-direction: column; }
.branch h3 { margin: 0 0 .25rem; font-size: 1.65rem; line-height: 1.2; }
.branch .for { margin: 0 0 .8rem; font-style: italic; color: var(--gold); }
.branch p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.6; }
.branch a { margin-top: auto; padding-top: 1rem; color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 5px; }

/* founder */
.founder { background: var(--ink); color: var(--parchment); }
.founder .grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--gap); align-items: center; }
.founder h2 { color: var(--parchment); }
.founder .soft { color: #C9CFDC; }
.founder blockquote {
  margin: 0; padding: .2rem 0 .2rem 1.6rem; border-left: 2px solid var(--gold-light);
  font-size: clamp(1.5rem, 2.9vw, 2.1rem); line-height: 1.32; font-style: italic;
}
.founder blockquote footer { margin-top: 1.2rem; font-size: 1.05rem; font-style: normal; color: var(--gold-light); }

/* build the sanctuary */
.support { background: var(--parchment-deep); }
.support-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--gap); align-items: center; }
.sanctuary-art { margin: 0; }
.sanctuary-art svg { display: block; width: 100%; height: auto; border-radius: 24px; box-shadow: 0 1px 0 rgba(31,45,79,.06); }
.sanctuary-art figcaption { margin-top: .9rem; font-style: italic; font-size: 1rem; color: var(--ink-soft); text-align: center; }
.support h2 { text-wrap: balance; }
.support .lead { font-size: clamp(1.3rem, 2.4vw, 1.55rem); line-height: 1.45; }
.support .actions { margin-top: 2rem; justify-content: flex-start; }
.support .small { margin-top: 1.4rem; font-size: .95rem; color: var(--ink-soft); }

/* weekly Scroll */
.letters .box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem var(--gap); align-items: center;
  padding: clamp(2rem, 5vw, 3.75rem); border: 1.5px solid var(--gold); border-radius: 22px; background: rgba(255,255,255,.4);
}
.letters h2 { margin-bottom: .9rem; }
form { display: flex; gap: .75rem; flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
input[type=email] {
  flex: 1 1 14rem; min-width: 0; padding: .8rem 1.2rem; font: inherit; font-size: 1.05rem;
  border: 1.5px solid rgba(31,45,79,.3); border-radius: 999px; background: #fff; color: var(--ink);
}
.note { margin: 1rem 0 0; font-size: .98rem; color: var(--ink-soft); }
.note a { text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* footer */
.site-footer { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 3rem; align-items: center; }
.site-footer img { height: 2.8rem; width: auto; }
.site-footer p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.site-footer .links { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: flex-end; }
.site-footer .links a { font-size: 1rem; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.site-footer .legal { grid-column: 1 / -1; font-size: .9rem; padding-top: 1.5rem; border-top: 1px solid rgba(31,45,79,.1); }

/* teachings: inner pages */
.page-header { position: static; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.page-top { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.page-top h1 { margin: 0 0 1rem; font-weight: 500; font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.04; letter-spacing: -0.015em; }
.page-top .intro { font-size: 1.2rem; }

.teaching-list { list-style: none; margin: 0; padding: 0 0 var(--space); border-top: 1.5px solid var(--ink); }
.teaching-list li { padding: 2rem 0; border-bottom: 1px solid rgba(31,45,79,.16); }
.teaching-list time { display: block; margin-bottom: .4rem; color: var(--gold); font-style: italic; font-size: 1.05rem; }
.teaching-list h2 { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }
.teaching-list h2 a { text-decoration: none; }
.teaching-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.teaching-list p { margin: 0; max-width: var(--measure); color: var(--ink-soft); }
.teaching-list .empty { color: var(--ink-soft); font-style: italic; }

.teaching { padding: clamp(3.5rem, 7vw, 5.5rem) 0 var(--space); }
.teaching .wrap { max-width: 38rem; }
.teaching .back { display: inline-block; margin-bottom: 2.5rem; color: var(--ink-soft); font-size: 1.05rem; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.teaching time { display: block; margin-bottom: .8rem; color: var(--gold); font-style: italic; font-size: 1.1rem; }
.teaching h1 { margin: 0 0 1.4rem; font-weight: 500; font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.teaching .standfirst { margin-bottom: 2.6rem; padding-bottom: 2.2rem; border-bottom: 1px solid var(--rule); font-size: clamp(1.3rem, 2.4vw, 1.55rem); line-height: 1.45; font-style: italic; color: var(--ink-soft); }
.teaching .body p { margin-bottom: 1.4rem; }
.teaching .body h2 { margin: 3rem 0 1rem; font-size: clamp(1.6rem, 3vw, 2rem); }
.teaching .body blockquote { margin: 2.2rem 0; padding: .2rem 0 .2rem 1.5rem; border-left: 2px solid var(--gold); font-size: 1.3rem; line-height: 1.45; font-style: italic; }
.teaching .body .scripture { margin: 2rem 0; text-align: center; font-style: italic; color: var(--ink-soft); }
.teaching .close { margin-top: 3.5rem; padding: 2rem; border: 1.5px solid var(--gold); border-radius: 20px; background: rgba(255,255,255,.4); }
.teaching .close p { margin: 0 0 1.2rem; }
.teaching .close .actions { justify-content: flex-start; margin-top: 0; }

.teaching .body h3 { margin: 2.2rem 0 .7rem; font-size: clamp(1.3rem, 2.4vw, 1.5rem); line-height: 1.25; }
.teaching .body ul, .teaching .body ol { margin: 0 0 1.6rem; padding-left: 1.4rem; }
.teaching .body li { margin-bottom: .5rem; padding-left: .3rem; }
.teaching .body li::marker { color: var(--gold); }
.teaching .body a, .related a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.teaching .faq { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.teaching .faq h2, .related h2 { margin: 0 0 1.4rem; font-size: clamp(1.7rem, 3vw, 2.1rem); }
.teaching .faq h3 { margin: 1.6rem 0 .5rem; font-size: 1.3rem; line-height: 1.3; }
.teaching .faq p { color: var(--ink-soft); }
.related { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 1rem 0; border-bottom: 1px solid rgba(31,45,79,.12); }
.related li a { font-size: 1.3rem; }
.related li p { margin: .3rem 0 0; color: var(--ink-soft); font-size: 1rem; }

/* tablets */
@media (max-width: 900px) {
  nav ul { gap: 1.1rem; }
  nav li.hide-md { display: none; }
  .levels .grid, .series-head, .founder .grid, .letters .box, .support-grid { grid-template-columns: 1fr; }
  .branches .cols { grid-template-columns: 1fr; gap: 2.5rem; }
  .branch a { margin-top: 0; padding-top: .2rem; }
  .book { grid-template-columns: 4.5rem 1fr; gap: .5rem 1.25rem; }
  .book .text { grid-column: 2; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer .links { justify-content: flex-start; }
}
/* phones */
@media (max-width: 640px) {
  .site-header { padding: 1.1rem 0; }
  .site-header .wrap { flex-direction: column; gap: .8rem; }
  .brand img { height: 4.35rem; }
  nav ul { gap: .4rem 1.1rem; flex-wrap: wrap; justify-content: center; }
  nav a { font-size: 1rem; }
  nav li.hide-sm { display: none; }
  .hero-copy { padding-top: 12rem; padding-bottom: 13rem; }
  .climb li:nth-child(n) { padding-left: 0; }
  .climb-note { margin-left: 0; }
  .book { grid-template-columns: 1fr; }
  .book .text { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sun { animation: none; }
  html { scroll-behavior: auto; }
}
