/*
 * Home page only. Loaded after base.css, layout-fixes.css and home-fonts.css, and
 * scoped to `body.home-page` so nothing here can reach the other eleven pages.
 *
 * Typography follows the "Option 1" system defined in css/home-fonts.css:
 * MaruBuri (--home-font-display) sets the editorial headings and Scripture, Pretendard
 * (--home-font-ui) sets navigation, body copy, buttons, metadata and the rest of the UI.
 * Nothing below hard-codes a family — every rule reads one of those two properties.
 *
 * The hero ships with no photograph: it is a dark deep-green field built from a solid
 * base colour, two glows and a generated grain texture. When an administrator publishes
 * a photograph it is shown as itself, unveiled — see the administrator configuration
 * block above `.home-hero`.
 */

.home-page {
  --home-max: 1120px;
  --home-gutter: clamp(20px, 5vw, 56px);
  --home-gap: clamp(56px, 8vw, 104px);

  --home-rule: #ddd6c6;
  --home-sand: #f4eee2;
  --home-soft: #4c635b;       /* readable secondary ink on the paper background */
  --home-gold-deep: #7a5f21;  /* the gold, darkened until it passes AA on paper */
  --home-on-deep: #e9efea;    /* body text on the deep green hero */

  /* Pretendard is the page default; the display face is opted into per element. */
  font-family: var(--home-font-ui);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.home-page a:focus-visible,
.home-page button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ----------------------------------------------------- type system (Option 1)
 *
 * `.home-page` above already makes Pretendard the inherited default, which covers the
 * menu links, the footer and every run of body copy. The rules here are the ones that
 * have to out-specify a `font-family` coming from css/base.css, plus the explicit
 * opt-ins to the MaruBuri display face.
 *
 * Every selector is prefixed with a home-only class, and this file is linked from
 * index.html alone, so the other eleven pages are untouched either way.
 */

/* Pretendard — navigation, chrome and UI surfaces that base.css styles directly. */
.home-page .site-header,
.home-page .menu-panel,
.home-page .menu-panel a,
.home-page .menu-panel summary,
.home-page .menu-button,
.home-page .site-footer,
.home-page .skip {
  font-family: var(--home-font-ui);
}

/* Pretendard — buttons and call-to-action links. */
.home-page .button,
.home-page .home-more,
.home-page .home-hero-actions a,
.home-page .home-welcome-actions a,
.home-page .featured-sermon-actions a {
  font-family: var(--home-font-ui);
}

/* Pretendard — eyebrows, kickers, dates and every other line of metadata. */
.home-page .eyebrow,
.home-page .home-kicker,
.home-page .meta,
.home-page .status,
.home-page .home-panel-title,
.home-page .worship-slot span,
.home-page .home-paths-grid span,
.home-page .home-scripture span,
.home-page .featured-plate-note {
  font-family: var(--home-font-ui);
}

/*
 * MaruBuri — the church wordmark in the header. It is the one piece of chrome that is a
 * mark rather than a control, and base.css already sets it in a generic serif; this only
 * points that serif at the display face so the home page's masthead matches its headings.
 */
.home-page .brand {
  font-family: var(--home-font-display);
}

/* ---------------------------------------------------------------- hero
 *
 * DEEP-GREEN HERO, AND THE PUBLISHED PHOTOGRAPH — administrator / developer configuration
 * =======================================================================================
 * The first screen ships deliberately photo-free. No stock image and no stand-in
 * "church photo" is referenced anywhere; the only asset below is a generated SVG grain
 * texture (see `.home-hero::before`), inlined as a data URI.
 *
 * A CHURCH PHOTOGRAPH IS PUBLISHED FROM THE ADMIN CONSOLE, not from this file. 관리자 ▸
 * 홈 대표 사진 uploads it to `shinsung-church/hero` in Cloudinary and stores a reference
 * in `siteSettings/homepage`; `js/site/hero-photo.js` validates that reference, builds a
 * fixed Cloudinary delivery URL from it, sets the three custom properties below and marks
 * this element `data-hero-photo="true"`. A developer can do the same by hand:
 *
 *     .home-hero[data-hero-photo="true"] { --home-hero-photo: url("../img/hero.jpg"); }
 *
 * THE PHOTOGRAPH IS SHOWN AS ITSELF. It is its own layer (`.home-hero::after`, behind the
 * content), and nothing green, gold or otherwise tinted is painted over it — the veil
 * that used to sit there is gone, property and all. The layer exists only while the
 * marker is present, so an unpublished, invalid or unreadable reference leaves the hero
 * exactly as it ships: `--home-hero-base` is opaque, so the green is also what a visitor
 * sees if the photograph 404s, is slow, or has transparency.
 *
 * Hero text stays legible over an arbitrary photograph locally instead: the copy is
 * wrapped in `.home-hero-inner` and that panel — and only that panel — carries a neutral
 * backing measured to WCAG AA. See the 명암비 block below. Do not reintroduce a wash.
 *
 * A VISITOR CHANGES NONE OF THIS. There is no control in the hero and nothing is kept in
 * their browser; the focal point and the blur are the administrator's, out of Firestore.
 *
 * Optional knobs, all with working defaults:
 *
 *   --home-hero-photo-position  focal point, e.g. `50% 30%` to hold a steeple in frame.
 *   --home-hero-photo-blur      the published softness, 0–12px. `HERO_BLUR` in
 *                               `js/site/hero-photo.js` and `firestore.rules` agree.
 *   --home-hero-photo-blur-max  that ceiling, restated here so the overscan below can be
 *                               checked against it.
 *   --home-hero-photo-bleed     how far the photograph layer overscans the hero. A
 *                               Gaussian blur samples transparency roughly three radii
 *                               past the edge of its own box, so without this a soft grey
 *                               border fades in along the hero edges at full blur. It
 *                               MUST stay at least three times the blur ceiling.
 *   --home-hero-text-backing    the neutral fill of the panel the hero copy sits on over
 *                               a photograph. See the 명암비 block below before weakening
 *                               it; it is the only thing holding the type at AA.
 *   --home-hero-base            the opaque green behind everything.
 */

.home-hero {
  /* --- administrator configuration (see the block above) ------------------ */
  --home-hero-photo: none;             /* set to url("…") to publish a photograph */
  --home-hero-photo-position: center;
  --home-hero-photo-blur: 0px;
  --home-hero-photo-blur-max: 12px;
  --home-hero-photo-bleed: 40px;       /* >= 3 × --home-hero-photo-blur-max */
  --home-hero-text-backing: rgba(0, 0, 0, 0.66);
  --home-hero-base: #061a15;
  /* ----------------------------------------------------------------------- */

  position: relative;
  isolation: isolate;
  overflow: hidden;                    /* clips the overscanned, blurred photograph */
  display: grid;
  align-content: center;
  min-height: clamp(460px, 76vh, 760px);
  min-height: clamp(460px, 76svh, 760px);
  padding: clamp(76px, 13vw, 132px) var(--home-gutter) clamp(52px, 8vw, 88px);

  /*
   * The photo-free hero, and the fallback under any photograph: green, glow, gold. The
   * three stops are the exact composite the old veil produced over the base, so the hero
   * without a photograph looks precisely as it did before the veil was removed.
   */
  background-color: var(--home-hero-base);
  background-image:
    radial-gradient(118% 88% at 84% 10%, rgba(184, 151, 75, 0.30), transparent 62%),
    radial-gradient(92% 74% at 4% 96%, rgba(23, 92, 75, 0.62), transparent 64%),
    linear-gradient(158deg, #0c2e25 0%, #09261f 46%, #061a15 100%);
  background-position: center;
  background-size: auto;
  background-repeat: no-repeat;
}

/*
 * Grain + a woven hairline, so the flat gradient reads as a surface rather than a fill.
 * It is neutral (white lines over greyscale noise) and sits *below* the photograph layer,
 * so a published photograph covers it rather than being textured or tinted by it.
 */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 15px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
}

/*
 * A published photograph covers the grain completely (the layer below overscans the hero
 * and an uploaded JPEG is opaque), so the browser is spared compositing a blended noise
 * texture it could never show.
 */
.home-hero[data-hero-photo="true"]::before {
  content: none;
}

/*
 * The published photograph. Above the green fallback, below the hero content, and
 * carrying nothing but the image itself: no gradient, no veil, no tint. `cover` around
 * the stored focal point is the only crop — Cloudinary delivers the photograph whole.
 */
.home-hero[data-hero-photo="true"]::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--home-hero-photo-bleed));
  z-index: -2;
  pointer-events: none;
  background-image: var(--home-hero-photo);
  background-position: var(--home-hero-photo-position);
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(var(--home-hero-photo-blur));
}

/* ------------------------------------------------- 명암비 — legibility over a photograph
 *
 * A veil over the whole photograph is exactly what was removed, so legibility is bought
 * locally instead: the hero copy sits on a bounded panel of its own — `.home-hero-inner`,
 * written by `renderPage` for this page alone — and the photograph either side of it is
 * untouched. Nothing here paints over the image layer.
 *
 * THE PANEL CARRIES WCAG AA ON ITS OWN. The worst photograph an administrator can publish
 * is a blown-out white one, so `--home-hero-text-backing` is measured composited over pure
 * white, against every colour the hero prints — not just white text:
 *
 *   white h1            7.26:1        .lead        #e9efea   6.22:1
 *   .eyebrow  #e4d09a   4.92:1        .home-scripture #cddbd4 5.08:1
 *
 * The gold eyebrow is the binding constraint: at 12.5px it is small text, so it needs the
 * full 4.5:1, and it only reaches it from rgba(0, 0, 0, 0.637) down. 0.66 is that floor
 * with a little margin. `tests/home-hero.test.mjs` recomputes all five from this file and
 * fails on anything weaker — do not lighten it by eye.
 *
 * The type keeps a neutral shadow on top of the panel, so a stray descender over the
 * photograph is still readable, and the ghost button — which used to borrow the veil for
 * its edge — gets a white border strong enough for WCAG 1.4.11 (3:1) against the panel.
 */

/*
 * The panel is narrower than the column it sits in, so it is pinned to where that column
 * starts rather than centred in the hero: its left edge lands on the page grid, and its
 * padding matches `.home-box`, so the hero copy shares the exact left edge of the reading
 * areas below it. (`margin-inline: auto` would float it into the middle of the hero.)
 */
.home-hero[data-hero-photo="true"] .home-hero-inner {
  max-width: min(var(--home-max), 54rem);
  margin-inline: max(0px, calc((100% - var(--home-max)) / 2)) auto;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 3px;
  background: var(--home-hero-text-backing);
}

.home-hero[data-hero-photo="true"] h1,
.home-hero[data-hero-photo="true"] .eyebrow,
.home-hero[data-hero-photo="true"] .lead,
.home-hero[data-hero-photo="true"] .home-scripture {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72), 0 8px 26px rgba(0, 0, 0, 0.55);
}

.home-hero[data-hero-photo="true"] .hero-secondary {
  border-color: rgba(255, 255, 255, 0.72);
}

.home-hero[data-hero-photo="true"] .hero-secondary:hover {
  border-color: #fff;
}

.home-hero > * {
  position: relative;
  width: 100%;
  max-width: var(--home-max);
  margin-inline: auto;
}

.home-hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  color: #e4d09a;
}

.home-hero .eyebrow::after {
  content: '';
  flex: 0 1 clamp(40px, 12vw, 140px);
  height: 1px;
  background: linear-gradient(90deg, #b8974b, transparent);
}

.home-hero h1 {
  font-family: var(--home-font-display);
  font-size: clamp(2.5rem, 8.4vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 17ch;
  margin: 0.55rem 0 0;
  word-break: keep-all;
}

.home-hero .lead {
  max-width: 44ch;
  margin: 1.2rem 0 0;
  color: var(--home-on-deep);
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  line-height: 1.85;
  word-break: keep-all;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(28px, 4.5vw, 44px);
}

.home-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.8rem;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-primary {
  background: var(--gold);
  color: #0c2019;
}

.hero-primary:hover {
  background: #cbab5f;
}

.hero-secondary {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.home-scripture {
  margin: clamp(36px, 6vw, 60px) 0 0;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--home-font-display);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  font-style: italic;
  line-height: 1.8;
  color: #cddbd4;
  word-break: keep-all;
}

/*
 * The reference is metadata rather than Scripture, so it takes the UI face (set in the
 * metadata group above). Its gold is the hero eyebrow's, not the darker #c2ab74 it used
 * to be: at 0.76rem it is small text, and the lighter gold is what keeps it above 4.5:1
 * once a photograph sits behind the veil.
 */
.home-scripture span {
  display: inline-block;
  margin-left: 0.7rem;
  font-style: normal;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  color: #e4d09a;
}

/* ------------------------------------------------------------ page shell */

.home-page .page-main {
  max-width: none;
  margin: 0;
  padding: 0 0 clamp(72px, 10vw, 128px);
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--home-gutter), 1fr)
    [content-start] minmax(0, var(--home-max))
    [content-end] minmax(var(--home-gutter), 1fr)
    [full-end];
}

.home-page .page-main > * {
  grid-column: content;
}

.home-page .page-main > .home-full {
  grid-column: full;
}

.home-page .page-main > * + * {
  margin-top: var(--home-gap);
}

.home-strip-inner {
  max-width: var(--home-max);
  margin-inline: auto;
}

/* ------------------------------------------------------------- 본문 카드
 *
 * The five reading areas of the home page — 처음 오신 분, 이번 주 말씀, 교회소식,
 * 다가오는 일정, 함께한 은혜의 기록 — each sit on their own surface, so a long run of
 * body copy is bounded instead of floating on the page. Everything else stays open: the
 * hero, the 예배 시간 strip, 함께하는 길 and 오시는 길 are already their own bands, and
 * boxing them too would turn the page into a wall of cards.
 *
 * The surface is deliberately quiet. The page is ivory (--paper), so the card is the
 * plain white a sheet of paper on that page would be, held by one hairline rule and a
 * shadow low enough to read as a lift rather than a float.
 */

.home-page .home-box {
  background: #fff;
  border: 1px solid var(--home-rule);
  border-radius: 3px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 1px 2px rgba(9, 38, 31, 0.04), 0 14px 34px rgba(9, 38, 31, 0.05);
}

/* A box already draws its own edge, so its masthead does not need a second one. */
.home-page .home-box > .home-section-heading {
  border-bottom-color: var(--home-sand);
}

/*
 * Boxed areas sit closer together than the open bands do: the surface itself already
 * separates them, so the full --home-gap would leave the page feeling loose. The run is
 * 처음 오신 분 → 이번 주 말씀 → 교회소식·일정 → 교회앨범; `home-box-row` marks the one
 * section in it that is not itself a box but holds two side by side.
 */
.home-page .page-main > :is(.home-box, .home-box-row) + :is(.home-box, .home-box-row) {
  margin-top: clamp(24px, 3.5vw, 44px);
}

/* --------------------------------------------------- section mastheads */

.home-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: clamp(24px, 3.5vw, 40px);
  border-bottom: 1px solid var(--home-rule);
}

.home-kicker {
  flex: 0 0 100%;
  margin: 0 0 0.15rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--home-gold-deep);
}

.home-section-heading h2,
.home-section-heading h3 {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--home-font-display);
  font-size: clamp(1.6rem, 4vw, 2.45rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  word-break: keep-all;
}

.home-section-heading h3 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.home-more {
  align-self: center;
  flex: 0 0 auto;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gold);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-more::after {
  content: ' →';
  color: var(--home-gold-deep);
}

.home-more:hover {
  color: var(--home-gold-deep);
  border-color: var(--home-gold-deep);
}

/* ------------------------------------------------------- 예배 시간 strip */

.home-worship-strip {
  background: var(--home-sand);
  border-bottom: 1px solid var(--home-rule);
  padding: clamp(26px, 4vw, 40px) var(--home-gutter);
}

.home-worship-strip .home-strip-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  align-items: end;
  gap: clamp(16px, 2.5vw, 28px);
}

.worship-slot {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--gold);
}

.worship-slot span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--home-gold-deep);
}

.worship-slot strong {
  font-family: var(--home-font-display);
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.worship-strip-link {
  align-self: end;
  justify-self: start;
}

/* ------------------------------------------------------- 처음 오신 분 */

.home-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.home-welcome-copy h2 {
  font-family: var(--home-font-display);
  font-size: clamp(1.8rem, 4.6vw, 2.8rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  word-break: keep-all;
}

.home-welcome-copy p {
  margin: 0 0 1rem;
  max-width: 46ch;
  color: var(--home-soft);
  word-break: keep-all;
}

.home-welcome-copy .home-welcome-lead {
  font-size: 1.06rem;
  color: var(--ink);
}

.home-welcome-actions {
  display: grid;
  gap: 1px;
  background: var(--home-rule);
  border: 1px solid var(--home-rule);
}

.home-welcome-actions a {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  min-height: 78px;
  align-content: center;
  background: var(--paper);
  transition: background-color 0.2s ease;
}

.home-welcome-actions a:hover {
  background: var(--home-sand);
}

.home-welcome-actions strong {
  font-size: 1.02rem;
}

.home-welcome-actions span {
  font-size: 0.86rem;
  color: var(--home-soft);
  word-break: keep-all;
}

/* -------------------------------------------------------- 이번 주 말씀 */

.home-message-body {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.featured-sermon {
  display: grid;
  gap: clamp(18px, 2.5vw, 26px);
}

.featured-sermon-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--home-rule);
  overflow: hidden;
}

.featured-sermon-media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* No video yet: a typographic plate rather than an empty grey box. */
.featured-sermon-plate {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.9rem;
  padding: clamp(24px, 5vw, 48px);
  text-align: center;
  color: #e6ece8;
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(184, 151, 75, 0.26), transparent 65%),
    linear-gradient(160deg, #0d3027, #071d18);
}

.featured-plate-scripture {
  margin: 0;
  font-family: var(--home-font-display);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.01em;
  word-break: keep-all;
}

.featured-plate-note {
  margin: 0;
  font-size: 0.86rem;
  color: #b9cac2;
  word-break: keep-all;
}

.featured-sermon-body h3 {
  font-family: var(--home-font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  word-break: keep-all;
}

.featured-sermon-body .meta {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--home-gold-deep);
  font-weight: 650;
}

.featured-sermon-description {
  margin: 0;
  max-width: 56ch;
  color: var(--home-soft);
  white-space: pre-line;
  word-break: keep-all;
}

.featured-sermon-actions {
  margin: 1.3rem 0 0;
}

.home-past-sermons {
  border-top: 2px solid var(--gold);
  padding-top: 1.1rem;
}

.home-panel-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--home-gold-deep);
}

.home-panel-foot {
  margin: 1.1rem 0 0;
}

/* ------------------------------------------------- 교회소식 · 교회일정 */

/* Two boxes side by side; the gap is the space between two surfaces, not two columns. */
.home-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.home-page .home-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-page .home-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--home-rule);
}

.home-page .home-list-item a {
  flex: 1 1 60%;
  font-weight: 650;
  word-break: keep-all;
  transition: color 0.2s ease;
}

.home-page .home-list-item a:hover {
  color: var(--home-gold-deep);
}

.home-page .home-list-item .meta {
  flex: 0 0 auto;
  font-size: 0.84rem;
  color: var(--home-soft);
  white-space: nowrap;
}

.home-page .status {
  margin: 0;
  padding: 1.1rem 0;
  color: var(--home-soft);
  font-size: 0.94rem;
}

.home-page .status.error {
  color: #8c2f21;
}

.home-page .status-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0 1.1rem;
}

.home-page .link-button {
  appearance: none;
  border: 1px solid var(--home-rule);
  background: var(--paper);
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  font: inherit;
  font-family: var(--home-font-ui);
  font-weight: 650;
  cursor: pointer;
}

.home-page .link-button:hover {
  background: var(--home-sand);
}

/* ----------------------------------------------------------- 교회앨범 */

.album-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: clamp(8px, 1.2vw, 14px);
  width: 100%;
}

.home-page .album-thumb {
  aspect-ratio: 1 / 1;
  border-color: var(--home-rule);
}

.home-page .album-thumb img {
  transition: transform 0.45s ease;
}

.home-page .album-thumb:hover img {
  transform: scale(1.05);
}

/* ------------------------------------------------------- 함께하는 길 */

.home-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1px;
  background: var(--home-rule);
  border: 1px solid var(--home-rule);
}

.home-paths-grid a {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 158px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--paper);
  transition: background-color 0.2s ease;
}

.home-paths-grid a:hover {
  background: var(--home-sand);
}

.home-paths-grid span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--home-gold-deep);
}

.home-paths-grid strong {
  font-family: var(--home-font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 400;
  line-height: 1.45;
  word-break: keep-all;
}

/* ----------------------------------------------------------- 오시는 길 */

.home-visit {
  background: var(--home-sand);
  border-top: 1px solid var(--home-rule);
  padding: clamp(44px, 7vw, 80px) var(--home-gutter);
}

.home-visit-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.home-visit-copy h2 {
  font-family: var(--home-font-display);
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

.home-address {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  word-break: keep-all;
}

.home-phone {
  margin: 0 0 0.9rem;
  font-family: var(--home-font-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: 0.02em;
}

.home-phone a:hover {
  color: var(--home-gold-deep);
}

.home-visit-copy .meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--home-soft);
  word-break: keep-all;
}

.home-visit-links {
  display: grid;
  gap: 0.7rem;
  justify-items: stretch;
}

.home-visit-links .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.home-visit-links .button:hover {
  background: #a6873f;
}

.home-visit-links .button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.home-visit-links .button.secondary:hover {
  background: var(--paper);
}

.home-visit-links .home-more {
  justify-self: start;
  margin-top: 0.3rem;
}

/* ----------------------------------------------------------- 모바일 */

@media (max-width: 860px) {
  .home-welcome,
  .home-message-body,
  .home-visit-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  /*
   * One column of boxes, each edge to edge inside the page gutter. The corner radius and
   * the side padding both come in, so a card on a phone reads as a panel rather than a
   * narrow slip of paper.
   */
  .home-page .home-box {
    padding: clamp(20px, 5vw, 28px);
    border-radius: 2px;
  }

  .home-page .page-main > :is(.home-box, .home-box-row) + :is(.home-box, .home-box-row) {
    margin-top: clamp(20px, 5vw, 28px);
  }

  .home-visit-inner {
    align-items: start;
  }

  .home-worship-strip .home-strip-inner {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  }

  .worship-strip-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .home-hero-actions a {
    flex: 1 1 100%;
  }

  .home-page .home-list-item .meta {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page * {
    transition: none !important;
  }
}
