/* Home sections: featured genres (tabs) and the start-here chooser. Uses the theme tokens from main.css. */

.sec-eyebrow { font: 600 12.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--foil); margin: 0 0 10px; }

/* ---------- Featured genres ---------- */
.fg { margin-top: 26px; }
.fg-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.fg-tabs button {
	flex: none; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 0;
	padding: 13px 18px; font: 600 15px/1.2 var(--sans); color: var(--muted); cursor: pointer;
	transition: color .15s, border-color .15s;
}
.fg-tabs button:hover { color: var(--ink); }
.fg-tabs button[aria-selected="true"] { color: var(--cloth-deep); border-bottom-color: var(--foil); }
.fg-tabs button:focus-visible { outline: 2px solid var(--cloth); outline-offset: -2px; }

.fg-panel { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 56px); padding: 30px 0 6px; }
.fg-panel[hidden] { display: none; }
.fg-panel:focus { outline: none; }
.fg-panel:focus-visible { outline: 2px solid var(--cloth); outline-offset: 6px; }
.fg-lede { margin: 0 0 14px; font-size: 1.06rem; line-height: 1.6; color: var(--ink); }
.fg-side .btn { margin-top: 6px; }

.fg-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fg-card {
	position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%;
	padding: 16px 44px 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
	color: var(--ink); text-decoration: none; transition: border-color .15s;
}
.fg-card strong { font: 600 16px/1.3 var(--serif); }
.fg-card span { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.fg-card::after { content: "→"; position: absolute; right: 16px; top: 16px; color: var(--foil); transition: transform .15s; }
.fg-card:hover { border-color: var(--cloth); }
.fg-card:hover::after { transform: translateX(3px); }
.fg-card:focus-visible { outline: 2px solid var(--cloth); outline-offset: 2px; }
.fg-also { margin: 14px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.fg-also span { font-weight: 600; color: var(--ink); }
.fg-covers { list-style: none; display: flex; gap: 12px; margin: 0 0 18px; padding: 0 0 6px; overflow-x: auto; scroll-snap-type: x proximity; }
.fg-covers li { flex: none; scroll-snap-align: start; }
.fg-covers img { display: block; height: 190px; width: auto; border-radius: 2px; box-shadow: 0 6px 16px rgba(21, 43, 38, .22); }

/* ---------- Start here: where is your book today ---------- */
.sh-section { padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.sh-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.sh-opt {
	display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
	background: var(--white); color: var(--ink); border: 1.5px solid var(--line); border-radius: var(--radius);
	padding: 18px 18px 16px; font: 400 14.5px/1.4 var(--sans);
	transition: border-color .15s, background .15s, color .15s;
}
.sh-opt .sh-n { font: 600 12.5px/1 var(--sans); letter-spacing: .1em; color: var(--foil); margin-bottom: 6px; }
.sh-opt strong { font: 600 17px/1.25 var(--serif); }
.sh-opt > span:last-child { color: var(--muted); }
.sh-opt:hover { border-color: var(--cloth); }
.sh-opt[aria-checked="true"] { background: var(--cloth); border-color: var(--cloth); color: #fff; }
.sh-opt[aria-checked="true"] > span:last-child { color: #dfe8e4; }
.sh-opt:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }

.sh-results { margin-top: 16px; }
.sh-result {
	display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px);
	background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--foil); border-radius: var(--radius);
	padding: clamp(22px, 3vw, 34px);
}
.sh-result[hidden] { display: none; }
.sh-result h3 { margin: 0 0 .4em; font-size: 1.35rem; }
.sh-result p { margin: 0 0 12px; }
.sh-note { font-size: 14.5px; color: var(--muted); }
.sh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.sh-links { list-style: none; margin: 0; padding: 0; align-self: start; }
.sh-links li { border-bottom: 1px solid var(--line); }
.sh-links li:first-child { border-top: 1px solid var(--line); }
.sh-links a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; color: var(--ink); font-weight: 500; text-decoration: none; }
.sh-links a::after { content: "→"; color: var(--foil); transition: transform .15s; }
.sh-links a:hover { color: var(--cloth); }
.sh-links a:hover::after { transform: translateX(3px); }

@media (max-width: 900px) {
	.sh-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sh-result, .fg-panel { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.sh-options, .fg-cards { grid-template-columns: 1fr; }
	.fg-tabs button { padding: 12px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
	.sh-result:not([hidden]), .fg-panel:not([hidden]) { animation: sec-in .22s ease-out; }
	@keyframes sec-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- Pill tabs and cover row ---------- */
.fg { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3vw, 32px); box-shadow: 0 14px 40px rgba(21, 43, 38, .08); }
.fg-tabs { gap: 10px; border-bottom: 0; padding: 2px 2px 12px; }
.fg-tabs button { margin: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 20px; background: var(--paper); color: var(--ink); }
.fg-tabs button:hover { border-color: var(--cloth); color: var(--cloth-deep); }
.fg-tabs button[aria-selected="true"] { background: var(--cloth); border-color: var(--cloth); color: #fff; box-shadow: 0 6px 16px rgba(21, 43, 38, .2); }
.fg-panel { padding-top: 14px; }
.fg-covers { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); overflow: visible; }
.fg-covers li { aspect-ratio: 2 / 3; background: var(--paper-2, #ece9e0); }
.fg-covers img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 20px rgba(21, 43, 38, .25); }
.fg-credit { grid-column: 1 / -1; margin: -4px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
	.fg-covers { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
	.fg-covers li { flex: none; width: 150px; scroll-snap-align: start; }
}

/* ---------- Sample covers (clearly labelled), reviews slider, filters, portfolio ---------- */
[data-g][hidden], .pf-card[hidden] { display: none !important; }
.cv { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; aspect-ratio: 2 / 3; box-sizing: border-box; padding: 14% 12%; text-align: center; color: var(--foil-soft); background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(0,0,0,.2)), var(--bg, var(--cloth)); border-radius: 3px; box-shadow: inset 7px 0 0 rgba(0,0,0,.2), 0 8px 20px rgba(21,43,38,.25); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.cv::after { content: ""; position: absolute; inset: 8% 8% 8% 13%; border: 1.5px solid var(--foil); opacity: .8; pointer-events: none; }
.cv-title { font: 600 clamp(.95rem, 1.5vw, 1.25rem)/1.2 var(--serif); color: #fff; }
.cv-rule { display: block; width: 34%; height: 2px; background: var(--foil); }
.cv-by { font: 500 clamp(.58rem, .85vw, .76rem)/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; font-style: normal; }
.cv-tag { position: absolute; top: 9px; right: 9px; z-index: 2; background: rgba(255,255,255,.92); color: var(--cloth-deep); font: 700 9.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 4px 6px; border-radius: 2px; }
.cv-v1 { background: radial-gradient(circle at 72% 18%, rgba(184,137,59,.4), transparent 46%), linear-gradient(160deg, rgba(255,255,255,.1), rgba(0,0,0,.24)), var(--bg, var(--cloth)); }
.cv-v2 { background: linear-gradient(180deg, rgba(0,0,0,0) 0 56%, rgba(0,0,0,.28) 56% 100%), linear-gradient(160deg, rgba(255,255,255,.1), rgba(0,0,0,.12)), var(--bg, var(--cloth)); }
.fg-covers li:hover .cv, .pf-card:hover .cv, .pf-card:focus-visible .cv, .pf-card[aria-expanded="true"] .cv { transform: translateY(-6px) rotate(-1.2deg); box-shadow: inset 7px 0 0 rgba(0,0,0,.2), 0 16px 28px rgba(21,43,38,.32); }
.fg-covers li.is-sample { background: none; }

.stars { color: var(--foil); letter-spacing: .12em; font-size: 1.05rem; display: block; margin-bottom: 6px; }
.review-title { margin: 0 0 .35em; font: 600 1.12rem/1.3 var(--serif); }
.review footer span { display: block; }
.rv { margin-top: 24px; }
.rv-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rv-track::-webkit-scrollbar { display: none; }
.rv-track .review { flex: 0 0 100%; box-sizing: border-box; scroll-snap-align: start; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--foil); }
@media (min-width: 900px) { .rv-track .review { flex-basis: calc((100% - 24px) / 2); } }
.rv-ctrl { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.rv-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); color: var(--cloth-deep); font-size: 18px; line-height: 1; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.rv-btn:hover { background: var(--cloth); border-color: var(--cloth); color: #fff; }
.rv-btn:focus-visible, .chips button:focus-visible, .rv-dots button:focus-visible, .pf-card:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }
.rv-dots { display: flex; align-items: center; }
.rv-dots button { width: 24px; height: 24px; padding: 7px; border: 0; background: var(--line); background-clip: content-box; border-radius: 50%; cursor: pointer; transition: width .2s, background-color .2s; }
.rv-dots button[aria-current="true"] { width: 40px; background-color: var(--foil); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }
.chips button { border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 18px; background: var(--paper); color: var(--ink); font: 600 14.5px/1.2 var(--sans); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chips button:hover { border-color: var(--cloth); }
.chips button[aria-pressed="true"] { background: var(--cloth); border-color: var(--cloth); color: #fff; }
.f-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.review-grid.is-filter { margin-top: 18px; }

.pf-note { margin: 0 0 6px; font-size: 14.5px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 20px; }
.pf-card { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.pf-cover { aspect-ratio: 2 / 3; }
.pf-card .pf-cap { display: flex; flex-direction: column; padding-top: 12px; font-size: 14.5px; color: var(--muted); }
.pf-card .pf-cap strong { color: var(--ink); font: 600 1rem/1.3 var(--serif); }
.pf-hint { margin: 22px 0 0; font-size: 14.5px; color: var(--muted); }
.pf-detail { margin-top: 24px; padding: clamp(20px, 3vw, 32px); background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--foil); border-radius: var(--radius); }
.pf-detail[hidden] { display: none; }
.pf-detail h3 { margin: 0 0 .3em; }
.pf-detail p { margin: 0 0 12px; }
.pf-detail ul { list-style: none; margin: 0 0 16px; padding: 0; }
.pf-detail li { border-bottom: 1px solid var(--line); }
.pf-detail li a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; color: var(--ink); font-weight: 500; text-decoration: none; }
.pf-detail li a::after { content: "\2192"; color: var(--foil); }
.pf-detail li a:hover { color: var(--cloth); }
@media (max-width: 1000px) { .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .cv { transition: none; } .cv, .pf-card:hover .cv { transform: none !important; } }