/* Archive: teal line. The shelf (Libib link-out + library card), era tiles into the timeline,
   a card catalog of what's open and what's still being catalogued, and the contribute form on a bill. */

/* the shelf */
.shelf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px clamp(40px, 7vw, 120px); align-items: center; }
.shelf__lede { margin: -4px 0 18px; }
.shelf__art { position: relative; padding-top: 48px; }
.shelf__tag { position: absolute; left: 0; top: -6px; z-index: 3; }

/* Diona's shelf, fading in and out of the shadows like the footer's books: mostly desaturated, dimmed, soft on every edge,
   brightest across the middle of the spines */
.shelf__photo { position: relative; margin: 0 -6% 0 -4%; aspect-ratio: 1400 / 731; overflow: hidden;
  -webkit-mask: radial-gradient(ellipse 62% 64% at 52% 46%, #000 28%, transparent 100%); mask: radial-gradient(ellipse 62% 64% at 52% 46%, #000 28%, transparent 100%); }
.shelf__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }   /* desaturation (30% colour) + dimming are baked into the file: phones switch CSS filters off */

/* the library card */
.card { position: relative; z-index: 2; width: min(400px, 92%); margin: -64px 0 0 auto; padding: 20px 22px 18px; background: var(--paper); color: var(--ink-soft); transform: rotate(-3deg); box-shadow: 0 20px 30px rgb(0 0 0 / .5), 0 2px 4px rgb(0 0 0 / .35); }
.card__head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ink-soft); font: 500 13.6px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; }
.card__head img { width: 28px; height: auto; }
.card__kind { margin-left: auto; padding: 4px 8px; background: var(--teal); color: #000; font-size: 13px; }
.card__name { margin: 0 0 6px; font: 400 1.6rem/1 var(--f-hand); color: var(--ink-soft); }
.card__body { margin: 0 0 14px; font: 400 .92rem/1.5 var(--f-body); color: var(--ink-mid); }
.card__body b { font-weight: 400; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.card__link { display: inline-block; font: 500 14.4px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid var(--teal); padding-bottom: 3px; }
.card__link:hover { color: var(--teal-deep); }
.card__bar { position: absolute; right: 22px; bottom: 18px; width: 108px; height: 30px; background: repeating-linear-gradient(90deg, #141210 0 2px, transparent 2px 4px, #141210 4px 5px, transparent 5px 8px, #141210 8px 11px, transparent 11px 12px); opacity: .85; }
@media (max-width: 900px) { .shelf { grid-template-columns: minmax(0, 1fr); } .card { margin-top: -40px; } }
@media (max-width: 420px) { .card__bar { display: none; } }

/* eras: paint chips into the timeline */
.eras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.era a { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: end; gap: 6px; min-height: clamp(180px, 17vw, 240px); padding: 22px 24px; background: var(--black-2); border: 1px solid var(--hair); color: var(--cream); text-decoration: none; transition: border-color .2s var(--ease-out); }
.era a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--e); clip-path: inset(0 0 calc(100% - 8px) 0); transition: clip-path .5s var(--ease-out); }
.era a:hover::before, .era a:focus-visible::before { clip-path: inset(0 0 0 0); }
.era a:hover { border-color: var(--e); }
.era__decade { position: absolute; right: 16px; top: 10px; font: 800 clamp(2.232rem, 3.72vw, 3.472rem)/1 var(--f-label); color: rgb(241 233 216 / .1); letter-spacing: 0; transition: color .3s; }
.era a:hover .era__decade { color: rgb(0 0 0 / .18); }
.era__name { font: 800 clamp(1.178rem, 1.736vw, 1.612rem)/1 var(--f-label); letter-spacing: 0; text-transform: uppercase; }
.era__who { font: 400 .9rem/1.45 var(--f-body); color: var(--cream-soft); transition: color .3s; }
.era a:hover .era__who { color: var(--cream); }
@media (max-width: 900px) { .eras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .eras { grid-template-columns: minmax(0, 1fr); } .era a { min-height: 140px; } }

/* the card catalog */
.drawers { list-style: none; margin: 0; padding: clamp(14px, 1.6vw, 22px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); background: #1b1813; border: 1px solid #2c2720; box-shadow: inset 0 2px 0 rgb(255 255 255 / .04), 0 24px 40px rgb(0 0 0 / .45); }
.drawer { position: relative; display: grid; grid-template-rows: auto auto auto; align-content: start; justify-items: center; gap: 10px; padding: 22px 16px 20px; background: linear-gradient(180deg, #2a251e, #201c16); border: 1px solid #3a332a; box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), inset 0 -3px 0 rgb(0 0 0 / .3); color: var(--cream); text-decoration: none; }
.drawer__label { order: 1; min-width: 72%; padding: 8px 14px; text-align: center; background: linear-gradient(180deg, #e4cf8a, #b8963c); color: #1a1408; border: 2px solid #8d7330; font: 500 clamp(.88rem, 1.2vw, 1.12rem)/1 var(--f-label); letter-spacing: .10em; text-transform: uppercase; box-shadow: 0 1px 0 rgb(255 255 255 / .2); }
.drawer__pull { order: 2; width: 54px; height: 16px; border-radius: 0 0 28px 28px; border: 3px solid #b8963c; border-top: 0; }
.drawer__state { order: 3; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-soft); }
.drawer--open { padding: 0; }
.drawer--open a { display: grid; align-content: start; justify-items: center; height: 100%; gap: 10px; width: 100%; padding: 22px 16px 20px; color: inherit; text-decoration: none; transition: transform .25s var(--ease-out); }
.drawer--open a:hover { transform: translateY(6px); }
.drawer--open .drawer__state { color: var(--teal-ink); }
.drawer--open .drawer__state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--teal-ink); vertical-align: 1px; }
.drawer:not(.drawer--open) { opacity: .78; }
@media (max-width: 640px) { .drawers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .drawer__label { min-width: 0; width: 100%; padding: 8px 6px; } }

/* contribute */
.give-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px clamp(40px, 6vw, 100px); align-items: start; }
.give-in__tag { display: inline-block; margin-top: 28px; }
.give-in__form { transform: rotate(.6deg); }
.give-in__form .field > span { color: var(--ink-mid); }
.give-in__form .input, .give-in__form .textarea, .give-in__form .select { background: rgb(255 255 255 / .55); border-color: rgb(20 18 16 / .35); color: var(--ink-soft); caret-color: var(--ink-soft); }
.give-in__form .select { background: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 22px) 55% / 6px 6px no-repeat, linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 16px) 55% / 6px 6px no-repeat, rgb(255 255 255 / .55); }
.give-in__form .select option { background: var(--paper); color: var(--ink-soft); }
.give-in__form .input::placeholder, .give-in__form .textarea::placeholder { color: #6c665c; }
.give-in__form .input:focus-visible, .give-in__form .textarea:focus-visible, .give-in__form .select:focus-visible { outline-color: var(--teal); }
.give-in__send { width: 100%; margin-top: 22px; }
@media (max-width: 900px) { .give-in { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .shelf__tag { font-size: 1.05rem; } }
.drawer--soon .drawer__state { color: var(--mustard-ink); }
.drawer--soon .drawer__state::before { background: var(--mustard-ink); }
@media (max-width: 1100px) and (min-width: 641px) { .drawers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* each era tile stands on a photograph of its decade */
.era__photo { position: absolute; inset: 0; z-index: -2; }
.era__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05); opacity: .32; transition: opacity .4s, transform .8s var(--ease-out); }
.era__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(20 18 15 / .2), rgb(20 18 15 / .85) 70%); }
.era a:hover .era__photo img { opacity: .5; transform: scale(1.04); }

.era a:hover::before, .era a:focus-visible::before { opacity: .6; }
.era__photo img { opacity: .5; }
.era__photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--e); mix-blend-mode: color; opacity: .55; }
.era__photo::after { z-index: 2; background: linear-gradient(rgb(20 18 15 / .05), rgb(20 18 15 / .8) 75%); }
@media (max-width: 900px) { .shelf__photo { margin: 0 -2%; } }

/* Malika's own books, linked to Amazon: two cloth spines laid flat, title in gold */
.authored { margin: 36px 0 0; padding-top: 26px; border-top: 1px solid var(--hair); }
.authored__title { margin: 0 0 14px; font: 500 12.8px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--cream); }
.authored__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.authored__book { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px 16px 26px;
  background: color-mix(in srgb, var(--b) 72%, #000); color: var(--cream); text-decoration: none; box-shadow: inset -8px 0 0 rgb(0 0 0 / .22), inset 3px 0 0 rgb(255 255 255 / .1);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.authored__book::before { content: ""; position: absolute; left: 10px; top: 12%; bottom: 12%; width: 2px; background: rgb(236 195 113 / .6); }
.authored__name { font: 800 1rem/1.25 var(--f-label); letter-spacing: .02em; text-transform: uppercase; color: var(--gold-bright, #ECC371); }
.authored__buy { flex: none; font: 500 11.5px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--cream); }
.authored__buy::after { content: " ↗"; }
.authored__book:hover { transform: translateX(4px); }
.authored__book:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .authored__book { transition: none; } .authored__book:hover { transform: none; } }
