/* ================================================================
   DOODLOO — Page-Specific & Detail Styles
   For book detail pages, blog posts, lightbox, modal
   ================================================================ */

/* =========================
   BOOK DETAIL PAGE
   ========================= */
.bd-hero {
  padding: 130px 0 80px;
  background: var(--bd-color, var(--paper-warm));
  position: relative;
  overflow: hidden;
}
.bd-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='1.4' fill='%231C1B17' opacity='0.12'/%3E%3C/svg%3E");
}
.bd-hero__wrap {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 900px) {
  .bd-hero__wrap { grid-template-columns: 1fr 1fr; gap: 80px; }
}

.bd-cover {
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}
.bd-cover__img {
  aspect-ratio: 1;
  border-radius: 4px 14px 14px 4px;
  overflow: hidden;
  box-shadow:
    inset 6px 0 0 rgba(0,0,0,0.18),
    0 40px 80px -20px rgba(28,27,23,0.5),
    0 18px 36px -16px rgba(28,27,23,0.25);
  transform: rotate(-3deg);
  transition: transform 0.6s var(--ease-smooth);
}
.bd-cover__img:hover {
  transform: rotate(0deg) scale(1.02);
}
.bd-cover__img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.bd-cover__badge {
  position: absolute;
  top: -12px; right: -12px;
  background: var(--butter);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  transform: rotate(8deg);
  z-index: 2;
}

.bd-meta {
  color: var(--ink);
}
.bd-meta__crumbs {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.bd-meta__crumbs a:hover { color: var(--ink); text-decoration: underline; }
.bd-meta__crumbs span { margin: 0 8px; opacity: 0.5; }

.bd-meta__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.bd-meta__theme {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-bottom: 28px;
  font-style: italic;
}
.bd-meta__desc {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 56ch;
}
.bd-meta__rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.bd-meta__rating-stars { display: flex; gap: 2px; }

.bd-meta__price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}
.bd-meta__price {
  font-family: var(--f-display);
  font-weight: 600;
  font-variation-settings: "opsz" 144;
  font-size: 2.6rem;
  color: var(--ink);
  line-height: 1;
}
.bd-meta__price-note {
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.bd-meta__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.bd-meta__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(28,27,23,0.12);
  border-bottom: 1px solid rgba(28,27,23,0.12);
}
@media (min-width: 480px) {
  .bd-meta__specs { grid-template-columns: repeat(4, 1fr); }
}
.bd-spec-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.bd-spec-val {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
}

/* Character section */
.bd-characters {
  padding: 100px 0;
  background: var(--paper);
}
.bd-characters__head {
  max-width: 760px;
  margin-bottom: 64px;
}
.bd-characters__head h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 18px 0 16px;
}
.bd-characters__head h2 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--bd-color, var(--butter-deep));
}
.bd-characters__head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 56ch;
}

.bd-character-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: 40px;
  background: var(--paper-warm);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  align-items: center;
}
@media (min-width: 720px) {
  .bd-character-card { grid-template-columns: 0.5fr 1fr; gap: 48px; padding: 48px; }
}
.bd-character-card__img {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bd-color, var(--paper-cool));
  box-shadow: var(--shadow);
}
.bd-character-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.bd-character-card__name {
  font-family: var(--f-hand);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.bd-character-card__role {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.bd-character-card__bio {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 18px;
}
.bd-character-card__traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.bd-character-card__trait {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--paper-cool);
  border: 1px solid rgba(28,27,23,0.1);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* Sample pages section */
.bd-pages {
  padding: 100px 0;
  background: var(--paper-warm);
  position: relative;
  overflow: hidden;
}
.bd-pages__head {
  text-align: center;
  margin-bottom: 60px;
}
.bd-pages__head h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 18px 0 16px;
}
.bd-pages__head h2 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.bd-pages__head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 56ch;
  margin: 0 auto;
}
.bd-pages__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.bd-page-tile {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper-cool);
  border: 1px solid rgba(28,27,23,0.12);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
}
.bd-page-tile:nth-child(odd) { transform: rotate(-1deg); }
.bd-page-tile:nth-child(even) { transform: rotate(1deg); }
.bd-page-tile:hover {
  transform: rotate(0) translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.bd-page-tile img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: white;
}
.bd-page-tile__num {
  position: absolute;
  bottom: 12px; left: 12px;
  background: var(--paper);
  border: 1px solid rgba(28,27,23,0.1);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.bd-page-tile__zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  background: rgba(28,27,23,0.85);
  color: var(--paper);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.bd-page-tile:hover .bd-page-tile__zoom { opacity: 1; }

/* Related books section */
.bd-related {
  padding: 100px 0 140px;
  background: var(--paper);
}
.bd-related__head {
  margin-bottom: 60px;
}
.bd-related__head h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 16px 0 8px;
}
.bd-related__head h2 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.bd-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 56px 28px;
}

/* =========================
   LIGHTBOX (sample page zoom)
   ========================= */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(28, 27, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  transform: scale(0.92);
  transition: transform 0.5s var(--ease-smooth);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: 24px; right: 24px;
  width: 48px; height: 48px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  box-shadow: var(--shadow);
}
.lightbox__close:hover {
  background: var(--butter);
  transform: rotate(90deg);
}
.lightbox__caption {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: var(--paper);
  background: rgba(0,0,0,0.5);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
}

/* =========================
   BLOG ARTICLE PAGE
   ========================= */
.article {
  padding: 130px 0 100px;
  background: var(--paper);
}
.article__crumbs {
  font-size: 0.84rem;
  color: var(--ink-muted);
  margin-bottom: 28px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.article__crumbs a:hover { color: var(--ink); text-decoration: underline; }
.article__crumbs span { margin: 0 8px; opacity: 0.5; }

.article__head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: center;
}
.article__cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--butter-deep);
  margin-bottom: 18px;
}
.article__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
.article__title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.article__sub {
  font-size: 1.18rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 32px;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}
.article__meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  align-items: center;
  flex-wrap: wrap;
}
.article__meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.article__meta-author-img {
  width: 32px; height: 32px;
  background: var(--butter);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.75rem;
  font-family: var(--f-display);
}
.article__hero-img {
  max-width: 900px;
  margin: 0 auto 64px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--butter) 0%, var(--coral) 100%);
  position: relative;
  overflow: hidden;
}
.article__hero-img-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(5rem, 12vw, 8rem);
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.18));
}

.article__body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink);
}
.article__body > * + * { margin-top: 1.2em; }
.article__body p { color: var(--ink-soft); }
.article__body p:first-child::first-letter {
  font-family: var(--f-display);
  font-weight: 400;
  font-style: italic;
  font-size: 4em;
  line-height: 0.85;
  float: left;
  margin: 0.05em 0.1em -0.05em 0;
  color: var(--butter-deep);
}
.article__body h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: 2em;
}
.article__body h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 1.6em;
}
.article__body blockquote {
  margin: 2em 0;
  padding: 28px 32px;
  background: var(--paper-warm);
  border-left: 4px solid var(--butter);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink);
  line-height: 1.5;
}
.article__body ul, .article__body ol {
  padding-left: 1.4em;
  color: var(--ink-soft);
}
.article__body li { margin-bottom: 0.6em; }
.article__body li::marker { color: var(--butter-deep); font-weight: 700; }
.article__body strong { color: var(--ink); font-weight: 600; }
.article__body em { font-style: italic; }
.article__body a {
  color: var(--ink);
  border-bottom: 2px solid var(--butter);
  font-weight: 500;
  transition: background 0.2s;
}
.article__body a:hover { background: var(--butter-soft); }
.article__body code {
  background: var(--paper-warm);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.92em;
  font-family: ui-monospace, monospace;
}

.article__share {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 32px 0;
  border-top: 1px solid rgba(28,27,23,0.12);
  border-bottom: 1px solid rgba(28,27,23,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.article__share-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.article__share-buttons {
  display: flex;
  gap: 8px;
}
.article__share-btn {
  width: 40px; height: 40px;
  background: var(--paper-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: all 0.3s;
}
.article__share-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.article__author-card {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 32px;
  background: var(--paper-warm);
  border-radius: var(--radius);
  display: flex;
  gap: 20px;
  align-items: center;
}
.article__author-card-img {
  width: 64px; height: 64px;
  background: var(--butter);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.article__author-card-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.article__author-card-bio {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.article__related {
  max-width: 1200px;
  margin: 96px auto 0;
}
.article__related-head {
  text-align: center;
  margin-bottom: 48px;
}
.article__related-head h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 8px 0;
}
.article__related-head h2 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.article__related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 720px) {
  .article__related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Reading progress */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--butter);
  z-index: 100;
  transition: width 0.1s ease-out;
  width: 0;
}

/* =========================
   BLOG INDEX
   ========================= */
.blog-index {
  padding: 130px 0 100px;
}
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 720px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

/* =========================
   FAQ schema-friendly page
   ========================= */
.faq-page__intro {
  text-align: center;
  margin-bottom: 64px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.faq-categories {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.faq-cat {
  padding: 8px 18px;
  background: var(--paper-cool);
  border: 1px solid rgba(28,27,23,0.1);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.3s;
}
.faq-cat:hover, .faq-cat.is-active {
  background: var(--ink);
  color: var(--paper);
}
