/* Troy Mott — custom styles layered on top of Tailwind CDN */

/* ---------- Paper texture ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(27,27,23,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.6;
  z-index: 1;
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 2; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #1b1b17; color: #f6efe1;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .raven, .ravens-flock path { animation: none !important; }
}

/* ---------- Active nav underline ---------- */
.nav-link-active {
  position: relative;
  color: #6b1f2a !important;
}
.nav-link-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1px;
  background: #6b1f2a;
}
@media (max-width: 819px) {
  .nav-link-active::after { display: none; }
}

/* ---------- Raven flap animation ---------- */
.raven, .ravens-flock path {
  transform-origin: center;
  animation: flap 4s ease-in-out infinite;
}
.raven.r2, .ravens-flock path:nth-child(2) { animation-delay: 0.3s; }
.raven.r3, .ravens-flock path:nth-child(3) { animation-delay: 0.6s; }
.raven.r4, .ravens-flock path:nth-child(4) { animation-delay: 0.9s; }
.raven.r5, .ravens-flock path:nth-child(5) { animation-delay: 1.2s; }
@keyframes flap {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- Book spines ---------- */
.book-spine {
  writing-mode: vertical-rl;
}

/* ---------- Form focus ---------- */
.field-input:focus {
  outline: none;
  border-color: #6b1f2a;
  box-shadow: 0 0 0 3px rgba(107, 31, 42, 0.12);
}

.field-input.err {
  border-color: #6b1f2a;
  box-shadow: 0 0 0 3px rgba(107, 31, 42, 0.08);
}

.form-status.error,
.form-status.warning {
  color: #6b1f2a;
}

/* ---------- Portrait frame (decorative double border) ---------- */
.portrait-frame {
  position: relative;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(215, 201, 168, 0.55);
  pointer-events: none;
  z-index: 3;
}

/* ---------- Paper card inner border ---------- */
.paper-card {
  position: relative;
}
.paper-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #d7c9a8;
  pointer-events: none;
}

/* ---------- Hero text fine-tune ---------- */
.display-em em {
  font-style: italic;
  color: #6b1f2a;
  font-weight: 500;
}

/* ---------- Pullquote ---------- */
.pullquote {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  line-height: 1.4;
  color: #6b1f2a;
  border-left: 3px solid #6b1f2a;
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-style: italic;
}

/* ---------- Timeline dot ---------- */
.timeline-dot {
  position: absolute;
  left: -5px; top: 10px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #6b1f2a;
  box-shadow: 0 0 0 3px #f6efe1;
}

/* ---------- Book hover lift ---------- */
.book-card {
  transition: transform 200ms ease;
  box-shadow:
    inset 8px 0 16px -8px rgba(0,0,0,0.35),
    0 6px 18px -8px rgba(27,27,23,0.35);
}
.book-card:hover { transform: translateY(-4px); }

/* Book cover colors */
.book-burgundy { background: #6b1f2a; }
.book-forest   { background: #264a3a; }
.book-indigo   { background: #2a3a55; }
.book-amber    { background: #6b4a1f; }
.book-plum     { background: #3a2a3a; }
.book-cocoa    { background: #4a2a1f; }

/* ---------- Hoverable hard shadow on cards ---------- */
.lift-card {
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.lift-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px -20px rgba(27, 27, 23, 0.35);
  border-color: #6b1f2a;
}

/* ---------- Mobile nav collapse ---------- */
@media (max-width: 819px) {
  .mobile-nav {
    position: absolute;
    top: 74px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #f6efe1;
    border-bottom: 1px solid #d7c9a8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
  }
  .mobile-nav.open { max-height: 400px; }
  .mobile-nav li { border-top: 1px solid #d7c9a8; width: 100%; }
  .mobile-nav a { display: block; padding: 18px 28px; width: 100%; }
}
