/* Custom styles that complement Tailwind */

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg,
    #7dd3fc 0%,
    #bae6fd 22%,
    #e0f2fe 45%,
    #fef9c3 72%,
    #fde68a 100%
  );
  background-attachment: fixed;
}

.font-nunito {
  font-family: 'Nunito', sans-serif;
}

/* Book cover hover lift */
.book-cover {
  max-width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-cover:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18);
}

/* Book viewer */
.book-viewer-container {
  user-select: none;
  min-height: 200px;
}

.book-nav-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  background: white;
  border: 2px solid #c7d2fe;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 10;
  line-height: 1;
}
.book-nav-btn:hover:not(:disabled) {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
  transform: scale(1.08);
}
.book-nav-btn:active:not(:disabled) {
  transform: scale(0.96);
}
.book-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.book-page-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.book-page-img {
  max-height: 70vh;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.15s ease;
}
.book-page-img.loading {
  opacity: 0.4;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Trust badge pills */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}
.value-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: white;
  border: 1.5px solid #c7d2fe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
}

/* Community selection tiles */
.community-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}
.community-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.1s;
  text-align: center;
  line-height: 1.2;
}
.community-tile:hover {
  border-color: #a5b4fc;
  background: #f0f4ff;
  color: #2563eb;
}
.community-tile.selected {
  border-color: #2563eb;
  background: #eef2ff;
  color: #2563eb;
}
.community-tile:active {
  transform: scale(0.97);
}
.community-tile .tile-icon {
  font-size: 22px;
  line-height: 1;
}

/* Why This Story Matters grid */
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 480px) {
  .value-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.value-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  text-align: center;
}
.value-card .value-icon {
  font-size: 28px;
}
.value-card .value-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1.3;
}

/* Partner benefit list */
.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.benefit-item .benefit-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.benefit-item .benefit-text strong {
  display: block;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}
.benefit-item .benefit-text span {
  font-size: 13px;
  color: #475569;
}

/* Testimonial placeholder cards */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.testimonial-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.testimonial-card .quote-text {
  font-size: 14px;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}
.testimonial-card .quote-author {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Slide-in reveal for visitor form step 2 */
#visitor-fields {
  transition: opacity 0.3s ease;
}
#visitor-fields.hidden {
  display: none;
}

/* Section reveal animation */
.section-reveal {
  animation: fadeInUp 0.45s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Audio player */
.audio-tip {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  padding: 4px 0 8px;
  letter-spacing: 0.01em;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  padding: 6px 0 14px;
}

.audio-play-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 9px 22px;
  font-size: 0.9rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.audio-play-btn:hover { background: #1d4ed8; }

.audio-progress-wrap {
  flex: 1;
  max-width: 200px;
  height: 5px;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.audio-progress-bar {
  height: 100%;
  width: 0%;
  background: #2563eb;
  transition: width 0.25s linear;
}

.audio-listen-start {
  text-align: center;
  padding: 2px 0 12px;
}

.audio-listen-start-btn {
  background: none;
  border: 2px solid #2563eb;
  color: #2563eb;
  border-radius: 9999px;
  padding: 7px 22px;
  font-size: 0.85rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.audio-listen-start-btn:hover {
  background: #2563eb;
  color: #fff;
}
