/* =========================================================
   岩本教会 — サイト全体のスタイル
   色や文字はここ（:root）でまとめて変えられます
   ========================================================= */
:root {
    --bg: #fbf8f3;
    --surface: #ffffff;
    --tint: #f4eee5;
    --ink: #2f2a25;
    --muted: #6d645a;
    --line: #e6ddd0;
    --accent: #a8443a;
    --accent-dark: #8a3530;
    --accent-soft: #f7e9e5;
    --wood: #a87a4f;
    --font-body: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
    --font-head: "Zen Maru Gothic", var(--font-body);
    --radius: 14px;
    --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .06);
    --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: .02em;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.45; letter-spacing: .04em; margin: 0 0 .6em; font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.narrow-left { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
/* ページを開くと見出し（h1）にフォーカスが移る（App.razor の FocusOnNavigate：読み上げソフト向け）。枠は表示しない */
h1:focus, h1[tabindex]:focus { outline: none; }

.boot-loading { padding: 40vh 20px; text-align: center; color: var(--muted); }

/* ---------- ヘッダー ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(251, 248, 243, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff;
    display: grid; place-items: center; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-sub { font-size: .7rem; color: var(--muted); letter-spacing: .1em; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: .12em; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500;
    padding: 8px 12px; border-radius: 999px; transition: background .15s;
}
.site-nav a:hover { background: var(--tint); }
.site-nav a.active { color: var(--accent); }
.site-nav a.nav-cta { background: var(--accent); color: #fff; margin-left: 6px; padding: 8px 18px; }
.site-nav a.nav-cta:hover { background: var(--accent-dark); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button { display: none; }

@media (max-width: 860px) {
    .nav-button {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 44px; height: 44px; cursor: pointer; padding: 10px; border-radius: 10px;
    }
    .nav-button span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
    .site-nav {
        position: absolute; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 8px 16px 20px; box-shadow: var(--shadow);
        display: none;
    }
    .site-nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--line); }
    .site-nav a.nav-cta { margin: 14px 0 0; text-align: center; border-radius: 999px; border: 0; }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .nav-toggle:checked + .nav-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked + .nav-button span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked + .nav-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--accent); }
}

/* ---------- ボタン・リンク ---------- */
.btn {
    display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700;
    text-decoration: none; font-size: .95rem; transition: background .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, .15); color: #fff; border: 1.5px solid rgba(255, 255, 255, .8); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- ヒーロー ---------- */
/* トップの画像はイラスト（img/church/exterior-illust.svg）。下の芝生の色はイラストに合わせている */
.hero {
    position: relative; overflow: hidden; color: var(--ink);
    background: linear-gradient(180deg, #a9d2ee 0%, #d3e9f6 55%, #e9f2ee 100%);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px; background: linear-gradient(180deg, #82ad5c, #7aa555); }
/* イラストは文章の背景。高さは文章で決まり、イラストはその高さいっぱいに右寄せで置く */
.hero-inner { padding-top: 56px; padding-bottom: 64px; }
.hero-text { position: relative; z-index: 1; max-width: 24em; text-shadow: 0 0 10px rgba(255, 255, 255, .9), 0 0 2px rgba(255, 255, 255, .9); }
.hero-art {
    position: absolute; z-index: 0; right: 0; bottom: 0;
    height: 100%; width: auto; max-width: none; pointer-events: none;
}
@media (max-width: 1100px) { .hero-art { height: 78%; } }
@media (max-width: 760px) {
    .hero-inner { padding-top: 32px; padding-bottom: 150px; }
    .hero-text { max-width: none; }
    .hero-art { height: 190px; right: -24px; }
}
.hero-welcome { font-family: var(--font-head); letter-spacing: .3em; font-size: .95rem; margin: 0 0 .3em; color: var(--accent); font-weight: 700; }
.hero-title { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem); letter-spacing: .16em; margin: 0 0 .5em; }
.hero-title-sub { display: block; font-size: .32em; letter-spacing: .3em; font-weight: 500; }
.hero-verse { margin: 0 0 1.6em; max-width: 34em; border-left: 3px solid var(--accent); padding-left: 16px; }
.hero-verse p { margin: 0 0 .3em; font-size: clamp(.95rem, .9rem + .3vw, 1.05rem); }
.hero-verse cite { font-style: normal; font-size: .85rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .7); color: var(--ink); border-color: var(--ink); }
.hero .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- セクション ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 28px; }
.section-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 8px; }
.section-head-row h2 { margin: 0; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 .4em; }
.h-line { display: flex; align-items: center; gap: 12px; margin-top: 1.2em; }
.h-line::before { content: ""; width: 6px; height: 1.2em; border-radius: 3px; background: var(--accent); flex: none; }
.h-line:first-child { margin-top: 0; }

.page-header { background: var(--tint); padding: clamp(48px, 7vw, 80px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin-bottom: .3em; }
.page-header .lead { color: var(--muted); margin: 0; }

/* はじめての方へ */
.welcome { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.welcome-photo { margin: 0; }
.welcome-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.welcome-photo figcaption { color: var(--muted); font-size: .85rem; margin-top: 8px; text-align: center; }
@media (max-width: 760px) { .welcome { grid-template-columns: 1fr; } }

/* 礼拝カード */
.service-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.service-card { background: var(--surface); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.service-card:nth-child(2) { border-top-color: var(--wood); }
.service-card:nth-child(3) { border-top-color: #6b7f5a; }
.service-card h3 { font-size: 1.2rem; margin-bottom: .4em; }
.service-time { color: var(--muted); line-height: 1.6; }
.service-time strong { color: var(--ink); font-size: 1.5rem; font-family: var(--font-head); letter-spacing: .04em; }
.service-card p:last-child { margin: 0; font-size: .92rem; }
@media (max-width: 860px) { .service-cards { grid-template-columns: 1fr; } }

/* 2カラム */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* お知らせ・説教の短いリスト */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: flex; gap: 16px; padding: 14px 4px; color: var(--ink); text-decoration: none; }
.post-list a:hover span { color: var(--accent); }
.post-list time { color: var(--muted); font-size: .88rem; flex: none; padding-top: .1em; font-variant-numeric: tabular-nums; }

/* アルバム */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-top: 24px; }
.album-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .2s; }
.album-card:hover { transform: translateY(-3px); color: var(--ink); }
.album-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.album-card-body { display: flex; flex-direction: column; padding: 12px 16px 16px; line-height: 1.5; }
.album-card time { color: var(--muted); font-size: .82rem; }
.album-card-title { font-weight: 700; }
.album-card-count { color: var(--muted); font-size: .8rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 40px; }
.photo-grid a { display: block; border-radius: 10px; overflow: hidden; background: var(--line); }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.photo-grid a:hover img { transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15, 10, 5, .92); display: grid; place-items: center; padding: 56px 16px; outline: none; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 12px; top: 12px; font-size: 1.6rem; }
.lb-count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); margin: 0; font-size: .9rem; }

/* アクセス */
.access { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 5vw, 56px); align-items: start; }
.info-list { display: grid; grid-template-columns: 6.5em 1fr; margin: 0 0 20px; border-top: 1px solid var(--line); }
.info-list dt, .info-list dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.info-list dt { color: var(--muted); font-size: .9rem; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--line); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; }
@media (max-width: 860px) { .access { grid-template-columns: 1fr; } .map iframe { height: 320px; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--surface); border-radius: var(--radius); padding: 0 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* 集会リスト */
.meeting-list { list-style: none; margin: 0 0 24px; padding: 0; }
.meeting { display: grid; grid-template-columns: 11em 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.meeting-when { display: flex; flex-direction: column; line-height: 1.5; }
.meeting-day { color: var(--accent); font-weight: 700; font-size: .9rem; }
.meeting-time { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.meeting-body h3 { margin: 0 0 .2em; }
.meeting-body p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .meeting { grid-template-columns: 1fr; gap: 4px; } }

.callout { background: var(--accent-soft); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.callout h2 { color: var(--accent-dark); }
.callout p:last-child { margin: 0; }

/* 説教一覧 */
.year-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.year-nav a { padding: 4px 14px; border-radius: 999px; background: var(--tint); text-decoration: none; color: var(--ink); font-size: .9rem; }
.year-nav a:hover { background: var(--accent); color: #fff; }
.year-head { margin-top: 2em; }
.sermon-list { list-style: none; margin: 0; padding: 0; }
.sermon-list li { border-bottom: 1px solid var(--line); }
.sermon-list a { display: grid; grid-template-columns: 11em 1fr; column-gap: 16px; padding: 16px 4px; text-decoration: none; color: var(--ink); line-height: 1.6; }
.sermon-list time { color: var(--muted); font-size: .88rem; grid-row: span 2; padding-top: .15em; }
.sermon-title { font-weight: 700; }
.sermon-excerpt { color: var(--muted); font-size: .88rem; }
.sermon-list a:hover .sermon-title { color: var(--accent); }
@media (max-width: 600px) { .sermon-list a { grid-template-columns: 1fr; } .sermon-list time { grid-row: auto; } }

/* お知らせ一覧 */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.news-list a { display: flex; gap: 20px; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.news-list img { width: 120px; flex: none; border-radius: 8px; object-fit: cover; }
.news-body { display: flex; flex-direction: column; line-height: 1.6; }
.news-list time { color: var(--muted); font-size: .85rem; }
.news-title { font-weight: 700; font-size: 1.08rem; }
.news-event { color: var(--accent); font-size: .9rem; font-weight: 500; }
.news-excerpt { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.news-list a:hover .news-title { color: var(--accent); }

/* 本文 */
.prose { font-size: 1.04rem; line-height: 2.05; }
.prose p { margin: 0 0 1.1em; }
.prose img { border-radius: 10px; margin: 1em 0; }
.signature { text-align: right; color: var(--muted); margin-top: 2em !important; }
.event-date { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; padding: 10px 16px; border-radius: 8px; display: inline-block; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; margin-bottom: 24px; }
.pager a { display: flex; flex-direction: column; padding: 16px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); line-height: 1.5; }
.pager a small { color: var(--muted); }
.pager-next { text-align: right; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } }

/* リンク */
.link-list { list-style: none; margin: 0 0 32px; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); padding: 12px 4px; }
.link-list a { text-decoration: none; font-weight: 500; }

/* ---------- フッター ---------- */
.site-footer { background: #3a322b; color: #e9e1d6; padding: 56px 0 24px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .3em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-name { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: .6em !important; }
.footer-label { color: #d9a79f; font-weight: 700; font-size: .8rem; letter-spacing: .15em; }
.footer-time { font-family: var(--font-head); font-size: 1.3rem; color: #fff; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; align-content: start; }
.footer-nav a { text-decoration: none; color: #e9e1d6; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 40px; padding-top: 20px; color: #b7ab9c; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- SNS ---------- */
.social { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px;
    border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface);
    color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.social a:hover { border-color: var(--accent); color: var(--accent); }
.social-footer a { width: 40px; padding: 0; justify-content: center; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.social-footer a:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Blazor エラー表示 ---------- */
#blazor-error-ui {
    background: #fff4d6; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
