/**
 * com_distributedbrands - front end styles
 *
 * (C) 2026 Laserworld. <https://www.laserworld.com>
 * GNU General Public License version 2 or later.
 *
 * Everything is scoped under .lwdb and prefixed lwdb-, so nothing here can reach the
 * rest of the template. Layout uses the Bootstrap 5 grid the template already loads;
 * this file only carries what Bootstrap has no opinion about.
 */

.lwdb {
	--lwdb-navy: #283242;
	--lwdb-ink: #131a26;
	--lwdb-accent: #645438;
	/* Set per brand from the accent colour field. Used for ONE decorative rule on
	   the detail sidebar and nothing else: a brand colour driving text produced
	   yellow labels on white, which read as an error rather than as branding. */
	--lwdb-brand: var(--lwdb-accent);
	--lwdb-line: #e3e8ee;
	--lwdb-muted: #5b6675;
	--lwdb-soft: #f5f7fa;
	--lwdb-hero-image: none;

	color: var(--lwdb-navy);
}

/* ---------------------------------------------------------------- hero band */

.lwdb-hero {
	position: relative;
	margin-bottom: 2.5rem;
	padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 1.25rem;
	background-color: var(--lwdb-ink);
	background-image: var(--lwdb-hero-image);
	background-size: cover;
	background-position: center;
	border-radius: 18px;
	overflow: hidden;
	text-align: center;
}

/* Keeps white text legible whatever photograph an editor picks. */
.lwdb-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(19, 26, 38, .72), rgba(19, 26, 38, .88));
}

.lwdb-hero__inner {
	position: relative;
	max-width: 60rem;
	margin: 0 auto;
}

.lwdb-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.01em;
}

.lwdb-hero__tagline {
	margin: .85rem auto 0;
	max-width: 42rem;
	color: rgba(255, 255, 255, .8);
	font-size: clamp(1rem, .95rem + .3vw, 1.2rem);
	line-height: 1.55;
}

.lwdb-hero__logo {
	margin: 0 auto 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 68px;
}

.lwdb-hero__logo img {
	max-height: 68px;
	max-width: min(320px, 70vw);
	width: auto;
	height: auto;
	display: block;
}

/* Used when a brand has no knockout logo: a plate beats an invisible logo. */
.lwdb-hero__logo--plate {
	background: #fff;
	border-radius: 12px;
	padding: .9rem 1.4rem;
	width: fit-content;
	min-height: 0;
}

.lwdb-eyebrow {
	margin: 0 0 .85rem;
	color: rgba(255, 255, 255, .65);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.lwdb-crumb {
	margin-bottom: 1.5rem;
	font-size: .8125rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lwdb-crumb a {
	color: rgba(255, 255, 255, .7);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, .3);
	padding-bottom: 2px;
}

.lwdb-crumb a:hover,
.lwdb-crumb a:focus-visible {
	color: #fff;
	border-bottom-color: #fff;
}

.lwdb-page-title {
	margin: 0 0 1.75rem;
	font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem);
	font-weight: 800;
	line-height: 1.15;
	color: var(--lwdb-navy);
}

.lwdb-badges {
	margin: 1.5rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: center;
}

.lwdb-badge {
	display: inline-block;
	padding: .35rem .8rem;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	color: rgba(255, 255, 255, .85);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------- body */

.lwdb-lead {
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--lwdb-muted);
}

.lwdb-lead p {
	margin: 0 0 1rem;
}

.lwdb-lead p:last-child {
	margin-bottom: 0;
}

.lwdb-lead--first {
	font-size: 1.25rem;
	line-height: 1.6;
	color: var(--lwdb-navy);
	margin: 0 0 1.5rem;
}

.lwdb-prose {
	font-size: 1rem;
	line-height: 1.75;
	color: var(--lwdb-muted);
}

.lwdb-prose p {
	margin: 0 0 1.1rem;
}

.lwdb-prose p:last-child {
	margin-bottom: 0;
}

.lwdb-prose h2,
.lwdb-prose h3 {
	margin: 2rem 0 .75rem;
	color: var(--lwdb-navy);
	font-weight: 800;
	line-height: 1.25;
}

.lwdb-prose h2 { font-size: 1.5rem; }
.lwdb-prose h3 { font-size: 1.2rem; }

.lwdb-prose strong {
	color: var(--lwdb-navy);
	font-weight: 700;
}

.lwdb-prose ul,
.lwdb-prose ol {
	margin: 0 0 1.1rem;
	padding-left: 1.25rem;
}

.lwdb-prose li {
	margin-bottom: .4rem;
}

.lwdb-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.lwdb-body > .row + .lwdb-more,
.lwdb-body > .lwdb-grid {
	margin-top: 2.5rem;
}

/* --------------------------------------------------------------- list reset */

/*
 * Bootstrap's .list-unstyled sets list-style on the <ul>, and the <li> inherits it -
 * but inheritance loses to ANY rule that targets the li directly, and templates
 * routinely ship one (e.g. "#main-content li { list-style: disc }"). That put a bullet
 * beside every card. These grids are card layouts rather than prose, so the marker is
 * killed on the li itself, and !important is used deliberately: the competing rule may
 * carry an id and there is no way to out-specify it from here.
 *
 * .lwdb-prose is excluded - lists inside a brand's body text keep their bullets.
 */
.lwdb-grid,
.lwdb-more__grid,
.lwdb-facts__list {
	list-style: none !important;
	margin-left: 0;
	padding-left: 0 !important;
}

.lwdb-grid > li,
.lwdb-more__grid > li,
.lwdb-facts__list > li {
	list-style: none !important;
	/* A marker box only exists on display:list-item, so this holds even against a
	   template rule that cannot be out-specified from here. */
	display: block;
}

.lwdb-grid > li::marker,
.lwdb-more__grid > li::marker,
.lwdb-facts__list > li::marker {
	content: "" !important;
}

/* ------------------------------------------------------------------- cards */

.lwdb-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--lwdb-line);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.lwdb-card:hover,
.lwdb-card:focus-visible {
	transform: translateY(-4px);
	border-color: var(--lwdb-navy);
	box-shadow: 0 20px 40px -26px rgba(19, 26, 38, .55);
	text-decoration: none;
	color: inherit;
}

.lwdb-card:focus-visible {
	outline: 3px solid var(--lwdb-accent);
	outline-offset: 3px;
}

.lwdb-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 128px;
	height: 128px;
	padding: 1rem 1.25rem;
	background: #fcfdfe;
	border-bottom: 1px solid var(--lwdb-line);
}

.lwdb-card__logo img {
	display: block;
	max-height: 76px;
	max-width: 88%;
	width: auto;
	height: auto;
	transition: transform .3s ease;
}

.lwdb-card:hover .lwdb-card__logo img {
	transform: scale(1.05);
}

.lwdb-card__wordmark {
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.15;
	text-align: center;
	color: var(--lwdb-navy);
}

.lwdb-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1.25rem 1.375rem 1.375rem;
}

.lwdb-card__tag {
	display: block;
	margin-bottom: .45rem;
	color: var(--lwdb-navy);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.lwdb-card__name {
	display: block;
	margin-bottom: .55rem;
	color: var(--lwdb-navy);
	font-size: 1.1875rem;
	font-weight: 800;
	line-height: 1.25;
}

.lwdb-card__text {
	display: block;
	color: var(--lwdb-muted);
	font-size: .9375rem;
	line-height: 1.6;
}

.lwdb-card__more {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: auto;
	padding-top: 1.15rem;
	color: var(--lwdb-navy);
	font-size: .875rem;
	font-weight: 700;
	transition: color .2s ease;
}

.lwdb-card:hover .lwdb-card__more {
	color: var(--lwdb-accent);
}

.lwdb-arrow {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	transition: transform .25s ease;
}

.lwdb-card:hover .lwdb-arrow,
.lwdb-btn:hover .lwdb-arrow,
.lwdb-facts__link:hover .lwdb-arrow,
.lwdb-more__back a:hover .lwdb-arrow {
	transform: translateX(4px);
}

/* -------------------------------------------------------- detail page aside */

.lwdb-facts {
	padding: 1.5rem;
	background: var(--lwdb-soft);
	border-top: 3px solid var(--lwdb-brand);
	border-radius: 14px;
}

.lwdb-facts__title {
	margin: 0 0 .85rem;
	font-size: 1rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--lwdb-navy);
}

.lwdb-facts__list {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.lwdb-facts__list li {
	position: relative;
	padding-left: 1.5rem;
	margin-bottom: .6rem;
	font-size: .9375rem;
	line-height: 1.5;
	color: var(--lwdb-muted);
}

.lwdb-facts__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .45rem;
	width: .5rem;
	height: .5rem;
	border-radius: 50%;
	background: var(--lwdb-accent);
}

.lwdb-facts__meta {
	margin: 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--lwdb-line);
	font-size: .9375rem;
}

.lwdb-facts__meta dt {
	color: var(--lwdb-muted);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin-bottom: .15rem;
}

.lwdb-facts__meta dd {
	margin: 0 0 .9rem;
	color: var(--lwdb-navy);
	font-weight: 600;
}

.lwdb-facts__meta dd:last-child {
	margin-bottom: 0;
}

.lwdb-facts__link {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: 1.25rem;
	color: var(--lwdb-navy);
	font-size: .9375rem;
	font-weight: 700;
	text-decoration: none;
}

.lwdb-facts__link:hover,
.lwdb-facts__link:focus-visible {
	color: var(--lwdb-accent);
	text-decoration: none;
}

/* ------------------------------------------------------- other brands strip */

.lwdb-more {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid var(--lwdb-line);
}

.lwdb-more__title {
	margin: 0 0 1.5rem;
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--lwdb-navy);
}

.lwdb-more__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .6rem;
	height: 100%;
	padding: 1rem .75rem;
	background: #fff;
	border: 1px solid var(--lwdb-line);
	border-radius: 12px;
	text-decoration: none;
	transition: border-color .2s ease, transform .2s ease;
}

.lwdb-more__card:hover,
.lwdb-more__card:focus-visible {
	border-color: var(--lwdb-navy);
	transform: translateY(-2px);
	text-decoration: none;
}

.lwdb-more__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	width: 100%;
}

.lwdb-more__logo img {
	max-height: 36px;
	max-width: 100%;
	width: auto;
	height: auto;
	display: block;
	filter: grayscale(1);
	opacity: .75;
	transition: filter .2s ease, opacity .2s ease;
}

.lwdb-more__card:hover .lwdb-more__logo img {
	filter: none;
	opacity: 1;
}

.lwdb-more__wordmark,
.lwdb-more__name {
	color: var(--lwdb-navy);
	font-size: .8125rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.2;
}

.lwdb-more__back {
	margin: 1.75rem 0 0;
}

.lwdb-more__back a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: var(--lwdb-navy);
	font-weight: 700;
	text-decoration: none;
}

.lwdb-more__back a:hover {
	color: var(--lwdb-accent);
}

/* -------------------------------------------------------------------- CTA */

.lwdb-cta {
	margin-top: 3rem;
	padding: 2.25rem 1.75rem;
	background: var(--lwdb-ink);
	border-radius: 18px;
	color: #fff;
}

.lwdb-cta__title {
	margin: 0 0 .5rem;
	color: #fff;
	font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
	font-weight: 800;
	line-height: 1.25;
}

.lwdb-cta__text {
	margin: 0;
	color: rgba(255, 255, 255, .75);
	font-size: 1rem;
	line-height: 1.6;
}

.lwdb-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .75rem 1.5rem;
	background: #fff;
	border: 2px solid #fff;
	border-radius: 6px;
	color: var(--lwdb-ink);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: .02em;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}

.lwdb-btn:hover,
.lwdb-btn:focus-visible {
	background: transparent;
	color: #fff;
	text-decoration: none;
}

@media (min-width: 992px) {
	.lwdb-cta {
		padding: 2.75rem 3rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lwdb * {
		transition: none !important;
	}
}

/* ---------------------------------------------------------------- gallery */

.lwdb-gallery-section {
	margin-top: 3rem;
}

.lwdb-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: .75rem;
	margin: 0;
	padding: 0;
	list-style: none !important;
}

.lwdb-gallery > li {
	list-style: none !important;
	display: block;
	margin: 0;
}

.lwdb-gallery > li::marker {
	content: "" !important;
}

.lwdb-gallery__item {
	display: block;
	overflow: hidden;
	border: 1px solid var(--lwdb-line);
	border-radius: 12px;
	background: var(--lwdb-soft);
	cursor: zoom-in;
	transition: border-color .2s ease, transform .2s ease;
}

.lwdb-gallery__item:hover,
.lwdb-gallery__item:focus-visible {
	border-color: var(--lwdb-navy);
	transform: translateY(-2px);
}

.lwdb-gallery__item:focus-visible {
	outline: 3px solid var(--lwdb-accent);
	outline-offset: 3px;
}

.lwdb-gallery__item img {
	display: block;
	width: 100%;
	/* A fixed ratio keeps a row of mixed portrait and landscape photos tidy; the
	   lightbox shows each one uncropped. */
	aspect-ratio: 4 / 3;
	object-fit: cover;
	height: auto;
}

/* --------------------------------------------------------------- lightbox */

.lwdb-lightbox {
	max-width: min(94vw, 1200px);
	max-height: 94vh;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--lwdb-ink);
	color: #fff;
	overflow: visible;
}

.lwdb-lightbox::backdrop {
	background: rgba(9, 13, 20, .82);
}

.lwdb-lightbox__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lwdb-lightbox__image {
	display: block;
	max-width: 100%;
	/* Leaves room for the caption and counter below the picture. */
	max-height: calc(94vh - 6rem);
	width: auto;
	height: auto;
	border-radius: 14px 14px 0 0;
}

.lwdb-lightbox__caption {
	margin: 0;
	padding: .85rem 3.5rem;
	font-size: .9375rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, .85);
	text-align: center;
}

.lwdb-lightbox__counter {
	margin: 0;
	padding: 0 0 .85rem;
	font-size: .75rem;
	letter-spacing: .08em;
	color: rgba(255, 255, 255, .55);
}

.lwdb-lightbox__closeform {
	position: absolute;
	top: -.75rem;
	right: -.75rem;
	margin: 0;
}

.lwdb-lightbox__close {
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--lwdb-ink);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.lwdb-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--lwdb-ink);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.lwdb-lightbox__nav:hover {
	background: #fff;
}

.lwdb-lightbox__nav--prev { left: .75rem; }
.lwdb-lightbox__nav--next { right: .75rem; }

.lwdb-lightbox__close:focus-visible,
.lwdb-lightbox__nav:focus-visible {
	outline: 3px solid var(--lwdb-accent);
	outline-offset: 2px;
}

@media (max-width: 575.98px) {
	.lwdb-lightbox__caption { padding-inline: 1rem; }
	.lwdb-lightbox__nav { width: 2.25rem; height: 2.25rem; font-size: 1.4rem; }
}
