:root {
  --cream: #f7f1e3;
  --cream-panel: rgba(255, 252, 246, 0.97);
  --cream-panel-solid: #fffcf6;
  --ink: #2a0f45;
  --ink-soft: #4a3558;
  --muted: #6b5a78;
  --purple: #6b2fa0;
  --purple-hover: #5a2788;
  --slime: #7ed321;
  --slime-hover: #6bb31c;
  --amazon: #ff9900;
  --amazon-ink: #111;
  --gmail: #ea4335;
  --youtube: #ff0000;
  --instagram: #e1306c;
  --border: rgba(42, 15, 69, 0.1);
  --shadow: 0 10px 28px rgba(42, 15, 69, 0.08);
  --shadow-btn: 0 6px 16px rgba(107, 47, 160, 0.28);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1100px;
  --font-sans: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: #f7f1e3;
  background-image:
    url("assets/watermark-spa-soft.png?v=10"),
    url("assets/watermark-livro-soft.png?v=10");
  background-repeat: repeat, repeat;
  background-size: 240px, 270px;
  background-position: 0 0, 130px 170px;
  background-attachment: scroll, scroll;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Strong cream wash + desaturation — watermark blends into the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(247, 241, 227, 0.25);
}

/* Legacy fixed layer — hidden; pattern now on body */
.bg-watermark {
  display: none !important;
}

.bg-watermark::after {
  display: none !important;
  content: none;
}

.page {
  overflow-x: clip;
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.header h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.92);
}

.portrait-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 520px;
  margin: 0 auto 1.25rem;
}

.portrait {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  background: var(--cream-panel-solid);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tagline {
  margin: 0 auto 1.25rem;
  max-width: 42rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  font-weight: 500;
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.88);
}

.header .tagline,
.header p {
  background: rgba(255, 252, 246, 0.88);
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-btn);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-purple {
  background: var(--purple);
  color: #fff;
}

.btn-purple:hover {
  background: var(--purple-hover);
}

.btn-slime {
  background: var(--slime);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(126, 211, 33, 0.35);
}

.btn-slime:hover {
  background: var(--slime-hover);
}

.btn-amazon {
  background: var(--amazon);
  color: var(--amazon-ink);
  box-shadow: 0 6px 16px rgba(255, 153, 0, 0.35);
  margin-top: 0.5rem;
}

.btn-amazon:hover {
  background: #e88b00;
}

/* Panels & sections */
.section {
  margin-bottom: 1.15rem;
}

.panel {
  background: #fffcf6 !important; /* fully opaque so text stays readable */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  opacity: 1;
}

.panel h2,
.info-card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.section-lead {
  margin: -0.15rem 0 1rem;
  color: var(--muted);
}

.panel p,
.info-card p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
}

.panel p:last-child,
.info-card p:last-child {
  margin-bottom: 0;
}

/* Sobre full-width + 3-column info cards */
.info-sobre {
  margin-bottom: 1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  width: 100%;
}

.info-card {
  background: #fffcf6 !important;
  min-width: 0;
  overflow: hidden;
  height: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.25rem 1.2rem;
  min-height: 0;
}

.info-card .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.book-cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-sm);
  margin: 0 0 0.75rem;
}

.book-videos {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 0.75rem;
  width: 100%;
  min-width: 0;
}

.book-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  background: #1a1020;
  object-fit: contain;
}

.promo-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  align-items: start;
}

.promo-item {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: stretch;
}

.promo-item figcaption {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.35;
}

/* FIXED height box — ALL promos identical; no aspect-ratio dependency */
.promo-frame {
  width: 100%;
  height: 200px;          /* FIXED — no aspect-ratio dependency */
  max-height: 200px;
  min-height: 200px;
  background: #1a1020;
  border-radius: 12px;
  overflow: hidden !important;
  position: relative;
  box-shadow: 0 4px 14px rgba(42, 15, 69, 0.1);
}

/* Long book title: smaller, wraps gracefully */
.book-title {
  display: inline;
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  hyphens: auto;
}

.info-card#livro p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Contact */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}

.contact-link:hover {
  text-decoration: underline;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  min-width: 1.7rem;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
}

.icon-badge svg {
  display: block;
}

.icon-gmail {
  background: var(--gmail);
}

.icon-youtube {
  background: var(--youtube);
}

.icon-instagram {
  background: var(--instagram);
}

/* Characters */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.character-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(42, 15, 69, 0.06);
}

.character-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #efe6d4;
}

.character-card figcaption {
  padding: 0.75rem 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.character-card strong {
  font-size: 1.02rem;
  color: var(--ink);
}

.character-card span {
  font-size: 0.88rem;
  color: var(--muted);
}

/* YouTube embeds */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1a1020;
  box-shadow: 0 4px 14px rgba(42, 15, 69, 0.1);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Slide galleries */
.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.slides-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #efe6d4;
  box-shadow: 0 4px 12px rgba(42, 15, 69, 0.06);
}

/* Promo */
.promo-note {
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(107, 47, 160, 0.35);
  background: rgba(107, 47, 160, 0.06);
  text-align: center;
  color: var(--ink-soft);
  margin: 0;
}

.promo-frame video,
.promo-frame .promo-video {
  position: absolute !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
  display: block;
  border-radius: 0;
  background: #1a1020;
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: unset !important;
  max-height: none !important;
  max-width: none !important;
}

/* Footer + subtle visit counter */
.footer {
  text-align: center;
  padding: 1.35rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

.footer p {
  margin: 0 0 0.55rem;
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.88);
}

.footer-visits {
  display: flex;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.footer-visits:hover {
  opacity: 0.85;
}

.footer-visits img {
  display: block;
  height: 18px;
  width: auto;
  filter: grayscale(0.35);
}

/* Responsive */
@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

.characters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .page {
    padding: 1.5rem 1rem 2rem;
  }

  .portrait-row {
    max-width: 100%;
    gap: 0.75rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .characters-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .video-grid,
  .slides-grid,
  .promo-video-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}

/* ===== v11: navegação, acessibilidade, "Em breve", rodapé ===== */

/* Long book title in headings must wrap on narrow screens */
.panel h2 {
  overflow-wrap: anywhere;
}

/* Skip link (visible only on keyboard focus) */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 100;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
}

.skip-link:focus {
  top: 0.75rem;
}

main:focus {
  outline: none;
}

/* Visible focus for every interactive element */
a:focus-visible,
button:focus-visible,
video:focus-visible,
iframe:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}

.btn-purple:focus-visible {
  outline-color: var(--ink);
}

/* Sticky top nav */
.site-nav {
  position: sticky;
  top: 0.5rem;
  z-index: 50;
  margin: 0 auto 1.25rem;
  max-width: max-content;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0.4rem;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-nav ul::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  display: block;
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover {
  background: var(--purple);
  color: #fff;
}

/* Anchored sections land below the sticky nav */
section[id],
article[id] {
  scroll-margin-top: 4.25rem;
}

/* "Em breve" — upcoming books */
.upcoming-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.upcoming-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(107, 47, 160, 0.35);
  background: rgba(107, 47, 160, 0.05);
}

.upcoming-card strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.25;
}

.upcoming-tag {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.upcoming-date {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.upcoming-link {
  margin-top: 0.15rem;
  color: var(--purple);
  font-weight: 600;
  font-size: 0.92rem;
}

.upcoming-link:hover {
  color: var(--purple-hover);
}

/* Footer contact links */
.footer-links {
  list-style: none;
  margin: 0 auto 0.75rem;
  padding: 0.3rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  max-width: max-content;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.88);
}

.footer-links a {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--purple);
  text-decoration: underline;
}

@media (max-width: 700px) {
  .site-nav {
    max-width: 100%;
    border-radius: 14px;
  }

  .site-nav a {
    font-size: 0.86rem;
    padding: 0.35rem 0.65rem;
  }

  .upcoming-grid {
    grid-template-columns: 1fr;
  }

  /* Hint that the nav scrolls sideways */
  .site-nav ul {
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  .footer-links {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav a,
  .btn {
    transition: none;
  }
}

/* Prévias dos próximos lançamentos */
.preview-grid{display:grid;gap:1.5rem}
.preview-book{border:1px solid var(--border);border-radius:var(--radius-sm);padding:1.25rem;background:#fff}
.preview-head{display:flex;gap:1.25rem;align-items:flex-start}
.preview-head h3{font-family:var(--font-display);margin:.35rem 0 .2rem;font-size:1.5rem}
.preview-head h4{margin:1rem 0 .4rem;color:var(--purple)}
.preview-head p{color:var(--ink-soft);line-height:1.6;margin:0 0 .6rem}
.preview-cover{width:170px;height:auto;flex:0 0 170px;border-radius:8px;box-shadow:var(--shadow)}
.reader{margin-top:1rem}
.reader summary{cursor:pointer;display:inline-block;background:var(--purple);color:#fff;padding:.6rem 1.1rem;border-radius:999px;font-weight:600;box-shadow:var(--shadow-btn)}
.reader summary:hover{background:var(--purple-hover)}
.reader[open] summary{margin-bottom:1rem}
.reader-body{max-height:70vh;overflow-y:auto;padding:1.25rem 1.5rem;background:var(--cream);border-radius:var(--radius-sm);font-family:Georgia,"Times New Roman",serif;font-size:1.05rem;line-height:1.75;color:var(--ink)}
.reader-body p{text-indent:1.5em;margin:0 0 .8rem;text-align:justify}
.reader-chapter{font-family:var(--font-display);text-align:center;margin:0 0 1rem}
.reader-fig{margin:1.25rem auto;max-width:520px;text-align:center}
.reader-fig img{width:100%;height:auto;border-radius:8px}
.reader-fig figcaption{font-size:.9rem;font-style:italic;color:var(--muted);margin-top:.4rem}
@media (max-width:640px){.reader-body p{text-align:left}.preview-head{flex-direction:column}.preview-cover{width:140px;flex-basis:auto}.reader-body{padding:1rem}}
