/* UT Flipbook — bookstore shelf. Every issue stands on a shelf; covers lean slightly and lift when pointed at. */
.utfb-store {
	--sh-gap: clamp(14px, 2.4vw, 34px);
	--sh-ink: #1d1a16;
	--sh-muted: #6b6259;
	--sh-wall: #f4efe8;
	--sh-plank: linear-gradient(180deg, #b98552 0%, #9a6a3d 38%, #7c522c 100%);
	--sh-plank-top: #d9a874;
	--sh-plank-h: 16px;
	--sh-plank-shadow: 0 16px 22px -8px rgb(60 35 10 / .55);
	--sh-book-shadow: 0 2px 2px rgb(0 0 0 / .18), 0 14px 26px -6px rgb(0 0 0 / .45);
	--sh-chip: rgb(0 0 0 / .06);
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: clamp(18px, 3.4vw, 48px) clamp(12px, 3vw, 44px) clamp(28px, 4vw, 56px);
	border-radius: 22px;
	background: var(--sh-bg, var(--sh-wall));
	color: var(--sh-ink);
	font-family: inherit;
	overflow: hidden;
	isolation: isolate;
}
.utfb-store *, .utfb-store *::before, .utfb-store *::after { box-sizing: border-box; }
.utfb-store--wood { background: var(--sh-bg, radial-gradient(120% 70% at 50% 0%, #fbf7f1 0%, #efe6da 60%, #e7dccd 100%)); }
.utfb-store--dark {
	--sh-ink: #f3efe9; --sh-muted: #b4aba1; --sh-wall: #15120f;
	--sh-plank: linear-gradient(180deg, #4a3423 0%, #3a281a 45%, #24180f 100%); --sh-plank-top: #6d4e35;
	--sh-plank-shadow: 0 20px 30px -8px rgb(0 0 0 / .85); --sh-book-shadow: 0 2px 3px rgb(0 0 0 / .5), 0 18px 34px -6px rgb(0 0 0 / .8); --sh-chip: rgb(255 255 255 / .08);
	background: var(--sh-bg, radial-gradient(90% 60% at 50% -10%, #3a2d22 0%, #1a1511 55%, #110e0b 100%));
}
.utfb-store--glass {
	--sh-ink: #f4f7fb; --sh-muted: #b9c4d0; --sh-wall: #0f1c2b;
	--sh-plank: linear-gradient(180deg, rgb(255 255 255 / .55) 0%, rgb(255 255 255 / .16) 30%, rgb(255 255 255 / .08) 100%); --sh-plank-top: rgb(255 255 255 / .85); --sh-plank-h: 12px;
	--sh-plank-shadow: 0 18px 30px -10px rgb(0 0 0 / .55), 0 0 30px rgb(140 200 255 / .15); --sh-book-shadow: 0 2px 3px rgb(0 0 0 / .35), 0 18px 34px -8px rgb(0 0 0 / .65); --sh-chip: rgb(255 255 255 / .12);
	background: var(--sh-bg, radial-gradient(80% 60% at 15% 0%, color-mix(in srgb, var(--sh-accent) 55%, #0b1a2a) 0%, transparent 60%), radial-gradient(70% 60% at 100% 100%, #2a3f64 0%, transparent 60%), #0d1826);
}
.utfb-store--glass .utfb-bk::after { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid rgb(255 255 255 / .6); }
.utfb-store--minimal {
	--sh-wall: transparent; --sh-ink: inherit; --sh-muted: #78808a;
	--sh-plank: linear-gradient(180deg, #e9ecef, #d5dae0); --sh-plank-top: #fff; --sh-plank-h: 6px; --sh-plank-shadow: 0 10px 14px -8px rgb(0 0 0 / .25);
	padding-left: 0; padding-right: 0; border-radius: 0;
}
.utfb-store--white {
	--sh-wall: #fbfbfc; --sh-ink: #14181d; --sh-muted: #6c7480;
	--sh-plank: linear-gradient(180deg, #ffffff 0%, #eef0f3 55%, #dfe3e8 100%); --sh-plank-top: #fff; --sh-plank-h: 14px;
	--sh-plank-shadow: 0 16px 24px -10px rgb(20 30 45 / .3);
	background: var(--sh-bg, linear-gradient(180deg, #ffffff, #f1f3f6));
	box-shadow: inset 0 0 0 1px rgb(0 0 0 / .05);
}

/* Heading and tools */
.utfb-store__head { text-align: center; max-width: 720px; margin: 0 auto clamp(18px, 3vw, 34px); }
.utfb-store__title { margin: 0; font-size: clamp(24px, 1rem + 2vw, 40px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: inherit; }
.utfb-store__intro { margin: 10px 0 0; color: var(--sh-muted); font-size: clamp(14px, .9rem + .2vw, 17px); }
.utfb-store__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 clamp(20px, 3vw, 34px); }
.utfb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.utfb-store .utfb-chips button { appearance: none; border: 0; margin: 0; min-height: 0; padding: 8px 15px; border-radius: 999px; background: var(--sh-chip); color: inherit; font: 600 13.5px/1.2 inherit; font-family: inherit; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0; }
.utfb-store .utfb-chips button.is-on { background: var(--sh-accent); color: #fff; }
.utfb-store__search { margin-left: auto; flex: 0 1 280px; }
.utfb-store__search input { width: 100%; height: 42px; margin: 0; padding: 0 16px 0 40px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); background: var(--sh-chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px 50%; color: inherit; font: inherit; font-size: 14px; box-shadow: none; }
.utfb-store__search input:focus { outline: 2px solid var(--sh-accent); outline-offset: 1px; }
.utfb-store .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.utfb-store__empty, .utfb-store__none { text-align: center; color: var(--sh-muted); padding: 30px 0; margin: 0; }
.utfb-store__none[hidden] { display: none; }

/* Featured latest issue */
.utfb-feat { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(22px, 4vw, 64px); align-items: center; max-width: 1040px; margin: 0 auto clamp(30px, 5vw, 64px); padding: clamp(10px, 2vw, 24px) 0 clamp(26px, 3vw, 40px); position: relative; }
.utfb-feat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, currentColor 22%, transparent), transparent); }
.utfb-feat__book .utfb-bk { aspect-ratio: auto; }
.utfb-feat__book .utfb-bk::after { left: 6%; right: 6%; }
.utfb-feat__kicker { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--sh-accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.utfb-feat__title { margin: 14px 0 6px; font-size: clamp(24px, 1rem + 2.2vw, 42px); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; color: inherit; }
.utfb-feat__meta { margin: 0; color: var(--sh-muted); font-size: 15px; }
.utfb-feat__text { margin: 16px 0 0; font-size: 16px; line-height: 1.6; max-width: 56ch; }
.utfb-store .utfb-feat__btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 13px 26px; border-radius: 12px; background: var(--sh-accent); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--sh-accent) 70%, transparent); transition: transform .2s, box-shadow .2s; }
.utfb-store .utfb-feat__btn:hover { transform: translateY(-2px); color: #fff; }
.utfb-store .utfb-feat__btn::after { content: "→"; }
@media (max-width: 700px) {
	.utfb-feat { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.utfb-feat__book { max-width: 230px; margin: 0 auto; width: 100%; }
	.utfb-feat__text { margin-left: auto; margin-right: auto; }
}

/* The shelves */
.utfb-shelf { display: grid; grid-template-columns: repeat(var(--sh-per, 5), minmax(0, 1fr)); column-gap: var(--sh-gap); row-gap: clamp(30px, 4vw, 52px); padding: 0 calc(var(--sh-gap) / 2); }
@media (max-width: 1000px) { .utfb-shelf { grid-template-columns: repeat(var(--sh-per-md, 4), minmax(0, 1fr)); } }
@media (max-width: 700px) { .utfb-shelf { grid-template-columns: repeat(var(--sh-per-sm, 3), minmax(0, 1fr)); } }
@media (max-width: 460px) { .utfb-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.utfb-slot { position: relative; min-width: 0; display: flex; flex-direction: column; }
.utfb-slot[hidden] { display: none; }

/* A book: the stand area keeps every plank at the same height. */
.utfb-store .utfb-bk { position: relative; display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 0.66; padding-bottom: var(--sh-plank-h); text-decoration: none; color: inherit; outline: none; perspective: 1100px; }
.utfb-bk::after { /* the plank — reaches into the gaps so neighbouring planks join up */
	content: ""; position: absolute; z-index: 0; left: calc(var(--sh-gap) / -2 - 1px); right: calc(var(--sh-gap) / -2 - 1px); bottom: 0; height: var(--sh-plank-h);
	background: var(--sh-plank); box-shadow: inset 0 2px 0 var(--sh-plank-top), var(--sh-plank-shadow);
}
.utfb-store--wood .utfb-bk::after, .utfb-store--dark .utfb-bk::after { background-image: repeating-linear-gradient(90deg, rgb(255 255 255 / .04) 0 2px, transparent 2px 9px, rgb(0 0 0 / .05) 9px 10px, transparent 10px 23px), var(--sh-plank); }
.utfb-store--dark .utfb-bk::before { /* a small spotlight over each issue */
	content: ""; position: absolute; z-index: 0; left: -10%; right: -10%; top: -6%; bottom: 0; background: radial-gradient(60% 50% at 50% 0%, rgb(255 225 170 / .16), transparent 70%); pointer-events: none;
}
.utfb-bk__cover {
	position: relative; z-index: 1; display: block; width: 82%; transform-origin: 50% 100%;
	transform: rotateY(-9deg) rotateX(2deg); transform-style: preserve-3d;
	border-radius: 2px 4px 4px 2px; box-shadow: var(--sh-book-shadow);
	transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
	background: #fff;
}
.utfb-store--s .utfb-bk__cover { width: 68%; }
.utfb-store--l .utfb-bk__cover { width: 94%; }
.utfb-bk__cover img { display: block; width: 100%; height: auto; max-height: none; border-radius: inherit; margin: 0; }
.utfb-bk__cover::before { /* spine: a fold and a soft highlight */
	content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
	background: linear-gradient(90deg, rgb(0 0 0 / .32) 0, rgb(255 255 255 / .28) 1.6%, rgb(0 0 0 / .14) 3.2%, transparent 7%, transparent 82%, rgb(255 255 255 / .08) 100%);
}
.utfb-bk__cover::after { /* page block seen from the side */
	content: ""; position: absolute; z-index: -1; top: 1.5%; bottom: .5%; right: -5px; width: 6px; border-radius: 0 3px 3px 0;
	background: repeating-linear-gradient(90deg, #fdfdfb 0 1px, #dcd8d0 1px 2px); box-shadow: 1px 0 2px rgb(0 0 0 / .2);
}
.utfb-store .utfb-bk:hover .utfb-bk__cover, .utfb-store .utfb-bk:focus-visible .utfb-bk__cover { transform: translateY(-12px) rotateY(0deg) scale(1.04); box-shadow: 0 4px 6px rgb(0 0 0 / .2), 0 30px 46px -10px rgb(0 0 0 / .5); }
.utfb-store .utfb-bk:focus-visible .utfb-bk__cover { outline: 3px solid var(--sh-accent); outline-offset: 3px; }
.utfb-bk__cta { position: absolute; z-index: 3; left: 50%; bottom: calc(var(--sh-plank-h) + 14px); transform: translate(-50%, 8px); padding: 7px 15px; border-radius: 999px; background: var(--sh-accent); color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; box-shadow: 0 6px 16px rgb(0 0 0 / .3); }
.utfb-store .utfb-bk:hover .utfb-bk__cta, .utfb-store .utfb-bk:focus-visible .utfb-bk__cta { opacity: 1; transform: translate(-50%, -10px); }
.utfb-bk__lock { position: absolute; z-index: 3; top: 10%; right: 10%; font-size: 13px; padding: 3px 6px; border-radius: 6px; background: rgb(0 0 0 / .55); }
.utfb-bk--big { padding-bottom: calc(var(--sh-plank-h) + 2px); }
.utfb-bk--big .utfb-bk__cover { width: 86%; transform: rotateY(-14deg) rotateX(3deg); }
@media (hover: none) { .utfb-bk__cover { transform: rotateY(-5deg); } .utfb-bk__cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .utfb-bk__cover, .utfb-bk__cta { transition: none; } }

/* Shelf label under each issue */
.utfb-slot__label { margin-top: calc(var(--sh-plank-h) * .5 + 14px); text-align: center; display: flex; flex-direction: column; gap: 3px; padding: 0 2px; }
.utfb-slot__label b { font-size: clamp(12.5px, .78rem + .15vw, 14.5px); line-height: 1.3; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.utfb-slot__label span { font-size: 12.5px; color: var(--sh-muted); }
.utfb-store--wood .utfb-slot__label b { color: #2d2016; }
@media (max-width: 600px) {
	.utfb-store__search { flex: 1 1 100%; margin-left: 0; }
	.utfb-shelf { row-gap: 22px; }
	.utfb-slot__label { margin-top: 12px; }
}
