/* ==========================================================================
   さんとしょ ～さんわにあるみんなのとしょかん～
   Design tokens shared with ori-com.jp (オリコム本体サイト)
   ========================================================================== */

:root {
  --orange: #E8703A;
  --green:  #7DC242;
  --blue:   #5BB8F5;
  --yellow: #FBCF29;
  --dark:   #1a1a1a;
  --mid:    #666;
  --light:  #f5f2ed;
  --white:  #ffffff;

  --serif: 'Noto Serif JP', serif;
  --sans:  'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--dark);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.nav-logo .tag {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--mid);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--orange);
}
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--orange);
}

.ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.ham span { display: block; width: 22px; height: 1.5px; background: var(--dark); transition: all 0.25s; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1.4rem;
  position: fixed;
  inset: 68px 0 0 0;
  background: var(--light);
  z-index: 99;
  padding: 2.5rem 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--dark);
  font-size: 1.15rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 1.1rem;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .ham { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 1.3rem;
}
.hero h1 .accent { color: var(--orange); }
.hero p.lead {
  color: var(--mid);
  font-size: 0.96rem;
  line-height: 1.95;
  max-width: 480px;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn-primary, .btn-outline {
  display: inline-block;
  padding: 12px 26px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.87rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d05f2c; transform: translateY(-2px); }
.btn-outline { border: 1.5px solid var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; }

.hero-photo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--dark);
}
.hero-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo .slideshow { position: absolute; inset: 0; }
.hero-photo .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero-photo .slide.active { opacity: 1; }
.hero-photo .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .slide-dots {
  position: absolute;
  bottom: 1rem; right: 1rem;
  display: flex; gap: 7px;
  z-index: 2;
}
.hero-photo .slide-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.hero-photo .slide-dot.active { background: #fff; transform: scale(1.25); }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
}

/* ---------- Bookshelf motif (SVG) ---------- */
.shelf-strip {
  display: flex;
  gap: 3px;
  height: 14px;
  margin: 0 0 1.6rem;
}
.shelf-strip span { flex: 1; border-radius: 2px 2px 0 0; }
.shelf-strip span:nth-child(4n+1) { background: var(--orange); }
.shelf-strip span:nth-child(4n+2) { background: var(--yellow); }
.shelf-strip span:nth-child(4n+3) { background: var(--green); }
.shelf-strip span:nth-child(4n)   { background: var(--blue); }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
section.alt { background: var(--white); }

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--orange);
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 1.3rem;
}
.section-body { font-size: 0.92rem; color: var(--mid); line-height: 2; }
.section-body p { margin: 0 0 1.1rem; }
.section-body p:last-child { margin-bottom: 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* ---------- Info list / rule cards ---------- */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 0.9rem;
}
.info-list li:first-child { border-top: 1px solid rgba(0,0,0,0.08); }
.info-list dt {
  flex: 0 0 8.5rem;
  color: var(--mid);
  font-weight: 500;
}
.info-list dd { margin: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
.card-top { height: 6px; }
.card-orange .card-top { background: var(--orange); }
.card-green  .card-top { background: var(--green); }
.card-blue   .card-top { background: var(--blue); }
.card-body { padding: 1.9rem; }
.card-title { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; margin: 0 0 0.5rem; }
.card-text { font-size: 0.86rem; color: var(--mid); line-height: 1.85; margin: 0; }

/* ---------- Book pick cards ---------- */
.book-cover {
  aspect-ratio: 3 / 4;
  background: var(--light);
  overflow: hidden;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-header { padding: 1.7rem 1.9rem 1rem; }
.card-eyebrow {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.6rem;
  line-height: 1.5;
}
.card-period {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(232, 112, 58, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
}
.book-quote {
  margin: 0.9rem 0 0.5rem;
  padding: 0;
  border: none;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--mid);
  line-height: 1.85;
}
.book-recommender { font-size: 0.78rem; color: var(--mid); text-align: right; margin: 0; }

/* ---------- Pricing box ---------- */
.price-box {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 2.4rem 2.2rem 2.2rem;
  text-align: center;
  overflow: hidden;
}
.price-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--orange);
}
.price-box .amount { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--orange); }
.price-box .unit { font-size: 0.85rem; color: var(--mid); }

/* ---------- Numbered steps (genuine sequences only) ---------- */
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 0.9rem;
  line-height: 1.85;
}
.step-list li::before {
  content: counter(step);
  flex: 0 0 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Availability table ---------- */
.avail-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.avail-table th, .avail-table td {
  text-align: left;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.avail-table th { color: var(--mid); font-weight: 500; font-size: 0.8rem; }
.avail-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}
.avail-dot.full  { background: var(--mid); opacity: 0.35; }
.avail-dot.open  { background: var(--green); }

/* ---------- Media mentions ---------- */
.media-list {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}
.media-entry {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.6rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.media-entry:last-child { border-bottom: none; padding-bottom: 0; }
.media-date {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.media-body p { font-size: 0.92rem; color: var(--mid); line-height: 1.9; margin: 0 0 0.8rem; }
.media-link {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  border-bottom: 1px solid var(--dark);
  padding-bottom: 1px;
}
.media-link:hover { color: var(--orange); border-color: var(--orange); }
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.4rem;
}
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
@media (max-width: 600px) {
  .media-entry { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- Instagram feed widget (SnapWidget) ---------- */
.snapwidget-container {
  position: relative;
  margin-top: 1.8rem;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  max-width: 765px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 765 / 510;
}
.snapwidget-container iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.snapwidget-container:empty {
  min-height: 200px;
  background: var(--white);
  border: 1px dashed rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.snapwidget-container:empty::after {
  content: "SnapWidgetの埋め込みコードをここに設置します";
  font-size: 0.82rem;
  color: var(--mid);
}

/* ---------- SNS row ---------- */
.sns-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; }
.sns-row a {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.2s;
}
.sns-row a svg { width: 19px; height: 19px; }
.sns-row a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
.sns-row a.sns-ig:hover { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.sns-row a.sns-fb:hover { background: #1877f2; border-color: #1877f2; }
.sns-row a.sns-note:hover { background: var(--green); border-color: var(--green); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--dark);
  color: #fff;
  border-radius: 12px;
  padding: 3rem 2.5rem;
  text-align: center;
}
.cta-banner .section-title { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin: 0 0 1.6rem; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  padding: 3rem 0 2rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { font-family: var(--serif); color: #fff; font-size: 1.05rem; font-weight: 700; }
.footer-brand + p { font-size: 0.8rem; margin: 0.5rem 0 0; max-width: 320px; line-height: 1.8; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: rgba(255,255,255,0.6); font-size: 0.84rem; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.6rem;
  font-size: 0.78rem;
}
.footer-bottom a { color: rgba(255,255,255,0.55); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.footer-bottom img { height: 16px; width: auto; filter: brightness(0) invert(1); opacity: 0.7; }

@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
  .info-list dt { flex-basis: 6.5rem; }
}

/* ---------- Scroll reveal (light) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
