/* Homepage Nicaea Library banner (#library-banner). Sits directly beneath the
   hero, so it is deliberately wider and quieter than the .home-feature cards
   below it — one gold-edged plate rather than a competing hero. */

#library-banner {
  padding: 3.25rem 1rem 0.5rem;
}

.libbanner-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.75rem 2rem;
  padding: 2.25rem 2.5rem;
  border: 1px solid rgba(131, 101, 49, 0.3);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(247, 244, 240, 0.88));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 18px 44px -28px rgba(58, 44, 20, 0.55);
  position: relative;
  overflow: hidden;
}

/* A hairline of gold along the top edge — the site's signature accent. */
.libbanner-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-leaf, #b8914b) 22%,
    var(--gold-highlight, #d6bc7b) 50%,
    var(--gold-leaf, #b8914b) 78%,
    transparent
  );
  opacity: 0.85;
}

.libbanner-art {
  color: var(--gold-leaf, #b8914b);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 16px;
  border: 1px solid rgba(131, 101, 49, 0.24);
  background: linear-gradient(160deg, rgba(216, 195, 156, 0.24), rgba(255, 255, 255, 0.32));
}

.libbanner-mark { width: 62px; height: 62px; display: block; }

.libbanner-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bronze, #8a642e);
}

.libbanner-title {
  margin: 0 0 0.5rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink-950, #211e1b);
  text-wrap: balance;
}

.libbanner-blurb {
  margin: 0;
  max-width: 62ch;
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--ink-800, #48423b);
}

.libbanner-side {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.libbanner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

/* Wide screens: the buttons become their own right-hand column so the plate
   reads as one balanced band instead of text with an empty right half. */
@media (min-width: 900px) {
  .libbanner-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  .libbanner-side { min-width: 15rem; max-width: 19rem; }
  .libbanner-actions { flex-direction: column; align-items: stretch; }
  .libbanner-cta, .libbanner-secondary { justify-content: center; }
}

.libbanner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  border: 1px solid var(--gold-bronze, #8a642e);
  background: linear-gradient(180deg, #9d7534, #7d5c27);
  color: #fdf9f0;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.libbanner-cta svg { width: 18px; height: 18px; }
.libbanner-cta:hover { filter: brightness(1.09); color: #fff; transform: translateY(-1px); }
.libbanner-cta:focus-visible { outline: 2px solid var(--gold-leaf, #b8914b); outline-offset: 3px; }

.libbanner-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(131, 101, 49, 0.4);
  background: transparent;
  color: var(--gold-500, #836531);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.libbanner-secondary:hover {
  background: rgba(216, 195, 156, 0.28);
  color: var(--ink-900, #2c2824);
}
.libbanner-secondary:focus-visible { outline: 2px solid var(--gold-leaf, #b8914b); outline-offset: 3px; }

.libbanner-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(72, 66, 59, 0.72);
}

@media (max-width: 720px) {
  #library-banner { padding-top: 2.25rem; }
  .libbanner-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1.75rem 1.4rem;
    text-align: left;
  }
  .libbanner-art { width: 72px; height: 72px; border-radius: 14px; }
  .libbanner-mark { width: 44px; height: 44px; }
  .libbanner-blurb { font-size: 0.98rem; }
  .libbanner-cta, .libbanner-secondary { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .libbanner-cta { transition: none; }
  .libbanner-cta:hover { transform: none; }
}

/* Night mode / dark theme parity — the site flips these vars on the root. */
.night-mode .libbanner-inner,
[data-theme="dark"] .libbanner-inner {
  background: linear-gradient(180deg, rgba(38, 34, 28, 0.94), rgba(28, 25, 21, 0.9));
  border-color: rgba(184, 145, 75, 0.34);
}
.night-mode .libbanner-title,
[data-theme="dark"] .libbanner-title { color: #f0e7d6; }
.night-mode .libbanner-blurb,
[data-theme="dark"] .libbanner-blurb { color: #cfc4b2; }
.night-mode .libbanner-note,
[data-theme="dark"] .libbanner-note { color: rgba(207, 196, 178, 0.72); }
.night-mode .libbanner-art,
[data-theme="dark"] .libbanner-art {
  background: linear-gradient(160deg, rgba(184, 145, 75, 0.18), rgba(255, 255, 255, 0.05));
}
