html { scroll-behavior: smooth; }
body {
  font-family: 'Instrument Sans', system-ui, sans-serif;
  background-color: #F6F1E8;
  color: #2B1D14;
  -webkit-font-smoothing: antialiased;
}

/* Display utility */
.font-display { font-family: 'Fraunces', serif; font-variation-settings: 'opsz' 144, 'SOFT' 50; }
.font-display-tight { font-family: 'Fraunces', serif; font-variation-settings: 'opsz' 144, 'SOFT' 0; }

/* Subtle paper grain */
.grain::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 0.11  0 0 0 0 0.08  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Hero blob animation */
@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(20px, -15px) rotate(8deg); }
}
@keyframes float-slower {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-25px, 20px) rotate(-6deg); }
}
.blob-1 { animation: float-slow 14s ease-in-out infinite; }
.blob-2 { animation: float-slower 18s ease-in-out infinite; }

/* Marquee */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track { animation: marquee 40s linear infinite; }

/* Page-load reveal */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both; }

/* Book card tilt + shadow */
.book-card {
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1), box-shadow 0.5s ease;
  transform-origin: center bottom;
}
.book-card:hover {
  transform: translateY(-8px) rotate(-1.2deg);
  box-shadow: 0 30px 50px -20px rgba(43, 29, 20, 0.35);
}

/* Generated book covers */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.06),
    0 12px 30px -12px rgba(43, 29, 20, 0.30);
  color: #FBF7EF;
  font-family: 'Fraunces', serif;
}
.cover img.cover-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cover .spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: linear-gradient(to right, rgba(0,0,0,0.18), rgba(0,0,0,0));
  pointer-events: none;
}
.cover .label {
  position: absolute; inset: 0;
  padding: 1.4rem 1.2rem 1.2rem 1.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cover-title { font-weight: 600; line-height: 1.0; letter-spacing: -0.01em; font-variation-settings: 'opsz' 144, 'SOFT' 0; }

/* Default generated cover (used when no uploaded image) */
.cover-default {
  background:
    radial-gradient(circle at 50% 25%, rgba(244,220,204,0.25) 0%, transparent 45%),
    #2B1D14;
}
.cover-default .cover-title { color: #F2C9B3; font-style: italic; }
.cover-default .accent { width: 50%; height: 1px; background: #F2C9B3; opacity: 0.7; margin: 0.6rem 0; }

.author-line {
  font-family: 'Instrument Sans';
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Underline link */
.ulink { position: relative; }
.ulink::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.ulink:hover::after { transform: scaleX(1); transform-origin: left; }

/* Pill button */
.btn-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: 'Instrument Sans';
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}
.btn-primary { background: #2B1D14; color: #FBF7EF; }
.btn-primary:hover { background: #C5523B; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #2B1D14; border: 1px solid #2B1D14; }
.btn-ghost:hover { background: #2B1D14; color: #FBF7EF; }

/* Section eyebrow */
.eyebrow {
  font-family: 'Instrument Sans';
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: #6B5747;
}

/* Author portrait */
.portrait-frame {
  aspect-ratio: 4 / 5;
  background: radial-gradient(ellipse at 50% 40%, #F2C9B3 0%, #E8917C 45%, #C5523B 100%);
  border-radius: 50% / 45%;
  position: relative;
  overflow: hidden;
}
.portrait-frame img {
  width: 100%; height: 100%; object-fit: cover;
  mix-blend-mode: luminosity;
  filter: contrast(1.05) brightness(1.02);
}

/* Quote mark */
.quote-mark {
  font-family: 'Fraunces', serif;
  font-size: 6rem; line-height: 0.6;
  color: #C5523B;
  font-style: italic;
}

/* Movie / film cards */
.movie-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(43, 29, 20, 0.40);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
  background: #2B1D14;
}
.movie-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.movie-card:hover { transform: translateY(-6px); }

/* Tag pill on film cards */
.tag {
  display: inline-block;
  font-family: 'Instrument Sans';
  font-size: 0.65rem; letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(251,247,239,0.15);
  backdrop-filter: blur(8px);
  color: #FBF7EF;
  border: 1px solid rgba(251,247,239,0.25);
}

/* Timeline (bio) */
.timeline-line { background: linear-gradient(to bottom, rgba(43,29,20,0.25), rgba(43,29,20,0.05)); }
