/* Before the Scalpel — Zen Warrior theme refinements */

/* Header glass on scroll */
#site-header.scrolled {
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(164, 187, 163, 0.25);
  box-shadow: 0 1px 24px -8px rgba(26, 46, 36, 0.08);
}

.dark #site-header.scrolled {
  background: rgba(10, 18, 14, 0.9);
  border-bottom-color: rgba(54, 76, 54, 0.5);
}

/* Author title hierarchy — medical first, then Zen Artist */
.author-title-line {
  position: relative;
  padding-left: 0.85rem;
  border-left: 2px solid rgba(196, 163, 90, 0.45);
}

.dark .author-title-line {
  border-left-color: rgba(212, 184, 114, 0.4);
}

.author-title-zen {
  padding-left: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a8863f;
  font-weight: 500;
  margin-bottom: 1rem;
}

.dark .section-label {
  color: #d4b872;
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* Cards */
.theme-card {
  padding: 1.75rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(201, 215, 201, 0.6);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.dark .theme-card {
  background: rgba(20, 35, 28, 0.55);
  border-color: rgba(54, 76, 54, 0.45);
}

.theme-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px -16px rgba(26, 46, 36, 0.18);
  border-color: rgba(196, 163, 90, 0.45);
}

.testimonial-card {
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 215, 201, 0.55);
  box-shadow: 0 4px 30px -12px rgba(26, 46, 36, 0.08);
  display: flex;
  flex-direction: column;
}

.dark .testimonial-card {
  background: rgba(20, 35, 28, 0.5);
  border-color: rgba(54, 76, 54, 0.4);
}

.why-card {
  padding: 2rem;
  border-radius: 2px;
  border: 1px solid rgba(201, 215, 201, 0.55);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(244, 247, 244, 0.6) 100%);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .why-card {
  background: linear-gradient(165deg, rgba(20, 35, 28, 0.7) 0%, rgba(15, 26, 21, 0.5) 100%);
  border-color: rgba(54, 76, 54, 0.45);
}

.why-card:hover {
  border-color: rgba(196, 163, 90, 0.4);
  box-shadow: 0 8px 32px -12px rgba(26, 46, 36, 0.12);
}

.credential-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(168, 134, 63, 0.35);
  color: #8a6b32;
  border-radius: 9999px;
  background: rgba(196, 163, 90, 0.06);
}

.dark .credential-pill {
  color: #d4b872;
  border-color: rgba(212, 184, 114, 0.3);
  background: rgba(196, 163, 90, 0.08);
}

/* Gentle book float */
@keyframes bookFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.book-float {
  animation: bookFloat 6s ease-in-out infinite;
}

/* Premium book cover presentation */
.book-stage {
  perspective: 1000px;
}

.book-cover-img {
  display: block;
  border-radius: 2px;
  box-shadow:
    0 2px 4px rgba(15, 26, 21, 0.06),
    0 12px 28px -6px rgba(15, 26, 21, 0.28),
    0 32px 64px -16px rgba(15, 26, 21, 0.35),
    0 0 0 1px rgba(15, 26, 21, 0.06);
  transform: rotateY(-6deg) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  will-change: transform;
  background: #1a2e24;
}

.book-stage:hover .book-cover-img {
  transform: rotateY(-2deg) rotateX(0deg) translateY(-4px);
  box-shadow:
    0 4px 8px rgba(15, 26, 21, 0.08),
    0 20px 40px -8px rgba(15, 26, 21, 0.32),
    0 40px 80px -20px rgba(196, 163, 90, 0.18),
    0 0 0 1px rgba(196, 163, 90, 0.12);
}

.dark .book-cover-img {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 16px 40px -8px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 40px -12px rgba(196, 163, 90, 0.2);
}

/* Author photo — premium medical circular portrait */
.author-photo-wrap {
  isolation: isolate;
}

.author-photo-glow {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 163, 90, 0.18) 0%, rgba(196, 163, 90, 0.04) 45%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.dark .author-photo-glow {
  background: radial-gradient(circle, rgba(196, 163, 90, 0.14) 0%, rgba(196, 163, 90, 0.03) 45%, transparent 70%);
}

.author-photo-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f3efe8 0%, #e4ebe4 100%);
  /* Soft gold ring + layered medical-grade shadow */
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 0 0 4px rgba(196, 163, 90, 0.45),
    0 4px 12px rgba(15, 26, 21, 0.06),
    0 16px 40px -8px rgba(15, 26, 21, 0.18),
    0 28px 64px -16px rgba(15, 26, 21, 0.14);
  transition: box-shadow 0.45s ease, transform 0.45s ease;
}

.dark .author-photo-frame {
  background: linear-gradient(145deg, #1a2e24 0%, #14231c 100%);
  box-shadow:
    0 0 0 3px rgba(15, 26, 21, 0.9),
    0 0 0 4px rgba(212, 184, 114, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.35),
    0 24px 56px -12px rgba(0, 0, 0, 0.45),
    0 0 48px -16px rgba(196, 163, 90, 0.15);
}

.author-photo-frame:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.98),
    0 0 0 5px rgba(196, 163, 90, 0.55),
    0 8px 20px rgba(15, 26, 21, 0.08),
    0 24px 48px -8px rgba(15, 26, 21, 0.2),
    0 36px 72px -16px rgba(196, 163, 90, 0.12);
}

.author-photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.7s ease;
}

.author-photo-frame:hover .author-photo-img {
  transform: scale(1.04);
}

.author-photo-badge {
  position: absolute;
  z-index: 2;
  bottom: 0.75rem;
  right: -0.25rem;
  max-width: 11.5rem;
  padding: 0.7rem 0.95rem;
  border-radius: 9999px 1rem 9999px 1rem;
  background: #1a2e24;
  color: #faf8f5;
  box-shadow: 0 10px 28px -8px rgba(15, 26, 21, 0.35);
}

.dark .author-photo-badge {
  background: #c4a35a;
  color: #0f1a15;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.4);
}

@media (min-width: 640px) {
  .author-photo-badge {
    bottom: 1.25rem;
    right: -0.75rem;
    max-width: 12.5rem;
  }
}

/* Prevent layout shift while images load */
.book-cover-img,
.author-photo-frame {
  content-visibility: auto;
}

img {
  max-width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: reduce) {
  .book-float,
  .animate-fade-up,
  .animate-bounce {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .author-photo-frame,
  .author-photo-img {
    transition: none !important;
  }
  .author-photo-frame:hover {
    transform: none;
  }
  .author-photo-frame:hover .author-photo-img {
    transform: none;
  }
}

/* Form success / error */
.form-success {
  color: #789678;
}

.dark .form-success {
  color: #a3bba3;
}

.form-error {
  color: #c45c5c;
}

/* ===== Lead magnet form (dark card) ===== */
.lead-label {
  display: block;
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.75);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.lead-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #faf8f5;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-input::placeholder {
  color: rgba(232, 224, 210, 0.4);
}

.lead-input:focus {
  outline: none;
  border-color: rgba(196, 163, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.15);
}

.lead-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  accent-color: #c4a35a;
  cursor: pointer;
}

.lead-submit {
  line-height: 1.35;
  min-height: 3rem;
}

@media (max-width: 400px) {
  .lead-submit {
    font-size: 0.8rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Lead form light (modal) */
.lead-label-light {
  display: block;
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6b32;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.dark .lead-label-light {
  color: #d4b872;
}

.lead-input-light {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(201, 215, 201, 0.8);
  background: #fff;
  color: #0f1a15;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dark .lead-input-light {
  background: #14231c;
  border-color: rgba(54, 76, 54, 0.7);
  color: #faf8f5;
}

.lead-input-light::placeholder {
  color: #a3bba3;
}

.lead-input-light:focus {
  outline: none;
  border-color: rgba(196, 163, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.12);
}

.lead-checkbox-light {
  width: 1rem;
  height: 1rem;
  accent-color: #c4a35a;
  cursor: pointer;
}

.lead-magnet-card {
  border: 1px solid rgba(196, 163, 90, 0.15);
}

/* Selection */
::selection {
  background: rgba(196, 163, 90, 0.35);
  color: #0f1a15;
}

/* Focus visible for a11y */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #c4a35a;
  outline-offset: 2px;
}


