/* Livingsky shared stylesheet */
:root {
  --sky-high: #2F5F8F;
  --sky-mid: #6E9CC4;
  --sky-low: #CFE3F1;
  --wheat: #D6AE58;
  --ink: #1F2A36;
  --ink-soft: #4A5968;
  --paper: #FFFFFF;
  --mist: #F2F6F9;
  --line: #DCE5EC;

  /* Cohorts sub-brand */
  --char: #2A2D29;
  --olive: #5A6342;
  --sand: #CBBB90;

  --sans: "Manrope", "Segoe UI", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --stencil: "Saira Stencil One", "Arial Black", Impact, sans-serif;

  --wrap: 68rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

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

a { color: var(--sky-high); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--wheat);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--sans);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; max-width: 62ch; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  padding: 1.25rem 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.nav a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--wheat); }

/* Sky hero */
.sky {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, var(--sky-high) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
  color: #fff;
  overflow: hidden;
}
.sky::after {
  /* the horizon: a thin strip of prairie */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 14px;
  background: linear-gradient(180deg, var(--wheat), #B98F3E);
}
.sky-inner { padding-bottom: 4.5rem; }
.sky h1 {
  font-size: clamp(3rem, 11vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 0.3em;
  color: #fff;
}
.sky p {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--ink);
  max-width: 34ch;
}

/* Sections */
.section { padding: 5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-intro { margin-bottom: 2.5rem; }
.section-intro p { color: var(--ink-soft); }

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  background: var(--sky-high);
  color: #fff;
  text-decoration: none;
}
.button:hover { background: var(--ink); }
.button.quiet {
  background: transparent;
  color: var(--sky-high);
  border: 2px solid var(--sky-high);
}

/* Three doors: stories, sermons, blog */
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 3rem 2.5rem;
}
.door { border-top: 4px solid var(--sky-mid); padding-top: 1.25rem; }
.door p { color: var(--ink-soft); }
.door a.more {
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
}
.door a.more:hover { text-decoration: underline; }

/* Featured story */
.feature {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: center;
}
.feature-cover {
  aspect-ratio: 2 / 3;
  background: linear-gradient(180deg, var(--sky-high), var(--sky-low));
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  max-width: 20rem;
}
.price {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
@media (max-width: 44rem) {
  .feature { grid-template-columns: 1fr; }
}

/* Cohorts strip (rugged sub-brand preview) */
.cohorts-strip {
  background: var(--char);
  color: #E9E4D6;
  padding: 5rem 0;
  border-top: 6px solid var(--olive);
}
.cohorts-strip h2 {
  font-family: var(--stencil);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: 0.02em;
  color: var(--sand);
}
.cohorts-strip p { font-family: var(--sans); color: #D8D3C4; }
.cohorts-strip .button { background: var(--olive); border-radius: 2px; }
.cohorts-strip .button:hover { background: var(--sand); color: var(--char); }

/* About */
.about { background: var(--mist); }

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Inner pages: a shorter sky band */
.sky.short { min-height: 42vh; }
.sky.short .sky-inner { padding-bottom: 3rem; }
.sky.short h1 { font-size: clamp(2.6rem, 7vw, 5rem); }

/* Story list */
.story-list { display: grid; gap: 3.5rem; }
.story {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 2rem;
  align-items: start;
}
.story .feature-cover {
  font-size: 1.05rem;
  padding: 1rem;
  width: 100%;
}
.passage {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
@media (max-width: 36rem) {
  .story { grid-template-columns: 1fr; }
  .story .feature-cover { max-width: 11rem; }
}

/* Collection bundle */
.bundle {
  background: var(--mist);
  border-left: 6px solid var(--wheat);
  padding: 2.5rem;
  border-radius: 4px;
}

/* Payhip buttons styled to match the site (theme "none") */
.payhip-buy-button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  background: var(--sky-high);
  color: #fff !important;
  text-decoration: none;
}
.payhip-buy-button:hover { background: var(--ink); }

.small-print {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Ten-story collections */
.collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 2rem;
}
.collections .bundle { padding: 2rem; }

/* Sermon library */
.finder {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.finder input[type="search"] {
  flex: 1 1 16rem;
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--line);
  border-radius: 6px;
}
.finder input[type="search"]:focus { outline: none; border-color: var(--sky-mid); }
.topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.topic[aria-pressed="true"] { background: var(--sky-high); border-color: var(--sky-high); color: #fff; }

.sermon-list { list-style: none; margin: 0; padding: 0; }
.sermon-list li { border-top: 1px solid var(--line); }
.sermon-list li:last-child { border-bottom: 1px solid var(--line); }
.sermon-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 2rem;
  padding: 1.25rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
}
.sermon-list a:hover .sermon-title { color: var(--sky-high); text-decoration: underline; }
.sermon-title { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; }
.sermon-meta { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }
.sermon-list .sermon-meta.right { text-align: right; }
.sermon-summary { grid-column: 1 / -1; color: var(--ink-soft); margin: 0; }
.no-results { font-family: var(--sans); color: var(--ink-soft); display: none; }
@media (max-width: 36rem) {
  .sermon-list a { grid-template-columns: 1fr; }
  .sermon-list .sermon-meta.right { text-align: left; }
}

/* Single sermon page */
.manuscript { max-width: 40rem; margin-inline: auto; }
.manuscript p { max-width: none; }
.manuscript h2 { margin-top: 2em; }
.manuscript blockquote {
  margin: 1.5em 0;
  padding-left: 1.25rem;
  border-left: 4px solid var(--wheat);
  font-style: italic;
}
.listen {
  background: var(--mist);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 2.5rem;
}
.listen audio { width: 100%; }
.video { position: relative; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.back { font-family: var(--sans); font-weight: 700; text-decoration: none; }

/* Blog */
.latest {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}
.latest-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, var(--sky-mid), var(--sky-low));
  border-radius: 6px;
  overflow: hidden;
}
.latest-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 44rem) { .latest { grid-template-columns: 1fr; } }

.post-kind {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--mist);
  color: var(--sky-high);
  margin-bottom: 0.75rem;
}
.post-kind.video { background: var(--wheat); color: var(--ink); }

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 3rem 2.5rem;
}
.post h3 a { color: var(--ink); text-decoration: none; }
.post h3 a:hover { color: var(--sky-high); text-decoration: underline; }
.post p { color: var(--ink-soft); }

/* ===== Covenant Cohorts page: rugged sub-brand ===== */
body.cohorts { background: var(--char); color: #E9E4D6; font-family: var(--sans); }
body.cohorts a { color: var(--sand); }
body.cohorts .site-header { position: static; background: #1E201D; border-bottom: 1px solid #3A3E37; }
body.cohorts .nav a[aria-current="page"] { border-bottom-color: var(--olive); }

.ops-hero {
  padding: 6rem 0 5rem;
  border-bottom: 6px solid var(--olive);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 80px),
    var(--char);
}
.ops-hero h1 {
  font-family: var(--stencil);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 0.95;
  color: var(--sand);
  margin-bottom: 0.35em;
}
.ops-hero p { font-size: clamp(1.1rem, 2vw, 1.35rem); color: #D8D3C4; max-width: 36ch; }
.status {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border: 2px solid var(--olive);
  color: var(--sand);
  margin-bottom: 1.5rem;
}

.ops-section { padding: 5rem 0; border-bottom: 1px solid #3A3E37; }
.ops-section h2 { font-family: var(--stencil); font-weight: 400; color: var(--sand); letter-spacing: 0.01em; }
.ops-section p { color: #D8D3C4; }

.orders {
  list-style: none;
  counter-reset: order;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
}
.orders li { counter-increment: order; border-top: 3px solid var(--olive); padding-top: 1rem; }
.orders li::before {
  content: counter(order);
  font-family: var(--stencil);
  font-size: 2.5rem;
  color: var(--olive);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.orders h3 { color: #F1ECDD; }
.orders p { font-size: 1rem; }

.verse {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.35;
  color: #F1ECDD;
  max-width: 30ch;
  margin: 0;
}
.verse-ref { font-weight: 700; color: var(--sand); margin-top: 1rem; }

.enlist { background: #1E201D; }
.enlist form { display: grid; gap: 1rem; max-width: 30rem; margin-top: 2rem; }
.enlist label { font-weight: 700; font-size: 0.95rem; color: #F1ECDD; }
.enlist input[type="text"], .enlist input[type="email"] {
  width: 100%;
  font: inherit;
  padding: 0.8rem 1rem;
  background: var(--char);
  border: 2px solid #4A4F45;
  color: #F1ECDD;
  border-radius: 2px;
}
.enlist input:focus { outline: none; border-color: var(--sand); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 600 !important; }
.check input { margin-top: 0.3rem; accent-color: var(--olive); }
.enlist button {
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.9rem 1.4rem;
  background: var(--olive);
  color: #fff;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  justify-self: start;
}
.enlist button:hover { background: var(--sand); color: var(--char); }
.enlist .small-print { color: #AFA995; }

body.cohorts .site-footer { color: #AFA995; background: #1E201D; }

/* Shop */
.shop-section { padding: 5rem 0; }
.shop-section + .shop-section { border-top: 1px solid var(--line); }
.coming {
  font-family: var(--sans);
  background: var(--mist);
  border-left: 6px solid var(--sky-mid);
  padding: 1.25rem 1.5rem;
  border-radius: 4px;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  max-width: none;
}
.shop-link { margin-top: 2rem; }

/* Devotions format list */
.format {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 2rem;
}
.format div { border-top: 4px solid var(--wheat); padding-top: 1rem; }
.format p { color: var(--ink-soft); font-size: 1rem; }

/* Holding pages */
.holding p { font-size: 1.15rem; }

/* Photo banners (Shop and Cohorts) */
.sky.photo {
  background:
    linear-gradient(180deg, rgba(31,42,54,0.10) 0%, rgba(31,42,54,0.35) 55%, rgba(31,42,54,0.78) 100%),
    url("images/joshuas-corner-hero.jpg") center / cover no-repeat;
}
.sky.photo p { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.45); }
.sky.photo h1 { text-shadow: 0 2px 14px rgba(0,0,0,0.45); }

.ops-hero.photo {
  background:
    linear-gradient(180deg, rgba(42,45,41,0.55) 0%, rgba(42,45,41,0.72) 55%, rgba(42,45,41,0.92) 100%),
    url("images/cohorts-hero.jpg") center / cover no-repeat;
  padding: 9rem 0 6rem;
}
.ops-hero.photo p { text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

/* Book covers and listings */
.cover-img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 6px 18px rgba(31,42,54,0.22); }
.story.book { grid-template-columns: 13rem 1fr; }
.story.book .cover-img { max-width: 13rem; }
@media (max-width: 36rem) { .story.book { grid-template-columns: 1fr; } .story.book .cover-img { max-width: 12rem; } }
.available-soon { font-family: var(--sans); font-weight: 600; color: var(--ink-soft); margin: 0; }

/* Home page: new books row */
.new-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2.5rem; margin: 2rem 0; }
.new-book h3 { font-family: var(--sans); font-size: 1.15rem; margin: 1rem 0 0.25rem; }
.new-book p { color: var(--ink-soft); margin: 0; }
.new-book a { text-decoration: none; color: inherit; display: block; }
.new-book a:hover h3 { text-decoration: underline; }

/* Cohorts "Coming Soon" band on the home page */
.cohorts-strip.soon { padding-top: 0; }
.cohorts-strip.soon .coming-banner {
  background: var(--sand);
  color: var(--char);
  text-align: center;
  font-family: var(--stencil);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.18em;
  padding: 0.6rem 1rem;
  margin-bottom: 3.5rem;
}

/* Contact form */
.contact-form { max-width: 36rem; display: grid; gap: 0.5rem; margin: 1.5rem 0; }
.contact-form label { font-family: var(--sans); font-weight: 700; margin-top: 0.75rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  font: inherit; padding: 0.7rem 0.9rem; border: 2px solid var(--line); border-radius: 6px; width: 100%; box-sizing: border-box; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--sky-mid); }
.contact-form .button { justify-self: start; margin-top: 1rem; cursor: pointer; border: 0; }
.contact-form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-error { font-family: var(--sans); background: #FBEAEA; border-left: 6px solid #B3261E; padding: 1rem 1.25rem; border-radius: 4px; color: #7A1712; }

/* Mailing list sign-up */
.signup .formkit-form { margin: 1.5rem auto; }
.signup .wrap > p { max-width: 42rem; }
