/*
 * Blueprint look: home, reviews listing, single review (top band).
 * Dark grid paper, line drawings with labels, cards with copper corner marks,
 * photos that print out of a drawing on hover / tap. Photos are never cropped
 * (object-fit: contain or natural shape).
 * Loaded only on those pages (inc/blueprint.php). Reduced-motion block last.
 */

@property --d { syntax: '<number>'; inherits: true; initial-value: 0; }

.bp {
	--bp-dark: #1E1713;
	--bp-cream: #FBFAF7;
	--bp-copper: #E9935A;
	--bp-grid: linear-gradient(rgba(251, 250, 247, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(251, 250, 247, .09) 1px, transparent 1px), linear-gradient(rgba(251, 250, 247, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(251, 250, 247, .04) 1px, transparent 1px);
	--bp-grid-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

/* Dark zones: swap the colour tokens so every theme part (buttons, cards, rows, pills) turns light-on-dark */
.bp-dark {
	--bg: #1E1713;
	--bg2: rgba(30, 23, 19, .88);
	--bg3: rgba(251, 250, 247, .07);
	--ink: #FBFAF7;
	--mute: rgba(251, 250, 247, .72);
	--line: rgba(251, 250, 247, .22);
	--faint: rgba(251, 250, 247, .1);
	--stroke: rgba(251, 250, 247, .3);
	--crema: #E9935A;
	--crema-dark: #E9935A;
	--pop-ink: #FF8A9C;
	--shadow: 0 40px 70px -40px #000;
	--shadow-sm: 0 18px 40px -24px #000;
	color: var(--ink);
}
body.bp--dark { background-color: var(--bp-dark); background-image: var(--bp-grid); background-size: var(--bp-grid-size); }
body.bp--dark .main-content { padding-bottom: clamp(24px, 4vw, 48px); }
body.bp--dark .site-footer { margin-top: 0; }
body.bp--light { background-image: linear-gradient(rgba(30, 23, 19, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 23, 19, .045) 1px, transparent 1px); background-size: 24px 24px; }

/* ---------- Line drawings ---------- */
.art { display: block; width: 100%; height: auto; overflow: visible; }
.bp-dark .art .s, .bp-dark .art .dot { fill: none; stroke: var(--bp-cream); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bp-dark .art .f1 { stroke: var(--bp-copper); }
.bp-dark .art .f2 { stroke: var(--pop); }
.bp-dark .art .handle { stroke-width: 10; }
.bp-dark .art .dot { fill: var(--bp-cream); stroke: none; }
.art .num { font: 700 9px/1 var(--sans); text-anchor: middle; fill: var(--bp-copper); }
.art .s { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--d)); }
.art .crank { transform-box: view-box; transform-origin: 100px 54px; animation: bp-crank 2.6s linear infinite; }
@keyframes bp-crank { to { transform: rotate(360deg); } }
.art .prs { animation: bp-press 2.4s var(--ease) infinite; }
@keyframes bp-press { 50% { transform: translateY(22px); } }
.art .stream { fill: none; stroke: var(--crema); stroke-width: 5; stroke-linecap: round; stroke-dasharray: .18 .1; animation: bp-flow 1.1s linear infinite; }
@keyframes bp-flow { to { stroke-dashoffset: -.56; } }
.art .stm path { animation: bp-steam 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.art .stm path:nth-child(2) { animation-delay: -1s; }
.art .stm path:nth-child(3) { animation-delay: -2s; }
@keyframes bp-steam { 50% { transform: translateY(-6px) scaleY(1.08); } }
.art .fall .dot { animation: bp-drop 1.6s linear infinite; }
.art .fall .dot:nth-child(2) { animation-delay: -.4s; }
.art .fall .dot:nth-child(3) { animation-delay: -.8s; }
.art .fall .dot:nth-child(4) { animation-delay: -1.2s; }
@keyframes bp-drop { from { transform: translateY(-14px); } to { transform: translateY(22px); } }

/* Drawings draw themselves: on load (hero) or when their card arrives */
.bp-hero__art { position: relative; width: 100%; max-width: 420px; justify-self: center; --d: 1; }
html.js .bp-hero__art { --d: 0; animation: bp-draw 2.4s .3s var(--ease) forwards; }
@keyframes bp-draw { to { --d: 1; } }
.bp-dim { position: absolute; left: var(--x); top: var(--y); padding: 6px 10px; border: 1px dashed rgba(251, 250, 247, .5); border-radius: 4px; background: var(--bp-dark); font: 600 13px/1 var(--sans); letter-spacing: .06em; white-space: nowrap; }

/* ---------- Hero ---------- */
.bp-hero { display: grid; gap: 40px; align-items: center; padding-block: clamp(56px, 9vw, 120px); }
.bp-hero__text { display: grid; gap: 22px; justify-items: start; }
.bp-hero .lead { margin: 0; }
.bp-dark .btn--ghost { color: var(--ink); border-color: rgba(251, 250, 247, .4); }

/* ---------- Cards ---------- */
.bp-grid { display: grid; gap: 18px; }
.bp-cell { perspective: 1400px; }
.bp-card, .bp-box, .bp-dark .verdict__box {
	position: relative;
	border: 1px solid var(--line); border-radius: 18px;
	background: rgba(30, 23, 19, .88);
	box-shadow: none;
}
.bp-card::before, .bp-card::after, .bp-box::before, .bp-box::after, .bp-dark .verdict__box::before, .bp-dark .verdict__box::after {
	content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--bp-copper); pointer-events: none;
}
.bp-card::before, .bp-box::before, .bp-dark .verdict__box::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-radius: 18px 0 0 0; }
.bp-card::after, .bp-box::after, .bp-dark .verdict__box::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-radius: 0 0 18px 0; }
.bp-card { height: 100%; display: grid; gap: 20px; padding: clamp(20px, 2.4vw, 32px); transform-origin: 50% 0; }
.bp-no { position: absolute; right: 22px; top: 6px; font: 600 64px/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(251, 250, 247, .28); }
.bp-art { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; justify-self: center; outline: none; --d: 1; }
.bp-art[tabindex] { cursor: pointer; }
.bp-art .art { padding: 8%; }
html.js .bp-cell .bp-art { --d: 0; }
html.js .bp-cell.is-in .bp-art { --d: 1; transition: --d 1.8s .25s var(--ease); }
.bp-call { position: absolute; left: var(--x); top: var(--y); padding: 5px 8px; border-left: 2px solid var(--pop); background: rgba(30, 23, 19, .92); color: var(--bp-cream); font: 600 12px/1.2 var(--sans); letter-spacing: .04em; white-space: nowrap; }
html.js .bp-cell .bp-call { -webkit-mask: linear-gradient(#000 0 0) 0 0 / var(--m, 0%) 100% no-repeat; mask: linear-gradient(#000 0 0) 0 0 / var(--m, 0%) 100% no-repeat; }
html.js .bp-cell.is-in .bp-call { --m: 100%; transition: -webkit-mask-size .6s var(--ease), mask-size .6s var(--ease); transition-delay: calc(1.4s + var(--i) * .2s); }
html.js .bp-cell .bp-card { transform: rotateX(-78deg); }
html.js .bp-cell.is-in .bp-card { transform: none; transition: transform 1.1s var(--spring); }

/* Hover / tap: the photo prints down out of the drawing (contain = never cropped) */
.bp-print { position: absolute; inset: 0; z-index: 2; padding: 14px; border-radius: 10px; background: var(--bp-cream); box-shadow: 0 30px 60px -30px #000; clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); }
.bp-print::before { content: ""; position: absolute; left: -6px; right: -6px; top: -4px; height: 8px; border-radius: 4px; background: var(--pop); }
.bp-art:hover .bp-print, .bp-art:focus-visible .bp-print, .bp-art.is-on .bp-print { clip-path: inset(-10px -10px 0 -10px); --st: 1; }
.bp-ph { display: grid; gap: 10px; grid-template-rows: repeat(var(--n, 1), minmax(0, 1fr)); width: 100%; height: 100%; }
.bp-ph img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.bp-print--stamp { display: grid; place-items: center; }
.bp-stamp { padding: 12px 18px; font-size: 13px; transform: rotate(-8deg) scale(var(--st, 0)); transition: transform .5s var(--spring) .15s; }
.bp-cam { position: absolute; right: 8px; top: 8px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--pop); color: #fff; pointer-events: none; }
.bp-cam svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bp-cam::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pop); animation: bp-ping 2.4s var(--ease) infinite; }
@keyframes bp-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(1.8); opacity: 0; } }

.bp-text { display: grid; gap: 14px; align-content: start; }
.bp-text p:not(.kicker) { margin: 0; color: var(--mute); }
.bp-title { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.05; }
.bp-title em { font-style: italic; color: var(--crema); }
.bp-fact { justify-self: start; display: inline-flex; gap: 10px; padding: 9px 14px; border: 1px dashed rgba(251, 250, 247, .45); border-radius: 6px; color: var(--ink); font-size: 14px; font-weight: 500; transition: background .3s, color .3s; }
a.bp-fact:hover { background: var(--bp-cream); color: var(--bp-dark); }
.bp-fact b { color: var(--pop); }

/* ---------- Home: reviews, guides, about, call to action ---------- */
.bp-dark .card { box-shadow: 0 0 0 1px var(--line); border-radius: 18px; }
.bp-dark .card__photo { aspect-ratio: 3 / 2; padding: 10px; background: var(--bp-cream); border-radius: 18px 18px 0 0; }
.bp-dark .card__img { object-fit: contain; }
.bp-dark .card__go { background: var(--pop); color: #fff; }
.bp-dark .peek { background: var(--bp-cream); padding: 8px; }
.bp-dark .peek img { object-fit: contain; }
.bp-dark .about-band { border-radius: 18px; }
.bp-cta { margin-top: clamp(60px, 9vw, 120px); }
.bp-cta .bp-card { align-items: center; padding: clamp(28px, 5vw, 72px); border-color: rgba(233, 147, 90, .5); }
.bp-cta__text { display: grid; gap: 32px; justify-items: start; }
.bp-cta .display { font-size: clamp(44px, 6.4vw, 104px); }
.bp-cta__art { max-width: 300px; }
.bp-cta .btn--pop { --fill: var(--bp-cream); }
.bp-cta .btn--pop:hover { color: var(--bp-dark); border-color: var(--bp-cream); }

/* ---------- Reviews listing ---------- */
.bp-listhead { display: grid; gap: 30px; align-items: center; }
.bp-listhead__art { max-width: 300px; }

/* ---------- Single review: dark top band, light reading body ---------- */
.bp-band { position: relative; padding-bottom: clamp(48px, 7vw, 90px); background-color: var(--bp-dark); background-image: var(--bp-grid); background-size: var(--bp-grid-size); }
.bp-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: repeating-linear-gradient(90deg, rgba(233, 147, 90, .7) 0 1px, transparent 1px 24px) 0 100% / 100% 6px no-repeat, repeating-linear-gradient(90deg, rgba(233, 147, 90, .7) 0 1px, transparent 1px 120px) 0 100% / 100% 10px no-repeat; border-bottom: 1px solid rgba(233, 147, 90, .55); }
.bp-band .review-head { padding-bottom: clamp(30px, 4vw, 48px); }
.bp-photo { position: relative; width: fit-content; max-width: min(1000px, 100%); margin-inline: auto; padding: 14px; border-radius: 12px; background: var(--bp-cream); box-shadow: 0 40px 70px -40px #000; }
.bp-photo::before { content: ""; position: absolute; left: -6px; right: -6px; top: -4px; height: 8px; border-radius: 4px; background: var(--pop); z-index: 1; }
.bp-photo img { width: auto; max-width: 100%; height: auto; max-height: 78vh; border-radius: 4px; }
html.js .bp-photo { -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% var(--m, 0%) no-repeat; mask: linear-gradient(#000 0 0) 0 0 / 100% var(--m, 0%) no-repeat; }
html.js .bp-photo.is-in { --m: 100%; -webkit-mask: none; mask: none; animation: bp-print 1.1s var(--ease); }
@keyframes bp-print { from { clip-path: inset(-20px -20px 100% -20px); } to { clip-path: inset(-20px -20px -20px -20px); } }
.bp-verdict { margin-top: clamp(36px, 5vw, 60px); }
.bp-verdict .verdict { max-width: 1000px; margin: 0 auto; }
.bp-dark .verdict__facts .fact { background: var(--bg3); border: 1px dashed rgba(251, 250, 247, .25); border-radius: 8px; }
.bp-dark .verdict__facts .fact b { color: inherit; }
.bp-dark .bean::after { background: var(--bp-dark); }

.bp--light .proscons__col, .bp--light .table-wrap, .bp--light .side-box, .bp--light .author-box, .bp--light .buy-box, .bp--light .prose .callout, .bp--light .prose .tip {
	box-shadow: none; border: 1px dashed rgba(30, 23, 19, .3); border-radius: 12px; background: var(--bg2);
}
.bp--light .prose .callout { border-left: 4px solid var(--pop); }
.bp--light .prose h2::before { color: var(--crema-dark); }
.bp--light .glance__box { position: relative; border-radius: 14px; background-image: var(--bp-grid); background-size: var(--bp-grid-size); }
.bp--light .glance__box::before, .bp--light .glance__box::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--bp-copper); pointer-events: none; }
.bp--light .glance__box::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.bp--light .glance__box::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.bp--light .side-review__img { object-fit: contain; background: var(--bg3); }
.bp--light .prose img { height: auto; }

/* ---------- Plain pages (How I Test, Contact, Privacy, Disclosure) ---------- */
.bp .page-plain { padding: 0; }
.bp-band--plain { padding-block: clamp(50px, 8vw, 100px); }
.bp-band--plain .h1 { margin: 0; max-width: 900px; }
.bp .page-plain > .section { margin-top: clamp(40px, 6vw, 70px); }
.bp-dark .ab-wont { border: 1px solid var(--line); border-radius: 18px; }

/* ---------- 404 ---------- */
.bp-dark .spill__puddle { background: var(--crema); }

/* ---------- Bigger screens ---------- */
@media (min-width: 800px) {
	.bp-hero, .bp-listhead { grid-template-columns: 1.3fr 1fr; }
	.bp-grid { grid-template-columns: repeat(3, 1fr); }
	.bp-cell--wide { grid-column: span 2; }
	.bp-cell--wide .bp-card { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* ---------- Reduced motion: everything drawn and in place ---------- */
@media (prefers-reduced-motion: reduce) {
	.bp *, .bp *::before, .bp *::after { animation: none !important; transition: none !important; }
	html.js .bp-cell .bp-card { transform: none; }
	html.js .bp-cell .bp-art, html.js .bp-hero__art { --d: 1; }
	html.js .bp-cell .bp-call, html.js .bp-photo { -webkit-mask: none; mask: none; }
}
