/* Pagina Autori — directory curata del catalogo demo */

.authors-page {
  --authors-max: 1120px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(12, 53, 114, 0.08), transparent 55%),
    var(--dl-bg);
  min-height: 60vh;
}

.authors-hero {
  max-width: var(--authors-max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 1.25rem;
}

.authors-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--scrinio-brown);
}

.authors-hero h1 {
  margin: 0 0 0.55rem;
  font-family: var(--dl-font-display);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--scrinio-blue-deep);
  line-height: 1.15;
}

.authors-lede {
  margin: 0;
  max-width: 40rem;
  color: var(--dl-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.authors-lede a {
  color: var(--dl-link);
}

.authors-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  max-width: var(--authors-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  background: linear-gradient(180deg, var(--dl-bg) 70%, rgba(255, 255, 255, 0));
}

.authors-filter {
  flex: 1 1 16rem;
  min-width: 12rem;
  max-width: 28rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
  background: #fff;
  box-shadow: var(--dl-shadow);
}

.authors-filter svg {
  flex: 0 0 auto;
  color: var(--scrinio-blue);
  opacity: 0.75;
}

.authors-filter input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-family: var(--dl-font);
  font-size: 0.92rem;
  color: var(--dl-ink);
  background: transparent;
}

.authors-filter input::placeholder {
  color: #8a93a6;
}

.authors-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dl-muted);
  white-space: nowrap;
}

.authors-grid {
  max-width: var(--authors-max);
  margin: 0 auto;
  padding: 0.25rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.author-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--dl-line);
  border-radius: calc(var(--dl-radius) + 2px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(8, 38, 79, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.author-card:hover {
  border-color: rgba(12, 53, 114, 0.28);
  box-shadow: 0 8px 24px rgba(8, 38, 79, 0.08);
  transform: translateY(-1px);
}

.author-card[hidden] {
  display: none !important;
}

.author-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.author-photo {
  position: relative;
  flex: 0 0 auto;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--scrinio-blue) 0%, var(--scrinio-blue-deep) 100%);
  box-shadow: 0 2px 8px rgba(8, 38, 79, 0.16);
}

.author-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.author-avatar {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--dl-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.author-photo.is-fallback img {
  display: none;
}

.author-photo.is-fallback .author-avatar {
  display: inline-flex;
}

.author-card-meta {
  min-width: 0;
  flex: 1;
}

.author-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--scrinio-blue-deep);
  line-height: 1.25;
}

.author-dates {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--scrinio-brown);
  letter-spacing: 0.02em;
}

.author-bio {
  margin: 0;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--dl-muted);
}

.author-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.author-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.7rem;
  border-radius: var(--dl-radius);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.author-actions .author-search {
  background: var(--scrinio-blue);
  color: #fff;
}

.author-actions .author-search:hover {
  background: var(--scrinio-blue-deep);
  color: #fff;
}

.author-actions .author-ext {
  background: var(--scrinio-light);
  color: var(--scrinio-blue);
}

.author-actions .author-ext:hover {
  background: #d7e1f6;
}

.authors-empty {
  grid-column: 1 / -1;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--dl-muted);
  font-size: 0.95rem;
}

.authors-empty[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .authors-hero {
    padding-top: 1.5rem;
  }
  .authors-grid {
    grid-template-columns: 1fr;
  }
}
