/* =========================================================
   Magnolia書房
   色・フォントは「Magnolia書房_ブランド素材\README.md」のロゴの決まりに合わせています。
   ここ（:root）を変えるだけで全体が変わります。
   ========================================================= */
:root {
  --bg: #FFFFFF;          /* 背景（白） */
  --bg-alt: #F6F1E7;      /* 交互の背景（生成り：ブランドの推奨背景） */
  --bg-soft: #FBF8F2;     /* さらに薄い生成り */
  --ink: #3A2A35;         /* 文字（ロゴの線・文字と同じ、深い紫がかった茶） */
  --ink-sub: #74666D;     /* 補足の文字 */
  --line: #E6DFD3;        /* 線 */
  --accent: #8D6C50;      /* アクセント（ロゴの枝の色） */
  --accent-deep: #6D513A; /* 濃いアクセント */
  --leaf: #628059;        /* 葉の色（タグなど） */
  --leaf-soft: #E6EDDF;
  --font-head: "Shippori Mincho", serif;   /* ロゴと同じ明朝 */
  --font-body: "Noto Sans JP", sans-serif;
  --font-en: "Cormorant Garamond", serif;  /* ロゴの「Magnolia」と同じ */
  --radius: 10px;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  letter-spacing: .03em;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; letter-spacing: .06em; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.container--narrow { max-width: 720px; }
.center { text-align: center; }

/* ===== ボタン ===== */
.btn {
  font: inherit;
  display: inline-block;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: .12em;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: .25s;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #241a21; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--bg-alt); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.text-link { color: var(--accent-deep); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; }
.text-link:hover { color: var(--ink); }

/* ===== ヘッダー ===== */
.header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 28px; height: auto; }
.logo__text { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; letter-spacing: .06em; }
.logo__en { font-family: var(--font-en); font-size: 1.25em; font-weight: 600; letter-spacing: .02em; margin-right: 1px; }
.nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-size: .92rem; letter-spacing: .08em; }
.nav a:hover { color: var(--accent); }
.nav__cta { border: 1px solid var(--ink); padding: 6px 18px; border-radius: 999px; }
.nav__cta:hover { background: var(--ink); color: #fff !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--ink); margin: 6px 0; }

/* ===== ファーストビュー ===== */
.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: grid; align-items: center;
  overflow: hidden;
  background: #FBF4E4;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 72px 0; }
.hero__text { grid-column: 2; }
.hero__mark { width: 44px; margin-bottom: 14px; }
.hero__label { margin: 0 0 18px; font-family: var(--font-en); font-size: 1.2rem; letter-spacing: .24em; color: var(--accent); }
.hero__title { font-size: clamp(2.1rem, 4.8vw, 3.5rem); line-height: 1.6; margin: 0 0 26px; letter-spacing: .16em; font-weight: 500; }
.hero__lead { color: var(--ink-sub); margin: 0 0 40px; }
.hero__buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__lead { color: #5e5058; }
.hero__text > * { animation: fadeUp .9s both; }
.hero__text > *:nth-child(2) { animation-delay: .1s; }
.hero__text > *:nth-child(3) { animation-delay: .2s; }
.hero__text > *:nth-child(4) { animation-delay: .35s; }
.hero__text > *:nth-child(5) { animation-delay: .5s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero__text > * { animation: none; } }

/* ===== お知らせバー ===== */
.news-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.news-bar__inner { display: flex; gap: 24px; align-items: baseline; padding: 18px 0; }
.news-bar__label { font-family: var(--font-en); color: var(--accent); letter-spacing: .2em; font-size: 1.05rem; flex-shrink: 0; }
.news-bar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .92rem; }
.news-bar__list time { color: var(--ink-sub); margin-right: 16px; font-size: .85rem; }
.news-bar__list a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* ===== セクション共通 ===== */
.section { padding: clamp(72px, 9vw, 112px) 0; }
.section--alt { background: var(--bg-alt); }
.section__label { margin: 0; font-family: var(--font-en); color: var(--accent); letter-spacing: .22em; font-size: 1.05rem; }
.section__title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 4px 0 16px; }
.section__title::after { content: ""; display: block; width: 32px; height: 1px; background: var(--accent); margin-top: 18px; }
.center .section__title::after { margin-inline: auto; }
.section__lead { color: var(--ink-sub); margin: 0 0 44px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.section__head .section__title { margin-bottom: 0; }
.section__more { white-space: nowrap; margin-bottom: 8px; }
.sub-title { font-size: 1.2rem; margin: 0 0 6px; }
.sub-title--lg { font-size: 1.4rem; }
.sub-lead { color: var(--ink-sub); margin: 0 0 28px; font-size: .95rem; }
.badge { display: inline-block; font-family: var(--font-body); font-size: .75rem; font-weight: 500; vertical-align: middle; padding: 2px 12px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); letter-spacing: .1em; }
.note { margin: 20px 0 0; font-size: .85rem; color: var(--ink-sub); }

/* 写真と文章の横並び */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split__img img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.concept__text { font-family: var(--font-head); font-size: clamp(1rem, 1.7vw, 1.12rem); line-height: 2.3; margin: 24px 0 0; }

/* 下層ページの見出し */
.page-head { padding: 72px 0 8px; }
.page-head .section__lead { margin-bottom: 24px; }

/* ===== 本 ===== */
.books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.book { text-decoration: none; position: relative; }
.book__label { position: absolute; z-index: 1; top: -8px; left: -6px; background: #b4472f; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: 2px 10px; border-radius: 3px; }
.book__vol { display: block; font-size: .75rem; color: var(--accent); letter-spacing: .1em; }
.book__cover img { object-position: top; }
.book__cover {
  aspect-ratio: 5 / 7.2;
  border-radius: 3px;
  background:
    url("../images/logo-flower-sm.png") center 28% / 34% no-repeat,
    linear-gradient(170deg, #fff 0%, var(--bg-soft) 100%);
  box-shadow: 0 10px 24px rgba(58,42,53,.10);
  display: grid; place-items: end center; text-align: center;
  padding-bottom: 18%;
  font-family: var(--font-head); font-weight: 600; color: var(--ink);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: .25s;
}
.book__cover:has(img) { background: none; padding: 0; border: 0; }
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__cover span { padding: 0 8px; line-height: 1.5; }
.book:hover .book__cover { transform: translateY(-4px); }
.book__title { margin: 10px 0 0; font-size: .85rem; text-align: center; color: var(--ink-sub); }
.book__soon { margin: 2px 0 0; font-size: .72rem; color: #b5aaa2; text-align: center; }
.count { font-family: var(--font-body); font-size: .8rem; color: var(--ink-sub); font-weight: 400; margin-left: 6px; }

.feature {
  display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: center;
  padding: 40px; background: var(--bg); border-radius: var(--radius);
}
.feature__cover { box-shadow: 0 16px 34px rgba(58,42,53,.18); }
.feature__label { margin: 0; font-size: .85rem; color: var(--ink-sub); }
.feature__title { margin: 6px 0 14px; font-size: 1.5rem; line-height: 1.6; }
.feature__title small { font-size: .7em; color: var(--ink-sub); font-weight: 500; }
.feature__body p { margin: 0 0 18px; }
#featured-book:not(:empty) + .sub-title { margin-top: 64px; }

/* ===== 写真の帯 ===== */
.photo-band { position: relative; height: clamp(280px, 38vw, 460px); overflow: hidden; }
.photo-band img { width: 100%; height: 100%; object-fit: cover; object-position: left 40%; }
.photo-band__text {
  position: absolute; z-index: 1; right: max(20px, calc((100% - var(--max)) / 2)); top: 50%; transform: translateY(-50%);
  margin: 0; color: var(--ink); font-family: var(--font-head); font-size: clamp(1.3rem, 2.8vw, 2rem); line-height: 1.9; letter-spacing: .16em;
  text-shadow: 0 0 18px rgba(255,255,255,.8);
}

/* ===== メモリアル本 ===== */
.memorial { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.memorial__sample img { border-radius: 4px; box-shadow: 0 14px 30px rgba(58,42,53,.14); }
.memorial__sample figcaption, .about__photo figcaption { margin-top: 10px; font-size: .8rem; color: var(--ink-sub); text-align: center; }
.memorial__photo img { border-radius: var(--radius); aspect-ratio: 16 / 7; object-fit: cover; width: 100%; margin-bottom: 28px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.point { display: flex; gap: 20px; align-items: flex-start; background: var(--bg-alt); border-radius: var(--radius); padding: 22px 26px; }
.point__num { font-family: var(--font-head); font-size: 1.5rem; color: var(--accent); line-height: 1.3; }
.point h3 { margin: 0 0 4px; font-size: 1.05rem; }
.point p { margin: 0; color: var(--ink-sub); font-size: .92rem; }

/* ===== 読みもの ===== */
.articles { list-style: none; margin: 0 0 56px; padding: 0; border-top: 1px solid var(--line); }
.articles a { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: .2s; }
.articles a:hover { background: var(--bg-soft); }
.articles time { color: var(--ink-sub); font-size: .85rem; }
.tag { font-size: .75rem; padding: 1px 10px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); }
.articles__title { font-family: var(--font-head); }
.magazines { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 0 0 56px; }
.magazine { padding: 24px 18px; border-top: 2px solid var(--leaf); background: var(--bg); border-radius: 0 0 var(--radius) var(--radius); }
.magazine h4 { margin: 0 0 8px; font-size: 1rem; line-height: 1.5; }
.magazine p { margin: 0; font-size: .85rem; color: var(--ink-sub); line-height: 1.7; }

/* ===== 発信先 ===== */
.channels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.channel { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.channel__name { margin: 0; font-family: var(--font-en); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.channel__name span { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 400; color: var(--ink-sub); margin-top: 4px; }
.channel__desc { margin: 0; font-size: .88rem; color: var(--ink-sub); line-height: 1.7; flex: 1; }
.soon { font-size: .8rem; color: #b5aaa2; }

/* ===== 木蓮について ===== */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.about__photo img { border-radius: var(--radius); background: #fff; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
.about__body > p { margin: 0 0 16px; }
.profile { width: 100%; border-collapse: collapse; margin-top: 28px; }
.profile th, .profile td { padding: 16px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.profile tr:first-child th, .profile tr:first-child td { border-top: 1px solid var(--line); }
.profile th { width: 26%; font-weight: 500; color: var(--ink-sub); }

/* ===== お問い合わせ ===== */
.contact { position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; width: 360px; height: 440px; right: -60px; bottom: -40px;
  background: url("../images/logo-flower.png") center / contain no-repeat; opacity: .12; pointer-events: none;
}
.contact .container { position: relative; }
.form { display: grid; gap: 22px; margin-top: 8px; background: var(--bg); padding: 40px; border-radius: var(--radius); }
.form__row { display: grid; gap: 6px; }
.form label { font-weight: 500; }
.req { font-size: .72rem; background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px; font: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form .is-invalid { border-color: #b4472f; }
.form__error { margin: 0; color: #b4472f; font-size: .85rem; min-height: 1em; }
.form__result { margin: 0; text-align: center; font-weight: 500; }
.form__result.ok { color: var(--leaf); }
.form__result.ng { color: #b4472f; }
.hp { position: absolute; left: -9999px; }

/* ===== フッター ===== */
.footer { background: var(--bg); border-top: 1px solid var(--line); text-align: center; padding: 56px 0 32px; font-size: .8rem; color: var(--ink-sub); }
.footer p { margin: 0; }
.footer__logo-img { width: 120px; margin: 0 auto 20px; }
.footer__logo { font-family: var(--font-head); font-size: 1.1rem; color: var(--ink); margin-bottom: 6px !important; }
.footer__links { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer__links:empty { display: none; }
.footer__links a { text-decoration: none; font-family: var(--font-en); font-size: 1rem; letter-spacing: .05em; }

/* ===== タブレット ===== */
@media (max-width: 960px) {
  .books { grid-template-columns: repeat(3, 1fr); }
  .magazines { grid-template-columns: repeat(3, 1fr); }
  .channels { grid-template-columns: repeat(2, 1fr); }
  .memorial { grid-template-columns: 220px 1fr; gap: 32px; }
  .about { grid-template-columns: 240px 1fr; gap: 36px; }
}

/* ===== スマホ（幅768px以下） ===== */
@media (max-width: 768px) {
  .sp-none { display: none; }
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 20px 24px; align-items: stretch; }
  .nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { text-align: center; margin-top: 16px; border-bottom: 1px solid var(--ink) !important; }

  /* スマホ：絵を上に、文章を下に */
  .hero { display: block; min-height: 0; }
  .hero__bg { position: static; height: 280px; object-position: 8% center; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; padding: 36px 0 56px; }
  .hero__text { grid-column: 1; }
  .hero__mark { display: none; }
  .hero__buttons { justify-content: center; }

  .section__title::after { margin-inline: auto; }
  .section__label, .section__title, .section__lead, .sub-title, .sub-lead { text-align: center; }
  .section__head { flex-direction: column; align-items: center; gap: 8px; }
  .news-bar__inner { flex-direction: column; gap: 4px; }
  .news-bar__list time { display: block; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .concept__text { font-size: .95rem; letter-spacing: 0; text-align: center; }

  .books { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .feature { grid-template-columns: 1fr; padding: 28px 22px; gap: 24px; }
  .feature__cover { width: 170px; margin-inline: auto; }

  .photo-band { height: 300px; }
  .photo-band img { object-position: 12% center; }
  .photo-band__text { right: 16px; top: 8%; transform: none; text-align: right; font-size: 1.05rem; }

  .memorial { grid-template-columns: 1fr; }
  .memorial__sample { width: 70%; margin-inline: auto; }
  .point { padding: 20px; }

  .magazines { grid-template-columns: 1fr 1fr; gap: 12px; }
  .channels { grid-template-columns: 1fr; }

  .about { grid-template-columns: 1fr; gap: 28px; }
  .about__photo { width: 220px; margin-inline: auto; }
  .profile th, .profile td { display: block; width: 100%; padding: 4px 0; border: 0 !important; }
  .profile th { padding-top: 14px; }
  .profile tr { border-bottom: 1px solid var(--line); display: block; padding-bottom: 12px; }

  .form { padding: 26px 20px; }
  .contact::before { width: 200px; height: 240px; right: -50px; }
}
