/* Library landing page (library.html, motion in library-landing.js).
   Same palette as the rest of the site: cream, deep green, gold. */

.lib { --ease: cubic-bezier(0.16, 1, 0.3, 1); --glass: rgba(255, 255, 255, 0.55); --line: rgba(145, 117, 81, 0.2); position: relative; z-index: 1; }
.lib-wrap { max-width: 1240px; margin: 0 auto; padding: 0 6%; }
.lib-eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 11px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-dark);
}
.lib-eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.lib-h2 {
  font-family: 'Playfair Display', serif; font-weight: 400; color: var(--dark-green);
  font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.12; margin: 0.9rem 0 1rem;
}
.lib-h2 em, .lib-hero-title em { font-style: italic; color: var(--gold-dark); }
.lib-lead { font-size: 1rem; line-height: 1.8; color: var(--text-muted); max-width: 560px; }
.lib-section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; position: relative; }
.lib-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* Buttons */
.lib-btn {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 1.05rem 1.7rem; border-radius: 999px;
  font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.lib-btn svg { width: 15px; height: 15px; transition: transform 0.4s var(--ease); }
.lib-btn:hover svg { transform: translateX(4px); }
.lib-btn--down:hover svg { transform: translateY(3px); }
.lib-btn--solid { background: var(--dark-green); color: var(--gold-light); box-shadow: 0 14px 30px -12px rgba(12, 30, 20, 0.55); }
.lib-btn--solid:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(12, 30, 20, 0.6); }
.lib-btn--ghost { background: rgba(255, 255, 255, 0.5); color: var(--dark-green); border-color: rgba(145, 117, 81, 0.35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lib-btn--ghost:hover { border-color: var(--gold-dark); background: rgba(255, 255, 255, 0.85); transform: translateY(-2px); }
.lib-btn--gold { background: var(--gold-light); color: var(--dark-green); }
.lib-btn--gold:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(229, 198, 151, 0.55); }
.lib-btn--line { color: var(--light-cream); border-color: rgba(229, 198, 151, 0.4); }
.lib-btn--line:hover { border-color: var(--gold-light); color: var(--gold-light); }
.lib-btn:focus-visible, .lib-path-tab:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

/* ================= HERO: cinematic full-bleed frame =================
   The photo fills a large rounded frame (a cinema screen inside the page):
   it opens from the centre, settles from a slow zoom, then keeps drifting;
   a deep green shade carries the copy and a soft light passes over once.
   Minimal on purpose: one image, one headline, two actions, three facts. */
.lib-hero { position: relative; }
/* Edge to edge: the hero fills the whole visible frame, top corners
   included (the page frame's own rounding clips it), and the header floats
   over it as a frosted bar (<header data-float-over>, site-nav.js). */
.lib-cine {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(600px, calc(100vh - 2 * var(--frame, 24px) - 4px));
  min-height: max(600px, calc(100svh - 2 * var(--frame, 24px) - 4px));
  display: grid; grid-template-rows: 1fr auto; background: #0A1911;
}
.lib-cine-media {
  position: absolute; inset: 0; z-index: -3; overflow: hidden;
  /* Opens by scale and fade only: both run on the graphics chip, so the
     opening stays smooth however busy the page is. */
  opacity: 0; transform: scale(0.9); transition: opacity 1.2s ease, transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.lib-hero.is-in .lib-cine-media { opacity: 1; transform: none; }
.lib-cine-media img {
  position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; object-position: 68% 50%; display: block;
  transform: scale(1.18); transition: transform 2.6s cubic-bezier(0.16, 1, 0.3, 1);
  translate: 0 var(--py, 0px); will-change: transform;  /* scroll parallax (library-landing.js), separate from the zoom */
}
.lib-hero.is-in .lib-cine-media img { transform: scale(1.02); animation: lib-drift-zoom 28s ease-in-out 2.6s infinite alternate; }
.lib-hero.is-offscreen .lib-cine-media img { animation-play-state: paused; }  /* library-landing.js */
@keyframes lib-drift-zoom { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.09) translateX(-1.5%); } }
.lib-cine-shade {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(700px 480px at 6% 0%, rgba(229, 198, 151, 0.18), transparent 60%),
    linear-gradient(90deg, rgba(7, 17, 11, 0.92) 0%, rgba(8, 19, 12, 0.78) 34%, rgba(10, 25, 17, 0.32) 62%, rgba(10, 25, 17, 0.08) 100%),
    linear-gradient(0deg, rgba(7, 17, 11, 0.85) 0%, rgba(7, 17, 11, 0) 32%),
    linear-gradient(180deg, rgba(7, 17, 11, 0.35) 0%, rgba(7, 17, 11, 0) 22%);
}
.lib-cine::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;  /* plain film grain: no blend mode, so the zoom stays cheap to draw */
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lib-cine-sweep {
  position: absolute; inset: -20% -40%; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 236, 200, 0.16) 50%, transparent 60%);
  transform: translateX(-60%);
}
.lib-hero.is-in .lib-cine-sweep { animation: lib-sweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 1.5s 1 both; }
@keyframes lib-sweep { 0% { opacity: 0; transform: translateX(-60%); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(60%); } }

.lib-cine-content { align-self: center; padding: clamp(8rem, 17vh, 10.5rem) clamp(1.6rem, 6vw, 5.5rem) 1.6rem; max-width: 1010px; color: var(--light-cream); }
.lib-cine .lib-eyebrow { color: var(--gold-light); }
.lib-hero-title {
  font-family: 'Playfair Display', serif; font-weight: 400; color: #FBF8F2;
  font-size: clamp(2.6rem, 4.9vw, 4.9rem); line-height: 1.04; letter-spacing: -0.015em; margin: 1.3rem 0 1.6rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
.lib-hero-title em { color: var(--gold-light); }
.lib-hero-title .ln { display: block; overflow: hidden; padding-bottom: 0.08em; }
.lib-hero-title .ln > span { display: inline-block; padding-right: 0.12em; transform: translateY(105%); transition: transform 1.2s var(--ease) 0.5s; }
.lib-hero.is-in .lib-hero-title .ln > span { transform: none; }
.lib-hero.is-in .lib-hero-title .ln:nth-child(2) > span { transition-delay: 0.65s; }
.lib-hero-rule { width: 0; height: 1px; background: linear-gradient(90deg, var(--gold-light), rgba(229, 198, 151, 0)); margin-bottom: 1.6rem; transition: width 1.4s var(--ease) 1s; }
.lib-hero.is-in .lib-hero-rule { width: 120px; }
.lib-hero-desc { font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.8; color: rgba(250, 249, 246, 0.78); max-width: 500px; }
.lib-hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.lib-btn--glass { color: var(--light-cream); background: rgba(250, 249, 246, 0.08); border-color: rgba(250, 249, 246, 0.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lib-btn--glass:hover { background: rgba(250, 249, 246, 0.16); border-color: rgba(250, 249, 246, 0.55); transform: translateY(-2px); }
.lib-cine .lib-btn:focus-visible { outline-color: var(--gold-light); }

.lib-fade { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.lib-hero.is-in .lib-fade { opacity: 1; transform: none; transition-delay: 0.6s; }
.lib-hero.is-in .lib-fade.d1 { transition-delay: 0.95s; }
.lib-hero.is-in .lib-fade.d2 { transition-delay: 1.1s; }
.lib-hero.is-in .lib-fade.d3 { transition-delay: 1.35s; }

.lib-cine-facts {
  list-style: none; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(1.6rem, 4vw, 3.6rem);
  margin: 0 clamp(1.6rem, 6vw, 5.5rem); padding: 1.3rem 0 1.6rem; border-top: 1px solid rgba(250, 249, 246, 0.14);
}
.lib-cine-facts li { display: flex; align-items: baseline; gap: 0.7rem; font-size: 0.84rem; color: rgba(250, 249, 246, 0.82); }
.lib-cine-facts b { font-family: 'Playfair Display', serif; font-weight: 400; font-style: italic; font-size: 0.95rem; color: var(--gold-light); }

.lib-scroll-cue {
  position: absolute; right: clamp(1.6rem, 4vw, 3rem); bottom: 1.5rem; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 10px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(250, 249, 246, 0.7); text-decoration: none;
  writing-mode: vertical-rl;
}
.lib-scroll-cue span { width: 1px; height: 42px; background: rgba(250, 249, 246, 0.25); position: relative; overflow: hidden; }
.lib-scroll-cue span::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-light); animation: lib-cue 2.2s var(--ease) infinite; }
@keyframes lib-cue { to { top: 100%; } }

/* ================= REVEAL ================= */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.rv.is-in { opacity: 1; transform: none; }

/* ================= PATHS ================= */
.lib-paths {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.4rem; align-items: stretch;
}
.lib-path-tabs { display: flex; flex-direction: column; gap: 0.7rem; }
.lib-path-tab {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem; width: 100%; text-align: left;
  padding: 1.25rem 1.4rem; border-radius: 18px; cursor: pointer; font: inherit; color: inherit;
  background: rgba(255, 255, 255, 0.42); border: 1px solid var(--line);
  transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.lib-path-tab:hover { background: rgba(255, 255, 255, 0.75); transform: translateX(4px); }
.lib-path-tab[aria-selected="true"] { background: var(--dark-green); border-color: var(--dark-green); box-shadow: 0 22px 44px -22px rgba(12, 30, 20, 0.6); transform: none; }
.lib-path-num { font-family: 'Playfair Display', serif; font-size: 0.95rem; color: var(--gold-dark); width: 2rem; }
.lib-path-tab[aria-selected="true"] .lib-path-num { color: var(--gold-light); }
.lib-path-label strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.22rem; font-weight: 400; color: var(--dark-green); }
.lib-path-label span { font-size: 0.8rem; color: var(--text-muted); }
.lib-path-tab[aria-selected="true"] .lib-path-label strong { color: var(--light-cream); }
.lib-path-tab[aria-selected="true"] .lib-path-label span { color: rgba(250, 249, 246, 0.65); }
.lib-path-arrow { width: 18px; height: 18px; color: var(--gold-dark); transition: transform 0.4s var(--ease); }
.lib-path-tab[aria-selected="true"] .lib-path-arrow { color: var(--gold-light); transform: translateX(4px); }

.lib-path-stage { position: relative; min-height: 470px; border-radius: 26px; overflow: hidden; background: var(--dark-green); box-shadow: 0 40px 80px -40px rgba(12, 30, 20, 0.6); }
.lib-path-panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem; opacity: 0; visibility: hidden; transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s; }
.lib-path-panel.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.lib-path-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s ease-out; }
.lib-path-panel.is-active img { transform: scale(1); }
.lib-path-panel::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(12,30,20,0.05) 0%, rgba(12,30,20,0.55) 45%, rgba(12,30,20,0.94) 100%); }
.lib-path-body { position: relative; z-index: 2; color: var(--light-cream); }
.lib-path-body h3 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.6rem; }
.lib-path-body > p { font-size: 0.93rem; line-height: 1.7; color: rgba(250, 249, 246, 0.78); max-width: 470px; margin-bottom: 1.4rem; }
.lib-path-links { display: grid; gap: 0.6rem; }
.lib-path-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.95rem 1.15rem; border-radius: 14px; text-decoration: none;
  background: rgba(250, 249, 246, 0.1); border: 1px solid rgba(229, 198, 151, 0.22); color: var(--light-cream);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.4s var(--ease);
}
.lib-path-link:hover { background: rgba(250, 249, 246, 0.18); border-color: var(--gold-light); transform: translateX(4px); }
.lib-path-link strong { display: block; font-size: 0.9rem; font-weight: 600; }
.lib-path-link small { font-size: 0.74rem; color: rgba(250, 249, 246, 0.62); }
.lib-path-link svg { width: 16px; height: 16px; color: var(--gold-light); flex: none; }

/* ================= COLLECTION: an editorial index =================
   The eight resources as a numbered list of large titles on hairlines.
   Hovering a row brings its photo to the cursor (library-landing.js) and
   quiets the other rows; a small filter narrows the list. */
.lib-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lib-index-sec::before, .lib-index-sec::after { display: none; }
.lib-index-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.lib-index-head .lib-h2 { margin-bottom: 0; }
.lib-index-filter { display: flex; gap: clamp(1rem, 2.4vw, 2rem); }
.lib-index-filter button {
  position: relative; background: none; border: 0; padding: 0.4rem 0; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: rgba(12, 30, 20, 0.45);
  transition: color 0.3s ease;
}
.lib-index-filter button sup { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400; font-size: 0.72rem; margin-left: 0.25rem; color: var(--gold-dark); }
.lib-index-filter button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--dark-green); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); }
.lib-index-filter button:hover { color: var(--dark-green); }
.lib-index-filter button[aria-pressed="true"] { color: var(--dark-green); }
.lib-index-filter button[aria-pressed="true"]::after { transform: scaleX(1); }
.lib-index-filter button:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 4px; }

.lib-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(12, 30, 20, 0.14); }
.lib-index-item { display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; transition: grid-template-rows 0.6s var(--ease), opacity 0.45s ease; }
.lib-index-item.is-hidden { grid-template-rows: minmax(0, 0fr); opacity: 0; }
.lib-index-row {
  position: relative; min-height: 0; display: grid; grid-template-columns: clamp(150px, 15vw, 210px) minmax(0, 1fr) 3rem; align-items: center; gap: clamp(1.4rem, 3vw, 2.6rem);
  padding: clamp(1.4rem, 2.6vw, 2.1rem) 0.4rem; border-bottom: 1px solid rgba(12, 30, 20, 0.14);
  color: inherit; text-decoration: none; transition: opacity 0.4s ease;
}
.lib-index-row::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold-dark);
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease);
}
.lib-index-num { transition: color 0.3s ease; }
.lib-index-thumb {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #E9E1D2;
  box-shadow: 0 18px 36px -24px rgba(12, 30, 20, 0.45); transition: box-shadow 0.5s var(--ease), border-radius 0.5s var(--ease);
}
.lib-index-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); transition: transform 1.1s var(--ease), filter 0.5s ease; filter: saturate(0.85); }
.lib-index-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 25, 17, 0) 45%, rgba(10, 25, 17, 0.55) 100%); }
.lib-index-thumb .lib-index-num {
  position: absolute; left: 0.75rem; bottom: 0.55rem; z-index: 1; padding: 0; color: #FBF8F2;
  font-family: 'Playfair Display', serif; font-style: italic; font-size: 1rem;
}
.lib-index-row:hover .lib-index-thumb, .lib-index-row:focus-visible .lib-index-thumb { box-shadow: 0 26px 46px -24px rgba(12, 30, 20, 0.6); }
.lib-index-row:hover .lib-index-thumb img, .lib-index-row:focus-visible .lib-index-thumb img { transform: scale(1.14); filter: saturate(1.05); }
.lib-index-row:hover .lib-index-num, .lib-index-row:focus-visible .lib-index-num { color: var(--gold-light); }
.lib-index-main { display: flex; flex-direction: column; gap: 0.35rem; transition: transform 0.6s var(--ease); }
.lib-index-title { width: fit-content; max-width: 100%; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.45rem, 2.5vw, 2.3rem); line-height: 1.15; color: var(--dark-green); }
.lib-index-desc { font-size: 0.88rem; line-height: 1.55; color: var(--text-muted); max-width: 52ch; }
.lib-index-meta { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.15rem; }
.lib-index-arrow {
  justify-self: end; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(12, 30, 20, 0.18); color: var(--dark-green);
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.5s var(--ease);
}
.lib-index-arrow svg { width: 18px; height: 18px; transition: transform 0.5s var(--ease); }
.lib-index-row:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }
.lib-index-row:hover::after, .lib-index-row:focus-visible::after { transform: scaleX(1); }
.lib-index-row:hover .lib-index-arrow, .lib-index-row:focus-visible .lib-index-arrow { background: var(--dark-green); border-color: var(--dark-green); color: var(--gold-light); }
.lib-index-row:hover .lib-index-arrow svg, .lib-index-row:focus-visible .lib-index-arrow svg { transform: rotate(-45deg); }
@media (hover: hover) and (pointer: fine) {
  .lib-index-row:hover .lib-index-main { transform: translateX(14px); }
  .lib-index.is-hovering .lib-index-row:not(:hover) { opacity: 0.32; }
}



/* ================= NEW IN THE LIBRARY (live) ================= */
.lib-fresh[hidden] { display: none; }

/* ================= STEPS ================= */
/* Steps: the same editorial language as the shelf above. Columns on a
   dark rule, divided by hairlines, with a gold rule that draws across the
   top when the row comes into view. */
.lib-steps { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--dark-green); border-bottom: 1px solid rgba(12, 30, 20, 0.16); }
.lib-steps::after { content: ''; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--gold-dark); transition: width 1.8s var(--ease) 0.3s; }
.lib-steps.is-in::after { width: 100%; }
.lib-step { position: relative; display: flex; flex-direction: column; padding: 2rem 2rem 2.2rem; }
.lib-step + .lib-step { border-left: 1px solid rgba(12, 30, 20, 0.16); }
.lib-step:first-child { padding-left: 0; }
.lib-step:last-child { padding-right: 0; }
.lib-step-num { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400; font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; color: var(--gold-dark); margin-bottom: 1.4rem; }
.lib-step h3 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.35rem, 1.9vw, 1.65rem); color: var(--dark-green); margin-bottom: 0.6rem; }
.lib-step p { flex: 1; font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 1.3rem; }
.lib-step a, .lib-step button.lib-link-btn {
  position: relative; align-self: flex-start; background: none; border: 0; padding: 0 0 0.35rem; cursor: pointer; text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dark-green);
}
.lib-step a::after, .lib-step button.lib-link-btn::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold-dark); transform: scaleX(0.35); transform-origin: left; transition: transform 0.5s var(--ease); }
.lib-step a:hover::after, .lib-step a:focus-visible::after, .lib-step button.lib-link-btn:hover::after, .lib-step button.lib-link-btn:focus-visible::after { transform: scaleX(1); }
.lib-step a:focus-visible, .lib-step button.lib-link-btn:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 4px; }

/* ================= CLOSING CTA ================= */
.lib-cta {
  position: relative; overflow: hidden; border-radius: 30px; padding: clamp(2.6rem, 6vw, 4.6rem);
  background: var(--dark-green); color: var(--light-cream);
  display: grid; grid-template-columns: 1.3fr auto; gap: 2.5rem; align-items: center;
}
.lib-cta::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 90% 0%, rgba(229, 198, 151, 0.25), transparent 45%), radial-gradient(circle at 10% 120%, rgba(47, 111, 79, 0.5), transparent 50%);
  opacity: 0.9;
}
.lib-cta > * { position: relative; }
.lib-cta .lib-eyebrow { color: var(--gold-light); }
.lib-cta h2 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.15; margin: 0.9rem 0 0.9rem; }
.lib-cta h2 em { color: var(--gold-light); }
.lib-cta p { color: rgba(250, 249, 246, 0.72); line-height: 1.75; max-width: 520px; }
.lib-cta-actions { display: flex; flex-direction: column; gap: 0.8rem; min-width: 250px; }
.lib-cta-actions .lib-btn { justify-content: center; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
}
@media (max-width: 900px) {
  .lib-paths { grid-template-columns: 1fr; }
  .lib-path-stage { min-height: 500px; }
  .lib-steps { grid-template-columns: 1fr; }
  .lib-step, .lib-step:first-child, .lib-step:last-child { padding: 1.7rem 0; }
  .lib-step + .lib-step { border-left: 0; border-top: 1px solid rgba(12, 30, 20, 0.16); }
  .lib-step-num { font-size: 2.4rem; margin-bottom: 0.9rem; }
  .lib-cta { grid-template-columns: 1fr; }
  .lib-cta-actions { min-width: 0; }
}
@media (max-width: 640px) {
  .lib-hero-title { font-size: clamp(2rem, 9.2vw, 3rem); }
  .lib-feature-stats { gap: 1.3rem; }
  .lib-feature-stats b { font-size: 1.9rem; }
  .lib-feature-stats span { font-size: 0.64rem; }
  .lib-hero-ctas .lib-btn { flex: 1 1 100%; justify-content: center; }
  .lib-path-tab { padding: 1rem 1.1rem; }
  .lib-path-stage { min-height: 540px; border-radius: 20px; }
  .lib-path-panel { padding: 1.5rem; }
  .lib-section-head { margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lib *, .lib *::before, .lib *::after { animation: none !important; transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .rv, .lib-fade { opacity: 1; transform: none; }
  .lib-cine-media { opacity: 1; transform: none; }
  .lib-cine-media img { transform: scale(1.02); }
}
@media (max-width: 380px) {
  .lib-hero-title { font-size: 8.8vw; }
}

/* =====================================================================
   BACKGROUND: designed bands instead of one stretched photo.
   Warm glow hero -> deep green "paths" panel -> bright ivory collection
   with a fading gold grid -> warm parchment with the Elowen tree ->
   dark closing panel on cream.
   ===================================================================== */
body .site-frame {
  background-color: #F4EEE4;
  background-image:
    radial-gradient(900px 620px at 0% 0%, rgba(229, 198, 151, 0.55), transparent 70%),
    radial-gradient(760px 520px at 62% 6%, rgba(255, 255, 255, 0.75), transparent 70%),
    linear-gradient(180deg, #F7F1E7 0, #F4EEE4 900px);
  background-size: auto;
  background-repeat: no-repeat;
}
body .site-frame::before { opacity: 0.05; z-index: 0; }


.lib-band { position: relative; isolation: isolate; }

/* Deep green panel */

.lib-band--dark {
  margin: 0 clamp(10px, 1.6vw, 22px); border-radius: clamp(22px, 3vw, 40px); overflow: hidden;
  background:
    radial-gradient(700px 480px at 100% 0%, rgba(229, 198, 151, 0.18), transparent 70%),
    radial-gradient(640px 520px at 0% 100%, rgba(47, 111, 79, 0.45), transparent 70%),
    linear-gradient(160deg, #10271A 0%, #0C1E14 55%, #0A1911 100%);
  box-shadow: 0 50px 90px -60px rgba(12, 30, 20, 0.8);
}
.lib-band--dark::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(229, 198, 151, 0.18) 1px, transparent 1.4px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 65%); mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 65%);
}
.lib-band--dark .lib-eyebrow { color: var(--gold-light); }
.lib-band--dark .lib-h2 { color: var(--light-cream); }
.lib-band--dark .lib-h2 em { color: var(--gold-light); }
.lib-band--dark .lib-lead { color: rgba(250, 249, 246, 0.68); }
.lib-band--dark .lib-path-tab { background: rgba(255, 255, 255, 0.04); border-color: rgba(229, 198, 151, 0.16); }
.lib-band--dark .lib-path-tab:hover { background: rgba(255, 255, 255, 0.08); }
.lib-band--dark .lib-path-label strong { color: var(--light-cream); }
.lib-band--dark .lib-path-label span { color: rgba(250, 249, 246, 0.55); }
.lib-band--dark .lib-path-num, .lib-band--dark .lib-path-arrow { color: rgba(229, 198, 151, 0.75); }
.lib-band--dark .lib-path-tab[aria-selected="true"] { background: linear-gradient(135deg, #EBD3AA, var(--gold-light)); border-color: transparent; box-shadow: 0 22px 44px -22px rgba(229, 198, 151, 0.5); }
.lib-band--dark .lib-path-tab[aria-selected="true"] .lib-path-label strong { color: var(--dark-green); }
.lib-band--dark .lib-path-tab[aria-selected="true"] .lib-path-label span { color: rgba(12, 30, 20, 0.7); }
.lib-band--dark .lib-path-tab[aria-selected="true"] .lib-path-num,
.lib-band--dark .lib-path-tab[aria-selected="true"] .lib-path-arrow { color: var(--dark-green); }
.lib-band--dark .lib-path-stage { box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7); border: 1px solid rgba(229, 198, 151, 0.18); }
.lib-band--dark .lib-btn:focus-visible, .lib-band--dark .lib-path-tab:focus-visible { outline-color: var(--gold-light); }

/* Bright ivory band with a fading gold grid and a glow behind the feature card */
.lib-band--light, .lib-band--ivory { background: #FBF8F2; }
.lib-band--ivory + .lib-band--ivory, .lib-band--light + .lib-band--ivory { padding-top: 0; }
.lib-band--light::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(145, 117, 81, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(145, 117, 81, 0.09) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 35%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 70% 55% at 50% 35%, #000 0%, transparent 75%);
}
.lib-band--light::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none; left: 4%; top: 30%; width: 46%; height: 60%;
  background: radial-gradient(closest-side, rgba(229, 198, 151, 0.45), transparent); filter: blur(10px);
}

/* Warm parchment with the Elowen tree watermark */


/* Closing panel on cream with a soft gold glow behind it */
.lib-cta-section::before {
  content: ''; position: absolute; left: 50%; top: 55%; width: 70%; height: 70%; transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(229, 198, 151, 0.5), transparent); filter: blur(20px);
}
.lib-cta-section { isolation: isolate; background: #FBF8F2; }

@media (max-width: 900px) {
}

/* =====================================================================
   GOLD MOTION SHAPES (built by library-landing.js addShapes()).
   Thin gold line shapes drifting behind each band's content. They only
   animate while their band is on screen (.is-playing) and stay still
   for visitors who prefer reduced motion.
   ===================================================================== */
.lib-shapes { display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; color: var(--gold-dark); }
.lib-hero-shapes { z-index: 0; }
.lib-band--dark .lib-shapes, .lib-cta .lib-shapes { color: var(--gold-light); }
.lib-cta .lib-shapes { z-index: 0; }
.lib-cta > div { position: relative; z-index: 1; }
.lib-shape { position: absolute; display: block; will-change: transform; animation-play-state: paused; }
.lib-shapes.is-playing .lib-shape, .lib-shapes.is-playing .lib-shape * { animation-play-state: running; }
.lib-shape svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lib-shape * { animation-play-state: paused; }

/* Dashed ring, turning slowly */
.lib-shape--ring svg circle { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 2 9; vector-effect: non-scaling-stroke; }
.lib-shape--ring { animation: lib-spin 70s linear infinite; }
.lib-shape--ring.rev { animation-direction: reverse; animation-duration: 90s; }

/* Thin ring with a dot orbiting it */
.lib-shape--orbit svg circle.track { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.55; vector-effect: non-scaling-stroke; }
.lib-shape--orbit svg circle.dot { fill: currentColor; }
.lib-shape--orbit svg g { transform-origin: 50% 50%; animation: lib-spin 22s linear infinite; }

/* Arc that draws itself in and out */
.lib-shape--arc svg path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lib-draw 9s ease-in-out infinite alternate; vector-effect: non-scaling-stroke; }

/* Diamond outline, floating and turning */
.lib-shape--diamond svg rect { fill: none; stroke: currentColor; stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.lib-shape--diamond { animation: lib-float-turn 16s ease-in-out infinite; }

/* Four-point sparkle, twinkling */
.lib-shape--spark svg path { fill: currentColor; }
.lib-shape--spark { animation: lib-twinkle 4.5s ease-in-out infinite; }

/* Small cluster of dots, drifting */
.lib-shape--dots svg circle { fill: currentColor; }
.lib-shape--dots { animation: lib-drift 18s ease-in-out infinite alternate; }

/* Soft gold glow, wandering */
.lib-shape--glow { border-radius: 50%; background: radial-gradient(closest-side, rgba(229, 198, 151, 0.42), rgba(229, 198, 151, 0.12) 55%, transparent); animation: lib-wander 24s ease-in-out infinite alternate; }
.lib-band--dark .lib-shape--glow, .lib-cta .lib-shape--glow { background: radial-gradient(closest-side, rgba(229, 198, 151, 0.22), transparent); }

@keyframes lib-spin { to { transform: rotate(360deg); } }
@keyframes lib-draw { 0% { stroke-dashoffset: 1; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes lib-float-turn { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-22px) rotate(90deg); } }
@keyframes lib-twinkle { 0%, 100% { transform: scale(0.55) rotate(0deg); opacity: 0.25; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes lib-drift { from { transform: translate(0, 0); } to { transform: translate(30px, -26px); } }
@keyframes lib-wander { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.18); } }

@media (max-width: 900px) {
  .lib-shape.hide-sm { display: none; }
  /* Text runs full width on phones: keep only the big rings/glow behind
     the hero copy, not small marks that would sit on the words. */
  .lib-hero-shapes .lib-shape--spark, .lib-hero-shapes .lib-shape--dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lib-shape, .lib-shape * { animation: none !important; }
  .lib-shape--arc svg path { stroke-dashoffset: 0; }
}

/* Cinematic hero on tablets and phones: copy sits at the bottom of the
   frame over a vertical shade; the photo keeps the laptop in view. */
@media (max-width: 900px) {
  .lib-cine { min-height: min(86svh, 760px); min-height: min(86vh, 760px); }
  .lib-cine-content { align-self: end; padding: clamp(13rem, 42vw, 18rem) 1.5rem 1.4rem; }
  .lib-cine-media img { object-position: 82% 62%; }
  /* The photo shows clearly in the top of the frame; the shade deepens
     only where the copy sits. */
  .lib-cine-shade {
    background:
      linear-gradient(0deg, rgba(7, 17, 11, 0.97) 0%, rgba(7, 17, 11, 0.9) 48%, rgba(7, 17, 11, 0.45) 66%, rgba(7, 17, 11, 0.06) 82%, rgba(7, 17, 11, 0.25) 100%);
  }
  .lib-cine-facts { grid-template-columns: 1fr; gap: 0.45rem; margin: 0 1.5rem; padding: 1.1rem 0 1.4rem; }
  .lib-scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .lib-cine-content { padding: clamp(12rem, 48vw, 15rem) 1.25rem 1.2rem; }
  .lib-cine-facts { margin: 0 1.25rem; }
  .lib-hero-ctas { margin-top: 1.8rem; }
  .lib-hero-ctas .lib-btn { padding: 1rem 1.1rem; font-size: 11px; letter-spacing: 0.1em; white-space: nowrap; }
}

/* =====================================================================
   PATHS: full-bleed split screen ("Where is your business right now?").
   Edge to edge and flush with the hero: the list of needs on the left,
   the chosen path's photo filling the whole right half with its copy
   over it. The list advances on its own while the section is on screen
   (library-landing.js), pausing on hover or focus and stopping for good
   once a visitor picks a path.
   ===================================================================== */
.lib-split {
  margin: 0; border-radius: 0; box-shadow: none;
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: clamp(640px, 94vh, 900px);
}
.lib-split::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(229, 198, 151, 0.4) 30%, rgba(229, 198, 151, 0.4) 70%, transparent);
}
.lib-split-copy {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 4vh, 3rem);
  padding: clamp(4.5rem, 9vw, 7rem) clamp(1.6rem, 4.5vw, 4.5rem) clamp(3.5rem, 7vw, 6rem) clamp(1.6rem, 6vw, 5.5rem);
}
.lib-split .lib-h2 { font-size: clamp(2rem, 3vw, 3.1rem); }
.lib-split .lib-h2 em { white-space: nowrap; }

/* The list: hairlines, no boxes. */
.lib-split .lib-path-tabs { gap: 0; border-top: 1px solid rgba(229, 198, 151, 0.16); }
.lib-split .lib-path-tab,
.lib-split .lib-path-tab:hover,
.lib-split .lib-path-tab[aria-selected="true"] {
  position: relative; background: transparent; border: 0; border-bottom: 1px solid rgba(229, 198, 151, 0.16);
  border-radius: 0; box-shadow: none; transform: none;
}
.lib-split .lib-path-tab { grid-template-columns: 2.6rem 1fr auto; padding: 1.3rem 0.2rem; align-items: start; }
.lib-split .lib-path-num { color: rgba(229, 198, 151, 0.45); padding-top: 0.35rem; font-style: italic; transition: color 0.4s ease; }
.lib-split .lib-path-label strong { font-size: clamp(1.25rem, 1.8vw, 1.6rem); color: rgba(250, 249, 246, 0.55); transition: color 0.4s ease; }
.lib-split .lib-path-label span {
  display: block; color: rgba(250, 249, 246, 0.6); max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  transition: max-height 0.5s var(--ease), opacity 0.4s ease, margin-top 0.4s ease;
}
.lib-split .lib-path-arrow { color: rgba(229, 198, 151, 0.35); margin-top: 0.45rem; transition: color 0.4s ease, transform 0.5s var(--ease); }
.lib-split .lib-path-tab:hover .lib-path-label strong { color: rgba(250, 249, 246, 0.85); }
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-label strong { color: #FBF8F2; }
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-label span { max-height: 3.2em; opacity: 1; margin-top: 0.3rem; color: rgba(250, 249, 246, 0.6); }
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-num,
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-arrow { color: var(--gold-light); }
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-arrow { transform: translateX(6px); }
.lib-path-progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--gold-light); }
.lib-split .lib-path-tab[aria-selected="true"] .lib-path-progress { width: 100%; }
.lib-split.is-auto .lib-path-tab[aria-selected="true"] .lib-path-progress { width: 0; animation: lib-progress 7s linear forwards; }
.lib-split.is-paused .lib-path-progress, .lib-split.is-away .lib-path-progress { animation-play-state: paused !important; }
@keyframes lib-progress { from { width: 0; } to { width: 100%; } }

/* The photo half: full height, out to the edge. */
.lib-split .lib-path-stage { min-height: 100%; border-radius: 0; border: 0; box-shadow: none; background: #0A1911; }
.lib-split .lib-path-panel { padding: clamp(2rem, 4.5vw, 4rem); transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s; }
.lib-split .lib-path-panel.is-active { transition-delay: 0s; }
.lib-split .lib-path-panel img { transform: scale(1.12); transition: transform 9s cubic-bezier(0.16, 1, 0.3, 1); }
.lib-split .lib-path-panel.is-active img { transform: scale(1.02); }
.lib-split .lib-path-panel::before {
  background:
    linear-gradient(90deg, rgba(12, 30, 20, 0.7) 0%, rgba(12, 30, 20, 0) 28%),
    linear-gradient(180deg, rgba(10, 25, 17, 0.15) 0%, rgba(10, 25, 17, 0.3) 40%, rgba(10, 25, 17, 0.96) 100%);
}
.lib-split .lib-path-body { max-width: 560px; }
.lib-split .lib-path-body h3 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.15; margin-bottom: 0.8rem; }
.lib-path-kicker { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; font-size: 11px; font-weight: 700; letter-spacing: 0.24em; color: var(--gold-light); }
.lib-path-kicker i { width: 28px; height: 1px; background: currentColor; opacity: 0.6; }
.lib-split .lib-path-body > * { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.8s var(--ease); }
.lib-split .lib-path-panel.is-active .lib-path-body > * { opacity: 1; transform: none; }
.lib-split .lib-path-panel.is-active .lib-path-body > :nth-child(2) { transition-delay: 0.08s; }
.lib-split .lib-path-panel.is-active .lib-path-body > :nth-child(3) { transition-delay: 0.16s; }
.lib-split .lib-path-panel.is-active .lib-path-body > :nth-child(4) { transition-delay: 0.24s; }
.lib-split .lib-path-links { grid-template-columns: 1fr 1fr; }

@media (max-width: 1100px) {
  .lib-split .lib-path-links { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .lib-split { grid-template-columns: 1fr; min-height: 0; }
  .lib-split-copy { padding: 4rem 1.5rem 2rem; }
  .lib-split .lib-path-stage { min-height: 560px; }
  .lib-split .lib-path-panel::before { background: linear-gradient(180deg, rgba(10, 25, 17, 0.2) 0%, rgba(10, 25, 17, 0.35) 35%, rgba(10, 25, 17, 0.96) 100%); }
}
@media (max-width: 640px) {
  .lib-split-copy { padding: 3.4rem 1.25rem 1.6rem; }
  .lib-split .lib-path-stage { min-height: 580px; border-radius: 0; }
  .lib-split .lib-path-panel { padding: 1.5rem 1.25rem 1.75rem; }
  .lib-split .lib-path-tab { padding: 1.05rem 0.1rem; }
  .lib-split .lib-path-label strong { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lib-split .lib-path-body > * { opacity: 1; transform: none; }
}

/* Index on tablets and phones: a small photo per row, no cursor photo. */
@media (max-width: 900px) {
  .lib-index-head { align-items: flex-start; }
  .lib-index-filter { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .lib-index-row { grid-template-columns: 64px minmax(0, 1fr) 2.6rem; gap: 1rem; padding: 1.15rem 0; }
  .lib-index-meta { font-size: 9.5px; margin-bottom: 0; }
  .lib-index-thumb { width: 64px; height: 64px; aspect-ratio: auto; border-radius: 12px; box-shadow: none; }
  .lib-index-thumb .lib-index-num, .lib-index-thumb::after { display: none; }
  .lib-index-title { font-size: 1.22rem; }
  .lib-index-desc { font-size: 0.82rem; }
  .lib-index-arrow { width: 38px; height: 38px; }
}
.lib-steps-sec + .lib-cta-section { padding-top: 0; }

/* =====================================================================
   HOW IT WORKS: a cinematic billboard (library.html #js-lib-bb, driven
   by library-landing.js "Billboard"). Four scenes over the HD stage
   footage, edge to edge. Each scene wipes in from the right behind a warm
   light streak, its footage pushes in slowly, the headline rises from a
   mask and a giant outlined numeral turns over. The chapter bar fills
   like a video's progress bar and is the navigation.
   ===================================================================== */
.lib-bb {
  --bb-move: cubic-bezier(0.77, 0, 0.175, 1);
  position: relative; isolation: isolate; overflow: hidden; color: #FBF8F2; background: #0A1911;
  display: grid; grid-template-rows: auto 1fr auto; gap: 2rem;
  min-height: clamp(640px, calc(100vh - 2 * var(--frame, 24px) - 4px), 920px);
  /* top room for the floating site header, which sits over this section */
  padding: clamp(6.5rem, 12vh, 8rem) clamp(1.5rem, 6vw, 5.5rem) clamp(1.4rem, 2.6vw, 2.2rem);
}
.lib-bb-media { position: absolute; inset: 0; z-index: -4; }
.lib-bb-slide { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
.lib-bb-slide.is-current { visibility: visible; z-index: 2; }
.lib-bb-slide.is-prev { visibility: visible; z-index: 1; }
.lib-bb-slide img, .lib-bb-slide video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.lib-bb-slide video { display: none; opacity: 0; transition: opacity 0.6s ease; }
.lib-bb.has-video .lib-bb-slide video { display: block; }
.lib-bb-slide.is-ready video { opacity: 1; }
.lib-bb-slide.is-current img, .lib-bb-slide.is-current video { animation: lib-bb-push 9.5s linear both; }
.lib-bb.is-paused .lib-bb-slide img, .lib-bb.is-paused .lib-bb-slide video { animation-play-state: paused; }
.lib-bb-slide.is-entering { animation: lib-bb-wipe 1.15s var(--bb-move) both; }
@keyframes lib-bb-push { from { transform: scale(1.12); } to { transform: scale(1.0); } }
@keyframes lib-bb-wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

.lib-bb-shade {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 17, 11, 0.9) 0%, rgba(7, 17, 11, 0.7) 38%, rgba(7, 17, 11, 0.25) 70%, rgba(7, 17, 11, 0.15) 100%),
    linear-gradient(0deg, rgba(7, 17, 11, 0.9) 0%, rgba(7, 17, 11, 0) 34%),
    linear-gradient(180deg, rgba(7, 17, 11, 0.6) 0%, rgba(7, 17, 11, 0) 26%);
}
.lib-bb-streak {
  position: absolute; top: 0; bottom: 0; left: 0; width: 22vw; z-index: -2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 232, 190, 0.32) 45%, rgba(255, 245, 225, 0.5) 50%, rgba(255, 232, 190, 0.32) 55%, transparent);
  transform: translateX(100vw);
}
.lib-bb.is-wiping .lib-bb-streak { animation: lib-bb-streak 1.15s var(--bb-move) both; }
@keyframes lib-bb-streak { 0% { opacity: 1; transform: translateX(100vw); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(-24vw); } }

.lib-bb-big {
  position: absolute; right: clamp(1rem, 4vw, 4rem); bottom: clamp(3.5rem, 8vw, 6rem); z-index: -1; pointer-events: none;
  font-family: 'Playfair Display', serif; font-style: italic; line-height: 0.8; font-size: clamp(9rem, 24vw, 22rem);
  color: transparent; -webkit-text-stroke: 1px rgba(229, 198, 151, 0.38);
}
.lib-bb-big span { display: inline-block; }
.lib-bb-big.is-swap span { animation: lib-bb-num 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes lib-bb-num { from { opacity: 0; transform: translateY(18%) rotate(4deg); } to { opacity: 1; transform: none; } }

.lib-bb-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.lib-bb .lib-eyebrow { color: var(--gold-light); }
.lib-bb-title { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.3; color: rgba(251, 248, 242, 0.9); margin-top: 0.6rem; }
.lib-bb-title em { color: var(--gold-light); }
.lib-bb-toggle {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #FBF8F2; background: rgba(250, 249, 246, 0.08); border: 1px solid rgba(250, 249, 246, 0.28);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color 0.3s ease, border-color 0.3s ease;
}
.lib-bb-toggle:hover { background: rgba(250, 249, 246, 0.16); border-color: rgba(250, 249, 246, 0.55); }
.lib-bb-toggle svg { width: 16px; height: 16px; }
.lib-bb-toggle .i-play, .lib-bb-toggle[aria-pressed="true"] .i-pause { display: none; }
.lib-bb-toggle[aria-pressed="true"] .i-play { display: block; }
.lib-bb-toggle:focus-visible, .lib-bb-tab:focus-visible, .lib-bb .lib-btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.lib-bb-scenes { align-self: center; max-width: 820px; }
.lib-bb-scene[hidden] { display: none; }
.lib-bb-num { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 11px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-light); }
.lib-bb-num i { width: 34px; height: 1px; background: currentColor; opacity: 0.6; }
.lib-bb-head { overflow: hidden; margin: 1rem 0 1.2rem; padding-bottom: 0.08em; }
.lib-bb-head span { display: inline-block; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(3rem, 7.2vw, 6.6rem); line-height: 1.02; letter-spacing: -0.015em; color: #FBF8F2; }
.lib-bb-scene:last-child .lib-bb-head span { font-size: clamp(2.6rem, 5.4vw, 5rem); }
.lib-bb-head em { color: var(--gold-light); }
.lib-bb-text { font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.75; color: rgba(250, 249, 246, 0.8); max-width: 540px; }
.lib-bb-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.lib-bb-scene.is-current .lib-bb-num { animation: lib-bb-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both; }
.lib-bb-scene.is-current .lib-bb-head span { animation: lib-bb-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
.lib-bb-scene.is-current .lib-bb-text { animation: lib-bb-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both; }
.lib-bb-scene.is-current .lib-bb-actions { animation: lib-bb-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.95s both; }
@keyframes lib-bb-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes lib-bb-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* The chapter bar: a video's progress bar, split into chapters. */
.lib-bb-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.6rem, 1.6vw, 1.4rem); }
.lib-bb-tab {
  position: relative; text-align: left; background: none; border: 0; cursor: pointer; padding: 1rem 0 0.2rem; color: rgba(250, 249, 246, 0.5);
  font-family: 'Montserrat', sans-serif; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.3s ease;
}
.lib-bb-tab::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: rgba(250, 249, 246, 0.2); }
.lib-bb-fill { position: absolute; left: 0; top: 0; height: 2px; width: 0; border-radius: 2px; background: var(--gold-light); }
.lib-bb-tab b { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400; font-size: 0.95rem; letter-spacing: 0; color: var(--gold-light); margin-right: 0.35rem; }
.lib-bb-tab:hover, .lib-bb-tab[aria-selected="true"] { color: #FBF8F2; }
.lib-bb-tab.is-done .lib-bb-fill, .lib-bb-tab[aria-selected="true"] .lib-bb-fill { width: 100%; }
.lib-bb.is-auto .lib-bb-tab[aria-selected="true"] .lib-bb-fill { width: 0; animation: lib-bb-fill var(--dur, 8s) linear forwards; }
.lib-bb.is-paused .lib-bb-fill { animation-play-state: paused !important; }
@keyframes lib-bb-fill { from { width: 0; } to { width: 100%; } }

@media (max-width: 700px) {
  .lib-bb { min-height: min(100svh, 860px); min-height: min(100vh, 860px); gap: 1.4rem; }
  .lib-bb-shade { background: linear-gradient(0deg, rgba(7, 17, 11, 0.96) 0%, rgba(7, 17, 11, 0.85) 45%, rgba(7, 17, 11, 0.35) 72%, rgba(7, 17, 11, 0.6) 100%); }
  .lib-bb-scenes { align-self: end; }
  .lib-bb-head span { font-size: clamp(2.5rem, 12vw, 3.4rem); }
  .lib-bb-scene:last-child .lib-bb-head span { font-size: clamp(2rem, 8.6vw, 2.6rem); }
  .lib-bb-big { bottom: auto; font-size: 9.5rem; }
  .lib-bb-actions .lib-btn { flex: 1 1 100%; justify-content: center; }
  .lib-bb-tab { font-size: 0.6rem; letter-spacing: 0.06em; white-space: nowrap; }
  .lib-bb { padding-top: 5.6rem; }
  .lib-bb-big { top: 8rem; }
  .lib-bb-tab b { display: none; }
  .lib-bb-streak { width: 40vw; }
}
@media (prefers-reduced-motion: reduce) {
  .lib-bb *, .lib-bb.is-wiping .lib-bb-streak { animation: none !important; }
  .lib-bb-slide img, .lib-bb-slide video { transform: none; }
}

/* =====================================================================
   NEW IN THE LIBRARY: characterful glass cards in a slider
   (library-landing.js). Soft gold and green light sits behind the row so
   the glass reads. Each card has a cover (uploaded image or drawn art in
   its type's accent), a chip (price or format), and a specific action.
   Three per view on desktop, two on tablets, one and a peek on phones;
   arrows, counter and progress appear only when there is more than fits.
   ===================================================================== */
.lib-fresh { position: relative; isolation: isolate; overflow: hidden; }
.lib-fresh::before, .lib-fresh::after { content: ''; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(40px); }
.lib-fresh::before { width: 46vw; height: 30vw; max-width: 640px; max-height: 420px; left: 4%; top: 34%; background: radial-gradient(closest-side, rgba(229, 198, 151, 0.75), rgba(229, 198, 151, 0)); }
.lib-fresh::after { width: 40vw; height: 28vw; max-width: 560px; max-height: 380px; right: 2%; top: 44%; background: radial-gradient(closest-side, rgba(47, 111, 79, 0.3), rgba(47, 111, 79, 0)); }

.lf-head { align-items: flex-end; }
.lf-controls { display: flex; align-items: center; gap: 0.6rem; }
.lf-controls[hidden], .lf-progress[hidden] { display: none; }
.lf-count { font-size: 0.82rem; color: var(--text-muted); margin-right: 0.5rem; letter-spacing: 0.04em; }
.lf-count b { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400; font-size: 1.35rem; color: var(--dark-green); }
.lf-nav {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--dark-green);
  background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(12, 30, 20, 0.16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.4s var(--ease);
}
.lf-nav svg { width: 18px; height: 18px; }
.lf-nav:hover:not(:disabled) { background: var(--dark-green); color: var(--gold-light); border-color: var(--dark-green); transform: scale(1.05); }
.lf-nav:disabled { opacity: 0.35; cursor: default; }
.lf-nav:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

.lf-track {
  --gap: clamp(1rem, 2vw, 1.6rem);
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 0.3rem; scrollbar-width: none;
  padding: 1rem 0.3rem 2.6rem; margin: -1rem -0.3rem -1.2rem;
}
.lf-track::-webkit-scrollbar { display: none; }
.lf-track.is-slider { cursor: grab; }
.lf-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.lf-track.is-dragging .lf-card { pointer-events: none; }
.lf-track:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 4px; }
.lf-slide { scroll-snap-align: start; min-width: 0; display: flex; }

.lf-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; text-decoration: none; color: inherit;
  border-radius: 24px; padding: 10px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 2px rgba(12, 30, 20, 0.05), 0 28px 60px -32px rgba(12, 30, 20, 0.45);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease), box-shadow 0.6s var(--ease);
  animation: lib-glass-float 7s ease-in-out infinite; animation-play-state: paused;
}
.lf-slide:nth-child(3n+2) .lf-card { animation-duration: 8s; animation-delay: -2.5s; }
.lf-slide:nth-child(3n+3) .lf-card { animation-duration: 7.5s; animation-delay: -5s; }
.lib-fresh.is-playing .lf-card { animation-play-state: running; }
.lf-track.is-dragging .lf-card, .lf-card:hover { animation-play-state: paused; }
@keyframes lib-glass-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
.lf-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 48%, transparent 60%);
  transform: translateX(-120%); transition: transform 1.1s var(--ease);
}
.lf-card:hover, .lf-card:focus-visible {
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 2px 4px rgba(12, 30, 20, 0.05), 0 44px 80px -34px rgba(12, 30, 20, 0.55);
}
.lf-card:hover::after, .lf-card:focus-visible::after { transform: translateX(120%); }
.lf-card:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 4px; }

/* Cover */
.lf-cover {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.35), transparent 50%),
    linear-gradient(150deg, color-mix(in srgb, var(--acc) 18%, #FBF8F2), color-mix(in srgb, var(--acc) 34%, #F1E6D2));
}
.lf-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lf-card:hover .lf-cover > img { transform: scale(1.05); }
.lf-chip, .lf-new {
  position: absolute; z-index: 1; top: 12px; padding: 0.38rem 0.75rem; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.2;
}
.lf-chip { right: 12px; background: rgba(255, 255, 255, 0.85); color: var(--dark-green); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 16px -10px rgba(12, 30, 20, 0.5); }
.lf-new { left: 12px; background: var(--dark-green); color: var(--gold-light); }

/* Body */
.lf-body { display: flex; flex-direction: column; flex: 1; gap: 0.7rem; padding: 1.15rem 0.9rem 0.9rem; }
.lf-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lf-kind { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc); }
.lf-kind::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.lf-date { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }
.lf-title { margin: 0; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.2rem, 1.6vw, 1.42rem); line-height: 1.25; color: var(--dark-green); }
.lf-text { margin: 0; flex: 1; font-size: 0.86rem; line-height: 1.6; color: var(--text-muted); }
.lf-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.4rem; padding-top: 0.9rem; border-top: 1px solid rgba(12, 30, 20, 0.08); }
.lf-go { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dark-green); }
.lf-go svg { width: 15px; height: 15px; padding: 7px; box-sizing: content-box; border-radius: 50%; background: var(--dark-green); color: var(--gold-light); transition: transform 0.5s var(--ease), background-color 0.3s ease; }
.lf-card:hover .lf-go svg { transform: translateX(4px); background: var(--acc); }
.lf-idx { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.05rem; color: rgba(145, 117, 81, 0.6); }

/* Progress line under the slider */
.lf-progress { position: relative; height: 2px; margin-top: 1.4rem; border-radius: 2px; background: rgba(12, 30, 20, 0.1); overflow: hidden; }
.lf-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 33%; border-radius: 2px; background: var(--dark-green); transition: transform 0.2s linear, width 0.3s ease; }

@media (max-width: 1000px) {
  .lf-track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 640px) {
  .lf-track { grid-auto-columns: 86%; }
  .lf-head { align-items: flex-start; }
  .lf-controls { width: 100%; justify-content: flex-end; }
  .lf-nav { width: 44px; height: 44px; }
  .lib-fresh::before { width: 90vw; height: 60vw; left: -10%; top: 30%; }
  .lib-fresh::after { width: 80vw; height: 60vw; right: -20%; top: 55%; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-card { animation: none; transform: none; }
  .lf-card:hover { transform: translateY(-4px); }
}

/* =====================================================================
   Green touches on the ivory sections ("Everything in the library" and
   "New in the library"): soft green shading that fades into the ivory,
   and fine green line shapes kept to the margins (library-landing.js,
   LAYOUTS, lib-shapes--green).
   ===================================================================== */
.lib-shapes--green { color: #2F6F4F; }
.lib-shapes--green .lib-shape--glow { background: radial-gradient(closest-side, rgba(47, 111, 79, 0.22), rgba(47, 111, 79, 0.07) 55%, transparent); }
@media (max-width: 900px) { .lib-shapes--green .lib-shape--glow { opacity: 0.45 !important; } }
.lib-shapes--green .lib-shape--spark { color: #3D7A58; }
#collection.lib-band--light {
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(47, 111, 79, 0.1), transparent 65%),
    radial-gradient(760px 520px at 100% 100%, rgba(47, 111, 79, 0.12), transparent 65%),
    #FBF8F2;
}
.lib-fresh.lib-band--ivory {
  background:
    radial-gradient(1000px 360px at 50% 0%, rgba(47, 111, 79, 0.06), transparent 70%),
    radial-gradient(700px 480px at 100% 100%, rgba(47, 111, 79, 0.08), transparent 65%),
    #FBF8F2;
}
.lib-fresh .lib-wrap { position: relative; z-index: 1; }
