/**
 * common.css — 全ページ共通（変数・ヘッダー・TOP・下層ページ見出し・フッター）
 *
 * 目次
 *   1. ヘッダー
 *   2. FV
 *   3. セクション共通
 *   4. 新刊・出版実績
 *   5. 出版までの流れ
 *   6. お知らせ
 *   7. 相談CTA
 *   8. フッター
 *   9. 下層ページ見出し・パンくず
 *   10. レスポンシブ
 */

:root {
  --accent: #ff8053;
  --accent-hover: #e86d42;
  --accent-soft: #ffe8e0;
  --text: #231815;
  --text-light: #5a524e;
  --muted: #9a9291;
  --bg: #fff;
  --bg-warm: #faf9f8;
  --border: #e8e5e3;
  --border-l: #f0eeec;
  --serif: "Noto Serif JP", "Noto Serif CJK JP", serif;
  --sans: "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --grid: url("../img/grid.png");
  --centerbook: url("../img/center-book.png");
  --ring1: url("../img/ring-1.png");
  --ring2: url("../img/ring-2.png");
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  font-size: 16px;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
}

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-l);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  height: 30px;
  display: block;
}
.gnav {
  display: flex;
  gap: 30px;
  align-items: center;
}
.gnav a {
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.3s;
}
.gnav a:hover {
  color: var(--accent);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 34px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.3s;
}
.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-sm {
  padding: 11px 22px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.nav-toggle span:nth-child(1) {
  top: 16px;
}
.nav-toggle span:nth-child(2) {
  top: 22px;
}
.nav-toggle span:nth-child(3) {
  top: 28px;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== FV ===== */
.mv {
  position: relative;
  overflow: hidden;
  height: 86vh;
  height: 86svh;
  padding: 81px 20px 0;
  /* 原稿用紙の帯だけ短くする。リング・キャッチのサイズは100svh基準のまま（上下が少し帯からはみ出す） */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.2vh, 28px);
  /* リングは画面の高さから逆算（ヘッダー81px＋キャッチ＋上下の余白を引いた残り） */
  --ring: min(860px, calc(100svh - 81px - 48px), 64vw);
  background-image: var(--grid);
  background-repeat: repeat;
  background-size: 320px auto;
  background-position: center;
  border-bottom: 1px solid var(--border-l);
}
.mv h1 {
  position: absolute;
  z-index: 2;
  top: calc(81px + clamp(28px, 5vh, 64px));
  right: 6%;
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vh, 42px);
  letter-spacing: 0.2em;
  line-height: 1.75;
  white-space: nowrap;
}
.ring {
  position: relative;
  width: var(--ring);
  height: var(--ring);
  flex-shrink: 0;
}
.ring i {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.ring .r1 {
  background-image: var(--ring1);
  animation: cw 60s linear infinite;
}
.ring .r2 {
  background-image: var(--ring2);
  animation: ccw 80s linear infinite;
}
.ring .cb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28%;
  aspect-ratio: 266/188;
  transform: translate(-50%, -50%);
  background-image: var(--centerbook);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
@keyframes cw {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes ccw {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(-360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ring .r1,
  .ring .r2 {
    animation: none;
  }
}
.mv h1 .l2 {
  padding-inline-start: 2.4em;
}
@media (max-width: 760px) {
  .mv h1 .l2 {
    padding-inline-start: 0;
  }
}

/* ===== セクション共通 ===== */
section.block {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 40px;
  border-bottom: 1px solid var(--border-l);
}
.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-header h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.section-more {
  text-align: center;
  margin-top: 48px;
}
.section-more a {
  font-size: 15px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: all 0.3s;
}
.section-more a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.section-sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-more a.btn-line:hover {
  background: var(--accent);
  color: #fff;
}
.section-more a.btn-line::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 14px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.section-more a.btn-line:hover::after {
  transform: translateX(3px) rotate(45deg);
}
.section-more a.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  background: #fff;
  transition:
    background 0.3s,
    color 0.3s;
  min-width: 320px;
  padding: 18px 48px;
  font-size: 16px;
}
@media (max-width: 760px) {
  .section-more a.btn-line {
    min-width: 0;
    width: 100%;
  }
}

/* ===== 新刊・出版実績 ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}
.book {
  display: block;
  text-align: left;
  transition: transform 0.3s;
}
.book:hover {
  transform: translateY(-4px);
}
.book .cover {
  aspect-ratio: 1 / 1.45; /* 書籍の比率（四六判・A5判の中間） */
  margin-bottom: 16px;
  border-radius: 2px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.09);
  overflow: hidden;
}
.book .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 4px;
}
.book p {
  font-size: 13px;
  color: var(--muted);
}
.new .book .cover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
}
.new .badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

/* ===== 出版までの流れ ===== */
.flow-lead {
  color: var(--text-light);
  margin: -28px auto 52px;
  max-width: 640px;
  text-align: center !important;
}
.fd {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.fd .it {
  text-align: center;
  padding: 0 18px;
  position: relative;
}
.fd .ic {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.fd .ic svg {
  width: 42px;
  height: 42px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fd .it:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  left: calc(50% + 52px);
  right: calc(-50% + 52px);
  border-top: 2px dotted var(--accent);
  opacity: 0.7;
}
.fd .it .desc {
  font-size: 14px;
  text-align: left;
}
.fd .it h3 {
  font-size: 18px;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.fd .desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.95;
  text-align: left;
}
@media (max-width: 760px) {
  .fd {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }
  .fd .it {
    display: grid;
    grid-template-columns: 72px 1fr;
    column-gap: 18px;
    text-align: left;
    padding: 0;
  }
  .fd .ic {
    width: 72px;
    height: 72px;
    margin: 0;
    grid-row: span 2;
  }
  .fd .ic svg {
    width: 34px;
    height: 34px;
  }
  .fd .it h3 {
    margin: 6px 0 2px;
  }
  .fd .it:not(:last-child)::after {
    top: 76px;
    bottom: -32px;
    left: 35px;
    right: auto;
    border-top: none;
    border-left: 2px dotted var(--accent);
  }
}

/* ===== お知らせ ===== */
.news-list {
  list-style: none;
  max-width: 860px;
  margin: 0 auto;
}
.news-list li {
  border-bottom: 1px solid var(--border-l);
}
.news-list li:last-child {
  border-bottom: none;
}
.news-list a {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 22px 0;
  transition: color 0.3s;
}
.news-list a:hover {
  color: var(--accent);
}
.news-date {
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
  width: 110px;
}
.news-title {
  font-size: 16px;
  line-height: 1.7;
}

/* ===== 相談CTA ===== */
.cta {
  background: var(--bg-warm);
  padding: 88px 40px;
}
.cta-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.cta h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
}
.cta p {
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 34px;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.cta p.cta-tel,
.cta p.cta-about {
  text-align: center;
}
.cta-actions .btn {
  min-width: 320px;
  padding: 18px 48px;
  font-size: 17px;
}
@media (max-width: 760px) {
  .cta-actions .btn {
    min-width: 0;
  }
}
.cta-actions {
  margin-bottom: 0;
}

/* ===== フッター ===== */
.site-footer {
  padding: 64px 40px 26px;
  border-top: 1px solid var(--border-l);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.footer-brand .logo {
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-light);
}
.footer-nav {
  display: flex;
  gap: 52px;
}
.footer-nav h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
}
.footer-nav ul {
  list-style: none;
}
.footer-nav li {
  margin-bottom: 9px;
}
.footer-nav a {
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.3s;
}
.footer-nav a:hover {
  color: var(--accent);
}
.footer-bottom {
  text-align: center;
  padding-top: 26px;
  border-top: 1px solid var(--border-l);
}
.footer-bottom p {
  font-size: 12px;
  color: var(--muted);
}
.footer-tel {
  margin-top: 18px;
}
.footer-tel span {
  display: block;
  font-size: 13px;
  color: var(--text-light);
}
.footer-tel a {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.5;
}
.footer-tel a .num {
  display: inline;
}
.footer-tel .num {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.02em;
  margin-left: 8px;
  vertical-align: -2px;
}

/* ===== 下層ページ見出し・パンくず ===== */
.page-head {
  padding: 81px 20px 0;
  background-image: var(--grid);
  background-repeat: repeat;
  background-size: 320px auto;
  background-position: center;
  border-bottom: 1px solid var(--border-l);
}
.page-head-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px 56px;
  text-align: center;
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.page-head .section-sub {
  margin-top: 6px;
}
.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 40px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--text-light);
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb span {
  margin: 0 8px;
}

@media (max-width: 760px) {
  .page-head {
    padding-top: 59px;
    background-size: 150px auto;
  }
  .page-head-inner {
    padding: 44px 20px 40px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .breadcrumb {
    padding: 12px 20px;
  }
}

/* ===== レスポンシブ ===== */
@media (max-width: 1100px) {
  .mv {
    --ring: min(680px, calc(100svh - 81px - 48px), 64vw);
  }
  .mv h1 {
    right: 4%;
    font-size: clamp(28px, 4vh, 34px);
  }
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .new .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .header-inner {
    padding: 12px 20px;
  }
  .nav-toggle {
    display: block;
  }
  .gnav {
    position: fixed;
    top: 59px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-l);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.25s,
      transform 0.25s;
  }
  .gnav[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .gnav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-l);
  }
  .gnav a.btn {
    margin-top: 18px;
    border-bottom: none;
    padding: 15px 28px;
  }

  .mv {
    height: auto;
    min-height: auto;
    padding: 92px 0 0;
    justify-content: flex-start;
    gap: 6px;
    background-size: 150px auto;
  }
  .mv h1 {
    position: relative;
    top: auto;
    right: auto;
    writing-mode: horizontal-tb;
    text-align: center;
    font-size: 25px;
    letter-spacing: 0.1em;
    line-height: 1.75;
  }
  .ring {
    width: 420px;
    height: 420px;
  }

  section.block {
    padding: 60px 20px;
  }
  .section-header {
    margin-bottom: 36px;
  }
  .section-header h2 {
    font-size: 22px;
  }
  .book-grid,
  .new .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 18px;
  }
  .book h3 {
    font-size: 15px;
  }
  .flow-lead {
    margin: -16px auto 36px;
    font-size: 15px;
    text-align: left;
  }
  .news-list a {
    flex-direction: column;
    gap: 2px;
    padding: 18px 0;
  }
  .news-date {
    width: auto;
  }
  .cta {
    padding: 60px 20px;
  }
  .cta h2 {
    font-size: 22px;
  }
  .cta p {
    text-align: left;
  }
  .cta-actions {
    flex-direction: column;
  }
  .cta-actions a {
    width: 100%;
  }
  .site-footer {
    padding: 48px 20px 24px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 34px;
  }
  .footer-nav {
    flex-wrap: wrap;
    gap: 34px;
  }
}
