/* ==========================================================================
   KAC v2 — HOME PAGE
   ========================================================================== */

/* -- HERO ------------------------------------------------------------------ */
.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.home-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(244, 239, 231, 0.55) 0%,
    rgba(244, 239, 231, 0.70) 50%,
    rgba(244, 239, 231, 0.92) 100%);
}
.home-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) sepia(0.08);
}
.home-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--rhythm) * 1.4) var(--gutter) var(--rhythm);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 56px;
}
.home-hero__display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 64px);
  line-height: 1.12;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  max-width: 24ch;
}
.home-hero__display em,
.home-hero__display .home-hero__emph {
  font-style: normal;
  color: var(--brass);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.home-hero__meta {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 36px;
  border-top: 1px solid var(--hairline-2);
  min-width: 0;
}
.home-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 720px) {
  .home-hero { min-height: 100vh; min-height: 100svh; }
  .home-hero__inner { padding: calc(var(--rhythm) * 1.1) var(--gutter) calc(var(--rhythm) * 0.9); gap: 40px; }
  .home-hero__meta { padding-top: 28px; gap: 16px; }
  .home-hero__actions { gap: 10px; flex-wrap: wrap; max-width: 100%; }
}

/* -- HOUSE OPENING --------------------------------------------------------- */
.opening {
  padding: var(--breath) 0;
  text-align: center;
}
.opening__scripture {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.25;
  color: var(--ink);
  max-width: 22ch;
  margin: 0 auto 32px;
  letter-spacing: -0.008em;
}
.opening__ref {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

/* -- OPENING · PINNED (sequential phrase reveal) ---------------------------
   Tier 1A. Opt-in via .opening--pinned. The reader scrolls into a tall,
   centred frame; phrases fade in one beat at a time at reading pace, then
   the reference resolves. No JS scroll-pinning — vertical breathing room
   does the pin. No layout shift — only opacity + small translateY animate. */
.opening--pinned {
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--rhythm) 0;
}
.opening--pinned .wrap--narrow {
  width: 100%;
}
.opening__scripture--phrased {
  display: block;
  /* phrases are inline-block so they wrap as a paragraph but animate individually */
}
.opening__scripture--phrased .opening__phrase {
  display: inline;
  /* one space between phrases, preserved naturally by whitespace in HTML */
}
.opening--pinned .opening__phrase {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1100ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.opening--pinned.is-revealing .opening__phrase[data-phrase="1"] { transition-delay: 0ms;    }
.opening--pinned.is-revealing .opening__phrase[data-phrase="2"] { transition-delay: 900ms;  }
.opening--pinned.is-revealing .opening__phrase[data-phrase="3"] { transition-delay: 1800ms; }
.opening--pinned.is-revealing .opening__phrase[data-phrase="4"] { transition-delay: 2900ms; }
.opening--pinned.is-revealing .opening__phrase {
  opacity: 1;
  transform: translateY(0);
}
/* The reference sits below and gets its own quieter resolve */
.opening--pinned .opening__ref.opening__phrase {
  display: block;
  margin-top: 32px;
}

/* Reduced motion: everything visible at once, no animation */
@media (prefers-reduced-motion: reduce) {
  .opening--pinned .opening__phrase {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile: keep the vertical breath but tame the height so we don't push
   the user to scroll back — 70vh feels right at 375px */
@media (max-width: 720px) {
  .opening--pinned {
    min-height: 70vh;
  }
}

/* -- TWO-COLUMN PROSE (the house / who we are) ---------------------------- */
.intro {
  padding: var(--rhythm) 0;
  border-top: 1px solid var(--hairline);
}
.intro__inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.intro__label .eyebrow { margin: 0; }
.intro__body p {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink);
  max-width: 38ch;
  margin: 0 0 1em;
}
.intro__body p:last-child { margin-bottom: 0; }
.intro__body p .pull { font-style: normal; color: var(--brass); }
.intro__cta { margin-top: 32px; }

@media (max-width: 900px) {
  .intro__inner { grid-template-columns: 1fr; gap: 24px; }
}

/* -- PREVIEW CARDS (network preview, watch preview) ----------------------- */
.preview {
  padding: var(--rhythm) 0;
  border-top: 1px solid var(--hairline);
}
.preview__header {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 56px;
}
.preview__header h2 { max-width: 18ch; }
.preview__view-all {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--brass);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.preview__view-all:hover { color: var(--brass-ink); border-color: var(--brass-ink); }
@media (max-width: 720px) {
  .preview__header { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 40px; }
}

/* -- Network directory (typographic, no map) ------------------------------- */
.netmap {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.netdir {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--hairline-2);
}
.netdir__col {
  padding: 48px 40px;
  border-right: 1px solid var(--hairline);
}
.netdir__col:last-child { border-right: 0; }
.netdir__region {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline-2);
}
.netdir__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.netdir__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  line-height: 1.2;
}
.netdir__city { letter-spacing: -0.005em; }
.netdir__note {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}
@media (max-width: 900px) {
  .netdir { grid-template-columns: 1fr; }
  .netdir__col { border-right: 0; border-bottom: 1px solid var(--hairline); padding: 36px 28px; }
  .netdir__col:last-child { border-bottom: 0; }
  .netdir__list li { font-size: 21px; }
}

.netmap__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 56px;
  background: var(--hairline-2);
  border: 1px solid var(--hairline-2);
}
.netmap__stat {
  background: var(--paper);
  padding: 32px 28px;
  text-align: left;
}
.netmap__stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
}
.netmap__stat-label {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}
@media (max-width: 720px) {
  .netmap__stats { grid-template-columns: 1fr; }
  .netmap__stat-number { font-size: 40px; }
}

/* -- NETWORK MAP VIDEO (home variant) -------------------------------------- */
.netmap-video {
  position: relative;
  margin-top: 48px;
  background: var(--cloister);
  border-radius: 4px;
  overflow: hidden;
}
.netmap-video__inner {
  position: relative;
  height: 62vh;
  min-height: 480px;
  max-height: 720px;
  overflow: hidden;
}
.netmap-video__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* Poster fallback so the user never sees a black box if play() is delayed. */
  background-image: url('../videos/network-map-poster.jpg');
  background-size: cover;
  background-position: center;
}
.netmap-video__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 14, 0.25) 0%, rgba(20, 18, 14, 0.65) 100%);
  z-index: 1;
}
.netmap-video__stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: flex-end;
  height: 100%;
  padding: 0 var(--gutter) 96px;
  gap: 24px;
  background: transparent;
  border: 0;
  margin: 0;
}
.netmap-video__stats .netmap__stat {
  background: transparent;
  padding: 0;
  color: var(--paper);
}
.netmap-video__stats .netmap__stat-number {
  color: var(--paper);
  font-size: 44px;
}
.netmap-video__stats .netmap__stat-label {
  color: rgba(244, 239, 231, 0.72);
}
.netmap-video__cta {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.netmap-video__cta .pill--ghost {
  border-color: rgba(244, 239, 231, 0.55);
  color: var(--paper);
  background: rgba(20, 18, 14, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.netmap-video__cta .pill--ghost:hover {
  border-color: var(--paper);
  color: var(--paper);
  background: rgba(182, 56, 57, 0.6);
}
@media (max-width: 720px) {
  .netmap-video__inner { height: auto; min-height: 540px; }
  .netmap-video__stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 36px var(--gutter) 96px;
    row-gap: 28px;
    column-gap: 18px;
  }
  .netmap-video__stats .netmap__stat-number { font-size: 36px; }
  .netmap-video__cta { bottom: 22px; }
}

/* -- EXPRESSIONS — EDITORIAL CARDS ---------------------------------------- */
.expressions {
  max-width: var(--col-wide, 1320px);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.expression {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--t-med) var(--ease);
}
.expression__card {
  position: relative;
  margin: 0;
  aspect-ratio: 5 / 8;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(31, 26, 20, 0.08);
  border-radius: 2px;
  transition: border-color var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.expression__card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--t-slow, 600ms) var(--ease);
}
.expression__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}
.expression__label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease);
}
.expression__tagline {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink-soft);
}
.expression:hover .expression__card {
  border-color: var(--kac-red);
  box-shadow: 0 14px 40px -22px rgba(31, 26, 20, 0.35);
}
.expression:hover .expression__card img {
  transform: scale(1.02);
}
.expression:hover .expression__label {
  color: var(--kac-red);
}
.expression:focus-visible {
  outline: none;
}
.expression:focus-visible .expression__card {
  border-color: var(--kac-red);
  box-shadow: 0 0 0 2px var(--kac-red);
}

@media (max-width: 1100px) {
  .expressions { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .expression:nth-child(4), .expression:nth-child(5) { /* 2nd row */ }
}
/* Desktop / tablet: hide mobile-only carousel chrome */
.expressions__swipe-hint { display: none; }
.expressions__dots { display: none; }

/* MOBILE: horizontal swipe carousel for the five expressions */
@media (max-width: 720px) {
  .expressions-section .preview__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .expressions__swipe-hint {
    display: inline-block;
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
    opacity: 0.7;
    padding: 4px 0;
    transition: opacity .4s ease;
  }
  .expressions-section.has-swiped .expressions__swipe-hint {
    opacity: 0;
    pointer-events: none;
  }

  .expressions {
    display: flex;
    grid-template-columns: none;
    gap: 16px;
    padding: 8px 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* peek of next card on the right — left padding matches site gutter, right padding leaves room */
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    scroll-padding-left: var(--gutter);
  }
  .expressions::-webkit-scrollbar { display: none; }

  .expression {
    flex: 0 0 78%;
    max-width: 320px;
    scroll-snap-align: start;
    gap: 14px;
  }
  .expression__card { aspect-ratio: 5 / 7; }
  .expression__tagline { font-size: 17px; }

  .expressions__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 22px auto 0;
  }
  .expressions__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(31, 26, 20, 0.18);
    transition: background .25s ease, transform .25s ease, width .25s ease;
  }
  .expressions__dot.is-active {
    background: var(--ink);
    width: 22px;
    border-radius: 3px;
  }
}

/* -- TEACHING PREVIEW ------------------------------------------------------ */
.teaching {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.teaching__inner {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 64px;
  align-items: start;
}
.teaching__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  overflow: hidden;
}
.teaching__visual img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.10);
}
.teaching__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--paper);
}
.teaching__play-circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 231, 0.65);
  background: rgba(31, 26, 20, 0.18);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}
.teaching__play:hover .teaching__play-circle {
  background: rgba(31, 26, 20, 0.35);
  border-color: var(--paper);
}
.teaching__play-circle svg { width: 24px; height: 24px; margin-left: 4px; }

.teaching__meta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
}
.teaching__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.teaching__credits {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.teaching__credits .sep { color: var(--mist); }
.teaching__excerpt {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0;
}
.teaching__series {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.teaching__series-label {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 12px;
}
.teaching__series-name {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 24px;
  color: var(--brass);
  margin: 0;
}

@media (max-width: 900px) {
  .teaching__inner { grid-template-columns: 1fr; gap: 32px; }
  .teaching__play-circle { width: 72px; height: 72px; }
}

/* -- TEACHING PREVIEW: link wrapper + play overlay tweaks ------------------ */
.teaching__inner--link {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 64px;
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--t-med) var(--ease);
}
.teaching__inner--link:hover { opacity: 0.92; }
.teaching__inner--link .teaching__play {
  pointer-events: none;
}
@media (max-width: 900px) {
  .teaching__inner--link { grid-template-columns: 1fr; gap: 32px; }
}

/* -- TEACHING PREVIEW: “Also recent” secondary row ------------------------ */
.teaching-also-row {
  max-width: var(--col);
  margin: 56px auto 0;
  padding: 32px var(--gutter) 0;
  border-top: 1px solid var(--hairline);
}
.teaching-also-row__label {
  margin: 0 0 20px;
}
.teaching-also-row__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.teaching-also {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: opacity var(--t-med) var(--ease);
}
.teaching-also:hover { opacity: 0.85; }
.teaching-also__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  overflow: hidden;
  border-radius: 2px;
}
.teaching-also__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.10);
}
.teaching-also__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.teaching-also__meta {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.teaching-also__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 900px) {
  .teaching-also-row__items { grid-template-columns: 1fr; gap: 20px; }
  .teaching-also { grid-template-columns: 120px 1fr; }
}

/* -- VISIT INVITATION ------------------------------------------------------ */
.invite {
  padding: var(--breath) 0;
  margin-top: var(--rhythm);
  background: var(--cloister);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.invite__inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.invite__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.018em;
  color: var(--paper);
  margin: 0 0 32px;
}
.invite__heading em { font-style: normal; color: var(--brass-soft); }
.invite__lede {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--paper-2);
  margin: 0 0 40px;
  max-width: 36ch;
}
.invite__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.invite__times {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 48px;
  background: rgba(244, 239, 231, 0.04);
  border: 1px solid rgba(244, 239, 231, 0.10);
  border-radius: 2px;
}
.invite__time {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(244, 239, 231, 0.10);
}
.invite__time:last-child { border-bottom: 0; padding-bottom: 0; }
.invite__time-label {
  font-family: var(--font-body);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-soft);
}
.invite__time-when {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--paper);
  letter-spacing: -0.005em;
}
.invite__time-note {
  font-size: 14px;
  color: var(--mist);
  margin: 0;
}

@media (max-width: 900px) {
  .invite__inner { grid-template-columns: 1fr; gap: 48px; }
  .invite__times { padding: 32px; }
  .invite__actions { flex-direction: column; }
  .invite__actions .pill { width: 100%; justify-content: center; }
}
