/* 弥陀讃堂 — prototype stylesheet
   Palette:
     --paper   #EFE8DA  washi ivory
     --ink     #2B2621  sumi ink
     --indigo  #2F4858  robe indigo (primary)
     --gold    #B8905A  gilt accent
     --shu     #9C4632  muted vermillion (links / CTA)
   Type:
     Display: "Shippori Mincho" (Japanese mincho, characterful)
     Body:    "Noto Serif JP"
     Utility: "Zen Kaku Gothic New" (nav, labels, captions)
*/

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;700;800&family=Noto+Serif+JP:wght@400;500;600&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

:root {
  --paper: #EFE8DA;
  --paper-deep: #E5DCC9;
  --ink: #2B2621;
  --ink-soft: #5A5347;
  --indigo: #2F4858;
  --gold: #B8905A;
  --shu: #9C4632;
  --rule: rgba(43, 38, 33, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif JP", serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--shu); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

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

/* ---------- Layout shell ---------- */

.site {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 100vh;
}

@media (max-width: 860px) {
  .site { grid-template-columns: 1fr; }
}

/* ---------- Seal / brand mark ---------- */

.seal {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.seal img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Side nav (temple noticeboard tabs) ---------- */

.nav-rail {
  background: var(--indigo);
  color: #EFE8DA;
  padding: 2.2rem 0 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

@media (max-width: 860px) {
  .nav-rail { position: static; height: auto; padding: 1.4rem 0; }
}

.nav-rail .brand { display: flex; align-items: center; gap: 0.7rem; padding: 0 1.4rem 1.6rem; border-bottom: 1px solid rgba(239,232,218,0.2); margin-bottom: 1rem; }

.nav-rail .brand-text { font-family: "Shippori Mincho", serif; }
.nav-rail .brand-text .ja { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.06em; }
.nav-rail .brand-text .en { display: block; font-size: 0.68rem; color: var(--gold); letter-spacing: 0.08em; margin-top: 0.15rem; }

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

.tabs li a {
  display: block;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.86rem;
  color: #EFE8DA;
  padding: 0.72rem 1.4rem;
  border-left: 3px solid transparent;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.tabs li a:hover { background: rgba(239,232,218,0.08); border-left-color: var(--gold); }
.tabs li a[aria-current="page"] { background: rgba(239,232,218,0.12); border-left-color: var(--gold); color: var(--gold); font-weight: 700; }

/* ---------- Main column ---------- */

main { min-width: 0; }

.hero {
  position: relative;
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(184,144,90,0.16), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--rule);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 86%);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.hero::before { top: 1.6rem; }
.hero::after { bottom: 1.6rem; }

.hero .eyebrow {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin: 0 0 0.3rem;
  letter-spacing: 0.03em;
}

.hero .sub-en {
  font-family: "Shippori Mincho", serif;
  color: var(--indigo);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: 0.08em;
  margin: 0 0 1.6rem;
}

.hero .tagline {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 32em;
  margin: 0 auto;
}

/* ---------- Full-bleed photo hero ---------- */

.hero-photo {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--indigo);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,26,20,0.88) 0%, rgba(20,26,20,0.35) 45%, rgba(20,26,20,0.15) 70%);
}

.hero-photo .content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.2rem 3.4rem;
  max-width: 880px;
}

.hero-photo .eyebrow {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin: 0 0 1rem;
}

.hero-photo h1 {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  color: #F4EFE3;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.25;
  margin: 0 0 1.2rem;
}

.hero-photo .tagline {
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: rgba(244,239,227,0.82);
  font-size: 1rem;
  max-width: 34em;
  margin: 0 0 1.8rem;
}

/* ---------- Big statement band ---------- */

.statement {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--paper);
}

.statement p {
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.65;
  max-width: 20em;
  margin: 0 auto;
  color: var(--ink);
}

.statement .credit {
  display: block;
  margin-top: 1.6rem;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--shu);
}

/* ---------- Solid color CTA block ---------- */

.cta-block {
  background: var(--shu);
  color: #F6EDE3;
  padding: 4.5rem 2.2rem;
}

.cta-block .inner {
  max-width: 880px;
  margin: 0 auto;
}

.cta-block .eyebrow {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  color: rgba(246,237,227,0.75);
  margin: 0 0 1rem;
}

.cta-block h2 {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.4;
  margin: 0 0 2rem;
  max-width: 14em;
}

.cta-block .buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.cta-block .btn {
  border-color: #F6EDE3;
  color: #F6EDE3;
}
.cta-block .btn:hover { background: #F6EDE3; color: var(--shu); }
.cta-block .btn.solid { background: #F6EDE3; color: var(--shu); }
.cta-block .btn.solid:hover { background: transparent; color: #F6EDE3; }

.cta-block.has-image {
  position: relative;
  background-image: linear-gradient(160deg, rgba(34,31,28,0.82) 0%, rgba(34,31,28,0.55) 55%, rgba(34,31,28,0.85) 100%), url("images/juren-anraku-emaki.jpg");
  background-size: cover;
  background-position: center 30%;
}
.cta-block.has-image .eyebrow { color: rgba(246,237,227,0.85); }

/* ---------- Sections ---------- */

section { padding: 3.2rem 2rem; max-width: 880px; margin: 0 auto; }
section + section { border-top: 1px solid var(--rule); }

.section-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 1.6rem; }
.section-head .num { font-family: "Shippori Mincho", serif; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; }
.section-head h2 { font-family: "Shippori Mincho", serif; font-size: 1.7rem; margin: 0; font-weight: 700; }

/* Feature cards: 絵解き / 法話 entry points */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}

.feature-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--indigo), #1c303b);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.feature-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.feature-card .thumb .kanji {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  font-size: 3.2rem;
  color: rgba(184,144,90,0.9);
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}

.feature-card .thumb::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(239,232,218,0.18);
  pointer-events: none;
}

.feature-card .body { padding: 1.3rem 1.4rem 1.5rem; }
.feature-card h3 { font-family: "Shippori Mincho", serif; margin: 0 0 0.5rem; font-size: 1.15rem; }
.feature-card p { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 1rem; }
.feature-card .go { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.82rem; font-weight: 700; }
.feature-card .go::after { content: " →"; }

/* News list */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.news-list li {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.94rem;
}
@media (max-width: 560px) {
  .news-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}
.news-list time {
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.news-list .headline a { color: var(--ink); }
.news-list .headline a:hover { color: var(--shu); }

.more-link { display: inline-block; margin-top: 1.6rem; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.86rem; font-weight: 700; }

/* Intro / about band */
.band {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.band .inner { max-width: 880px; margin: 0 auto; padding: 3.2rem 2rem; display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.4rem; }
@media (max-width: 700px) { .band .inner { grid-template-columns: 1fr; } }
.band .portrait {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #d8cdb2, var(--paper-deep));
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.75rem; color: var(--ink-soft); text-align: center; padding: 1rem;
  overflow: hidden;
}

.band .portrait img { width: 100%; height: 100%; object-fit: cover; }
.band h2 { font-family: "Shippori Mincho", serif; font-size: 1.5rem; margin: 0 0 0.3rem; }
.band .furigana { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 1rem; }
.band p { font-size: 0.96rem; margin: 0; }

/* Donation / CTA strip */
.cta-strip {
  text-align: center;
  padding: 3.4rem 2rem;
  max-width: 880px;
  margin: 0 auto;
}
.cta-strip h2 { font-family: "Shippori Mincho", serif; font-size: 1.4rem; margin: 0 0 0.6rem; }
.cta-strip p { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 1.6rem; }
.cta-strip .buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.7rem;
  border: 1px solid var(--indigo);
  color: var(--indigo);
  text-decoration: none;
  border-radius: 2px;
}
.btn:hover { background: var(--indigo); color: var(--paper); text-decoration: none; }
.btn.solid { background: var(--indigo); color: var(--paper); }
.btn.solid:hover { background: #23394654; }

/* Footer */
footer.site-foot {
  background: var(--indigo);
  color: rgba(239,232,218,0.85);
  padding: 2.6rem 2rem 2rem;
  font-family: "Zen Kaku Gothic New", sans-serif;
}
footer.site-foot .inner { max-width: 880px; margin: 0 auto; }
footer.site-foot .name {
  font-family: "Shippori Mincho", serif;
  color: #EFE8DA;
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
footer.site-foot .name img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
footer.site-foot .social {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}
footer.site-foot .social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239,232,218,0.1);
  color: rgba(239,232,218,0.85);
  transition: background 0.15s, color 0.15s;
}
footer.site-foot .social a:hover { background: var(--gold); color: var(--indigo); text-decoration: none; }
footer.site-foot .social svg { width: 18px; height: 18px; fill: currentColor; }
footer.site-foot .legal { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: 0.78rem; padding-top: 1.2rem; border-top: 1px solid rgba(239,232,218,0.18); }
footer.site-foot .legal a { color: rgba(239,232,218,0.65); }

/* Placeholder badge for missing images (prototype only) */
.ph-note {
  font-family: "Zen Kaku Gothic New", sans-serif;
}

/* ---------- Interior page utilities ---------- */

.prose { font-size: 0.98rem; }
.prose p { margin: 0 0 1.1em; }
.prose h3 { font-family: "Shippori Mincho", serif; font-size: 1.2rem; margin: 1.8em 0 0.6em; }

.lede {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Video embeds */
.video-block { margin-bottom: 3rem; }
.video-block:last-child { margin-bottom: 0; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--rule);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-block h3 { font-family: "Shippori Mincho", serif; font-size: 1.2rem; margin: 1rem 0 0.4rem; }
.video-block p { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 0.5rem; }

/* People / member grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}
.person-card { text-align: left; }
.person-card .avatar {
  aspect-ratio: 1/1;
  background: linear-gradient(160deg, var(--indigo), #1c303b);
  margin-bottom: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-family: "Shippori Mincho", serif;
  font-size: 1.6rem;
}
.person-card h3 { font-family: "Shippori Mincho", serif; font-size: 1.05rem; margin: 0 0 0.2rem; }
.person-card .role { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.78rem; color: var(--shu); margin: 0 0 0.6rem; }
.person-card p { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.85rem; color: var(--ink-soft); }

/* Service grid (request page) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.4rem;
}
.service-card {
  background: #fff;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.service-card .thumb {
  aspect-ratio: 21/9;
  background: linear-gradient(135deg, var(--indigo), #1c303b);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.service-card .thumb .kanji {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  font-size: 1.9rem;
  color: rgba(184,144,90,0.9);
  letter-spacing: 0.2em;
}
.service-card .thumb::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(239,232,218,0.18);
  pointer-events: none;
}
.service-card .body { padding: 1.2rem 1.4rem 1.4rem; }
.service-card h3 { font-family: "Shippori Mincho", serif; font-size: 1.05rem; margin: 0 0 0.5rem; }
.service-card p { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

/* Archive year blocks */
.archive-year {
  margin-bottom: 2.8rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--rule);
}
.archive-year:last-child { border-bottom: none; }
.archive-year .era { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.78rem; color: var(--gold); letter-spacing: 0.08em; margin: 0 0 0.3rem; }
.archive-year h3 { font-family: "Shippori Mincho", serif; font-size: 1.3rem; margin: 0 0 1rem; }
.archive-year ul { list-style: none; margin: 0; padding: 0; }
.archive-year li { padding: 0.55rem 0; border-bottom: 1px dotted var(--rule); font-size: 0.92rem; }
.archive-year li a { color: var(--ink); }
.archive-year li a:hover { color: var(--shu); }
.archive-year .pdf-link { display: inline-block; margin-top: 0.8rem; font-size: 0.85rem; font-family: "Zen Kaku Gothic New", sans-serif; font-weight: 700; }

/* Timeline-style list (profile achievements) */
.timeline { margin: 0 0 2rem; padding: 0; list-style: none; }
.timeline li {
  padding: 0.7rem 0 0.7rem 1.1rem;
  border-left: 2px solid var(--rule);
  margin-left: 0.4rem;
  font-size: 0.92rem;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px; top: 1.15rem;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

/* Simple info box */
.info-box {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 1.6rem 1.8rem;
  margin: 2rem 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.92rem;
}
.info-box h3 { font-family: "Shippori Mincho", serif; font-size: 1.05rem; margin: 0 0 0.6rem; }
.page-head {
  padding: 3rem 2rem 2rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.page-head .eyebrow { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 0.78rem; letter-spacing: 0.24em; color: var(--ink-soft); margin: 0 0 0.6rem; }
.page-head h1 { font-family: "Shippori Mincho", serif; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }

/* Bold interior hero (for pillar pages: videos, eishin-howa, chokoza) */
.mini-hero {
  position: relative;
  background: linear-gradient(155deg, var(--indigo) 0%, #182731 100%);
  padding: 4rem 2.2rem 3.4rem;
  text-align: center;
  overflow: hidden;
}
.mini-hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.mini-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 18% 15%, rgba(184,144,90,0.22), transparent 45%),
                     radial-gradient(circle at 85% 85%, rgba(156,70,50,0.22), transparent 50%);
}
.mini-hero .content { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.mini-hero .eyebrow {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.78rem; letter-spacing: 0.26em;
  color: var(--gold); margin: 0 0 1rem;
}
.mini-hero h1 {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  color: #F4EFE3;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.35;
  margin: 0 0 1rem;
}
.mini-hero .tagline {
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: rgba(244,239,227,0.8);
  font-size: 0.94rem;
  max-width: 32em;
  margin: 0 auto;
}

/* Episode description snippet under timeline titles, with clamp + toggle */
.timeline li .ep-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.3rem 0 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.timeline li .ep-desc.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.timeline li .ep-desc-toggle {
  display: inline-block;
  margin-top: 0.25rem;
  background: none;
  border: none;
  padding: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--shu);
  cursor: pointer;
}
.timeline li .ep-desc-toggle:hover { text-decoration: underline; }
.timeline li { padding-bottom: 1rem; }
