/* Jeffrey Portfolio — front-end styles
   Tokens are injected as CSS variables by the plugin. Change them once in
   jeffrey-portfolio.php and everything follows. */

/* ---------- Cards ---------- */
.jp-card {
	transition: border-color .3s ease, background-color .3s ease, transform .3s ease;
}
.jp-card:hover {
	border-color: rgba(201, 162, 74, .55) !important;
	transform: translateY(-2px);
}

/* ---------- Live-site table ---------- */
.jp-sites {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.jp-sites th {
	text-align: left;
	padding: 12px 14px;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--jp-gold);
	font-weight: 600;
	border-bottom: 1px solid var(--jp-hairline);
}
.jp-sites td {
	padding: 14px;
	border-bottom: 1px solid rgba(246, 241, 230, .07);
	color: var(--jp-muted);
	vertical-align: middle;
}
.jp-sites tr:last-child td {
	border-bottom: none;
}
.jp-sites td a {
	color: var(--jp-cream);
	text-decoration: none;
	border-bottom: 1px solid var(--jp-hairline);
	padding-bottom: 2px;
	transition: color .25s ease, border-color .25s ease;
}
.jp-sites td a:hover,
.jp-sites td a:focus-visible {
	color: var(--jp-gold);
	border-color: var(--jp-gold);
}
.jp-sites tbody tr {
	transition: background-color .25s ease;
}
.jp-sites tbody tr:hover {
	background: rgba(255, 255, 255, .022);
}

/* ---------- Notices ---------- */
.jp-formnote,
.jp-cvnote {
	border: 1px dashed var(--jp-hairline);
	border-radius: 3px;
	padding: 20px 22px;
	color: var(--jp-faint);
	font-size: 14px;
	line-height: 1.65;
}
.jp-cvnote {
	padding: 10px 14px;
	font-size: 12.5px;
	margin: 0;
}
.jp-formnote strong {
	color: var(--jp-gold);
	display: block;
	margin-bottom: 6px;
}

/* ---------- Logo carousel ---------- */
.jp-lc {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.jp-lc-viewport {
	overflow: hidden;
	flex: 1;
	border-radius: 3px;
}
.jp-lc-viewport:focus-visible {
	outline: 2px solid var(--jp-gold);
	outline-offset: 4px;
}
.jp-lc-track {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 14px;
	transition: transform .55s cubic-bezier(.4, .05, .2, 1);
	will-change: transform;
}
.jp-lc-item {
	flex: 0 0 calc((100% - (var(--jp-lc-per) - 1) * 14px) / var(--jp-lc-per));
	list-style: none;
	margin: 0;
}
.jp-lc-card {
	height: 118px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px 22px;
	background: rgba(255, 255, 255, .045);
	border: 1px solid var(--jp-hairline);
	border-radius: 3px;
	transition: border-color .3s ease, background-color .3s ease;
}
.jp-lc-card:hover {
	border-color: rgba(201, 162, 74, .5);
	background: rgba(255, 255, 255, .07);
}
/* Contain-fit is mandatory: original colours, no crop, no distortion. */
.jp-lc-card img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.jp-lc-nav {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--jp-hairline);
	color: var(--jp-cream);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	transition: all .25s ease;
}
.jp-lc-nav:hover,
.jp-lc-nav:focus-visible {
	border-color: var(--jp-gold);
	color: var(--jp-gold);
}
.jp-lc-empty {
	border: 1px dashed var(--jp-hairline);
	padding: 26px;
	color: var(--jp-faint);
	font-size: 14px;
	border-radius: 3px;
}

@media (max-width: 1024px) {
	.jp-lc-item {
		flex-basis: calc((100% - (var(--jp-lc-per-t) - 1) * 14px) / var(--jp-lc-per-t));
	}
}
@media (max-width: 767px) {
	.jp-lc-item {
		flex-basis: calc((100% - (var(--jp-lc-per-m) - 1) * 14px) / var(--jp-lc-per-m));
	}
	.jp-lc-card {
		height: 92px;
		padding: 14px;
	}
	.jp-lc-nav {
		width: 32px;
		height: 32px;
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jp-lc-track {
		transition: none;
	}
	.jp-card:hover {
		transform: none;
	}
}

/* ---------- Header / footer bars (auto-rendered) ---------- */
.jl-bar {
	background: var(--jp-ink);
	color: var(--jp-cream);
	width: 100%;
	font-size: 13px;
	letter-spacing: .02em;
	position: relative;
	z-index: 5;
}
.jl-topbar {
	border-bottom: 1px solid var(--jp-hairline);
}
.jl-footerbar {
	border-top: 1px solid var(--jp-hairline);
}
.jl-bar-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.jl-bar-stack {
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding-top: 42px;
	padding-bottom: 42px;
}
.jl-bar-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	width: 100%;
}
.jl-social {
	display: flex;
	gap: 14px;
	align-items: center;
}
.jl-social a {
	color: var(--jp-cream);
	opacity: .72;
	display: inline-flex;
	transition: color .25s ease, opacity .25s ease, transform .25s ease;
}
.jl-social a:hover,
.jl-social a:focus-visible {
	color: var(--jp-gold);
	opacity: 1;
	transform: translateY(-1px);
}
.jl-contact {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: wrap;
}
.jl-contact a {
	color: var(--jp-cream);
	opacity: .72;
	text-decoration: none;
	transition: color .25s ease, opacity .25s ease;
}
.jl-contact a:hover,
.jl-contact a:focus-visible {
	color: var(--jp-gold);
	opacity: 1;
}
.jl-sep {
	color: var(--jp-gold);
	margin: 0 8px;
	opacity: .6;
}
.jl-brandline strong {
	display: block;
	color: var(--jp-cream);
	letter-spacing: .22em;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}
.jl-brandline span {
	color: var(--jp-faint);
	font-size: 14px;
}
.jl-copy {
	color: var(--jp-faint);
	font-size: 12px;
	border-top: 1px solid rgba(246, 241, 230, .07);
	padding-top: 16px;
	width: 100%;
}
@media (max-width: 600px) {
	.jl-bar-inner {
		justify-content: center;
		font-size: 12px;
		padding: 8px 16px;
	}
	.jl-bar-row {
		justify-content: center;
	}
	.jl-bar-stack {
		align-items: center;
		text-align: center;
	}
}
@media (prefers-reduced-motion: reduce) {
	.jl-social a:hover { transform: none; }
}

/* ==========================================================================
   v6.1 additions — showcase tiles, motion, back-to-top
   Everything below is additive. Nothing above this line was changed.
   ========================================================================== */

/* --- Showcase tiles ------------------------------------------------------ */

.jp-tile-frame {
	background: #0F0F12;
	border: 1px solid rgba(246, 241, 230, .07);
	border-radius: 3px;
	overflow: hidden;
	width: 100%;
}
.jp-tile-frame img {
	width: 100%;
	height: 240px;
	object-fit: contain;
	display: block;
	transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.jp-tile:hover .jp-tile-frame img {
	transform: scale(1.03);
}
.jp-tile {
	transition: transform .35s cubic-bezier(.22, .61, .36, 1),
	            border-color .35s ease;
}
.jp-tile:hover {
	transform: translateY(-4px);
	border-color: rgba(201, 162, 74, .45) !important;
}

/* --- Motion ---------------------------------------------------------------
   Sections lift into place once, on first sight, and then stay put. No
   parallax, no scroll-jacking, no letter-by-letter typing: a portfolio that
   makes a reader wait for the words is a portfolio that gets closed.
   -------------------------------------------------------------------------- */

.jp-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .7s ease, transform .7s cubic-bezier(.22, .61, .36, 1);
	will-change: opacity, transform;
}
.jp-reveal.jp-seen {
	opacity: 1;
	transform: none;
}

/* Tiles in a row arrive a beat apart, left to right. */
.jp-reveal.jp-d1 { transition-delay: .08s; }
.jp-reveal.jp-d2 { transition-delay: .16s; }
.jp-reveal.jp-d3 { transition-delay: .24s; }

/* If JavaScript never runs, nothing may stay invisible. */
.no-js .jp-reveal,
html:not(.jp-js) .jp-reveal {
	opacity: 1;
	transform: none;
}

/* --- Back to top ---------------------------------------------------------- */

.jp-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(201, 162, 74, .45);
	background: rgba(10, 10, 11, .82);
	backdrop-filter: blur(6px);
	color: #C9A24A;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .3s ease, transform .3s ease, visibility .3s,
	            background-color .3s ease, color .3s ease;
	z-index: 900;
	padding: 0;
}
.jp-to-top.jp-show {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.jp-to-top:hover,
.jp-to-top:focus-visible {
	background: #C9A24A;
	color: #0A0A0B;
	outline: none;
}
.jp-to-top:focus-visible {
	box-shadow: 0 0 0 3px rgba(201, 162, 74, .3);
}
@media (max-width: 600px) {
	.jp-to-top {
		right: 16px;
		bottom: 16px;
		width: 42px;
		height: 42px;
	}
}

/* --- Respect the system setting ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.jp-reveal,
	.jp-reveal.jp-d1,
	.jp-reveal.jp-d2,
	.jp-reveal.jp-d3 {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.jp-tile,
	.jp-tile-frame img {
		transition: none;
	}
	.jp-tile:hover {
		transform: none;
	}
	.jp-tile:hover .jp-tile-frame img {
		transform: none;
	}
	.jp-to-top {
		transition: opacity .01ms;
	}
}

/* --- Carousel polish ------------------------------------------------------
   The mechanics were already right: real colours, contain-fit, pause on hover.
   What was missing was the finish — logos were sliced flat against the edge of
   the viewport. A soft mask lets them arrive and leave instead of being cut.
   -------------------------------------------------------------------------- */

.jp-lc-viewport {
	-webkit-mask-image: linear-gradient(
		to right,
		transparent 0,
		#000 68px,
		#000 calc(100% - 68px),
		transparent 100%
	);
	mask-image: linear-gradient(
		to right,
		transparent 0,
		#000 68px,
		#000 calc(100% - 68px),
		transparent 100%
	);
}
.jp-lc-track {
	transition: transform .72s cubic-bezier(.22, .61, .36, 1);
}
.jp-lc-card {
	transition: border-color .3s ease, background-color .3s ease,
	            transform .3s cubic-bezier(.22, .61, .36, 1);
}
.jp-lc-card:hover {
	transform: translateY(-3px);
}
@media (max-width: 600px) {
	.jp-lc-viewport {
		-webkit-mask-image: none;
		mask-image: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.jp-lc-card,
	.jp-lc-track {
		transition: none;
	}
	.jp-lc-card:hover {
		transform: none;
	}
}

/* --- v6.2: per-page figure ------------------------------------------------
   The picture beside a page intro. Framed like the home tiles so the whole site
   keeps one visual language, and contained so a tall portrait is never cropped
   through the face.
   -------------------------------------------------------------------------- */

.jp-page-figure img {
	width: 100%;
	max-height: 460px;
	object-fit: contain;
	border: 1px solid rgba(246, 241, 230, .07);
	border-radius: 3px;
	background: #0F0F12;
	display: block;
}
@media (max-width: 880px) {
	.jp-page-figure img {
		max-height: 320px;
	}
}
