/*
 * Photoset (new) post template: styles.
 * Used only by single-photoset.php (body class "hb-photoset"). Nothing here affects other pages.
 * Sections: 1 page frame, 2 photo strip, 3 back link + progress, 4 title + panel, 5 panel content, 6 comments
 */

/* ---------- 1. PAGE FRAME: one full-screen page, no header, no page scroll ---------- */
html:has(body.hb-photoset),
body.hb-photoset { overflow: hidden; height: 100%; background: #000; }

body.hb-photoset #masthead,
body.hb-photoset .site-header,
body.hb-photoset #ast-scroll-top { display: none !important; }

body.hb-photoset #content,
body.hb-photoset #content > .ast-container { padding: 0 !important; margin: 0 !important; max-width: none !important; }

.hb-set {
	--hb-top: 56px;        /* room above the photos for the Gallery link */
	--hb-bar: 34px;        /* height of the closed expand bar (the photos stop at its top edge) */
	--hb-adm: 0px;         /* WordPress admin bar, only when logged in */
	--hb-h: calc(100vh - var(--hb-top) - var(--hb-adm) - var(--hb-bar));
	position: fixed;
	inset: 0;
	z-index: 10;
	background: #000;
	color: #eee;
	font-family: Lato, -apple-system, BlinkMacSystemFont, sans-serif;
	animation: hb-set-in .8s ease-out both;
}
@supports (height: 100dvh) {
	.hb-set { --hb-h: calc(100dvh - var(--hb-top) - var(--hb-adm) - var(--hb-bar)); }
}
body.admin-bar .hb-set { --hb-adm: 32px; }
@media (max-width: 782px) { body.admin-bar .hb-set { --hb-adm: 46px; } }
@keyframes hb-set-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 2. PHOTO STRIP: one row, scrolls sideways (wheel, drag or swipe) ---------- */
.hb-set__strip {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(var(--hb-top) + var(--hb-adm));
	height: var(--hb-h);
	display: flex;
	align-items: center;
	gap: 75px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	overscroll-behavior: contain;
	touch-action: pan-x;
	-webkit-overflow-scrolling: touch;
	cursor: grab;
	outline: none;
}
.hb-set__strip::-webkit-scrollbar { display: none; }
.hb-set__strip.is-dragging { cursor: grabbing; user-select: none; }
.hb-set__photo { flex: none; margin: 0; height: 100%; cursor: inherit; }
.hb-set__photo img {
	display: block;
	height: 100%;
	width: auto;
	max-width: none;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}
@media (max-width: 768px) { .hb-set__strip { gap: 40px; } }

/* ---------- 3. BACK LINK + PROGRESS LINE ---------- */
.hb-set__back {
	position: absolute;
	z-index: 6;
	top: calc(var(--hb-adm) + 18px);
	left: 16px;
	font: 700 12px/1 Lato, sans-serif;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hb-eyebrow, #bdbdbd);
	text-decoration: none;
	transition: color .3s ease;
}
@media (max-width: 768px) { .hb-set__back { left: auto; right: 16px; } }
.hb-set__back:hover, .hb-set__back:focus-visible { color: var(--hb-gold, #bf9b30); }

.hb-set__progress {
	position: absolute;
	z-index: 4;
	left: 0;
	right: 0;
	top: calc(var(--hb-top) + var(--hb-adm) - 6px);
	height: 2px;
	pointer-events: none;
	overflow: hidden;
}
.hb-set__progress span { display: block; height: 100%; width: 0; background: rgba(255,255,255,.35); transform-origin: left; }

/* ---------- 4. TITLE + EXPAND PANEL: the title sits on the panel and rises with it ---------- */
.hb-set__dock {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	pointer-events: none;            /* only the panel itself takes the mouse */
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	/* no height clamp: a long title may rise past the top of the frame and its extra lines crop off */
}
.hb-set__title {
	margin: 0 0 -6px 15px;
	max-width: 30%;
	font-family: Freight-big-pro, Helvetica, Arial, sans-serif;
	font-weight: 400;
	font-size: 110px;
	line-height: .61;
	text-transform: capitalize;
	text-align: left;
	color: #fff;
	pointer-events: none;            /* the mouse and fingers go through to the photos */
	flex: 0 0 auto;
}
@media (max-width: 768px) {
	.hb-set__title { font-size: 48px; max-width: 60%; margin-bottom: -4px; }
}

.hb-set__panel {
	pointer-events: auto;
	flex: 0 0 auto;                   /* never shrinks to fit the title: the panel keeps its full height */
	min-height: var(--hb-bar);
	max-height: var(--hb-bar);
	overflow: hidden;
	background: #000;
	transition: max-height .5s ease;
}
/* Desktop: 70% of the screen, but never so tall that a 3-line title (3 x .61 x 110px, minus the 6px overlap = 195px) would pass the top */
.hb-set__panel.is-open { max-height: 70vh; max-height: min(70dvh, calc(100dvh - var(--hb-adm) - 195px)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(150,150,150,.5) transparent; }
/* Phones: open panel is as tall as the screen allows with a 3-line title (3 x .61 x 48px, minus the 4px overlap), so a 3-line title just touches the top; a 4th line and beyond crop off the top */
@media (max-width: 768px) {
	.hb-set__panel.is-open { max-height: calc(100vh - var(--hb-adm) - 84px); max-height: calc(100dvh - var(--hb-adm) - 84px); }
}

/* closed: nothing of the body may show above/behind the bar (fixes faint text flicker on phones) */
.hb-set__body { visibility: hidden; transition: visibility 0s linear .5s; }
.hb-set__panel.is-open .hb-set__body { visibility: visible; transition-delay: 0s; }

.hb-set__toggle {
	position: sticky;
	top: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: var(--hb-bar);
	margin: 0;
	padding: 0 50px;
	border: 0;
	border-radius: 0;
	background: #000;
	color: var(--hb-eyebrow, #bdbdbd);
	font: 700 12px/1 Lato, sans-serif;      /* the site eyebrow style */
	letter-spacing: .14em;
	text-transform: uppercase;
	text-align: center;
	cursor: pointer;
	transition: color .3s ease;
}
.hb-set__toggle::after {
	content: "+";
	font: 400 16px/1 Lato, sans-serif;
	letter-spacing: 0;
	position: absolute;
	right: 25px;
	top: 50%;
	transform: translateY(-50%);
}
.hb-set__panel.is-open .hb-set__toggle::after { content: "\2212"; }
.hb-set__toggle:hover, .hb-set__toggle:focus-visible { background: #000; color: #fff; }

/* ---------- 5. PANEL CONTENT ---------- */
.hb-set__body { max-width: 800px; margin: 0 auto; padding: 0 15px 60px; }
.hb-set__text { color: var(--hb-body, #c4c4c4); font-size: 16px; line-height: 1.6; padding-top: 15px; }
.hb-set__text p { margin: 0 0 15px; }
.hb-set__text h2, .hb-set__text h3 { color: #fff; margin: 24px 0 10px; }
.hb-set__text img, .hb-set__text video, .hb-set__text figure { max-width: 100%; height: auto; }
.hb-set__text a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hb-set__text a:hover { color: var(--hb-gold, #bf9b30); }

.hb-set__related, .hb-set__comments { margin-top: 30px; padding-top: 15px; border-top: 1px solid var(--hb-line, rgba(255,255,255,.14)); }
.hb-set__related h3, .hb-set__comments h3 {
	margin: 0 0 15px;
	font: 700 12px/1 Lato, sans-serif;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hb-eyebrow, #bdbdbd);
}
.hb-set__related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.hb-set__related-item { display: block; color: var(--hb-muted, #a0a0a0); text-decoration: none; transition: color .3s ease; }
.hb-set__related-item:hover { color: #fff; }
.hb-set__related-thumb { display: block; aspect-ratio: 1; overflow: hidden; margin-bottom: 6px; background: #111; }
.hb-set__related-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.hb-set__related-item:hover img { transform: scale(1.03); }
.hb-set__related-title { display: block; font-size: 14px; line-height: 1.3; }

/* ---------- 6. COMMENTS (dark, minimal) ---------- */
.hb-set__comments, .hb-set__comments a { color: var(--hb-body, #c4c4c4); }
.hb-set__comments .comments-title { display: none; }
.hb-set__comments ol, .hb-set__comments ul { list-style: none; margin: 0; padding: 0; }
.hb-set__comments .ast-comment { padding: 10px 0; border: 0; }
.hb-set__comments .ast-comment-time, .hb-set__comments .ast-comment-time * { font-size: 14px; color: var(--hb-note, #a0a0a0); }
.hb-set__comments .comment-respond { margin-top: 20px; }
.hb-set__comments label { font-size: 14px; color: var(--hb-note, #a0a0a0); }
.hb-set__comments input[type="text"], .hb-set__comments input[type="email"], .hb-set__comments input[type="url"], .hb-set__comments textarea {
	width: 100%;
	background: transparent;
	color: #eee;
	border: 1px solid var(--hb-field, rgba(255,255,255,.22));
	border-radius: 0;
}
body.hb-photoset .hb-set__comments .comment-form .submit,
body.hb-photoset .hb-set__comments input[type="submit"],
body.hb-photoset .hb-set__comments button[type="submit"] {
	background: transparent !important;
	color: #fff !important;
	border: 1px solid #fff !important;
	border-radius: 0 !important;
	padding: 10px 22px !important;
	font: 700 12px/1 Lato, sans-serif !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color .3s ease, border-color .3s ease;
}
body.hb-photoset .hb-set__comments .comment-form .submit:hover,
body.hb-photoset .hb-set__comments input[type="submit"]:hover,
body.hb-photoset .hb-set__comments button[type="submit"]:hover { color: var(--hb-gold, #bf9b30) !important; border-color: var(--hb-gold, #bf9b30) !important; }

@media (prefers-reduced-motion: reduce) {
	.hb-set, .hb-set__panel { animation: none; transition: none; }
}
