/* ==========================================================================
   Components
   ========================================================================== */

/* ==========================================================================
   MASTHEAD — centred, bulletin-style. Nav links are always visible at every
   breakpoint (no hamburger); they wrap onto further lines on narrow screens.
   ========================================================================== */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--ivory);
}
.masthead__rule {
  height: 3px;
  background: var(--gold);
}
.masthead__inner {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) 0;
  text-align: center;
}

.wordmark {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
}
.wordmark__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.wordmark__sub {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.wordmark:hover .wordmark__name { color: var(--gold-deep); }
.wordmark__name,
.wordmark:hover .wordmark__name { transition: color var(--dur-fast) var(--ease); }

/* Nav — always open, wraps rather than collapsing */
.site-nav { margin-top: clamp(1.25rem, 3vw, 1.85rem); }
.site-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.35rem, 2.2vw, 2.1rem);
  padding-bottom: 0.9rem;
}
.site-nav__link {
  position: relative;
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  /* Vertical padding keeps the tap target at the 44px accessibility minimum. */
  padding: 0.85rem 0.55rem;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur-med) var(--ease);
}
.site-nav__link:hover { color: var(--ink); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--gold-deep); }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (max-width: 420px) {
  .site-nav__link { font-size: 0.72rem; letter-spacing: 0.1em; padding-inline: 0.45rem; }
}

/* ==========================================================================
   SCRIPTURE BLOCK — the site's signature component.
   Identical markup and styling on every page. Echoes the way verbatim
   scripture is boxed in the sermon documents.
   ========================================================================== */
.scripture {
  background: var(--sand);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.5rem);
  max-width: var(--measure-wide);
  margin-inline: auto;
  text-align: center;
  position: relative;
}
.scripture::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: clamp(4rem, 20%, 7rem);
  height: 3px;
  background: var(--gold);
}
.scripture__text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-scripture);
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  text-wrap: pretty;
}
.scripture__ref {
  margin: 1.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.scripture__ref span {
  color: var(--ink-faint);
  font-weight: 500;
}

/* ==========================================================================
   Buttons & links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 1.05em 2.1em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.btn-primary {
  background: var(--gold);
  color: #241c10;
}
.btn-primary:hover {
  background: var(--gold-deep);
  color: var(--ivory-raised);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.btn-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-deep); }

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-deep);
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--rule-strong);
  transition: gap var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.link-cta:hover { gap: 0.85em; border-color: var(--gold-deep); color: var(--ink); }

/* Inline text link inside prose */
.prose a, .text-link {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-pale);
  transition: border-color var(--dur-fast) var(--ease);
}
.prose a:hover, .text-link:hover { border-color: var(--gold-deep); }

/* ==========================================================================
   Page hero — text-only variant (kept for pages without a photograph)
   ========================================================================== */
.page-hero {
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.page-hero__title { margin-top: 1.1rem; }
.page-hero__lede {
  margin: 1.75rem auto 0;
  max-width: var(--measure);
}

/* ==========================================================================
   PHOTOGRAPHIC HERO
   A full-bleed image with the headline over it. Photography appears at the
   top of a page only — the reading sections below stay on ivory.
   The scrim is a warm brown rather than neutral black so the gold accent and
   the ivory page beneath it stay in the same family.
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  background: #2a2116;
  text-align: center;
}

/* Home: tall. Inner pages: a shorter band. */
.hero--tall { min-height: clamp(30rem, 78vh, 46rem); }
.hero--band { min-height: clamp(17rem, 42vh, 24rem); }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Warm scrim — dark enough for white text at AA, light enough to keep the
   photograph readable as a photograph. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(26, 20, 12, 0.62) 0%,
      rgba(26, 20, 12, 0.48) 45%,
      rgba(26, 20, 12, 0.72) 100%);
}
/* Hairline of gold where the photograph meets the page */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--gold);
}

.hero__inner {
  position: relative;
  padding-block: clamp(4rem, 12vw, 7rem);
}

.hero__eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft, #e2bd72);
}

.hero__title {
  margin-top: 1.35rem;
  color: #fdfaf4;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 1.8rem + 4.2vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 24px rgba(20, 14, 8, 0.5);
}
.hero--band .hero__title {
  font-size: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
}

.hero__lede {
  margin: 1.6rem auto 0;
  max-width: 34rem;
  color: rgba(253, 250, 244, 0.92);
  font-size: var(--text-lede);
  line-height: 1.6;
  text-shadow: 0 1px 16px rgba(20, 14, 8, 0.45);
}

.hero__actions {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* On a photograph, the outline button needs a light border to stay visible */
.hero__actions .btn-ghost {
  border-color: rgba(253, 250, 244, 0.55);
  color: #fdfaf4;
}
.hero__actions .btn-ghost:hover {
  border-color: #fdfaf4;
  background: rgba(253, 250, 244, 0.1);
  color: #fdfaf4;
}

/* ==========================================================================
   Cards, panels, image slots
   ========================================================================== */
.card {
  background: var(--ivory-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.image-slot {
  background: var(--sand);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  position: relative;
  overflow: hidden;
}
.image-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, var(--rule) 0 1px, transparent 1px 20px);
  opacity: 0.45;
}
.image-slot__label {
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--ivory-raised);
  padding: 0.5em 0.9em;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

/* ==========================================================================
   Home — the three-line strip
   ========================================================================== */
.triad {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  text-align: center;
}
.triad p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
}
.triad__mark {
  display: block;
  width: 7px; height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  margin: 0 auto 1.4rem;
}

/* ==========================================================================
   Beliefs
   ========================================================================== */
.belief {
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
}
.belief:last-child { border-bottom: none; }
.belief h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.625rem);
  margin-bottom: 0.75rem;
}
.belief p { color: var(--ink-soft); font-size: var(--text-body-lg); margin: 0; }

@media (min-width: 860px) {
  .belief {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: var(--space-4);
    align-items: start;
  }
  .belief h3 { margin-bottom: 0; }
}

/* ==========================================================================
   Leadership
   ========================================================================== */
.leaders {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.leader { text-align: center; }
.leader__portrait {
  aspect-ratio: 1 / 1;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  min-height: 0;
}
.leader__portrait .image-slot__label { font-size: 0.6rem; }
.leader__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0;
}
.leader__role {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.leader__bio {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 1.05em 1.2em;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.92rem;
}
th {
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--gold-deep);
  background: var(--sand);
}
td { color: var(--ink); }
tr:last-child td { border-bottom: none; }
td a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid var(--gold-pale); }
td a:hover { border-color: var(--gold-deep); }

.schedule-table td:first-child {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  white-space: nowrap;
}

/* ==========================================================================
   Order of Service
   ========================================================================== */
.order-list { list-style: none; max-width: var(--measure); margin-inline: auto; }
.order-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--rule);
}
.order-list li:last-child { border-bottom: none; }
.order-num {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  width: 1.75rem;
}
.order-item__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1.3;
}
.order-item__by {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ==========================================================================
   Getting here — walking map + numbered directions
   ========================================================================== */
.map-figure {
  margin: 0;
  max-width: var(--measure-wide);
  margin-inline: auto;
}
/* On a phone the map would shrink until its labels were unreadable, so it
   keeps a legible minimum width and scrolls inside its own box instead —
   a swipe, never a pinch-zoom. The page body never scrolls sideways. */
.map-figure__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.map-figure__scroll svg {
  display: block;
  width: 100%;
  min-width: 34rem;
  height: auto;
}
.map-figure figcaption {
  margin-top: 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
}

.steps {
  list-style: none;
  counter-reset: step;
  max-width: var(--measure);
  margin-inline: auto;
}
.steps li {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--text-body-lg);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 1.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.steps strong { color: var(--ink); font-weight: 600; }

/* Access note — quiet, but must not be missed */
.access-note {
  max-width: var(--measure);
  margin: var(--space-4) auto 0;
  padding: var(--space-3);
  background: var(--sand);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--ink-soft);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: var(--space-3); }
.field label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--ivory-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.9em 1.05em;
  resize: vertical;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.form-note {
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--ink-faint);
  margin-top: var(--space-2);
}
.form-note a { color: var(--gold-deep); }

/* ==========================================================================
   Journal
   ========================================================================== */
.journal-entry {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure-wide);
  margin-inline: auto;
}
.journal-entry:last-child { border-bottom: none; }
.journal-entry__date {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0;
}
.journal-entry__title { margin-top: 0.7rem; font-size: var(--text-h3); }
.journal-entry__body { margin-top: 1rem; font-size: var(--text-body-lg); color: var(--ink-soft); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: var(--space-7);
  background: var(--sand);
  border-top: 1px solid var(--rule-strong);
  padding-block: var(--space-5) var(--space-3);
}
.site-footer__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}
.site-footer__sub {
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.site-footer h4 {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.85rem;
}
.site-footer p, .site-footer a {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { color: var(--gold-deep); border-color: var(--gold-deep); }
.site-footer__ko { color: var(--ink-faint); }

.site-footer__bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule-strong);
}
/* One quiet line tying this service to the Korean parent congregation */
.site-footer__parent { margin: 0 0 1rem; }
.site-footer__parent a { border-bottom: 1px solid var(--rule-strong); }
.site-footer__parent span { color: var(--ink-faint); font-size: 0.8rem; }

/* NIV attribution — legal requirement, deliberately quiet */
.niv-attribution {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 46rem;
  margin: 0 0 1rem;
}
.site-footer__copyright {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin: 0;
}
